Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0] Switching Input object from CMS to framework class #40415

Merged
merged 8 commits into from Feb 5, 2024

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Apr 19, 2023

Summary of Changes

The Joomla\CMS\Input package has been deprecated and we have the Joomla\Input\Input package from the framework instead. This converts all occurences of the CMS package over to the framework package. This especially fixes the issue that our application baseclass, Joomla\Application\AbstractWebApplication, uses the framework classes, while all child classes in the CMS use the CMS classes.

This introduces a few b/c breaks, which I would consider acceptable, but also requires more work on the InputFilter class. The following issues have come up:

  • The framework Input class uses the framework Joomla\Filter\InputFilter, while the CMS class uses the CMS InputFilter class. These 2 are not compatible right now, which is something we have to fix for the 3.0 release of the framework. The InputFilter framework class is lacking in functionality here.
  • The framework class doesn't have the unserialize() method the CMS class has. However, the CMS class also doesn't have a serialize() method anyway, so that feature doesn't work at all. This feature was removed 4 years ago.
  • Joomla\CMS\Input\Cookie::set() currently accepts an array of values and then sets a cookie for each entry in the array, the framework doesn't have this feature.
  • Joomla\CMS\Input\Files::get() has additional code to check for unsafe files, which would have to be added to the framework package.

This PR also depends, among other things, on #40429.

Testing Instructions

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

@Hackwar
Copy link
Member Author

Hackwar commented Apr 19, 2023

Please note that the CMS Input package is still used in the CLI applications and there is no CLI replacement in the framework package, among other things because according to the docblocks the joomla/console package should be used instead.

@Hackwar Hackwar marked this pull request as draft April 19, 2023 08:21
@HLeithner HLeithner changed the base branch from 5.0-dev to 5.1-dev September 30, 2023 22:50
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.1-dev.

….0-input

# Conflicts:
#	administrator/components/com_actionlogs/src/Controller/ActionlogsController.php
#	installation/src/Application/InstallationApplication.php
#	libraries/src/Application/AdministratorApplication.php
#	libraries/src/Application/BaseApplication.php
#	libraries/src/Application/CMSApplication.php
#	libraries/src/Application/SiteApplication.php
#	libraries/src/Application/WebApplication.php
@Hackwar
Copy link
Member Author

Hackwar commented Dec 25, 2023

So, I looked into this again and the CliApplication class is deprecated and will be removed in 6.0. Since we are removing the CMS input class then as well, we can revert this change back and keep the CMS CLI Input class in that Application class. So after reverting that change, I'm marking this PR again as ready for review.

@Hackwar Hackwar marked this pull request as ready for review December 25, 2023 22:49
@laoneo laoneo merged commit 572f686 into joomla:5.1-dev Feb 5, 2024
0 of 2 checks passed
@laoneo
Copy link
Member

laoneo commented Feb 5, 2024

Merged, as they are only doc block changes. Thanks @Hackwar for this!

@Quy Quy removed the PR-5.0-dev label Mar 3, 2024
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.

None yet

7 participants