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
minor #25133 Proposing Flex-specific error messages in the controller shortcuts (weaverryan)
This PR was merged into the 4.1-dev branch.
Discussion
----------
Proposing Flex-specific error messages in the controller shortcuts
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
This is to help discoverability when you try to use a feature that's not installed. It's opinionated about Flex being installed, which is why this is done on 4.0.
Two of the options relate to configuration. An alternative (if we don't like the short description) is to include a link instead (which could be some short URL - e.g. `http://symfony.com/docs/sessions` would be pretty cool).
Commits
-------
d377b1545b Proposing Flex-specific error messages in the controller shortcuts
thrownew \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.');
209
+
thrownew \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available. Try running "composer require twig"');
thrownew \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available.');
227
+
thrownew \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require twig"');
thrownew \LogicException('You can not use the "stream" method if the Templating Component or the Twig Bundle are not available.');
259
+
thrownew \LogicException('You can not use the "stream" method if the Templating Component or the Twig Bundle are not available. Try running "composer require twig"');
if (!$this->container->has('security.csrf.token_manager')) {
375
-
thrownew \LogicException('CSRF protection is not enabled in your application.');
375
+
thrownew \LogicException('CSRF protection is not enabled in your application. Enable it with the "csrf_protection" key in "config/packages/framework.yaml"');
0 commit comments