[6.0] Deprecate Http CMS package#45751
Conversation
|
Large parts of this PR should be unnecessary when #45825 is merged. |
|
I have tested this item ✅ successfully on 0642199 The usage of the deprecated code has already been removed in the CMS (6-0-dev) with PR #45825 . This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45751. |
|
How do you test the magic getter? The rest is ok but as I can't test that part (yet) I can't give it a successful test |
|
I have tested this item ✅ successfully on 0642199 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45751. |
|
Thank you for your speedy fix and the testers for their amazing help |
@brianteeman The getter is the same as in v3 of the framework package: https://github.com/joomla-framework/http/blob/3.x-dev/src/Response.php#L35-L61 |
|
... except of the |
|
Thanks @richard67 I wonder how anyone was able to test it |
…http package. Set default userAgent if nothing else is set, as it is in Joomla CMS http package. The change introduces in joomla/joomla-cms#45751 to replace CMS Http package by the framework package with the PSR-7 interface has some difference. The missing part to set userAgent as default if nothing else set will return a 403 error when trying to update an extension, if the update xml file is hosted on a server using a firewall. This missing part (difference with CMS http package) in Joomla 6.0+ blocked updates for one of my update server xml hosted on OVH where their firewall was enabled. Disabling the hosting server firewall was the only way to make the update process works. The userAgent check was introduced in this PR: joomla/joomla-cms#16538
Summary of Changes
The Joomla CMS contains a http package which is almost an identical copy of the Joomla framework http package. This PR deprecates the CMS package and converts all CMS code to use the framework package with the PSR-7 interface.
Please note that there are small differences between the CMS and framework package, which I couldn't resolve directly. These would have to be reviewed and probably adapted for the framework package before 6.0 release:
HTTPFactory::getHttp()setsuserAgenttoJoomla <version>Joomla\Http\Transport\Stream::getResponse()is not identicalJoomla\Http\Transport\Socket::getResponse()is not identicalJoomla\Http\Transport\Curl::getResponse()andredirectsAllowed()are not identicalThe differences between the packages have adressed here: joomla-framework/http#67
Testing Instructions
Codereview
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: Deprecate Joomla\CMS\Http package Manual#498
No documentation changes for manual.joomla.org needed