Skip to content
Snippets Groups Projects
Commit 9324ba96 authored by Stefan Bürk's avatar Stefan Bürk Committed by Christian Kuhn
Browse files

[TASK] Avoid php deprecation in functional tests

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.

Resolves: #101548
Releases: main, 12.4
Change-Id: I13fae7a20162eb3a48910ca91a5a1b178d5a1821
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80228


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 3e275b69
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment