-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | - |
License | MIT |
Doc PR | - |
👍 |
{ | ||
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); |
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.
Isn't the real change that you should not pass the caster anymore (which implies that the exception is now the first argument)?
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.
Agree, the constructor should only have one argument (without typehint) and the BC layer implementation should be changed.
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.
I changed the deprecation message (but not the logic around, which looks fine to me)
…construct, removing $caster
Thank you @nicolas-grekas. |
…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
…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