Skip to content

Conversation

@oscarruesga
Copy link

Refactor String Class to Str Class to prevent conflict with reserve keys in PHP 7

Refactor String Class to Str Class to prevent conflict with reserve keys in PHP 7
@ryasmi
Copy link
Member

ryasmi commented Jun 18, 2016

Nice catch @oscarruesga, I'll try to check this out next week, thanks for taking the time to make the fix 👍

@ryasmi
Copy link
Member

ryasmi commented Jun 21, 2016

Does "String" actually conflict with any reserved words in PHP 7? I thought it was "string" (with a lowercase "s") that they reserved not "String".

@oscarruesga
Copy link
Author

oscarruesga commented Jun 21, 2016

But if you use PHP 7 obtain this:

Fatal error: Cannot use 'String' as class name as it is reserved in /usr/share/nginx/html/vendor/learninglocker/statementfactory/src/String.php on line 3

Here is my php configuration:

image

@ryasmi
Copy link
Member

ryasmi commented Jun 21, 2016

Ok thanks for the additional info @oscarruesga. I think it'll be ok to merge this soon, I'll have to do some testing locally, unfortunately we don't have great test coverage in this repo.

@ryasmi ryasmi merged commit 7d6db6f into LearningLocker:master Jun 30, 2016
@ryasmi
Copy link
Member

ryasmi commented Jun 30, 2016

Just merged and added this to the latest release of this library, thanks for your time @oscarruesga and sorry this took so long to get merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants