PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
25 Mar 2025

Pull Request for Issue #45190.

Summary of Changes

This pr eases the transition from CMSObject to stdClass when calling the getItem function. If the compatibility plugin is enabled it sets not the constant JCOMPAT_ENABLED. If this flag is set, then does the getItem function return a CMSObject instead of stdClass.

Testing Instructions

Perform testing instructions from #45190 with the BC plugin enabled.

Actual result BEFORE applying this Pull Request

Crashes.

Expected result AFTER applying this Pull Request

No crash.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar laoneo laoneo - open - 25 Mar 2025
avatar laoneo laoneo - change - 25 Mar 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2025
Category Libraries Front End Plugins
avatar brianteeman brianteeman - test_item - 25 Mar 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 25 Mar 2025

I have tested this item ✅ successfully on 31558da


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

avatar HLeithner
HLeithner - comment - 26 Mar 2025

I would suggest to specify an own constant for CMSObject and make it an configurable option, I think we will have a couple more of this constants.

avatar laoneo
laoneo - comment - 26 Mar 2025

What is the benefit of having different constants? My intention was to have one constant which rules them all, similar to JDEBUG.

avatar HLeithner
HLeithner - comment - 26 Mar 2025

the reason is that you can tests to disable only one things which is a benefit for developer, same as the 5.0, allow the user to decide. It's also easier to finally remove the b/c code.

avatar laoneo
laoneo - comment - 26 Mar 2025

So an end user should decide if compatibility for CMSObject class should be enabled?

avatar HLeithner
HLeithner - comment - 31 Mar 2025

So an end user should decide if compatibility for CMSObject class should be enabled?

maybe yes, at least now it's a black box for all, even if it's not an option, it could be separated constants if the decision is to not remove all b/c breaking switches in a later version.

avatar laoneo
laoneo - comment - 31 Mar 2025

And then we have to deprecate these constants as well and make constants for them too to deprecate them? This is absolute overkill. How it is now in this pr is absolutely ok and I'm not going to change it. Because this would confuse extension developers too much when you have to search in code for the right constants.

avatar laoneo laoneo - change - 31 Mar 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-03-31 13:06:55
Closed_By laoneo
Labels Added: PR-6.0-dev
avatar laoneo laoneo - close - 31 Mar 2025

Add a Comment

Login with GitHub to post a comment