Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix named parameters confusion with PHP 8 #282

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

remicollet
Copy link
Contributor

Without this fix:

PHP Fatal error:  Uncaught Error: Unknown named parameter $stop-on-failure in /work/GIT/php-compat-info/src/Bartlett/CompatInfo/Console/CommandFactory.php:320
Stack trace:
#0 /work/GIT/php-compat-info/src/Bartlett/CompatInfo/Console/CommandFactory.php(320): call_user_func_array()
#1 /work/GIT/php-compat-info/vendor/symfony/console/Command/Command.php(256): Bartlett\CompatInfo\Console\CommandFactory->Bartlett\CompatInfo\Console\{closure}()
#2 /work/GIT/php-compat-info/vendor/symfony/console/Application.php(938): Symfony\Component\Console\Command\Command->run()
#3 /work/GIT/php-compat-info/vendor/symfony/console/Application.php(266): Symfony\Component\Console\Application->doRunCommand()
#4 /work/GIT/php-compat-info/src/Bartlett/CompatInfo/Console/Application.php(217): Symfony\Component\Console\Application->doRun()
#5 /work/GIT/php-compat-info/vendor/symfony/console/Application.php(142): Bartlett\CompatInfo\Console\Application->doRun()
#6 /work/GIT/php-compat-info/src/Bartlett/CompatInfo/Console/Application.php(192): Symfony\Component\Console\Application->run()
#7 /work/GIT/php-compat-info/bin/phpcompatinfo(27): Bartlett\CompatInfo\Console\Application->run()
#8 {main}
  thrown in /work/GIT/php-compat-info/src/Bartlett/CompatInfo/Console/CommandFactory.php on line 320

Fo the is_callable call, need to understand why syntax_only is now required

@remicollet remicollet changed the title fix named pamareters confusion with PHP 8 fix named parameters confusion with PHP 8 Oct 2, 2020
fix is_callable call, failing with PHP8 for non-static method

x
@remicollet
Copy link
Contributor Author

is_callable change explanation:

is_callable fails when an object is not given (looks like he believes we are testing a static call), so checking with an object instead of class-name fixes this issue.

@remicollet
Copy link
Contributor Author

And for completeness
php/php-src#6263

@llaville llaville merged commit 28974d6 into llaville:master Oct 2, 2020
@remicollet remicollet deleted the issue-php8rc1 branch October 3, 2020 05:25
@llaville
Copy link
Owner

llaville commented Oct 6, 2020

@remicollet we have the same issue on PHP Reflect 4.4.0; FYI I'm prepare a release 4.4.1 to fix it and allows PHP 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants