Public API and stability 

This extension was extracted from another extension to provide a stable, reusable API that other extensions can build on and rely on. To keep that promise meaningful, the API surface is split into a public part covered by backward-compatibility guarantees and an internal part that may change at any time.

Public API 

The following types form the public API. Depend on these interfaces and types:

Type Purpose
FGTCLBEnvironmentStateManagerStateManagerInterface Central service to backup, bootstrap, apply, restore and execute within an environment.
FGTCLBEnvironmentStateManagerEnvironmentBuilderFactoryInterface Resolves a TYPO3 core-version compatible environment builder.
FGTCLBEnvironmentStateManagerEnvironmentBuilderInterface Builds a StateInterface for a given build context.
FGTCLBEnvironmentStateManagerStateInterface Immutable snapshot of the bootstrapped environment elements.
FGTCLBEnvironmentStateManagerStateBuildContext DTO describing which environment to build.
FGTCLBEnvironmentStateManagerEventStateApplyEvent, FGTCLBEnvironmentStateManagerEventStateBackupEvent PSR-14 events to react on state changes.
FGTCLBEnvironmentStateManagerExceptionNoTypo3VersionCompatibleEnvironmentBuilderFound, FGTCLBEnvironmentStateManagerExceptionSiteConfigCouldNotBeDetermined Exceptions thrown by the API.

The TYPO3 core-version specific Core12ExtendedStateInterface and Core13ExtendedStateInterface extend StateInterface and are part of the public API as well. They exist for future version-specific additions to the state contract. Type-hint the version-agnostic StateInterface in code that should work across core versions, and only reference an ExtendedStateInterface when you explicitly target a specific TYPO3 core version.

Internal implementation details 

The concrete, TYPO3 core-version specific implementations under the FGTCLBEnvironmentStateManagerCore12 and FGTCLBEnvironmentStateManagerCore13 namespaces – for example Core13StateManager, Core13FrontendEnvironmentBuilder and Core13State – as well as the EnvironmentBuilderFactory and the internal traits are marked @internal. They are registered as dependency injection services and resolved to the implementation matching the running TYPO3 core version.