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

Global namespace collision in ramsay/uuid 3.3 or pre-requisite #115

Closed
eparisca opened this issue Apr 14, 2016 · 3 comments
Closed

Global namespace collision in ramsay/uuid 3.3 or pre-requisite #115

eparisca opened this issue Apr 14, 2016 · 3 comments
Labels

Comments

@eparisca
Copy link

eparisca commented Apr 14, 2016

As soon as I upgraded from 3.2 to 3.3 via composer, my servers started reporting the following PHP Fatal error:

PHP Fatal error: Call to undefined method Error::GetXML() in [script name]

Downgrading to 3.2, which also removes the prerequisite paragonie/random_compat v2.0.2, fixed the issue. At this point i'm not sure yet if the source of this namespace collision is within ramsey/uuid or the new prerequisite.

Cheers.

@eparisca
Copy link
Author

eparisca commented Apr 14, 2016

Issue appears to be in paragonie/random_compat extending Exception with the global name Error.

 // We can't really avoid making this extend Exception in PHP 5.
class Error extends Exception

Source

@eparisca
Copy link
Author

Reported paragonie/random_compat issue #104

I will leave this issue open here at the discretion of the contributors, since it will affect users upgrading to ramsey/uuid 3.3.

Cheers.

@ramsey
Copy link
Owner

ramsey commented Apr 14, 2016

Thanks for the report. random_compat does that to provide compatibility with PHP 7, which has a global Error class that extends Exception. I'll close this for now, as I don't think this will affect too many people, and especially as people prepare for upgrading to PHP 7, they'll need to be aware of the built-in Error class and change their names.

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

No branches or pull requests

2 participants