Important: #94889 - AbstractTypoLinkBuilder::build now returns array|LinkResultInterface

See Issue #94889

Description

The method signature of \TYPO3\CMS\Frontend\Typolink\AbstractTypoLinkBuilder has changed, as array return type has been removed, thus loosening the inheritance criteria for TYPO3 v11.

In TYPO3 v12 AbstractTypoLinkBuilder will have a \TYPO3\CMS\Frontend\Typolink\LinkResultInterface return type.

Extensions using this class can stay compatible with two major TYPO3 LTS versions by doing the following:

  • Keeping an array return type to stay compatible with TYPO3 v10 and TYPO3 v11.
  • Using the LinkResultInterface return type to stay compatible with TYPO3 v11 and TYPO3 v12+.