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
Factories definitions using arrow functions ClosureAnalysisException #706
Comments
I think arrow functions are not yet supported by SuperClosure. See jeremeamia/super_closure#112 for the relevant issue. |
Oh yeah good catch! I was using short functions, but did not compile the container so I never saw the exception before. |
Is https://github.com/opis/closure missing this too? |
Ok, SuperClosure just became abandoned (jeremeamia/super_closure@3d2c7f8). @mnapoli opis/closure supports short functions (opis/closure@86fc51f) so PHP-DI should migrate. |
using php-di/slim-bridge V3.0.1 in production. got the same error too
|
Guys, please take a look at #716. I replaced closure |
Hello,
We have been using PHP-DI for around a month in development environment, and everything has been good so far. We tried to save in cache our definitions:
And when
writeProxiesToFile
was being executed, we got the following error:We have tried the same example but without arrow functions, and it's working. So arrow functions are causing the issue, but why? We know context works different using arrow functions, but we're not using $this or anything similar in any of our factories.
PHP Version: 7.4.3
PHP-DI version: 6.0
The text was updated successfully, but these errors were encountered: