1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00
Commit Graph

112986 Commits

Author SHA1 Message Date
Nikita Popov d1157cbce1 Relax closure $this unbinding deprecation
Only deprecate unbinding of $this from a closure if $this is
syntactically used within the closure.

This is desired to support Laravel's macro system, see laravel/framework#29482.

This should still allow us to implement the performance improvements
we're interested in for PHP 8, without breaking existing use-cases.
2019-08-23 17:21:23 +02:00
Nikita Popov 8807889ac2 Fix arginfo leak when using disabled_classes
Also remove the hack where scope is set to NULL in order to make
free_internal_arg_info work. Instead explicitly call it for class
methods.

This fixes the asan build for Zend/tests/bug77494.phpt.
2019-08-23 17:00:59 +02:00
Nikita Popov 7910f128e2 Fix noalias violation in select call 2019-08-23 16:18:59 +02:00
Nikita Popov 6534ff13cd Avoid strncat use in proc_open
Instead manually manage the insertion position.
2019-08-23 16:18:59 +02:00
Nikita Popov 724a4662b8 Replace strncat in filter implementation
In this case we already know exactly where we need to write, no
need to use strncat at all.
2019-08-23 16:18:50 +02:00
Nikita Popov 9173c21a35 Support variable element size in spl heap implementation
This allows us to drop the intermediate allocation for
spl_pqueue_elem.

This fixes GC for SplPriorityQueue, because we can now directly
return a well-formed GC child buffer.
2019-08-23 15:29:53 +02:00
Nikita Popov 13e92223c0 Fixed bug #78436 2019-08-23 15:27:28 +02:00
Christoph M. Becker 514be3ff87 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77812: Interactive mode does not support PHP 7.3-style heredoc
2019-08-23 14:04:31 +02:00
Christoph M. Becker 03c7749dc8 Fix #77812: Interactive mode does not support PHP 7.3-style heredoc
As of PHP 7.3.0, the rules regarding the heredoc and nowdoc closing
identifier have been relaxed.  While formerly, the closing identifier
was required to be placed at the beginning of a line and to be
immediately followed by (a semicolon and) a line break, it may now be
preceeded by whitespace, and may be followed by any non-word character.
We adjust the recognition logic respectively.
2019-08-23 13:59:10 +02:00
Christoph M. Becker eeb910911d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Suppress deprecation warning on IDNA2003 ICU methods for clang
2019-08-23 12:22:28 +02:00
Christoph M. Becker c9d31941e4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Suppress deprecation warning on IDNA2003 ICU methods for clang
2019-08-23 12:21:57 +02:00
Christoph M. Becker ff7029b65b Suppress deprecation warning on IDNA2003 ICU methods for clang 2019-08-23 12:18:58 +02:00
Christoph M. Becker ca265eb545 Fix #78438: Corruption when __unserializing deeply nested structures
When storing two temporary variables for delayed __unserialize() calls,
we have to make sure that both fit into the same linked list element.
To that end we introduce the internal API `tmp_var` which allows to
reserve `num` slots in the same list element.

We also fix the `var_dtor_entries` struct definition to use the proper
size, namely `VAR_DTOR_ENTRIES_MAX`.
2019-08-23 11:41:06 +02:00
Christoph M. Becker 69ba2b98d1 Fix var_unserializer debug code
At least it now compiles and should be free of warnings.
2019-08-22 15:58:51 +02:00
Christoph M. Becker 1eb75f2937 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78441: Parse error due to heredoc identifier followed by digit
2019-08-21 22:54:52 +02:00
Christoph M. Becker 310708845f Fix #78441: Parse error due to heredoc identifier followed by digit
Since digits are allowed for identifiers, we have to cater to them as
well.
2019-08-21 22:51:51 +02:00
George Peter Banyard 01996c4b69 Remove dead code in base64.c 2019-08-20 21:42:06 +02:00
Remi Collet 15dcc1817d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  ensure proper settings for test
2019-08-20 16:31:11 +02:00
Remi Collet 08aafbe93e ensure proper settings for test 2019-08-20 16:30:52 +02:00
Derick Rethans cf678da52d Update NEWS for 7.4.0RC1 2019-08-20 14:10:36 +00:00
Derick Rethans b3561e9329 Update NEWS for PHP 7.4.0beta4 2019-08-20 14:09:17 +00:00
Christoph M. Becker c03114e55c Fix #78386: fstat mode has unexpected value on PHP 7.4
We must not assume that any file which is not a directory is a regular
file.  Therefore we employ `GetFileType()` in this case to properly
distinguish between character special, FIFO special and regular files.
2019-08-20 16:04:14 +02:00
Christoph M. Becker ae923287ca Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Don't use C++ style comments
2019-08-20 13:58:54 +02:00
Christoph M. Becker 963b40c9a8 Don't use C++ style comments
Cf. <https://github.com/php/php-src/blob/f45b61b8988b5b2d80dd4a1df7edd04282cf319a/CODING_STANDARDS.md#syntax-and-indentation>

