Important: #109517 - Setup extension merged into backend extension
See forge#109517
Description
The system extension setup (typo3/) existed for historical reasons
as a separate package. It provided the "User Settings" backend module where users
could change their password, name, email, language, avatar and other personal
preferences.
In modern web applications a user profile module should never be optional, so
the extension has been fully merged into the backend extension
(typo3/). The module is now always available when the backend is
installed and can still be hidden for individual users via user TSconfig. The
separate package is no longer needed and should not be referenced in new
installations.
For Composer-based installations
The Composer package typo3/ now replaces typo3/.
This means:
- There is no need to require
typo3/incms- setup composer.anymore. Existing references are resolved automatically becausejson typo3/declares that it replaces the package.cms- backend - No manual action is required during an upgrade – Composer handles the replacement transparently.
- New projects should not add
typo3/as a dependency.cms- setup
For class-based references
The following public classes have been moved and class aliases are in place for backwards compatibility:
\TYPO3\→CMS\ Setup\ Event\ Add Java Script Modules Event \TYPO3\CMS\ Backend\ Event\ Add User Settings Java Script Modules Event \TYPO3\→CMS\ Setup\ Form\ Element\ Avatar Element \TYPO3\CMS\ Backend\ Form\ Element\ Avatar Element \TYPO3\→CMS\ Setup\ User Functions\ User Settings Items Proc Func \TYPO3\CMS\ Backend\ User Functions\ User Settings Items Proc Func
Extensions using the old class names will continue to work, but should be updated to the new namespaces.
Moved event AddJavaScriptModulesEvent
A special case is
\TYPO3\. This file
has been moved to typo3/
and is added as a specific PSR-4 autoload entry to the Core's composer.
map, so that the legacy event can be dispatched properly. No deprecation
message is emitted when dispatching this legacy event.
Alongside, a new event
\TYPO3\
has been added with a distinguishing name. Both events are dispatched in TYPO3 v14,
with the legacy event being deprecated and removed in TYPO3 v15
(see Deprecation: #109517 - PSR-14 event \TYPO3\CMS\Setup\Event\AddJavaScriptModulesEvent).
Extensions providing compatibility to two versions at once should proceed like this:
For compatibility with TYPO3 v13 and v14
Only listen to the legacy event
\TYPO3\:
<?php
declare(strict_types=1);
namespace MyExtension\Listener;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Setup\Event\AddJavaScriptModulesEvent;
final class SetupModuleListener
{
#[AsEventListener('my-extension/setup-module-listener')]
public function __invoke(AddJavaScriptModulesEvent $event): void
{
$event->addJavaScriptModule('@my-extension/setupModule/some-file.js');
}
}
For compatibility with TYPO3 v14 and v15
Only listen to the new event
\TYPO3\:
<?php
declare(strict_types=1);
namespace MyExtension\Listener;
use TYPO3\CMS\Backend\Event\AddUserSettingsJavaScriptModulesEvent;
use TYPO3\CMS\Core\Attribute\AsEventListener;
final class SetupModuleListener
{
#[AsEventListener('my-extension/setup-module-listener')]
public function __invoke(AddUserSettingsJavaScriptModulesEvent $event): void
{
$event->addJavaScriptModule('@my-extension/setupModule/some-file.js');
}
}