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

don't use eventName as parameter and variable #1393

Merged
merged 1 commit into from Feb 8, 2016
Merged

Conversation

xabbuh
Copy link

@xabbuh xabbuh commented Feb 8, 2016

Using $eventName for both as function parameter and in the use statement will fail on PHP 7.1 with a message like "Cannot use lexical variable $eventName as a parameter name" (see symfony/symfony-installer#237).

There also is a test in the test suite for PHP 7.1 ensuring that such a fatal error is triggered: https://github.com/php/php-src/blob/master/Zend/tests/closure_use_parameter_name.phpt

@jeremeamia
Copy link
Member

It seems like having the $eventName parameters in the original code was probably a mistake anyway.

@cmeury
Copy link

cmeury commented Jun 9, 2017

This fix seems to be present in the 5.3.1 release only:

$ git tag --contains fcae91ff31de41e312fe113ec3acbcda31b2622e
5.3.1

Shouldn't it be also merged to 6.x?

@sagikazarmark
Copy link
Member

Guzzle 6 is middleware based, there are no events anymore.

@cmeury
Copy link

cmeury commented Jun 9, 2017

I see, thanks!

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.

None yet

5 participants