8000 [VarDumper] Move $prev as 1st argument in ThrowingCasterException::__construct, removing $caster by nicolas-grekas · Pull Request #16129 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[VarDumper] Move $prev as 1st argument in ThrowingCasterException::__construct, removing $caster #16129

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
Oct 6, 2015

Conversation

nicolas-grekas
Copy link
Member
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

@stof
Copy link
Member
stof commented Oct 5, 2015

👍

{
if (!$prev instanceof \Exception) {
@trigger_error('Providing the $prev exception as 2nd argument when instanciating a '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Provide it as first argument instead.', E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the real change that you should not pass the caster anymore (which implies that the exception is now the first argument)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, the constructor should only have one argument (without typehint) and the BC layer implementation should be changed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed the deprecation message (but not the logic around, which looks fine to me)

@nicolas-grekas nicolas-grekas changed the title [VarDumper] Move $prev as 1st argument in ThrowingCasterException::__construct [VarDumper] Move $prev as 1st argument in ThrowingCasterException::__construct, removing $caster Oct 6, 2015
@fabpot
Copy link
Member
fabpot commented Oct 6, 2015

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 02b86b0 into symfony:2.8 Oct 6, 2015
fabpot added a commit that referenced this pull request Oct 6, 2015
…Exception::__construct, removing $caster (nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Move $prev as 1st argument in ThrowingCasterException::__construct, removing $caster

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

Commits
-------

02b86b0 [VarDumper] Move $prev as 1st argument in ThrowingCasterException::__construct, removing $caster
@nicolas-grekas nicolas-grekas deleted the vdd branch October 6, 2015 07:27
fabpot added a commit that referenced this pull request Oct 6, 2015
…ages (xabbuh)

This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][VarDumper] tweak some deprecation messages

| Q             | A
| ------------- | ---
| Fixed tickets | #16129, #16135
| License       | MIT

I was a bit too slow with reviewing.

Commits
-------

536045f tweak some deprecation messages
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
0