Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Adding use statement for InvalidArgumentException #21851

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

Closed
wants to merge 2 commits into from

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Mar 3, 2017

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

This is a super minor bugfix. We should tell what InvalidArgumentException we throw. I consider this a bugfix and not a BC break because Symfony\Component\Translation\Exception\InvalidArgumentException has always been the intention.

@linaori
Copy link
Contributor

linaori commented Mar 3, 2017

This should not cause a single BC break afaik

@Nyholm
Copy link
Member Author

Nyholm commented Mar 3, 2017

You are correct. Technically this is not a BC break. But strictly speaking one could believe the intention was \InvalidArgumentException instead of Symfony\Component\Translation\Exception\InvalidArgumentException

@nicolas-grekas
Copy link
Member

Should we apply this on the lowest supported branch where it goes ?

@Nyholm
Copy link
Member Author

Nyholm commented Mar 3, 2017

I think so. But it is your call. That is why I wrote "master"

@linaori
Copy link
Contributor

linaori commented Mar 3, 2017

I think this is more of an "improvement" than a feature or bugfix. Sadly there's no mention of this in the symfony docs/semver. However, I do think it falls under the following:

Coding standard and refactoring: Coding standard fixes or code refactoring are not recommended but can be accepted for consistency with the existing code base, if they are not too invasive, and if merging them on master would not lead to complex branch merging

@ro0NL
Copy link
Contributor

ro0NL commented Mar 3, 2017

< 3.2 actually throws \InvalidArgumentException

So for 2.7 you need to update the actual throws as well (https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Translation/Translator.php#L463)

Otherwise this could be 3.2 without any BC issue (it's a doc fix, at least for the current implementations ^^).

ref

@Nyholm
Copy link
Member Author

Nyholm commented Mar 3, 2017

Thank you @ro0NL. You are correct.

So either merge in master or in 3.2 and up.

@fabpot
Copy link
Member

fabpot commented Mar 3, 2017

Thank you @Nyholm.

fabpot added a commit that referenced this pull request Mar 3, 2017
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #21851).

Discussion
----------

Adding use statement for InvalidArgumentException

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

This is a super minor bugfix. We should tell what InvalidArgumentException we throw. I consider this a bugfix and not a BC break because `Symfony\Component\Translation\Exception\InvalidArgumentException` has always been the intention.

Commits
-------

187f65b Adding use statement for InvalidArgumentException
@fabpot fabpot closed this Mar 3, 2017
@Nyholm Nyholm deleted the patch-3 branch March 3, 2017 16:05
@Nyholm
Copy link
Member Author

Nyholm commented Mar 3, 2017

Thank you for merging

@fabpot fabpot mentioned this pull request Mar 9, 2017
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.

6 participants