Review main Merged

80310[TASK] Avoid php deprecation in functional tests

Stefan Bürk CR +2 V +2 Easy +2 −2 updated 08/03/23, 13:26

Commit message

With PHP8.3 the `ReflectionProperty->setValue()` method
emits a E_DEPRECATED if a value should be set to a class
and the context is not set as first argument.

For instanciated classes the class needs to be provided,
which is not possible for a static class or property.

The solution for this is to use `null` as first argument
as context object. That avoids the deprecation and keeps
the backward compatibility.

The testing-framework provides a tool to keep and handle
static Framework state, which uses reflection under the
hood and therefore needs the null context for `setValue()`.

To verify manually use:

> Build/Scripts/runTests.sh -s functional -p 8.3

Note: Activating in CI runs will be shuffeld in a dedicated
      change afterwards.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 58

  1. Stefan Bürk uploaded patch set 1 08/03/23, 12:52

  2. core-ci voted on patch set 1 V +1 08/03/23, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44926

  3. Stefan Bürk updated the commit message in patch set 2 V +1 08/03/23, 13:05

  4. core-ci voted on patch set 2 V -1 08/03/23, 13:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44928

  5. core-ci voted on patch set 2 V +1 08/03/23, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44928

  6. Christian Kuhn voted on patch set 2 V +1 CR +1 08/03/23, 13:25

  7. Christian Kuhn voted on patch set 2 V +2 CR +2 08/03/23, 13:26

  8. Christian Kuhn merged patch set 3 08/03/23, 13:26