Skip to content

The String class is not suported in PHP 7.#12

Merged
ryasmi merged 1 commit into
LearningLocker:masterfrom
oscarruesga:master
Jun 30, 2016
Merged

The String class is not suported in PHP 7.#12
ryasmi merged 1 commit into
LearningLocker:masterfrom
oscarruesga:master

Conversation

@oscarruesga

Copy link
Copy Markdown

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

ryasmi commented Jun 18, 2016

Copy link
Copy Markdown
Contributor

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

@ryasmi

ryasmi commented Jun 21, 2016

Copy link
Copy Markdown
Contributor

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

oscarruesga commented Jun 21, 2016

Copy link
Copy Markdown
Author

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

ryasmi commented Jun 21, 2016

Copy link
Copy Markdown
Contributor

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

ryasmi commented Jun 30, 2016

Copy link
Copy Markdown
Contributor

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