Skip to content

Commit 54863f4

Browse files
gen_stub: Update PHP-Parser to 5.6.0 (#19271)
Includes support for declaring functions named `clone`, so update the stub file where `clone` is declared to remove the `_clone` workaround.
1 parent 712508f commit 54863f4

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Zend/zend_builtin_functions.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class stdClass
88
}
99

1010
/** @refcount 1 */
11-
function _clone(object $object, array $withProperties = []): object {}
11+
function clone(object $object, array $withProperties = []): object {}
1212

1313
function exit(string|int $status = 0): never {}
1414

Zend/zend_builtin_functions_arginfo.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/gen_stub.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,9 +959,6 @@ class FunctionName implements FunctionOrMethodName {
959959
private /* readonly */ Name $name;
960960

961961
public function __construct(Name $name) {
962-
if ($name->name === '_clone') {
963-
$name = new Name('clone', $name->getAttributes());
964-
}
965962
$this->name = $name;
966963
}
967964

@@ -6059,7 +6056,7 @@ function initPhpParser() {
60596056
}
60606057

60616058
$isInitialized = true;
6062-
$version = "5.5.0";
6059+
$version = "5.6.0";
60636060
$phpParserDir = __DIR__ . "/PHP-Parser-$version";
60646061
if (!is_dir($phpParserDir)) {
60656062
installPhpParser($version, $phpParserDir);

0 commit comments

Comments
 (0)