-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
EasyAdmin is not compatible with RoadRunner PHP app server #5591
Comments
👍 |
That isn't so much about EAB but Twig, or more so how your application uses it. EAB registers From my experience this will cause problems with a lot of libraries, as adding Twig globals in |
@speller thanks for reporting this, but I'm afraid we can't do anything on our side. We don't use RoadRunner and we don't have resources to try it or debug this. Luckily, according to @kiler129 message, this could be not an issue with EasyAdmin itself but more related to Twig global variables. I hope you can find a solution, even if it's a bit hackish. Sorry! |
@javiereguiluz probably EA shouldn't use twig globals to store context data |
Related issue twigphp/Twig#4007 I think we need to modify the way the global variable is declared. The Twig environment should not be initialized differently depending on the request. EasyAdminBundle/src/Twig/EasyAdminTwigExtension.php Lines 68 to 74 in f63e526
The
This function signature would require the current request from the global # src/Resources/views/crud/field/array.html.twig
- {% if ea.crud.currentAction == 'detail' %}
+ {% if ea_context(app.request).crud.currentAction == 'detail' %} @javiereguiluz Can you re-open this issue please. |
Describe the bug
RoadRunner is a powerful replacement to the standard FPM which keeps PHP processes running. This makes PHP apps lightning-fast. The only drawback is that all PHP code must be stateless and not rely on global and static variables, all objects must be destroyed after the request. EasyAdmin seems to be not following these requirements and admin pages fail randomly with the following error:
To Reproduce
Try using easyadmin under RR.
It would be nice if EA will fix this.
The text was updated successfully, but these errors were encountered: