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

Backports #513 to 0.9 branch #626

Merged
merged 1 commit into from
Sep 30, 2016
Merged

Backports #513 to 0.9 branch #626

merged 1 commit into from
Sep 30, 2016

Conversation

alindeman
Copy link

@alindeman alindeman commented Sep 29, 2016

The bugfix in #513 was not pushed to the 0.9 branch. I think it's an important fix, so I'm proposing it be backported.

Fixes mockery#512:

A fatal error is triggered when an exception occurs during instantiation using unserialisation:

PHP Fatal error: Cannot use Exception as Exception because the name is already in use
Runtime: PHP 5.6.14-1+deb.sury.org~trusty+1 with Xdebug 2.3.2

The cause of this error is that \Exception is imported as Exception in \Mockery\Instantiator, while a class name Exception already exists in that namespace (\Mockery\Exception).

This commit fixes the name collision. I don't quite remember how I got a error to trigger during unserialisation, so there's no regression test.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 73.767% when pulling a3711c4 on alindeman:0.9 into dc36998 on padraic:0.9.

@davedevelopment davedevelopment merged commit 65d4ca1 into mockery:0.9 Sep 30, 2016
@davedevelopment
Copy link
Collaborator

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants