Skip to content
Snippets Groups Projects
Commit 5dd37c3f authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[TASK] Replace static property caches in RootlineUtility

RootlineUtility uses a multi-staged cacheing logic. This
contains the use of a dedicated rootline-cache, but also
two static class internal caches. Static property caches
are a horrable nightmare when it comes to keep proper
clean state between test executions, beside it's a not
really needed state on a non-static class.

This change aims to replace the static property caches
in RootlineUtility with the core runtime cache. Thus
making the static properties obsolete, but keeping it
until testing-framework can deal with the absence of
the static properties. Remove them!

`RootlineUtility::purgeCaches()` calls are replaced now
with core runtime cache flush calls using tags to avoid
flushing other unrelated runtime cache entries. This makes
this method obsolete. This method was declared @internal,
eliminate it!

Additionally, default `$rootlineField` merging with the
`$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields']`
is moved from RootlineUtility constructor to the only
method using it, namely `getRecordArray`. In the same
we changed it from static to non-static, as there is no
need anymore for having it static.

"typo3/testing-framework" has been made aware of these
changes and deals with absent of these properties and
method, but keep doing the guarding steps if they are
still exists.

See: https://github.com/TYPO3/testing-framework/pull/423

> composer u typo3/testing-framework

Resolves: #99100
Releases: main
Change-Id: I5fdcabd1c3727f020abc7d8bdbcf1f0276b715a3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76637


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 4cc5f782
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