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\AcademicBase\Environment , \FGTCLB\AcademicBase\Core12\Environment and \FGTCLB\AcademicBase\Core13\Environment has been extracted into the standalone public extension fgtclb/environment-state-manager (namespace \FGTCLB\EnvironmentStateManager ), 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\EnvironmentStateManager 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\AcademicBase\Environment\EnvironmentBuilderInterface
  • \FGTCLB\AcademicBase\Environment\EnvironmentBuilderFactory
  • \FGTCLB\AcademicBase\Environment\EnvironmentBuilderFactoryInterface
  • \FGTCLB\AcademicBase\Environment\StateInterface
  • \FGTCLB\AcademicBase\Environment\StateManagerInterface
  • \FGTCLB\AcademicBase\Environment\StateManagerExecuteMethodTrait
  • \FGTCLB\AcademicBase\Environment\StateManagerRootStateInterfaceHelperMethodsTrait
  • \FGTCLB\AcademicBase\Environment\Event\StateApplyEvent
  • \FGTCLB\AcademicBase\Environment\Event\StateBackupEvent
  • \FGTCLB\AcademicBase\Environment\Exception\NoTypo3VersionCompatibleEnvironmentBuilderFound
  • \FGTCLB\AcademicBase\Environment\Exception\SiteConfigCouldNotBeDetermined
  • \FGTCLB\AcademicBase\Core12\Environment\* and \FGTCLB\AcademicBase\Core13\Environment\* ( ExtendedStateInterface , FrontendEnvironmentBuilder , StateManager , State )

Special case: StateBuildContext 

\FGTCLB\AcademicBase\Environment\StateBuildContext is a plain value object that is carried by type through the public PSR-14 event \FGTCLB\AcademicPersons\Service\Event\ModifyProfileCommandEnvironmentStateBuildContextForFrontendUserEvent . 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\EnvironmentStateManager\StateBuildContext through the typo3/class-alias-loader composer plugin (Migrations/Code/ClassAliasMap.php). 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 StateBuildContext 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\EnvironmentStateManager\StateBuildContext gained two optional constructor arguments, $backendUserId and $workspaceId .
  • \FGTCLB\EnvironmentStateManager\StateInterface no longer declares withTypoScriptFrontendController() and typoScriptFrontendController() . They moved to the core-version specific ExtendedStateInterface of the namespaces \FGTCLB\EnvironmentStateManager\Core12 and \FGTCLB\EnvironmentStateManager\Core13 , because the TypoScriptFrontendController is deprecated in TYPO3 v13. The interface also gained withLanguageService() and languageService() .

Affected Installations 

Only installations whose own code references the internal environment / state-manager classes directly. The academic extensions themselves use fgtclb/environment-state-manager already.

Migration 

Require the new extension and replace the namespace prefix \FGTCLB\AcademicBase\Environment with \FGTCLB\EnvironmentStateManager . For the core-version specific classes replace \FGTCLB\AcademicBase\Core12\Environment with \FGTCLB\EnvironmentStateManager\Core12 , and \FGTCLB\AcademicBase\Core13\Environment with \FGTCLB\EnvironmentStateManager\Core13 . The class names stay the same. Code that calls the TypoScriptFrontendController accessors on a StateInterface has to type against the ExtendedStateInterface of the running core version instead, see Impact.

composer require fgtclb/environment-state-manager
Copied!
// Before
use FGTCLB\AcademicBase\Environment\StateManagerInterface;
use FGTCLB\AcademicBase\Environment\StateBuildContext;

// After
use FGTCLB\EnvironmentStateManager\StateManagerInterface;
use FGTCLB\EnvironmentStateManager\StateBuildContext;
Copied!