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 |
|---|---|
FGTCLBEnvironment | Central service to backup, bootstrap, apply, restore and execute within an environment. |
FGTCLBEnvironment | Resolves a TYPO3 core-version compatible environment builder. |
FGTCLBEnvironment | Builds a State for a given build context. |
FGTCLBEnvironment | Immutable snapshot of the bootstrapped environment elements (request, context, backend user, language service, ...). |
FGTCLBEnvironment | DTO describing which environment to build (application type, page and language; backend user and workspace for backend environments). |
FGTCLBEnvironment,
FGTCLBEnvironment | PSR-14 events to react on state changes. |
FGTCLBEnvironment,
FGTCLBEnvironment | Exceptions thrown by the API. |
The TYPO3 v13 specific Core13Extended extends
State and is part of the public API as well. It carries the
version-specific part of the state contract: the
Typo accessors
(with and
typo) are declared here, and not on the
version-agnostic State, because the
Typo is deprecated in TYPO3 v13 and removed in
TYPO3 v14. TYPO3 v14 has no extended state interface. Type-hint the
version-agnostic State in code that should work across core
versions, and only reference Core13Extended when you
explicitly target TYPO3 v13 specific state.
Internal implementation details
The concrete, TYPO3 core-version specific implementations under the
FGTCLBEnvironment and
FGTCLBEnvironment namespaces – for example
Core13State, Core14Frontend and
Core14State – as well as the Environment 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.
Warning
Never type-hint or instantiate the core-version specific classes directly. Always inject the interfaces; the dependency injection container provides the implementation for the current TYPO3 core version. Their constructor signatures already differ between core versions and may change at any time without a backward-compatibility break.