Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Rename the String class for PHP 7.0 #42

Closed
tomzx opened this issue May 2, 2015 · 3 comments
Closed

Rename the String class for PHP 7.0 #42

tomzx opened this issue May 2, 2015 · 3 comments

Comments

@tomzx
Copy link

tomzx commented May 2, 2015

Under PHP 7.0, classes named as String are not allowed. As such, it will generate a fatal error that looks like this:

PHP Fatal error: Cannot use vierbergenlars\LibJs\String as String because 'String' is a special class name in /home/travis/build/tomzx/php-semver-checker-git/vendor/vierbergenlars/php-semver/src/vierbergenlars/SemVer/internal.php on line 5

@vierbergenlars
Copy link
Owner

I thought only \String was not allowed as a class name.
Does changing the use statement fix it or should the class be renamed?

@tomzx
Copy link
Author

tomzx commented May 2, 2015

Based off http://3v4l.org/dkvXT, it appears that in April the behavior changed from allowing the \Namespaced\String class to not allowing it anymore. Thus the answer would be that you need to rename the class itself.

@vierbergenlars
Copy link
Owner

Fixed in 516bb30
Tagged 3.0.1

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

No branches or pull requests

2 participants