Review 13.4 Merged

88710[TASK] Remove deprecated call to `xml_set_object()`, add tests

Georg Ringer CR +2 V +2 Normal +244 −2 updated 03/24/25, 20:21

Commit message

With PHP 8.4, the function `xml_set_object()` has been deprecated,
see [1][2].

This function allowed to set a reference to an object when using
strings in `xml_set_...()` specifications for callables.

TYPO3 already uses proper `[$this, 'method']` callable specifications,
so using `xml_set_object()` did not have any effect here.
Thus, it can not only be removed for PHP 8.4 compatibility, but also
for at least PHP 8.0 (according to [2] already since PHP 5.3).

Since any PHP version compatible to the scope of this patch's TYPO3
versions can deal without this call, it can be safely
removed.

Since the `parseXml()` methods did not provide any test coverage,
this is added with this patch, too.

[1] https://www.php.net/manual/en/migration84.deprecated.php#migration84.deprecated.core.xml
[2] https://externals.io/message/123816

Review

  • Code review CR +2 Done
    • Georg Ringer +2
  • Verified V +2 Done
    • Georg Ringer +2
    • core-ci +1 CI

Issues 1

Files 5

Review log 34

  1. Georg Ringer commented on patch set 1 03/24/25, 20:05

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 03/24/25, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76169

  3. Georg Ringer voted on patch set 1 CR +2 V +2 03/24/25, 20:21

  4. Georg Ringer merged patch set 2 03/24/25, 20:21