Breaking: #102835 - Strict typing in final TypoLinkCodecService
See forge#102835
Description
The
\TYPO3\, 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
$typo is now a type hinted
string.
This has been done in combination with the introduction of the two new PSR-14
events
Before and
After,
which allow to fully influence the encode and decode functionality, making
any cross classing superfluous.
Impact
Extending / cross classing
Typo 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
Typo or
calling
decode with the first parameter
$typolink not being
a
string.
Migration
Instead of extending / cross classing
Typo 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.