---
title: "Feature: #96975 - New PSR-14 events for SiteConfiguration Handling"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-96975"
source: "Changelog/12.0/Feature-96975-NewPSR-14EventsForSiteConfiguration.rst"
typo3-version: "12.0"
typo3-major: 12
type: "feature"
issue: 96975
forge: "https://forge.typo3.org/issues/96975"
tags: ["PHP-API", "ext:core"]
rendered: "2026-10-01T16:39:42+00:00"
---

# Feature: #96975 - New PSR-14 events for SiteConfiguration Handling {#feature-96975}

See [forge#96975](https://forge.typo3.org/issues/96975)

## Description {#description}

Two new events have been added to TYPO3, to allow manipulation of the loaded
SiteConfiguration before it is cached and before the configuration is written to disk.

-   `\TYPO3\CMS\Core\Configuration\Event\SiteConfigurationBeforeWriteEvent`
-   `\TYPO3\CMS\Core\Configuration\Event\SiteConfigurationLoadedEvent`

## Impact {#impact}

The events SiteConfigurationLoadedEvent and SiteConfigurationBeforeWriteEvent
have been introduced.

Both contain the following methods:

-   `getSiteIdentifier()`: returns the sites' identifier
-   `getConfiguration()`: returns the configuration (loaded or to be written)
-   `setConfiguration(array $configuration)`: allows overwriting of the configuration

They allow modification of the site configuration array both before loading and
before writing the configuration to disk.

To register an event listener for the new events, use the following code in your
`Services.yaml`:

```yaml
services:
  MyCompany\MyPackage\EventListener\SiteConfigurationLoadedListener:
    tags:
      - name: event.listener
        identifier: 'myLoadedListener'
  MyCompany\MyPackage\EventListener\SiteConfigurationBeforeWriteListener:
    tags:
      - name: event.listener
        identifier: 'myWriteListener'
```
