joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[5.3] Replace xml_set_object with proper callable parameters #44490

Open HLeithner opened 2 days ago

HLeithner commented 2 days ago

Pull Request for Issue # .

Summary of Changes

Replace xml_set_object call by calling setxml*_handler with callable object.

Testing Instructions

Test extension installation Test joomla update

Actual result BEFORE applying this Pull Request

Works (php 8.4 with deprecation warinings)

Expected result AFTER applying this Pull Request

Works (php 8.4 without deprecation warnings)

Link to documentations

Please select:

richard67 commented 2 days ago

It sems that the system tests need to be adapted to this PR, or there is something wrong because they are currently failing: https://ci.joomla.org/joomla/joomla-cms/80456/1/22

Running:  administrator/components/com_joomlaupdate/Update.cy.js                       (19 of 129)

  Test the update retrieval logic
    1) "after each" hook for "Can fetch available updates with valid metadata"

  0 passing (2s)
  1 failing

  1) Test the update retrieval logic
       "after each" hook for "Can fetch available updates with valid metadata":
     Error: Unwanted PHP Warning: "  xml_parse(): Unable to call handler Joomla\\CMS\\Updater\\Adapter\\ExtensionAdapter::startElement() in <b>/tests/www/cmysql/libraries/src/Updater/Adapter/ExtensionAdapter.php</b> on line <b>286</b>"

Because this error occurred during a `after each` hook we are skipping all of the remaining tests.
  at supportCommands/ (webpack://joomla/./node_modules/joomla-cypress/src/support.js:110:0)
...
HLeithner commented 2 days ago

Copy paste issue...