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
Static closures resolving #3067
Conversation
f46298d
to
cc67e40
Compare
0221dc4
to
6dc3f36
Compare
/** @var Closure $callable */ | ||
$callable = $callable->bindTo($this->container); | ||
/** @var Closure $bound */ | ||
$bound = @$callable->bindTo($this->container); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't suppress errors in this codebase. This isn't a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know. But there is no legal way to check that Closure is static.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until there is a way to do this without suppressing errors, it will not be merged unfortunately. There is no upside to allowing static closures. This is a micro optimization.
See #3067 (comment) |
Fixes #1636 PHP Warning, wich still actual in all PHP versions.