Breaking: #102835 - Strict typing in final TypoLinkCodecService

See forge#102835


The \TYPO3\CMS\Core\LinkHandling\TypoLinkCodecService, used to encode and decode TypoLinks, has been declared readonly and set final. Additionally, the class does now use strict typing and the decode() method's first parameter $typoLink is now a type hinted string.

This has been done in combination with the introduction of the two new PSR-14 events BeforeTypoLinkEncodedEvent and AfterTypoLinkDecodedEvent, which allow to fully influence the encode and decode functionality, making any cross classing superfluous.


Extending / cross classing TypoLinkCodecService does no longer work and will lead to PHP errors.

Calling decode() with the first parameter $typolink being not a string will lead to a PHP TypeError.

Affected installations

All installations extending / cross classing TypoLinkCodecService or calling decode() with the first parameter $typolink not being a string.


Instead of extending / cross classing TypoLinkCodecService use the new PSR-14 events to modify the functionality.

Ensure to always provide a string as first parameter $typolink, when calling decode() in your extension code.