Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Security] Replace exception mocks with actual exception instances.#10621
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
It is done for two reasons:* consistency - we use real exception objects in most of the code* latest phpunit does not like the way we were creating mocks for exceptions (it could be also fixed by letting phpunit to call the original constructor)
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.
could we pass a real exception instead of a classname?
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.
Not in this specific case, since one of the exception classes here is abstract (Symfony\Component\Security\Core\Exception\AccountStatusException).
… instances. (jakzal)This PR was merged into the 2.3 branch.Discussion----------[Security] Replace exception mocks with actual exception instances.It is done for two reasons:* consistency - we use real exception objects in most of the code* latest phpunit does not like the way we were creating mocks for exceptions (it could be also fixed by letting phpunit to call the original constructor)Commits-------9438f88 [Security] Replace exception mocks with actual exception instances.
It is done for two reasons: