Drop v11/v12, add TYPO3 v14 support#49
Merged
Merged
Conversation
Bumps the supported TYPO3 range to ^13.4 || ^14.0 and PHP minimum to ^8.2. Two TYPO3 v14 breaking changes required code adjustments; the rest is just removing the v11-only fallback code that is no longer reachable. * AfterCachedPageIsPersistedEvent no longer carries the TypoScriptFrontendController in v14. The listener now reads cache tags from $event->getCacheData()['cacheTags'], which TYPO3 populates in both v13 and v14 before dispatching the event. * AbstractMessage::OK / WARNING / ERROR constants were removed in v14. ManagementController switches to ContextualFeedbackSeverity::* enum cases unconditionally; the Typo3Version major-version checks are gone. Cleanup of v11-only code: * Classes/Hook/FrontendHook.php and the matching SC_OPTIONS hook in ext_localconf.php — the v11 tslib_fe insertPageIncache hook has been superseded by the AfterCachedPageIsPersistedEvent listener since v12. * ext_tables.php — v11-only ExtensionUtility::registerModule() call. Configuration/Backend/Modules.php has handled the registration since v12. * Resources/Private/TemplatesV11/ — v11 fallback Fluid template. See UPGRADE.md for the v4 -> v5 upgrade notes.
2 tasks
TYPO3 v14 added strict type declarations to Typo3DatabaseBackend's public API; v13's parent signatures had no types. Loading the extension on v14 fataled with: Declaration of B13\Proxycachemanager\Cache\Backend\ReverseProxyCacheBackend::remove($entryIdentifier) must be compatible with TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::remove(string $entryIdentifier): bool The fix: * Drop the remove() override entirely. It was a pure passthrough to parent::remove() — the docblock explained the historical reason the provider call was removed, but the override itself adds no behaviour. Parent::remove() is inherited automatically. * Add covariant ": void" return types to flush(), flushByTag(), flushByTags() to match v14 while staying compatible with v13's untyped parents (return-type covariance is allowed). Parameter types stay untyped so v13 (untyped parent) keeps working; PHP allows the child to widen — but not narrow — parameter types.
TYPO3 v14 changed TransientBackendInterface from an empty marker
interface to a proper contract with
set(string $entryIdentifier, mixed \$data, ...): void
That contract is incompatible with the parent Typo3DatabaseBackend's
typed signature
set(string \$entryIdentifier, string \$data, ...): void
so v14 refuses to load a class that both extends Typo3DatabaseBackend
and implements TransientBackendInterface, fataling with:
Declaration of TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::set(...)
must be compatible with TYPO3\CMS\Core\Cache\Backend\TransientBackendInterface::set(...)
ReverseProxyCacheBackend originally declared the marker so the
configured VariableFrontend would skip serialize()/unserialize() on
the stored URL strings. The optimisation was always minor (we store
short strings), and the marker simply cannot coexist with
Typo3DatabaseBackend on v14. Dropping the interface declaration
returns to the default VariableFrontend behaviour — URLs are
serialised/unserialised transparently — which is functionally
identical and works on both v13 and v14.
The previous commit removed Classes/Hook/FrontendHook.php but missed the matching service definition in Configuration/Services.yaml. With the class gone, every DI container build fataled: Invalid service "B13\Proxycachemanager\Hook\FrontendHook": class "B13\Proxycachemanager\Hook\FrontendHook" does not exist.
achimfritz
approved these changes
May 28, 2026
Contributor
achimfritz
left a comment
There was a problem hiding this comment.
i think we have also adapt the CI workflow (which was disabled when creating PR).
can be done in an other issue.
we should also use ServerRequestInterface instead of RequestInterface in ProxyProviderInterface (this will be breaking but can be done, because we make a new major release)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
typo3/cms-{backend,frontend}constraint to^13.4 || ^14.0and PHP to^8.2Hook/FrontendHook.php,ext_tables.php,Resources/Private/TemplatesV11/, and the matchingSC_OPTIONShook inext_localconf.phpTYPO3 v14 breaking changes
AfterCachedPageIsPersistedEventlost itscontroller.In v14 the event only carries
request / cacheIdentifier / cacheData / cacheLifetime(cms-frontend/Classes/Event/AfterCachedPageIsPersistedEvent.php). The listener now reads cache tags from$event->getCacheData()['cacheTags'], which both v13 and v14 populate before dispatching ($content['cacheTags'] = $pageCacheTags;inRequestHandler::handle()).AbstractMessage::OK / WARNING / ERRORremoved. Replaced byContextualFeedbackSeverity::*enum cases unconditionally — theTypo3Version::getMajorVersion() === 11branches inManagementControllerare gone.v11/v12 cleanup
With v11/v12 out of scope, the following v11-only fallbacks are removed:
Classes/Hook/FrontendHook.php+ matchingSC_OPTIONSentry (tslib/class.tslib_fe.php / insertPageIncache) — superseded by the event listener since v12ext_tables.php(v11ExtensionUtility::registerModule) —Configuration/Backend/Modules.phpalready handles this on v12+Resources/Private/TemplatesV11/This is a backwards-incompatible release — see
UPGRADE.mdfor the v4 → v5 notes. Tag accordingly (5.0.0).Context
Sister PR over at b13/cloudflare-cdn#6. Both are needed so b13.com (currently on TYPO3 14.3) can wire up the existing TAE-style Cloudflare CDN integration.
Test plan
tx_proxycache row appears with correct URL + tagsreverseProxyProvider