]> granicus.if.org Git - php/log
php
5 years agoCleanup return values for Intl when parameter parsing is unsuccessful
Máté Kocsis [Tue, 29 Oct 2019 14:45:46 +0000 (15:45 +0100)]
Cleanup return values for Intl when parameter parsing is unsuccessful

Closes GH-4871.

5 years agoDon't use chunking for stream writes
Nikita Popov [Thu, 18 Jul 2019 15:02:29 +0000 (17:02 +0200)]
Don't use chunking for stream writes

We're currently splitting up large writes into 8K size chunks, which
adversely affects I/O performance in some cases. Splitting up writes
doesn't make a lot of sense, as we already must have a backing buffer,
so there is no memory/performance tradeoff to be made here.

This change disables the write chunking at the stream layer, but
retains the current retry loop for partial writes. In particular
network writes will typically only write part of the data for large
writes, so we need to keep the retry loop to preserve backwards
compatibility.

If issues due to this change turn up, chunking should be reintroduced
at lower levels where it is needed to avoid issues for specific streams,
rather than unnecessarily enforcing it for all streams.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 30 Oct 2019 10:32:08 +0000 (11:32 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add UPGRADING note for stream_read() change

[ci skip]

5 years agoAdd UPGRADING note for stream_read() change
Nikita Popov [Wed, 30 Oct 2019 10:31:28 +0000 (11:31 +0100)]
Add UPGRADING note for stream_read() change

Ref bug #78575.

[ci skip]

5 years agoAdd more openssl stubs
Rimvydas Zilinskas [Wed, 30 Oct 2019 10:20:48 +0000 (11:20 +0100)]
Add more openssl stubs

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 30 Oct 2019 10:06:59 +0000 (11:06 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Optimize creation of empty arrays in json_decode

5 years agoOptimize creation of empty arrays in json_decode
Tyson Andre [Fri, 25 Oct 2019 23:57:39 +0000 (19:57 -0400)]
Optimize creation of empty arrays in json_decode

Use the shared empty array from ZVAL_EMPTY_ARRAY

For code that created an 10 arrays of 100000 empty arrays
(has the same result with `$assoc=true` and `{}`)

- This is the worst-case comparison, but I'd expect 0-length arrays to be fairly
  common in regular data for json_decode
- The parser implementation was using function pointers so that third party
  extension developers could reuse the json parser for their own
  data structures, etc. (I think).

  This PR is meant to let those third party extensions continue working
  without changes.

Before this patch: In 0.126 seconds: added 97.99 MiB
After this patch:  In 0.096 seconds: added 41.99 MiB

```php
<?php
$json = '[' . str_repeat('[],', 100000) . "null]";
$start_memory = memory_get_usage();
$start_time = microtime(true);
$result = [];
for ($i = 0; $i < 10; $i++) {
    $result[] = json_decode($json);
}
$end_memory = memory_get_usage();
$end_time = microtime(true);
// Before this patch: In 0.126 seconds: added 97.99 MiB
// After this patch:  In 0.096 seconds: added 41.99 MiB
printf("In %.3f seconds: added %.2f MiB\n", $end_time - $start_time, ($end_memory - $start_memory)/1000000);

// For objects
$json = '[' . str_repeat('{},', 100000) . "null]";
$start_memory = memory_get_usage();
$start_time = microtime(true);
for ($i = 0; $i < 10; $i++) {
    $result[] = json_decode($json, true);
}
$end_memory = memory_get_usage();
$end_time = microtime(true);
// Before this patch: In 0.126 seconds: added 97.99 MiB
// After this patch:  In 0.096 seconds: added 41.99 MiB
printf("In %.3f seconds: added %.2f MiB (objects decoded as arrays) \n", $end_time - $start_time, ($end_memory - $start_memory)/1000000);
```

Closes GH-4861.

5 years agoMake "unterminated comment" into a parse error
Nikita Popov [Wed, 30 Oct 2019 10:00:27 +0000 (11:00 +0100)]
Make "unterminated comment" into a parse error

5 years agoWarn on strtr(["" => "x"])
Nikita Popov [Mon, 7 Oct 2019 11:04:06 +0000 (13:04 +0200)]
Warn on strtr(["" => "x"])

Previously:
 * If only ["" => "x"] was present, the original string was returned
   without warning.
 * If both ["" => "x"] and at least one more element was present,
   false was returned without warning.

New behavior:
 * Ignore "" keys in the replacement array (and perform any remaining
   replacement).
 * Throw a warning indicating that an empty string replacement has
   been ignored.

Closes GH-4792.

5 years agoPromote mt_rand() min/max warning to ValueError
Nikita Popov [Wed, 30 Oct 2019 09:36:42 +0000 (10:36 +0100)]
Promote mt_rand() min/max warning to ValueError

5 years agoAdd stubs for various standard functions
Máté Kocsis [Wed, 23 Oct 2019 12:46:59 +0000 (14:46 +0200)]
Add stubs for various standard functions

Closes GH-4851.

5 years agoUse ArgumentCountError in IntlGregorianCalendar ctor
Nikita Popov [Tue, 29 Oct 2019 23:48:28 +0000 (19:48 -0400)]
Use ArgumentCountError in IntlGregorianCalendar ctor

5 years agoUpdate documentation/comment for GH-4860
Tyson Andre [Tue, 29 Oct 2019 23:48:28 +0000 (19:48 -0400)]
Update documentation/comment for GH-4860

Fix folding for the new helper method.

Clarify comment in UPGRADING:
The performance on associative arrays would also improve,
as long as no offsets were unset (no gaps).
Packed arrays can have gaps.

Closes GH-4873.
[ci skip]

5 years agoAdd stubs for directory and file functions
Máté Kocsis [Mon, 28 Oct 2019 17:56:49 +0000 (18:56 +0100)]
Add stubs for directory and file functions

5 years agoDon't check $this existence in object opcodes
Nikita Popov [Wed, 13 Feb 2019 10:37:32 +0000 (11:37 +0100)]
Don't check $this existence in object opcodes

We are now guaranteed that $this always exists inside methods, as
well as insides closures (if they use $this at all).

This removes checks for $this existence from the individual object
opcodes. Instead ZEND_FETCH_THIS is used in the cases where $this
is not guaranteed to exist, which is mainly the pseudo-main scope.

Closes GH-3822.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 30 Oct 2019 08:23:23 +0000 (09:23 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add missing refcount increment

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 30 Oct 2019 08:23:06 +0000 (09:23 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add missing refcount increment

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 30 Oct 2019 08:22:37 +0000 (09:22 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Add missing refcount increment

5 years agoAdd missing refcount increment
Nikita Popov [Wed, 30 Oct 2019 08:22:20 +0000 (09:22 +0100)]
Add missing refcount increment

5 years agoFix bug #78681 by renaming libphp8.so to libphp.so
Nikita Popov [Tue, 29 Oct 2019 15:01:59 +0000 (16:01 +0100)]
Fix bug #78681 by renaming libphp8.so to libphp.so

The major version number is no longer included.

5 years agoAllow to call XMLReader::open() and ::XML() statically
Christoph M. Becker [Fri, 11 Oct 2019 14:41:07 +0000 (16:41 +0200)]
Allow to call XMLReader::open() and ::XML() statically

The implementation of `XMLReader::open()` and `XMLReader::XML()` still
supports calling the methods statically and non-statically.  However,
as of PHP 8.0.0, calling these methods statically is not allowed,
because they are not declared as static methods.  Since we consider it
to be cleaner to call these methods statically, but had deprecated to
call them statically, we properly support both variants.

We implement support for static and non-static calls by overloading, so
that non-static calls have access to the `$this` pointer.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 29 Oct 2019 14:08:03 +0000 (15:08 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78689

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 29 Oct 2019 14:07:28 +0000 (15:07 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78689

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 29 Oct 2019 14:06:28 +0000 (15:06 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fixed bug #78689

5 years agoFixed bug #78689
Nikita Popov [Tue, 29 Oct 2019 14:05:59 +0000 (15:05 +0100)]
Fixed bug #78689

5 years agoRemove some RETURN_FALSE on exception
Nikita Popov [Tue, 29 Oct 2019 12:36:03 +0000 (13:36 +0100)]
Remove some RETURN_FALSE on exception

5 years agoAdd Z_PARAM_STRING/ARRAY_OR_NULL convenience macros
Nikita Popov [Tue, 29 Oct 2019 12:29:52 +0000 (13:29 +0100)]
Add Z_PARAM_STRING/ARRAY_OR_NULL convenience macros

5 years agoDon't accept objects for options in password_hash()
Nikita Popov [Tue, 29 Oct 2019 12:20:22 +0000 (13:20 +0100)]
Don't accept objects for options in password_hash()

This was likely a mixup of zpp modifiers in the original implementation.
Per the RFC only arrays should be accepted here.

5 years agoPromote base_convert "invalid base" errors to ValueError
Nikita Popov [Tue, 29 Oct 2019 12:12:37 +0000 (13:12 +0100)]
Promote base_convert "invalid base" errors to ValueError

5 years agoThrow "Unsupported operand types" error when using ** on arrays
Nikita Popov [Tue, 29 Oct 2019 12:05:02 +0000 (13:05 +0100)]
Throw "Unsupported operand types" error when using ** on arrays

5 years agoExpect number argument in round()
Nikita Popov [Tue, 29 Oct 2019 11:49:42 +0000 (12:49 +0100)]
Expect number argument in round()

5 years agoConvert phpdbg arginfo to php stubs
Craig Duncan [Sun, 27 Oct 2019 21:46:11 +0000 (21:46 +0000)]
Convert phpdbg arginfo to php stubs

Closes GH-4867.

5 years agoSmall phpdbg cleanups
Nikita Popov [Tue, 29 Oct 2019 10:39:02 +0000 (11:39 +0100)]
Small phpdbg cleanups

Add a zpp_none() call, convert E_ERROR to ValueError.

5 years agoSmall ext/dom cleanups
Nikita Popov [Tue, 29 Oct 2019 10:15:08 +0000 (11:15 +0100)]
Small ext/dom cleanups

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 29 Oct 2019 09:07:22 +0000 (10:07 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Skip test case on non Windows platforms

5 years agoSkip test case on non Windows platforms
Christoph M. Becker [Tue, 29 Oct 2019 09:05:31 +0000 (10:05 +0100)]
Skip test case on non Windows platforms

5 years agoTry to fix asan warning in scalar_constant_defaults.phpt
Nikita Popov [Tue, 29 Oct 2019 08:57:29 +0000 (09:57 +0100)]
Try to fix asan warning in scalar_constant_defaults.phpt

Doing the SAVE_VALID_OPLINE right before the call, because we
still need r0 before that.

5 years agoMerge branch 'PHP-7.4'
Derick Rethans [Tue, 29 Oct 2019 09:00:45 +0000 (09:00 +0000)]
Merge branch 'PHP-7.4'

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 29 Oct 2019 08:57:27 +0000 (09:57 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Skip test case on non Windows platforms

5 years agoSkip test case on non Windows platforms
Christoph M. Becker [Tue, 29 Oct 2019 08:53:44 +0000 (09:53 +0100)]
Skip test case on non Windows platforms

5 years agoTry to fix 32-bit fprintf test
Nikita Popov [Tue, 29 Oct 2019 08:52:46 +0000 (09:52 +0100)]
Try to fix 32-bit fprintf test

5 years agoUpdate NEWS for 7.4.0RC6
Derick Rethans [Tue, 29 Oct 2019 08:50:32 +0000 (08:50 +0000)]
Update NEWS for 7.4.0RC6

5 years agoUpdate NEWS for PHP 7.4.0RC5
Derick Rethans [Tue, 29 Oct 2019 08:49:13 +0000 (08:49 +0000)]
Update NEWS for PHP 7.4.0RC5

5 years agoFix test cases for master
Christoph M. Becker [Tue, 29 Oct 2019 08:34:15 +0000 (09:34 +0100)]
Fix test cases for master

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 29 Oct 2019 07:58:17 +0000 (08:58 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Implement #78270: Support __vectorcall convention with FFI

5 years agoImplement #78270: Support __vectorcall convention with FFI
Christoph M. Becker [Mon, 14 Oct 2019 12:56:37 +0000 (14:56 +0200)]
Implement #78270: Support __vectorcall convention with FFI

To work around the limitation of the current rudimentary vectorcall
support in our patched libffi, we forbid yet unsupported declarations,
i.e. float/double parameters at certain positions (SIMD vector types
and HVA types are not supported anyway).

5 years agoMerge branch 'PHP-7.4'
Stanislav Malyshev [Tue, 29 Oct 2019 03:47:57 +0000 (20:47 -0700)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Tue, 29 Oct 2019 03:47:50 +0000 (20:47 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Tue, 29 Oct 2019 03:47:44 +0000 (20:47 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release

5 years agoMerge branch 'PHP-7.1' into PHP-7.2
Stanislav Malyshev [Tue, 29 Oct 2019 03:47:30 +0000 (20:47 -0700)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 28 Oct 2019 15:41:16 +0000 (16:41 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add support for Interbase 1 dialect

5 years agoAdd support for Interbase 1 dialect
Simonov Denis [Fri, 25 Oct 2019 16:38:01 +0000 (18:38 +0200)]
Add support for Interbase 1 dialect

5 years agoAdd missing zend_parse_parameters_none()
Christoph M. Becker [Sun, 27 Oct 2019 12:12:45 +0000 (13:12 +0100)]
Add missing zend_parse_parameters_none()

We fix the trivial cases; some others need further discussion, see
<https://news-web.php.net/php.internals/107723>.

5 years agoRemove ability to unbind $this of closures if used
Nikita Popov [Mon, 28 Oct 2019 12:24:07 +0000 (13:24 +0100)]
Remove ability to unbind $this of closures if used

This was deprecated in PHP 7.4, removing it for PHP 8.0.

5 years agoDefine IS_WINDOWS in the test runner
Fabien Villepinte [Mon, 28 Oct 2019 12:14:50 +0000 (13:14 +0100)]
Define IS_WINDOWS in the test runner

Avoid code duplication

Closes GH-4866.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 28 Oct 2019 12:09:44 +0000 (13:09 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 28 Oct 2019 12:09:11 +0000 (13:09 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 28 Oct 2019 12:08:06 +0000 (13:08 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable

5 years agoFix #78751: Serialising DatePeriod converts DateTimeImmutable
Christoph M. Becker [Fri, 25 Oct 2019 13:43:38 +0000 (15:43 +0200)]
Fix #78751: Serialising DatePeriod converts DateTimeImmutable

When getting the properties of a DatePeriod instance we have to retain
the proper classes, and when restoring a DatePeriod instance we have to
cater to DateTimeImmutable instances as well.

5 years agoElevate warnings to Error Exceptions in ext/bcmath
Christoph M. Becker [Mon, 28 Oct 2019 10:59:20 +0000 (11:59 +0100)]
Elevate warnings to Error Exceptions in ext/bcmath

`bcdiv()` and `bcmod()` throw DivisionByZeroError if the divisor is 0,
which matches the behavior of the `/` and `%` operators, and `bcsqrt()`
throws ValueError for negative operands.

5 years agoConvert warnings to Errors in sprintf() functions
kharhamel [Tue, 15 Oct 2019 15:51:39 +0000 (17:51 +0200)]
Convert warnings to Errors in sprintf() functions

Closes GH-4837.

5 years agoFix miscellaneous typos in docs and error messages
Tyson Andre [Sun, 27 Oct 2019 03:44:36 +0000 (23:44 -0400)]
Fix miscellaneous typos in docs and error messages

Closes GH-4863.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 28 Oct 2019 10:42:57 +0000 (11:42 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove redundant variable rv and optimize code

5 years agoRemove redundant variable rv and optimize code
ZiMuyang [Sun, 27 Oct 2019 15:21:31 +0000 (23:21 +0800)]
Remove redundant variable rv and optimize code

Closes GH-4864.

5 years agoOptimize array_slice for packed arrays with large offsets
Tyson Andre [Fri, 25 Oct 2019 13:31:06 +0000 (09:31 -0400)]
Optimize array_slice for packed arrays with large offsets

If the offset is 100000, and there are no gaps in the packed/unpacked array,
then advance the pointer once by 100000,
instead of looping and skipping 100000 times.

Add a new test of array_slice handling unset offsets.

Closes GH-4860.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 28 Oct 2019 09:28:24 +0000 (10:28 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #78752

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 28 Oct 2019 09:28:14 +0000 (10:28 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #78752

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 28 Oct 2019 09:27:46 +0000 (10:27 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix bug #78752

5 years agoFix bug #78752
Nikita Popov [Mon, 28 Oct 2019 09:23:20 +0000 (10:23 +0100)]
Fix bug #78752

NULL out the execute_data before destroying it, otherwise GC may
trigger while the execute_data is partially destroyed, resulting
in double-frees.

The handling of call stack unfreezing is a bit awkward because it's
a ZEND_API function, so we can't change the signature.

5 years agoFix libmagic buffer overflow issue (CVE-2019-18218)
Stanislav Malyshev [Sun, 27 Oct 2019 23:30:38 +0000 (16:30 -0700)]
Fix libmagic buffer overflow issue (CVE-2019-18218)

Ported from https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84

5 years agoRevert "Add missing zend_parse_parameters_none()"
Christoph M. Becker [Sun, 27 Oct 2019 12:41:41 +0000 (13:41 +0100)]
Revert "Add missing zend_parse_parameters_none()"

This reverts commit ef439ec895a97a12e8f88c3371dfc8881a501649.
Test failures need to be resolved first.

5 years agoAdd missing zend_parse_parameters_none()
Christoph M. Becker [Sun, 27 Oct 2019 12:12:45 +0000 (13:12 +0100)]
Add missing zend_parse_parameters_none()

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Sun, 27 Oct 2019 08:36:44 +0000 (09:36 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Try one more FD in ext/standard/tests/file/php_fd_wrapper_04.phpt

5 years agoTry one more FD in ext/standard/tests/file/php_fd_wrapper_04.phpt
Nikita Popov [Sun, 27 Oct 2019 08:33:46 +0000 (09:33 +0100)]
Try one more FD in ext/standard/tests/file/php_fd_wrapper_04.phpt

For some reason FD 120 seems to exist on macos quite often, while
FD 12 did not... Let's try an even larger number, otherwise we
should just drop this test.

5 years agoRemove generic type annotations
Christoph M. Becker [Sat, 26 Oct 2019 14:24:02 +0000 (16:24 +0200)]
Remove generic type annotations

Cf. <https://github.com/php/php-src/commit/de69a9d3ebad41da9bc7c59f836bb141f0af70f8#r35675846>.

5 years agoFix and make reflection arginfo stubs more specific
Christoph M. Becker [Sat, 26 Oct 2019 14:15:19 +0000 (16:15 +0200)]
Fix and make reflection arginfo stubs more specific

5 years agoMerge branch 'PHP-7.4'
Fabien Villepinte [Sat, 26 Oct 2019 14:08:00 +0000 (16:08 +0200)]
Merge branch 'PHP-7.4'

5 years agoReplace EXPECTF by EXPECT
Fabien Villepinte [Sat, 26 Oct 2019 14:05:02 +0000 (16:05 +0200)]
Replace EXPECTF by EXPECT

In ext/dom all the tests with a EXPECTF section
starting by "Fatal error: Uncaught" have been updated
to use the faster EXPECT

5 years agoImprove reflection arginfo stubs
Christoph M. Becker [Sat, 26 Oct 2019 10:29:18 +0000 (12:29 +0200)]
Improve reflection arginfo stubs

5 years agoAdd stubs for ext-reflection
Thomas Gerbet [Sun, 13 Oct 2019 18:57:09 +0000 (20:57 +0200)]
Add stubs for ext-reflection

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 25 Oct 2019 14:38:13 +0000 (16:38 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add ARM64 CI to Travis

5 years agoAdd ARM64 CI to Travis
Nikita Popov [Wed, 23 Oct 2019 10:58:21 +0000 (12:58 +0200)]
Add ARM64 CI to Travis

We need to install a number of additional packages that are installed
by default on the AMD64 workers.

We also have to manually set up the MySQL user.

For now we don't set up Postgres -- if anyone wants to figure that
out, it would be great ;)

Log redirections in compile.sh are removed, because /dev/stdout is
not accessible. We don't see to use this anyway.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 25 Oct 2019 14:32:14 +0000 (16:32 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #78226: Don't call __set() on uninitialized typed properties

5 years agoFix bug #78226: Don't call __set() on uninitialized typed properties
Nikita Popov [Thu, 24 Oct 2019 14:36:25 +0000 (16:36 +0200)]
Fix bug #78226: Don't call __set() on uninitialized typed properties

Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are still triggered if
the property is explicitly unset().

This gives us both the behavior people generally expect, and still
allows ORMs to do lazy initialization by unsetting properties.

For PHP 8, we should fine a way to forbid unsetting of declared
properties entirely, and provide a different way to achieve lazy
initialization.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 25 Oct 2019 10:53:24 +0000 (12:53 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #78747

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 25 Oct 2019 10:50:26 +0000 (12:50 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78747

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Fri, 25 Oct 2019 10:50:12 +0000 (12:50 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fixed bug #78747

5 years agoFixed bug #78747
Nikita Popov [Fri, 25 Oct 2019 10:47:18 +0000 (12:47 +0200)]
Fixed bug #78747

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 25 Oct 2019 09:41:41 +0000 (11:41 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Optimize VERIFY_RETURN_TYPE for TMP operands as well

5 years agoOptimize VERIFY_RETURN_TYPE for TMP operands as well
Nikita Popov [Fri, 25 Oct 2019 09:37:19 +0000 (11:37 +0200)]
Optimize VERIFY_RETURN_TYPE for TMP operands as well

Only exclude CONST operands, which use a different instruction
format (they have a return operand).

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 25 Oct 2019 09:25:49 +0000 (11:25 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Check class linking in VERIFY_RETURN_TYPE optimization
  Simplify travis setup scripts

5 years agoCheck class linking in VERIFY_RETURN_TYPE optimization
Nikita Popov [Fri, 25 Oct 2019 09:24:32 +0000 (11:24 +0200)]
Check class linking in VERIFY_RETURN_TYPE optimization

instanceof_function() requires linked classes. I'm not reusing
unlinked_instanceof() here, because it performs class loading,
which wouldn't be right here, I think.

5 years agoSimplify travis setup scripts
Nikita Popov [Fri, 25 Oct 2019 09:14:56 +0000 (11:14 +0200)]
Simplify travis setup scripts

Reduce duplication.

5 years agoOptimize instanceof_function
Nikita Popov [Fri, 25 Oct 2019 08:45:42 +0000 (10:45 +0200)]
Optimize instanceof_function

Split out the simple equality check into an inline function --
this is one of the common cases.

Replace instanceof_function_ex with zend_class_implements_interface.
There are a few more places where it may be used.

5 years agoCheck type is set when verifying variadic args
Nikita Popov [Fri, 25 Oct 2019 08:27:45 +0000 (10:27 +0200)]
Check type is set when verifying variadic args

Weird that there was no test for this...

This code is somewhat inefficient, because it will be performed
for every arg, rather than only once.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 25 Oct 2019 08:20:19 +0000 (10:20 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove recursive check from instanceof_interface

5 years agoRemove recursive check from instanceof_interface
Nikita Popov [Thu, 24 Oct 2019 16:11:41 +0000 (18:11 +0200)]
Remove recursive check from instanceof_interface

Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.

Only exception are instanceof checks performed during inheritance
itself. However, we already have unlinked_instanceof for this
purpose, it just needs to be taught to handle this case.

Closes GH-4857.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 24 Oct 2019 15:50:53 +0000 (17:50 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Optimize instanceof_class/interface

5 years agoOptimize instanceof_class/interface
Nikita Popov [Thu, 24 Oct 2019 15:47:35 +0000 (17:47 +0200)]
Optimize instanceof_class/interface

instanceof_class does not need to check for a NULL pointer in the
first iteration -- passing NULL to this function is illegal.

instanceof_interface does not need to use instanceof_class(), it
only has to check whether the CEs match exactly. There is no way
for an interface to appear inside "parent", it will always be in
"interfaces" only.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 24 Oct 2019 15:42:04 +0000 (17:42 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Clean up and clarify instanceof_function_ex()