Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Fixes PHP Fatal error: Cannot use Underscore\Types\String as String #101

Closed

Conversation

kenorb
Copy link

@kenorb kenorb commented Sep 25, 2017

Fixes: #96

The error happens in PHP 7.x

E.g.

PHP Fatal error: Cannot use Underscore\Types\String as String because 'String' is a special class name in vendor/radic/tmp-underscore-php/src/Methods/StringMethods.php on line 5

Ignore the CI tests, as they're basically broken. My attempt to fix them is in #102.

@dustingraham
Copy link

Note, this is a bad patch. The problem does not exist in this version. Notice the name of the class is "Strings" which is fine.

The problem exists in older versions of anahkiasen/underscore-php where it is simply "String"

The request from the other ticket was to tag the 1.x branch with the fix.

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

Successfully merging this pull request may close these issues.

PHP Fatal error: Cannot use Underscore\Types\String as String because 'String' is a special class name
2 participants