8000 Backport Flex-specific error messages in controller shortcuts to 3.4 by chalasr · Pull Request #25636 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

chalasr
Copy link
Member
@chalasr chalasr commented Dec 30, 2017
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

@nicolas-grekas
Copy link
Member

👍 , 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.');
Copy link
Member

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@chalasr
Copy link
Member Author
chalasr commented Dec 31, 2017

👍 , but why not 3.4?

no objection for me, 4.0 was the target of #25133.
The trait could also give these hints only if class_exists(Flex::class), not sure it's worth it though, let me know wdyt.

@nicolas-grekas
Copy link
Member
nicolas-grekas commented Dec 31, 2017

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.)

@xabbuh xabbuh modified the milestones: 4.0, 3.4 Dec 31, 2017
@nicolas-grekas nicolas-grekas changed the base branch from 4.0 to 3.4 December 31, 2017 19:45
@chalasr chalasr added the Ready label Jan 1, 2018
@chalasr
Copy link
Member Author
chalasr commented Jan 1, 2018

rebased

@chalasr chalasr changed the title Backport Flex-specific error messages in controller shortcuts to 4.0 Backport Flex-specific error messages in controller shortcuts to 3.4 Jan 1, 2018
@chalasr
Copy link
Member Author
chalasr commented Jan 1, 2018

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"');
Copy link
Member

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.

Copy link
Member

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).

Copy link
Member
@nicolas-grekas nicolas-grekas left a 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)

@fabpot
Copy link
Member
fabpot commented Jan 3, 2018

Thank you @chalasr.

@fabpot fabpot merged commit 419e934 into symfony:3.4 Jan 3, 2018
fabpot added a commit that referenced this pull request Jan 3, 2018
…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
@chalasr chalasr deleted the flex-suggest branch January 4, 2018 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0