-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Backport Flex-specific error messages in controller shortcuts to 3.4 #25636
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
Conversation
👍 , but why not 3.4? |
@@ -153,7 +153,7 @@ protected function file($file, string $fileName = null, string $disposition = Re | |||
protected function addFlash(string $type, string $message) | |||
{ | |||
if (!$this->container->has('session')) { | |||
throw new \LogicException('You can not use the addFlash method if sessions are disabled.'); | |||
throw new \LogicException('You can not use the addFlash method if sessions are disabled. Enable them in config/packages/framework.yaml.'); |
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.
This is not consistent with other message (no quotes but dot at the end).
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.
fixed
38d12ea
to
4f7dee7
Compare
no objection for me, 4.0 was the target of #25133. |
As a general rule of thumb, almost all PRs that target 4.0 should really target 3.4: both versions share the same bugs (with rare exceptions.) |
rebased |
Note that symfony-standard exists in 3.4, these suggestions would be wrong there. |
@@ -194,7 +194,7 @@ protected function file($file, $fileName = null, $disposition = ResponseHeaderBa | |||
protected function addFlash($type, $message) | |||
{ | |||
if (!$this->container->has('session')) { | |||
throw new \LogicException('You can not use the addFlash method if sessions are disabled.'); | |||
throw new \LogicException('You can not use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml"'); |
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.
Error messages like this -> Enable them in "config/packages/framework.yaml" could be problematic for 3.4 app ... which probably use the same dir layout that 3.3. The new layout is only generally used in 4.0 and newer.
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.
Most of the exceptions will probably never be shown if you depend on the Standard Edition (this one is indeed a bit different, but we could additionally check for the FullStack
class).
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.
(but missing dot at the end of each message)
Thank you @chalasr. |
…tcuts to 3.4 (weaverryan) This PR was merged into the 3.4 branch. Discussion ---------- Backport Flex-specific error messages in controller shortcuts to 3.4 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25133 (comment) | License | MIT | Doc PR | n/a Commits ------- 419e934 Proposing Flex-specific error messages in the controller shortcuts
Uh oh!
There was an error while loading. Please reload this page.