Skip to content

[5.4] HTTP: Remove legacy code for Response calls #45825

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

Merged
merged 5 commits into from
Aug 5, 2025

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Aug 3, 2025

Summary of Changes

The Joomla HTTP framework package provides a magic method to access code, body and headers of a Response object. This way of accessing this data is considered legacy and will not work with the version 4 of the framework package anymore. This PR thus converts all of this to the correct calls to the respective methods. This change is fully backwards compatible and makes the code forward compatible to Joomla 6+. The only thing changing in Joomla 6.0 now will be how to get an HTTP object. This will be changed in the PR to update the dependencies in 6.0.

Testing Instructions

  • Test saving the global configuration
  • Install a language
  • Update Joomla from 5.4 to a newer version
  • Check the changelog of an extension update in the extension manager
  • Load a menu item for a newsfeed in the frontend
  • Test logging in with Yubikey MFA
  • Run a request task in the scheduled tasks component

Alternatively, do a codereview.

In all cases, everything should work the same between the current code and after applying the changes.

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

@exlemor
Copy link

exlemor commented Aug 3, 2025

I have tested this item ✅ successfully on 368bf17

I have successfully tested this PR. Thanks @Hackwar for all of your hard work.

I did all of the tests mentioned and much more, but I could not test these 2:

  • Check the changelog of an extension update in the extension manager - I uploaded and updated 10+ extensions but couldn't find a single 1 that used the Changelog column in Extensions Update Manager ;(. { is that because very few people know about it or because it doesn't work with non-stable versions? }

  • Test logging in with Yubikey MFA = I don't have a Yubikey ;(


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

@richard67
Copy link
Member

I have tested this item ✅ successfully on 890b8c9

Code review: The changes made by this PR match the (deprecated) magic getters here: https://github.com/joomla-framework/http/blob/3.x-dev/src/Response.php#L38-L45


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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 4, 2025
@muhme
Copy link
Contributor

muhme commented Aug 5, 2025

✅ Final test before merge: Named tests, plus additional info:

  • Enabled 'Log Almost Everything' and installed blog sample data
  • Installed German language paket as extension from URL
  • Installed mod_zitat_service_de_2.0.1.zip from URL and configured, update is offered and updated, see new version and checked is still working on frontend
  • Configured to send email in successful task in GC, purged and see email
  • Checked administrator/logs/*
  • Updated back to 5.4-dev nightly build

Not tested:

  • Yubikey – I don't have one

@muhme muhme merged commit 37612d3 into joomla:5.4-dev Aug 5, 2025
40 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 5, 2025
@muhme muhme added this to the Joomla! 5.4.0 milestone Aug 5, 2025
@muhme
Copy link
Contributor

muhme commented Aug 5, 2025

Thank you @Hackwar for your contribution. Thank you @richard67 and @exlemor for testing.

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.

5 participants