User tests: Successful: Unsuccessful:
One of the changes in PHP 7 is the platform now allows Scalar Type Hints. Implementing this change means there are now some new reserved keywords in the language that cannot be used for class names, such as "string". We have a class named just that in the Framework's String package and have managed its deprecation at that level.
This PR updates the CMS to use the latest String package which includes a new "StringHelper" class to replace the existing "String" class. JString is modified to extend this directly versus the older class.
JString is used to help create aliases on items when you save them. So you should be able to create a new item and validate the alias is still processed correctly.
As JString, String, and StringHelper are all abstract, there is no practical reason to typehint against this class. However, in the very off chance someone may be, a JString object will no longer match a typehint for a String class. The typehint can be updated for StringHelper and everything will work out OK. I realize this is a fat chance, but it is a B/C break and the options are either this or Joomla 3 will not function on PHP 7.
Labels |
Added:
?
|
Labels |
Added:
?
|
Category | ⇒ | External Library |
Milestone |
Added: |
Also added the application package to this because it had a reference to String that was replaced. And dropped unit tests fully for the registry and string packages (something about the string tests was causing the bad class to trigger in PHP 7 and the CMS shouldn't need to run a now partial test suite on code it is consuming).
Milestone |
Removed: |
If this is pegged for 3.5, can it be merged to the 3.5 branch at some point? PHPUnit won't even run on PHP 7 right now because of the String class, so basically everything is stalled out trying to work out PHP 7 compatibility.
I aim to merge this tonight
Milestone |
Removed: |
@test I can confirm the patch. Before the patch: PHP 7 blew up telling me that string is a reserved class name. After the patch: I get the installer page. It won't go anywhere after that (loops back to the same page), but it's a good start!
Milestone |
Removed: |
||
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-14 18:27:44 |
Closed_By | ⇒ | wilsonge |
PR is updated to include the utilities and registry packages as well due to their use of the string package.