Commit Graph

118611 Commits

Author SHA1 Message Date
Remi Collet
ebdcdf39ed skip when mbstring missing (no warning) 2020-05-13 10:56:10 +02:00
Gerard Roche
ecc0a87ff2 run-tests: extract usage message
Put the usage message near the top of the script,
into a separate function.

Closes GH-5558.
2020-05-13 09:54:55 +02:00
Gerard Roche
10edee7f03 run-tests: cs fixes (cleanup)
I used php-cs-fixer to do the cs fixes. The configuration I used is
posted below. The reason I disabled some of the rules is because they
create too much noise and would make it difficult to review. But please
feel free to close this PR and run the php-cs-fixer yourself.

    <?php

    $config = PhpCsFixer\Config::create();
    $config->setRiskyAllowed(false);
    $config->setRules([
        '@PSR2' => true,
        '@Symfony' => true,
        'array_syntax' => false,
        'binary_operator_spaces' => false,
        'blank_line_before_statement' => false,
        'concat_space' => false,
        'increment_style' => false,
        'phpdoc_align' => false,
        'single_quote' => false,
        'trailing_comma_in_multiline_array' => false,
        'unary_operator_spaces' => false,
        'yoda_style' => false,
    ]);

    $finder = PhpCsFixer\Finder::create();
    $finder->in(getcwd());

    $finder->exclude('Zend');
    $finder->exclude('build');
    $finder->exclude('ext');
    $finder->exclude('pear');
    $finder->exclude('sapi');
    $finder->exclude('scripts');
    $finder->exclude('win32');

    $config->setFinder($finder);

    return $config;

Closes GH-5557.
2020-05-13 09:52:44 +02:00
Dmitry Stogov
7d66e4f323 Replace zend_jit_trace_info.loop_kind by zend_jit_trace_info.flags 2020-05-13 00:56:04 +03:00
Dmitry Stogov
25b7df4283 Fixed invalid index 2020-05-12 23:45:34 +03:00
Dmitry Stogov
2224f63bb5 Prevent usage of uninitialized class entry 2020-05-12 23:34:07 +03:00
George Peter Banyard
c0997130ec Fix [-Wundef] warning in PHPDBG SAPI 2020-05-12 22:02:51 +02:00
George Peter Banyard
56698afb6d Fix [-Wundef] warning in CLI SAPI 2020-05-12 22:02:12 +02:00
George Peter Banyard
f87743de9f Fix [-Wundef] warning in FPM SAPI 2020-05-12 22:02:03 +02:00
George Peter Banyard
25acc4a6b4 Fix [-Wundef] warning in Zend folder 2020-05-12 22:01:51 +02:00
George Peter Banyard
8e66d22f7e Fix [-Wundef] warning in streams implementation 2020-05-12 22:01:20 +02:00
George Peter Banyard
1df3f97c21 Fix [-Wundef] warning in main folder 2020-05-12 22:01:00 +02:00
Christoph M. Becker
3689807998 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79588: Boolean opcache settings ignore on/off values
2020-05-12 19:50:16 +02:00
Christoph M. Becker
129fd647a1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79588: Boolean opcache settings ignore on/off values
2020-05-12 19:48:12 +02:00
Christoph M. Becker
5bdb4ab786 Fix #79588: Boolean opcache settings ignore on/off values
We should display boolean INI settings as boolean.
2020-05-12 19:44:39 +02:00
Alex Dowad
f152fece02 Test setting SplDoublyLinkedList iterator mode to IT_MODE_LIFO 2020-05-12 17:24:35 +02:00
Alex Dowad
d4d0852c23 SplDoublyLinkedList uses iteration flags in iterator struct
The 'flags' field in spl_dllist_it was formerly unused. This means that if one started to
iterate over an SplDoublyLinkedList using 'foreach', and then *changed* the iteration mode
halfway, the 'foreach' loop would start iterating in the opposite direction. Probably this
was not what was intended.

Therefore, use the 'flags' field in spl_dllist_it for iteration via 'foreach'. For explicit
iteration using methods like '::next()' and '::current()', continue to use the flags in
the SplDoublyLinkedList object itself.
2020-05-12 17:22:31 +02:00
Alex Dowad
9999e7faa3 Remove useless prototype for spl_dllist_get_iterator 2020-05-12 17:21:21 +02:00
Nikita Popov
f83a23e59d Display errors in shutdown function timeout test 2020-05-12 17:14:16 +02:00
Alex Dowad
f0960879e4 zend_timeout is not a signal handler function
The 'int dummy' parameter to this function makes it appear that it was intended as a
signal handler, but it is not being used as such. So remove the redundant parameter.
2020-05-12 17:13:46 +02:00
Nikita Popov
53f5cfd99e Drop multi_convert_* APIs
These are no longer used internally, and I'd rather they weren't
used externally either.
2020-05-12 17:10:06 +02:00
Rod Elias
682e2f6c20 Trim trailing whitespaces and fix code style
Closes GH-5554.
2020-05-12 17:00:11 +02:00
Gerard Roche
16f23cd159 run-tests: remove use of FILE_BINARY constant
The FILE_BINARY (and FILE_TEXT) constants are not really valid or useful
constants. It looks like they were added in 5.2.7 and have "no effect,
and are only available for forward compatibility."

See: https://www.php.net/manual/en/filesystem.constants.php

