? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
20 Jun 2015

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.

Backward Compatibility

Fetching Data

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).

Setting Data

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.

Testing Instructions

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.

avatar mbabker mbabker - open - 20 Jun 2015
avatar mbabker mbabker - change - 20 Jun 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jun 2015
Labels Added: ?
Build 3.5-dev staging
avatar Fedik
Fedik - comment - 20 Jun 2015

test after the patch Joomla still works :wink:

avatar Fedik Fedik - test_item - 20 Jun 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 20 Jun 2015

Tested and Joomla version still shows in the
toolbar
system information page
metadata when option is enabled to show the version


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7217.

avatar brianteeman brianteeman - test_item - 20 Jun 2015 - Tested successfully
avatar Bakual Bakual - change - 20 Jun 2015
Labels Added: ?
avatar Bakual
Bakual - comment - 20 Jun 2015

Absolutely agree with making an exception for the potential B/C break here. If an extension really manipulated this, it deserves to break.

avatar Bakual Bakual - reference | 5c7f173 - 20 Jun 15
avatar Bakual Bakual - merge - 20 Jun 2015
avatar Bakual Bakual - close - 20 Jun 2015
avatar Bakual Bakual - change - 20 Jun 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-06-20 11:44:59
Closed_By Bakual
avatar Bakual Bakual - close - 20 Jun 2015
avatar zero-24 zero-24 - close - 20 Jun 2015
avatar Bakual Bakual - change - 20 Jun 2015
Milestone Added:
avatar mbabker mbabker - head_ref_deleted - 20 Jun 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment