? Failure

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
8 Sep 2016

Summary of Changes

JObject is deprecated and will be removed in J4.x. This PR removes the majority of references to JObject in favour of new stdClass().

Note:
I haven't touched class extending, such as JMenuNode extends JObject as again, not sure how this would be done.

Testing Instructions

Code review.

Documentation Changes Required

None

avatar C-Lodder C-Lodder - open - 8 Sep 2016
avatar C-Lodder C-Lodder - change - 8 Sep 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2016
Category Administration Components Media Manager Libraries Plugins Front End
avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2016
Labels Added: ?
avatar C-Lodder C-Lodder - change - 8 Sep 2016
The description was changed
avatar C-Lodder C-Lodder - edited - 8 Sep 2016
avatar mbabker
mbabker - comment - 8 Sep 2016

I also haven't touched class extending, such as JMenuNode extends JObject as again, not sure how this would be done.

Has to wait for 4.0 as it'd be a B/C break to stop being able to use the API methods it provides.

avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2016
Category Administration Components Media Manager Libraries Plugins Front End Administration Components Media Manager Front End Tags Libraries
avatar C-Lodder C-Lodder - change - 8 Sep 2016
The description was changed
avatar C-Lodder C-Lodder - edited - 8 Sep 2016
avatar mbabker
mbabker - comment - 8 Sep 2016

The other thing to think of here is stdClass doesn't allow you to have object keys with dots in them. Like where we create a JObject to check permissions in components where you have something like $object->set('core.create', $value);. In those cases you'd be better off using a Registry object instead.

avatar C-Lodder
C-Lodder - comment - 8 Sep 2016

@mbabker - ah ok that's fine. I've now removed the reference in $foo = JArrayHelper::toObject($bar, 'JObject'); too

avatar C-Lodder
C-Lodder - comment - 8 Sep 2016

@mbabker Just reverting some of the changes based on your comments. As for the last one...This will need to be a Registry object., does that also mean changing this:

$this->state = new stdClass();

to this:

$this->state = new JRegistry();

?

avatar mbabker
mbabker - comment - 8 Sep 2016

Yes.

avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2016
Category Administration Components Media Manager Libraries Front End Tags Administration Components Media Manager Front End Tags Libraries Plugins
avatar zero-24
zero-24 - comment - 8 Sep 2016

@mbabker JRegistry and not Registry?

avatar C-Lodder
C-Lodder - comment - 8 Sep 2016

Hmm, I think this is causing too many problems for Travis as some functions from the JObject class are being called which I didn't take into consideration. Close?

avatar mbabker
mbabker - comment - 8 Sep 2016

Hmm, I think this is causing too many problems for Travis. Close?

Do it in smaller chunks. It's honestly a major project you're not going to be able to do in one big push just because there are so many uses of it.

avatar C-Lodder
C-Lodder - comment - 8 Sep 2016

Ok I'll revisit this later on tonight or tomorrow morning

avatar brianteeman brianteeman - change - 8 Sep 2016
Category Administration Components Media Manager Libraries Front End Tags Plugins Administration Code style Components Front End Libraries Media Manager Plugins Tags
avatar wilsonge wilsonge - change - 10 Sep 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-09-10 13:28:57
Closed_By wilsonge
avatar wilsonge wilsonge - close - 10 Sep 2016
avatar wilsonge
wilsonge - comment - 10 Sep 2016

Given that closing this

Add a Comment

Login with GitHub to post a comment