The default value of the file_put_contents() flags parameter is 0 and
FILE_BINARY is set to 0, so removing it doesn't change functionality.

P.S. Maybe those constants should be deprecated or removed in 8.0.

Closes GH-5556.
2020-05-12 16:59:25 +02:00
Nikita Popov
f07fbfb8a9 Remove zend_qsort
This has been superseded by zend_sort and is no longer used.
2020-05-12 16:57:53 +02:00
Christoph M. Becker
125682f13a Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip test on big-endian architectures
2020-05-12 13:33:06 +02:00
Christoph M. Becker
8623a85cb9 Skip test on big-endian architectures
Due to the memory layout on BE architectures, the address would be
`0x2a00000000` instead of `0x2a` on little-endian architectures.
2020-05-12 13:31:53 +02:00
Dmitry Stogov
650ab370c7 Avoid useless manual instruction encoding 2020-05-12 14:24:13 +03:00
Dmitry Stogov
60090adc6a Move EG(vm_interrupt) checks at the end of the trace loops 2020-05-12 13:35:38 +03:00
Christoph M. Becker
9dcf494e36 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79489: .user.ini does not inherit
2020-05-12 11:49:04 +02:00
Christoph M. Becker
4b0d5e0faf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79489: .user.ini does not inherit
2020-05-12 11:48:36 +02:00
Christoph M. Becker
bdba0cd3d2 Fix #79489: .user.ini does not inherit
On Windows, PATH_TRANSLATED may contain backslashes as well as slashes,
so we must not only check for `DEFAULT_SLASH`.
2020-05-12 11:47:47 +02:00
Christoph M. Becker
cdd0a90992 Merge branch 'PHP-7.4'
* PHP-7.4:
  [ci skip] Update NEWS
2020-05-12 11:19:10 +02:00
Christoph M. Becker
6cb3d5e2c2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Update NEWS
2020-05-12 11:17:33 +02:00
Christoph M. Becker
85e241c35c [ci skip] Update NEWS 2020-05-12 11:16:55 +02:00
Remi Collet
107ef83dd6 Merge branch 'PHP-7.4'
* PHP-7.4:
  bump version to 7.2.32-dev
  Update NEWS
2020-05-12 09:19:51 +02:00
Remi Collet
43f6f263aa Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  bump version to 7.2.32-dev
  Update NEWS
2020-05-12 09:19:36 +02:00
Remi Collet
8f8f32cfaf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  bump version to 7.2.32-dev
  Update NEWS
2020-05-12 09:19:11 +02:00
Remi Collet
4cf8be71df bump version to 7.2.32-dev 2020-05-12 09:16:01 +02:00
Stanislav Malyshev
b4afd21428 Update NEWS 2020-05-11 14:28:51 -07:00
Stanislav Malyshev
c317c420b0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30
2020-05-11 14:21:25 -07:00
Stanislav Malyshev
355e36e4f6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30
2020-05-11 14:20:47 -07:00
Stanislav Malyshev
f43041250f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30
2020-05-11 14:20:41 -07:00
Christoph M. Becker
3c8582ca4b Fix #78876: Long variables cause OOM and temp files are not cleaned
We use the proper type for size calculations, which is `size_t`.
2020-05-11 13:48:40 -07:00
Christoph M. Becker
1c9bd513ac Fix #78875: Long filenames cause OOM and temp files are not cleaned
We must not cast `size_t` to `int` (unless the `size_t` value is
guaranteed to be less than or equal to `INT_MAX`).  In this case we can
declare `array_len` as `size_t` in the first place.
2020-05-11 13:47:38 -07:00
George Peter Banyard
7dd332f110 Refactor mb_substitute_character()
Using the new Fast ZPP API for string|int|null

This also fixes Bug #79448 which was too disruptive to fix in PHP 7.x
2020-05-11 17:30:01 +02:00
Nikita Popov
28af364d2a Deprecate old ReflectionParameter type declaration APIs
This deprecates:

    ReflectionParameter::isArray()
    ReflectionParameter::isCallable()
    ReflectionParameter::getClass()

These APIs have been superseded by ReflectionParameter::getType()
since PHP 7.0. Types introduced since that time are not available
through the old APIs, and their behavior is getting increasingly
confusing. This is how they interact with PHP 8 union types:

 * isArray() will return true if the type is array or ?array,
   but not any other union type
 * Same for isCallable().
 * getClass() will return a class for T|int etc, as long as the
   union only contains a single type. T1|T2 will return null.

This behavior is not particularly reasonable or useful, and will
get more confusing as new type system extensions are added.

Closes GH-5209.
2020-05-11 17:01:40 +02:00
George Peter Banyard
4865592525 Remove old ARG_COUNT() macro
Use ZEND_NUM_ARGS() instead.

Clsoes GH-5551
2020-05-11 16:52:04 +02:00
Christoph M. Becker
43eca196e7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79571: FFI: var_dumping unions may segfault
2020-05-11 16:25:30 +02:00
Christoph M. Becker
d5300873c5 Fix #79571: FFI: var_dumping unions may segfault
We must not attempt to access arbitrary union members when retrieving
debug info, because that may not be valid.  Therefore we do no longer
dereference pointer types inside of unions, but report their address as
string in `%p` format instead.
2020-05-11 16:24:46 +02:00
Christoph M. Becker
6549891602 Update AppVeyor for enchant-2
Cf. <df5a4586e0>
2020-05-11 16:18:03 +02:00