Deprecation: #111326 - LanguageAspect::OVERLAYS_ON
See forge#111326
Description
The overlay type
\TYPO3\
(value
'on'
) has been marked as deprecated and will be removed in
TYPO3 v16.0.
This overlay type is never created from a site configuration:
fallback results in
Language,
fallback in
Language and
fallback in
Language. It is only
used when a
Language is created
manually.
The record overlay in
Page already treats
both overlay types the same way. The only difference is how records of the
requested language without a record in the default language ("floating"
records) are handled: with
Language, the TypoScript
content object
CONTENT
and Extbase repositories do not include
them. Removing this overlay type reduces the number of language overlay modes
that need to be considered.
Impact
Creating a
Language with the overlay
type
'on'
triggers a PHP deprecation warning. The behavior stays the
same until the overlay type is removed in TYPO3 v16.0.
Affected installations
TYPO3 installations with custom extensions that create a
Language with
Language or the value
'on'
, for example to set
a custom language aspect on Extbase query settings or in the context.
The extension scanner reports usages of the constant as a strong match.
Migration
Use
Language instead. This is the
overlay type that is used by sites with
fallback.
Records of the requested language without a record in the default language are
then included in the result. If they must not be shown, exclude them in the
query. For the content object
CONTENT
, set the option
select..
use TYPO3\CMS\Core\Context\LanguageAspect;
$languageAspect = new LanguageAspect(1, 1, LanguageAspect::OVERLAYS_ON);
use TYPO3\CMS\Core\Context\LanguageAspect;
$languageAspect = new LanguageAspect(1, 1, LanguageAspect::OVERLAYS_ON_WITH_FLOATING);