Deprecation: Internal environment / state-manager subsystem moved to own extension
Description
The environment, state-manager and environment-builder subsystem that
EXT:academic_base shipped internally under the namespaces
\FGTCLB\,
\FGTCLB\ and
\FGTCLB\ has been extracted into the
standalone public extension fgtclb/ (namespace
\FGTCLB\), which additionally provides backend
environment handling.
The internal classes were always flagged
@internal
and were never part of
the public API of EXT:academic_base. They are now deprecated and will
be removed with EXT:academic_base 3.0.0. Use the
\FGTCLB\ classes instead.
The deprecated classes, interfaces and traits stay in place and keep working until then, so their TYPO3 core-version aware dependency injection continues to resolve to the correct implementation:
\FGTCLB\Academic Base\ Environment\ Environment Builder Interface \FGTCLB\Academic Base\ Environment\ Environment Builder Factory \FGTCLB\Academic Base\ Environment\ Environment Builder Factory Interface \FGTCLB\Academic Base\ Environment\ State Interface \FGTCLB\Academic Base\ Environment\ State Manager Interface \FGTCLB\Academic Base\ Environment\ State Manager Execute Method Trait \FGTCLB\Academic Base\ Environment\ State Manager Root State Interface Helper Methods Trait \FGTCLB\Academic Base\ Environment\ Event\ State Apply Event \FGTCLB\Academic Base\ Environment\ Event\ State Backup Event \FGTCLB\Academic Base\ Environment\ Exception\ No Typo3Version Compatible Environment Builder Found \FGTCLB\Academic Base\ Environment\ Exception\ Site Config Could Not Be Determined \FGTCLB\andAcademic Base\ Core12\ Environment\* \FGTCLB\(Academic Base\ Core13\ Environment\* Extended,State Interface Frontend,Environment Builder State,Manager State)
Special case: StateBuildContext
\FGTCLB\ is a plain value object
that is carried by type through the public PSR-14 event
\FGTCLB\.
Shipping a second, distinct class with the same purpose would break that event's
type contract for existing listeners. This one class has therefore been
removed from EXT:academic_base and registered as a deprecated
class alias of
\FGTCLB\
through the typo3/ composer plugin
(Migrations/). The old name keeps resolving to the
new class, they are the same class at runtime, until the alias is removed in
3.0.0.
Impact
Referencing any of the deprecated class names keeps working: the remaining
classes are still shipped, and
State resolves through the class
alias. Because the classes were
@internal
, no runtime deprecation is
triggered.
The new classes differ from the deprecated ones in two places:
\FGTCLB\gained two optional constructor arguments,Environment State Manager\ State Build Context $backendandUser Id $workspace.Id \FGTCLB\no longer declaresEnvironment State Manager\ State Interface withandTypo Script Frontend Controller () typo. They moved to the core-version specificScript Frontend Controller () Extendedof the namespacesState Interface \FGTCLB\andEnvironment State Manager\ Core12 \FGTCLB\, because the TypoScriptFrontendController is deprecated in TYPO3 v13. The interface also gainedEnvironment State Manager\ Core13 withandLanguage Service () language.Service ()
Affected Installations
Only installations whose own code references the internal environment /
state-manager classes directly. The academic extensions themselves use
fgtclb/ already.
Migration
Require the new extension and replace the namespace prefix
\FGTCLB\ with
\FGTCLB\.
For the core-version specific classes replace
\FGTCLB\ with
\FGTCLB\, and
\FGTCLB\ with
\FGTCLB\. The class names stay the same.
Code that calls the TypoScriptFrontendController accessors on a
State has to type against the
Extended of
the running core version instead, see Impact.
composer require fgtclb/environment-state-manager
// Before
use FGTCLB\AcademicBase\Environment\StateManagerInterface;
use FGTCLB\AcademicBase\Environment\StateBuildContext;
// After
use FGTCLB\EnvironmentStateManager\StateManagerInterface;
use FGTCLB\EnvironmentStateManager\StateBuildContext;