phpspec / prophecy

Highly opinionated mocking framework for PHP 5.3+
MIT License
8.53k stars 241 forks source link

Difference between latest release and master #622

Open matejdr opened 5 months ago

matejdr commented 5 months ago

Hi, just got an error Use of "parent" in callables is deprecated today. Then I check the latest code in master and the problem was fixed several months ago👍 But the change does not reflect in the latest release, any reason for that?

https://github.com/phpspec/prophecy/blob/master/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php vs https://github.com/phpspec/prophecy/blob/v1.19.0/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php

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

vs

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