Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[HttpKernel] Add ability to configure catching exceptions for Client#22890
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
new features should be submitted against 3.4 |
@@ -31,6 +31,7 @@ | |||
class Client extends BaseClient | |||
{ | |||
protected $kernel; | |||
protected $catchExceptions = true; |
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.
should beprivate
* | ||
* @param bool $catchExceptions Whether to catch exceptions | ||
*/ | ||
public function catchExceptions($catchExceptions = true) |
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.
having a default value here does not very useful to me
Anything preventing this from making it into 3.4? |
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.
Missing CHANGELOG.md entry ? :)
* | ||
* @return bool | ||
*/ | ||
public function isCatchingExceptions() |
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.
Is this method really useful?
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 really, I was just matchingSymfony\Component\BrowserKit\Client::isFollowingRedirects()
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.
let's remove it :)
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.
Done.
I added a Let me know if you want me to remove |
Thank you@kbond. |
…ons for Client (kbond)This PR was merged into the 3.4 branch.Discussion----------[HttpKernel] Add ability to configure catching exceptions for Client| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | todoDebugging exceptions in functional tests is difficult as you need to look at the logs to see which exception was thrown. Disabling catching of exceptions in the client would allow the exception to bubble up to phpunit and make it easier to see what exception was thrown.Commits-------4812e60 add ability to configure catching exceptions
…angedbrowser kit client to not catch exceptions to fix our test suite.References: -https://symfony.com/blog/new-in-symfony-4-1-deprecated-the-bundle-notation -symfony/symfony#26085 -symfony/symfony#22890Signed-off-by: Rob Frawley 2nd <rmf@src.run>
Uh oh!
There was an error while loading.Please reload this page.
Debugging exceptions in functional tests is difficult as you need to look at the logs to see which exception was thrown. Disabling catching of exceptions in the client would allow the exception to bubble up to phpunit and make it easier to see what exception was thrown.