cc @mcmic
2019-08-20 13:58:22 +02:00
Christoph M. Becker a18f53ec2c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix the problem for connect_attr, set db condition, and add a new attribute _server_host
2019-08-20 13:35:17 +02:00
Christoph M. Becker 3771d66142 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix the problem for connect_attr, set db condition, and add a new attribute _server_host
2019-08-20 13:33:45 +02:00
Qianqian Bu cdf16c010a fix the problem for connect_attr, set db condition, and add a new attribute _server_host 2019-08-20 13:31:58 +02:00
Christoph M. Becker 3775d47eee Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78220: Can't access OneDrive folder
2019-08-19 19:58:45 +02:00
Christoph M. Becker 5e19f1d458 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78220: Can't access OneDrive folder
2019-08-19 19:57:22 +02:00
Christoph M. Becker 81f52158b4 Fix #78220: Can't access OneDrive folder
As of Windows 1903, when the OneDrive on-demand feature is enabled, the
OneDrive folder is reported as reparse point by `FindFirstFile()`, but
trying to get information about the reparse point using
`DeviceIoControl()` fails with `ERROR_NOT_A_REPARSE_POINT`.  We work
around this problem by falling back to `GetFileInformationByHandle()`
if that happens, but only if the reparse point is reported as cloud
reparse point, and only if PHP is running on Windows 1903 or later.

The patch has been developed in collaboration with ab@php.net.

We should keep an eye on the somewhat quirky OneDrive behavior, since
it might change again in a future Windows release.
2019-08-19 19:55:35 +02:00
Nikita Popov 86d751f696 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-17 10:59:52 +02:00
Nikita Popov be7e819068 Fixed bug #77922
In PHP 7.3 shadow properties are no longer duplicated. Make sure we
only release them if the property was defined on the parent class,
which means that it changed from private->shadow, which is where
duplication does happen.
2019-08-17 10:58:54 +02:00
Sara Golemon bd62f5ac47 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Suppress deprecation warning on IDNA2003 ICU methods
2019-08-16 12:41:32 -04:00
Sara Golemon a192499d2a Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Suppress deprecation warning on IDNA2003 ICU methods
2019-08-16 12:41:02 -04:00
Sara Golemon 725f439778 Suppress deprecation warning on IDNA2003 ICU methods 2019-08-16 12:40:20 -04:00
Sara Golemon 4d3be2a995 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Revert "Move to non deprecated API on suitable ICU versions"
2019-08-16 11:40:01 -04:00
Sara Golemon 9b9814fa77 Revert "Move to non deprecated API on suitable ICU versions"
This reverts commit 13a2f2d041.

The APIs used by this commit aren't entirely equivalent to the original ones.
2019-08-16 11:39:05 -04:00
Jan Altensen 0b6d869d7c appveyor: exclude some documentation paths
Change-Id: Ifff234133f4437bfe5c31c1f1e00092cd60e1d53
2019-08-15 18:19:15 +02:00
Christoph M. Becker b1c4e0be89 Empty merge 2019-08-15 15:30:03 +02:00
Christoph M. Becker 4966647443 Update NEWS
This fix has been cherry-picked into PHP-7.3.9.
2019-08-15 15:28:52 +02:00
Nikita Popov 34885408db Fixed bug #78409
This removes an incorrect optimization (I think this code used to be
necessary to properly handle references in the Serializable based
implementation, but now this code just avoids an array duplication
in a way that is not sound).
2019-08-15 10:40:28 +02:00
Christoph M. Becker 65ea6bbdc6 Empty merge 2019-08-14 19:25:48 +02:00
Christoph M. Becker 8fb297cd82 Update credits_ext.h 2019-08-14 19:24:16 +02:00
Nikita Popov 80a2bfafa4 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-14 17:53:24 +02:00
Nikita Popov c238b5bbef Fix reference printing in GC tracing 2019-08-14 17:51:41 +02:00
Nikita Popov 1166359acb Merge branch 'PHP-7.2' into PHP-7.3 2019-08-14 17:51:35 +02:00
Nikita Popov fcabe7e5e4 Fixed bug #78412
$this should only be included in the generator GC buffer, if it
will be released on destruction.
2019-08-14 17:50:58 +02:00
Sara Golemon 2f13f65706 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Bump for 7.2.23
2019-08-13 19:34:26 -04:00
Sara Golemon e5da73d1f2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Bump for 7.2.23
2019-08-13 19:34:12 -04:00
Sara Golemon 4b64d47c99 Bump for 7.2.23 2019-08-13 19:32:12 -04:00