Breaking: #96733 - Removed support for module handling based on TBE_MODULES
See forge#96733
Description
In previous TYPO3 versions, all available Backend modules were stored in the
global array
$TBE_
.
Next to a very scattered and dated API to work with this array, it was still possible to modify entries of modules through this global array.
With the introduction of the new Module Registration API, the global array is not filled anymore since TYPO3 v12.0.
In addition, any previous functionality related to handling of the global array has been removed.
The main and foremost important previous API piece
\TYPO3\
has been removed completely as it
was usually populated with data of $TBE_
.
The PHP classes
\TYPO3\
CMS\ Backend\ Domain\ Model\ Module\ Backend Module \TYPO3\
CMS\ Backend\ Domain\ Repository\ Module\ Backend Module Repository \TYPO3\
CMS\ Backend\ Module\ Module Storage
which were related to building the Module Menu on the left side
of the TYPO3 Backend have been removed as well. The new API based
on the
Module
takes care of permission handling
and returns objects of
Module
, the
rendering is now based on a well-defined OOP-based approach, which
is used throughout all places in TYPO3 Backend in a unified way.
As for TYPO3 Backend Modules, based on Extbase, their additional information
(allowed controllers and actions) was previously stored in a different
global array
$GLOBALS
which has been merged with the Module Registry API and has been removed as well.
Because the registration of modules is now done in the extension's
Configuration/
file, the following
API methods do no longer have any effect and will be removed in
TYPO3 v13.0:
\TYPO3\
CMS\ Core\ Utility\ Extension Management Utility:: add Module () \TYPO3\
CMS\ Core\ Utility\ Extension Management Utility:: add Navigation Component () \TYPO3\
CMS\ Core\ Utility\ Extension Management Utility:: add Core Navigation Component () \TYPO3\
CMS\ Extbase\ Utility\ Extension Utility:: register Module ()
The User TSconfig
options.
has been
removed. All modules are registered with a unique identifier. Therefore, the
TSconfig
options.
should be used for all modules
directly. This still allows to hide a whole group, e.g. web
, next to
regular moludes, such as web_
.
Impact
Accessing or manipulating the now non-existent
$GLOBALS
array will result in a PHP warning.
Referencing any of the removed PHP classes will result in a PHP fatal error.
Using one of the mentioned API methods won't have any effect.
Affected Installations
TYPO3 installations working with hooks or events effectively reading or
manipulating the global array $TBE_
or accessing any of the removed
PHP classes / methods by third-party extensions.
Any occurrences can be detected via the Extension Scanner.
Migration
Migrate to the new Module Registration API, and use the
Module
class to get allowed modules and work with the objects. The current module
information (an implementation of
Module
) is stored in a
TYPO3 Backend request within the module
option of a TYPO3 Backend route,
which can be accessed via
$request->get
.
As soon as the new TYPO3
Backend
PSR-15 middleware
has validated the module for the current user, the
Module
object is also added to the current request and can then be accessed
via
$request->get
in custom middlewares or
components.
Note
With the new module registration, the module identifier is also used
as the route identifier. Therefore, the module
option is removed
from the TYPO3 backend route object.
The registration has to be moved from ext_
to the
Configuration/
file. See the
feature changelog
for more information regarding the new registration.
Instead of
options.
, use
options.
.