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

PHP7 Incompatibility with in registry/json.php with strings #7571

Closed
ghost opened this issue Jul 28, 2015 · 2 comments
Closed

PHP7 Incompatibility with in registry/json.php with strings #7571

ghost opened this issue Jul 28, 2015 · 2 comments

Comments

@ghost
Copy link

@ghost ghost commented Jul 28, 2015

Steps to reproduce the issue

Install Joomla! on PHp 5.5.
Then switch to PHP 7.
Error appears

Expected result

Joomla! works

Actual result

Fatal error: Cannot use Joomla\String\String as String because 'String' is a special class name in [...]/libraries/vendor/joomla/registry/src/Format/Json.php on line 12

System information (as much as possible)

PHP 7 Beta 2
Joomla! 3.4.3

Additional comments

@Bakual

This comment has been minimized.

Copy link
Contributor

@Bakual Bakual commented Jul 28, 2015

It's a know issue. Joomla 3.4 isn't compatible with PHP7 yet.
Joomla 3.5 should be compatible. To my knowlege all issues are fixed there.

Can you confirm that @mbabker and @wilsonge ?

@wilsonge

This comment has been minimized.

Copy link
Contributor

@wilsonge wilsonge commented Jul 28, 2015

Yes we fixed this in the Joomla 3.5 branch by changing the class name to StringHelper. Although we've left the old wrapper String class in place in case people are using it for b/c, we merged it to the 3.5 branch because JString now inherits the StringHelper class rather than String (as they are all static methods this shouldn't be an issue and on top of that the only difference would occur if people initialised and typehinted the class against a class only introduced in 3.4.0)

TLDR: If you test against the 3.5-branch (or 3.5 nightly build at http://developer.joomla.org/cms-packages/) this should be fixed. Closing the issue :)

@wilsonge wilsonge closed this Jul 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.