Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
ogizanagi merged 1 commit intosymfony:3.4fromkbond:client-catch-exceptions
Sep 26, 2017
Merged

[HttpKernel] Add ability to configure catching exceptions for Client#22890

ogizanagi merged 1 commit intosymfony:3.4fromkbond:client-catch-exceptions
Sep 26, 2017

Conversation

kbond
Copy link
Member

@kbondkbond commentedMay 24, 2017
edited by ogizanagi
Loading

QA
Branch?3.4
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRtodo

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.

@nicolas-grekas
Copy link
Member

new features should be submitted against 3.4

@kbondkbond changed the base branch frommaster to3.4May 24, 2017 15:07
@@ -31,6 +31,7 @@
class Client extends BaseClient
{
protected $kernel;
protected $catchExceptions = true;
Copy link
Member

Choose a reason for hiding this comment

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

should beprivate

ro0NL reacted with thumbs up emoji
*
* @param bool $catchExceptions Whether to catch exceptions
*/
public function catchExceptions($catchExceptions = true)
Copy link
Member

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

ro0NL reacted with thumbs up emoji
@kbond
Copy link
MemberAuthor

Anything preventing this from making it into 3.4?

Copy link
Contributor

@ogizanagiogizanagi left a 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()
Copy link
Contributor

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?

Copy link
MemberAuthor

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()

Choose a reason for hiding this comment

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

let's remove it :)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Done.

@kbond
Copy link
MemberAuthor

I added aCHANGELOG.md entry.

Let me know if you want me to removeClient::isCatchingExceptions()

@ogizanagi
Copy link
Contributor

Thank you@kbond.

@ogizanagiogizanagi merged commit4812e60 intosymfony:3.4Sep 26, 2017
ogizanagi added a commit that referenced this pull requestSep 26, 2017
…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
This was referencedOct 18, 2017
robfrawley added a commit to robfrawley/liip-imagine-bundle that referenced this pull requestMay 7, 2018
…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>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@xabbuhxabbuhxabbuh left review comments

@ogizanagiogizanagiogizanagi approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
3.4
Development

Successfully merging this pull request may close these issues.

5 participants
@kbond@nicolas-grekas@ogizanagi@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp