You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The static create() method would then get the container from the app, twig from the container, and the route parser from the app (via route collector). Of course, the method would throw exceptions whenever anything is missing (no container, twig not found, etc.).
The text was updated successfully, but these errors were encountered:
This issue is similar to slimphp/Slim#2762.
With the solution proposed in slimphp/Slim#2762 (comment), a user could for example just write
and only
AppFactory
needs to be imported. That is pretty nice for these two internal slim middlewares.I wonder if we could simplify the other middlewares as well. I mean, for example, to add the twig middleware, a user has to write the following code.
We could for example let the user add twig to the container and then he/she can simply call
The static
create()
method would then get the container from the app, twig from the container, and the route parser from the app (via route collector). Of course, the method would throw exceptions whenever anything is missing (no container, twig not found, etc.).The text was updated successfully, but these errors were encountered: