Skip to content

Conversation

@laoneo
Copy link
Member

@laoneo laoneo commented Feb 17, 2025

Summary of Changes

Reverts #42890 and moves the classes to the compat plugin instead of easier transition. It uses the same logic as #44240 without the option.

Testing Instructions

  • Enable the compat plugin
  • Add the following code to the file /administrator/components/com_content/tmpl/articles/default.php:
    new \Joomla\CMS\Input\Json();
  • Open the back end articles list with at least one article.

Actual result BEFORE applying this Pull Request

A Class "Joomla\CMS\Input\Json" not found exception is thrown.

Expected result AFTER applying this Pull Request

The articles list is loaded.

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: Change input chapter to be moved Manual#389

  • No documentation changes for manual.joomla.org needed

@laoneo laoneo changed the title Compat/input [6.0] Add removed Input classes to the compat plugin Feb 17, 2025
@Hackwar
Copy link
Member

Hackwar commented Feb 17, 2025

Why do we have to add back in all those classes, when most of it is a pretty much direct copy of the framework classes? Why can't we use the alias method? I mean, if you insist on adding back in old classes, I can understand to add the CLI class, but the rest is basically just duplicated code. I don't see why we need that.

@laoneo
Copy link
Member Author

laoneo commented Feb 17, 2025

I leave the decision up to the RM's.

@laoneo laoneo linked an issue Feb 17, 2025 that may be closed by this pull request
@wilsonge
Copy link
Contributor

For the record this one is tricker. Removing the alias from CMSInput functionally changes behavior and forces extensions to change much more of their code as a result. In this very specific case because of that I’m personally against merging this (for the record in favour of merging the other application one)

@laoneo
Copy link
Member Author

laoneo commented Feb 20, 2025

Which alias do you mean? This one? It was added in #43209 after I remove the classes in #42890 and was never in production anyway. So this pr basically restores the 5.x behavior, with the only difference that the classes are moved from libraries to the compat plugin.

@wilsonge
Copy link
Contributor

I do mean that one and even though it's not in production it leads to a much bigger b/c break when the compat plugin is disabled.

@tekvishal
Copy link

getting this error The file marked for modification does not exist: plugins/behaviour/compat/src/classmap/classmap.php


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

@tekvishal
Copy link

I have tested this item 🔴 unsuccessfully on 88f0ecd


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

@laoneo
Copy link
Member Author

laoneo commented Mar 4, 2025

@tekvishal you need to test it with the code from version 6. This error has nothing to do with the current pr. Best is to use the prebuilt package.

@laoneo
Copy link
Member Author

laoneo commented Mar 6, 2025

An additional comment to @wilsonge comment about the impact. The alias is only loaded when the compat plugin is enabled anyway, so this here is no difference to the state before as both ways are only loaded when the compat plugin is enabled.

@exlemor
Copy link

exlemor commented Mar 8, 2025

I have tested this item 🔴 unsuccessfully on 59330d8

I can NOT replicate the before Condition - without the Patch applied, there is NO error message when looking at the Articles list...

See attachment below...


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44925.
Screen.Recording.8.Mar.2025.at.1_32_36.AM-3.mp4

@laoneo
Copy link
Member Author

laoneo commented Mar 8, 2025

Thanks for the test, I'v updated the testing instructions with another class as we have an alias for the default input class.

@exlemor
Copy link

exlemor commented Mar 9, 2025

I have tested this item ✅ successfully on 59330d8

I have tested this successfully now (with the updated new \Joomla\CMS\Input\Json(); line). Thanks @laoneo.

FYI, for the next testers, the error will show:

An error has occurred.
0 Class "Joomla\CMS\Input\Json" not found

not A Class "Joomla\CMS\Input\Input" not found exception is thrown. as mentioned in the Testing instructions.


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

@laoneo
Copy link
Member Author

laoneo commented Mar 9, 2025

@exlemor you are awesome!

@krishnaGandhi11
Copy link

krishnaGandhi11 commented Mar 9, 2025

I have tested this item ✅ successfully on 59330d8


Thanks @laoneo.


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

@richard67
Copy link
Member

RTC as it has 2 successful tests. But I will also add the RMDQ (release managers decision queue) label so it will be decided in the CMS Maintenance Team.


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 22, 2025
@richard67 richard67 added the RMDQ ReleaseManagerDecisionQueue label Mar 22, 2025
@Bodge-IT Bodge-IT removed the RMDQ ReleaseManagerDecisionQueue label May 14, 2025
@Bodge-IT Bodge-IT merged commit d2f8838 into joomla:6.0-dev May 14, 2025
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 14, 2025
@Bodge-IT
Copy link
Contributor

Thanks for this @laoneo and for the testers @krishnaGandhi11 & @exlemor

@laoneo laoneo deleted the compat/input branch May 14, 2025 10:26
HLeithner added a commit to HLeithner/joomla-cms that referenced this pull request May 14, 2025
HLeithner added a commit that referenced this pull request May 14, 2025
* Create backward compatibility 6 plugin
* Moved relevant code from old compat plugin and removed it

considered changes from prs:
#44926
#44240
#44638
#44700
#43209
#43958
#42884

* Add new plugin on install and uninstall old plugin
* Remove compat media folder, add compat6 removed.asset.json
* Fix cs exceptions
* Update ExtensionHelper
* Rename Compat.php to Compat6.php
* Disable compat6 plugin for system tests
* Restore class aliases from compat 5 plugin
* Relocate files from #44925

---------

Co-authored-by: Richard Fath <[email protected]>
Co-authored-by: Brian Teeman <[email protected]>
softforge pushed a commit that referenced this pull request May 25, 2025
* Create backward compatibility 6 plugin

* Moved relevant code from old compat plugin and removed it

considered changes from prs:
#44926
#44240
#44638
#44700
#43209
#43958
#42884

* Add new plugin on install and uninstall old plugin

* Remove compat media folder, add compat6 removed.asset.json

* Fix cs exceptions

* Update ExtensionHelper

* Rename Compat.php to Compat6.php

* Disable compat6 plugin for system tests

* Update administrator/language/en-GB/plg_behaviour_compat6.ini

Co-authored-by: Brian Teeman <[email protected]>

* Update plugins/behaviour/compat6/compat6.xml

Co-authored-by: Brian Teeman <[email protected]>

* Update plugins/behaviour/compat6/compat6.xml

Co-authored-by: Brian Teeman <[email protected]>

* Update administrator/language/en-GB/plg_behaviour_compat6.ini

Co-authored-by: Brian Teeman <[email protected]>

* Update administrator/language/en-GB/plg_behaviour_compat6.sys.ini

Co-authored-by: Brian Teeman <[email protected]>

* Update plugins/behaviour/compat6/src/Extension/Compat6.php

* Restore class aliases from compat 5 plugin

* Relocate files from #44925

* Apply language string improvement from review suggestion

Co-authored-by: Brian Teeman <[email protected]>

* Update plugins/behaviour/compat6/src/Extension/Compat6.php

Co-authored-by: Allon Moritz <[email protected]>

* Update plugins/behaviour/compat6/compat6.xml

Co-authored-by: Allon Moritz <[email protected]>

* Update installation/sql/mysql/base.sql

Co-authored-by: Richard Fath <[email protected]>

* Update installation/sql/postgresql/base.sql

Co-authored-by: Richard Fath <[email protected]>

* Fix wrong folder in uninstallation of compat (5) plugin.

---------

Co-authored-by: Richard Fath <[email protected]>
Co-authored-by: Richard Fath <[email protected]>
Co-authored-by: Brian Teeman <[email protected]>
Co-authored-by: Benjamin Trenkle <[email protected]>
Co-authored-by: Allon Moritz <[email protected]>
@Bodge-IT Bodge-IT added this to the Joomla! 6.0.0 milestone Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Readd the deprecated app and input classes to the compatibility plugin

9 participants