---
title: "Deprecation: Internal environment / state-manager subsystem moved to own extension"
manual: "Academic Base"
version: "main"
permalink: "https://docs.typo3.org/permalink/fgtclb/academic-base:deprecation-1783574951@main"
source: "Changelog/2.4/Deprecation-1783574951-InternalEnvironmentStateManagerSubsystem.rst"
rendered: "2026-10-17T08:47:46+00:00"
---

# Deprecation: Internal environment / state-manager subsystem moved to own extension {#deprecation-1783574951}

## Description {#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` {#special-case-php-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 {#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 {#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 {#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.

```bash
composer require fgtclb/environment-state-manager
```

```php
// Before
use FGTCLB\AcademicBase\Environment\StateManagerInterface;
use FGTCLB\AcademicBase\Environment\StateBuildContext;

// After
use FGTCLB\EnvironmentStateManager\StateManagerInterface;
use FGTCLB\EnvironmentStateManager\StateBuildContext;
```
