Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Joomla\String\String conflicts with PHP 7 #378

Closed
jissereitsma opened this issue Aug 11, 2015 · 2 comments
Closed

Joomla\String\String conflicts with PHP 7 #378

jissereitsma opened this issue Aug 11, 2015 · 2 comments

Comments

@jissereitsma
Copy link

I've just tested out the latest Joomla with PHP 7 and found that the \Joomla\String\String class is stopping Joomla from working under PHP 7. The reason is that "String" is a reserved word (or actually a reserved class) under PHP 7. So I hacked my Joomla a bit and renamed \Joomla\String\String (and all references to it) to \Joomla\String\Text - that worked out fine and is so far the only compatibility issue with PHP 7.

How do you think this is best solved? I've seen another project where they renamed String to String_ (yes, with an underscore) which sounds kind of stupid. So far the only good naming scheme I found was to rename it to Text (where the complete namespace would become \Joomla\Text\Text). What do you think?

RFC

@mbabker
Copy link
Contributor

mbabker commented Aug 11, 2015

The String package has been updated to use StringHelper as the class name instead of String (see joomla-framework/string#9). In CMS version 3.5 that change is backported and the String class isn't used by core (see joomla/joomla-cms#6600).

@mbabker mbabker closed this as completed Aug 11, 2015
@jissereitsma
Copy link
Author

That's awesome. Sorry for not taking the extra peak at the latest progress ;)

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