Skip to content
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

Honor silent flag & prevent error handler catch #137

Merged
merged 3 commits into from Jan 7, 2016

Conversation

@mdarse
Copy link
Contributor

@mdarse mdarse commented Aug 19, 2015

This is a more generic fix to #35, it should fix #108 too.

$result = @stat($path);
} catch (\ErrorException $e) {

This comment has been minimized.

@adri

adri Sep 8, 2015
Contributor

Looks nice thank you. I wonder though, if we don't catch the exception PHPUnit might throw ErrorExceptions when running in processIsolation. Did you test this by any chance?

@mcrumm
Copy link

@mcrumm mcrumm commented Jan 6, 2016

👍 for this. I'm using kahlan for specs, and ran into #33 when I added a dependency that referenced an existing namespace. This PR corrects that problem.

In an attempt to answer your question about PHPUnit and process isolation, I ran the following:

$ vendor/bin/phpunit --process-isolation tests/VCR/Util/StreamProcessorTest.php
PHPUnit 3.7.38 by Sebastian Bergmann.

Configuration read from /Users/mike/Code/php-vcr/php-vcr/phpunit.xml

..........

Time: 5.93 seconds, Memory: 4.25Mb

Hopefully that's enough to green-light this patch. If there's more I can do to help verify this as working, please let me know.

@mcrumm
Copy link

@mcrumm mcrumm commented Jan 6, 2016

D'oh, but of course PHPUnit didn't gripe about it. PHP-VCR's dependencies don't share namespaces. I'll try a more specific test and report back.

@mcrumm
Copy link

@mcrumm mcrumm commented Jan 6, 2016

Well, I had to write a PHPUnit test for my project to be sure, but I can confirm that this works under process isolation for at least PHPUnit v3.7.38 (VCR's version from composer.lock) and PHPUnit v5.1.3.

@adri adri added the Bug label Jan 7, 2016
@adri
Copy link
Contributor

@adri adri commented Jan 7, 2016

Alright, let's merge then.

adri added a commit that referenced this pull request Jan 7, 2016
Honor silent flag & prevent error handler catch
@adri adri merged commit cc8b752 into php-vcr:master Jan 7, 2016
1 of 2 checks passed
1 of 2 checks passed
Scrutinizer Errored
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mcrumm
Copy link

@mcrumm mcrumm commented Jan 7, 2016

Thanks!

@mdarse
Copy link
Contributor Author

@mdarse mdarse commented Jan 7, 2016

Thanks for merging this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.