User tests: Successful: Unsuccessful:
Joomla's version data is currently manipulable within a JVersion instance since the data is defined as public facing vars. This PR blocks the ability of developers to be able to manipulate this information by defining the version data as constants instead.
A magic getter is implemented which will catch any calls which tried to access the previously defined class member variables and will return the corresponding constant instead. A deprecation log message is added for these cases. In instances where someone trying to access an undefined class variable occurs, a E_USER_NOTICE
PHP error is generated (similar to PHP's native handling).
With this PR, it's no longer possible. It should have never been possible. But, since we are being so strict on B/C, this must be highlighted. And we should hopefully not use the argument that a developer could previously overwrite the core platform's version data as an excuse to not accept this patch IMO.
Make sure you have the version data displayed in the admin toolbar (default yes), apply the patch, and make sure the page loads without any error messages.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
||
Build | 3.5-dev | ⇒ | staging |
Tested and Joomla version still shows in the
toolbar
system information page
metadata when option is enabled to show the version
Labels |
Added:
?
|
Absolutely agree with making an exception for the potential B/C break here. If an extension really manipulated this, it deserves to break.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-20 11:44:59 |
Closed_By | ⇒ | Bakual |
Milestone |
Added: |
Labels |
Removed:
?
|
test after the patch Joomla still works