? ? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
20 Aug 2016

Summary of Changes

JText::script() violates SRP by acting as a setter and getter for the internal storage array of strings for use with JavaScript. This PR deprecates the getter portion of this method in favor of a new API method to get these strings and will raise a deprecation notice when the current getter behavior is used.

At 4.0, JText::script() will have its method signature changed to require a string is always passed and will only act as a setter for the storage array.

Testing Instructions

Uses of JText::script() with no parameters should cause a deprecation message to be logged. The new JText::getScriptStrings() should return the contents of the internal storage array.

Documentation Changes Required

N/A, JText::script() is only documented via the automatically generated API documentation.

avatar joomla-cms-bot joomla-cms-bot - change - 20 Aug 2016
Category Libraries
avatar mbabker mbabker - open - 20 Aug 2016
avatar mbabker mbabker - change - 20 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Aug 2016
Labels Added: ?
avatar bertmert
bertmert - comment - 21 Aug 2016

@mbabker
Works as described.
I found the log entry in /administrator/logs/everything.php but not in /administrator/logs/deprecated.php. Intentional?

avatar mbabker
mbabker - comment - 21 Aug 2016

Intentional?

Nope, fixed.

avatar bertmert bertmert - test_item - 21 Aug 2016 - Tested successfully
avatar bertmert
bertmert - comment - 21 Aug 2016

I have tested this item successfully on fab3ffd


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

avatar jeckodevelopment jeckodevelopment - test_item - 22 Aug 2016 - Tested successfully
avatar jeckodevelopment
jeckodevelopment - comment - 22 Aug 2016

I have tested this item successfully on fab3ffd


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

avatar jeckodevelopment jeckodevelopment - change - 22 Aug 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 22 Aug 2016

@joomla-cms-bot please double check this one.


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

avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2016
Labels Added: ?
avatar rdeutz rdeutz - change - 22 Aug 2016
Labels Added: ?
avatar wilsonge
wilsonge - comment - 3 Sep 2016

Merged with 45164a4

avatar wilsonge wilsonge - change - 3 Sep 2016
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2016-09-03 11:28:29
Closed_By wilsonge
avatar wilsonge wilsonge - close - 3 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - close - 3 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - change - 3 Sep 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment