Skip to content

Commit

Permalink
Fixed deprecation warning in DisableConstructorPatch.php
Browse files Browse the repository at this point in the history
Fixes the "Use of "parent" in callables is deprecated" deprecation error when a constructor with arguments is used.
See [PHP RFC: Deprecate partially supported callables](https://wiki.php.net/rfc/deprecate_partially_supported_callables).
  • Loading branch information
singinwhale authored Dec 21, 2023
1 parent d4f454f commit dae7a95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function apply(ClassNode $node)

$constructor->setCode(<<<PHP
if (0 < func_num_args()) {
call_user_func_array(array('parent', '__construct'), func_get_args());
call_user_func_array(array(parent::class, '__construct'), func_get_args());
}
PHP
);
Expand Down

0 comments on commit dae7a95

Please sign in to comment.