Skip to content
Snippets Groups Projects
Commit 6541b3eb authored by Benni Mack's avatar Benni Mack Committed by Georg Ringer
Browse files

[TASK] Deprecate runtime activated packages

The option to register packages during runtime was a work-around
to dynamically modify the "extList". Using this feature has certain limitations:

* Runtime-activated Extensions cannot add their DI configuration
* Runtime-activated Extensions make every (!) single TYPO3 request much slower
  just like back in 6.2.0 times

The usecases from people using this functionality was to enable e.g. extensions
such as "devlog", "mask"/"mask_export" or "extensionbuilder" only on development
systems.

Nowadays, it is recommended - if this functionality is needed - to use TYPO3
Console and Composer Mode (with require-dev) to achieve a similar behaviour.

This also ensures a clear state of available extensions, and to build a proper
class map / autoloading mechansims of extensions in use.

Runtime-activated extensions also prohibit to continue to work on
a smoother integration between composer-mode and non-composer mode
in the future.

Resolves: #91030
Releases: master
Change-Id: If4344cd081e8f60f30c9a0fb4d0cb9c308bbfb66
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64166


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
Tested-by: default avatarChristian Eßl <indy.essl@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarJosef Glatz <josefglatz@gmail.com>
Reviewed-by: default avatarChristian Eßl <indy.essl@gmail.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent af5244a5
Branches
Tags
No related merge requests found
......@@ -257,6 +257,7 @@ class Bootstrap
{
$packages = $GLOBALS['TYPO3_CONF_VARS']['EXT']['runtimeActivatedPackages'] ?? [];
if (!empty($packages)) {
trigger_error('Support for runtime activated packages will be removed in TYPO3 v11.0.', E_USER_DEPRECATED);
foreach ($packages as $runtimeAddedPackageKey) {
$packageManager->activatePackageDuringRuntime($runtimeAddedPackageKey);
}
......
......@@ -317,6 +317,7 @@ class PackageManager implements SingletonInterface
*
* @param string $packageKey
* @return PackageInterface
* @deprecated will be removed in TYPO3 v11.0
*/
protected function registerPackageDuringRuntime($packageKey)
{
......@@ -576,6 +577,7 @@ class PackageManager implements SingletonInterface
* Enables packages during runtime, but no class aliases will be available
*
* @param string $packageKey
* @deprecated will be removed in TYPO3 v11.0
*/
public function activatePackageDuringRuntime($packageKey)
{
......
.. include:: ../../Includes.txt
================================================
Deprecation: #91030 - Runtime-Activated Packages
================================================
See :issue:`91030`
Description
===========
TYPO3's global configuration option :php:`$GLOBALS['TYPO3_CONF_VARS']['EXT']['runtimeActivatedPackages']` has been deprecated.
The option to register packages during runtime was introduced as
a work-around to dynamically modify the "extension list" when migrating from TYPO3 v4.5 to TYPO3 v6.x.
However, using this feature has certain limitations:
* Runtime-activated Extensions cannot add their DI configuration
* Runtime-activated Extensions make every (!) single TYPO3 request much slower just like back in 6.2.0 times
The main usecase we know from people was to this functionality to enable e.g. extensions such as "devlog", "mask"/"mask_export" or "extensionbuilder" only on development systems.
Impact
======
Having a TYPO3 system using Runtime Activated Packages functionality
will trigger a PHP deprecation warning on every TYPO3 request.
Affected Installations
======================
TYPO3 installations having the affected option set in either :php:`typo3conf/LocalConfiguration.php` or :php:`typo3conf/AdditionalConfiguration.php`.
Migration
=========
It is recommended - if this functionality is needed - to use TYPO3
Console and Composer Mode (with require-dev) to achieve a similar behavior.
If it is critical to have such features, consider modifying the extension in question to deal with TYPO3's Context
feature to enable / disable functionality for Production environment.
.. index:: LocalConfiguration, FullyScanned, ext:core
\ No newline at end of file
......@@ -417,4 +417,9 @@ return [
'Deprecation-91012-VariousHooksRelatedToTypoScriptFrontendController.rst',
],
],
'$GLOBALS[\'TYPO3_CONF_VARS\'][\'EXT\'][\'runtimeActivatedPackages\']' => [
'restFiles' => [
'Deprecation-91030-Runtime-ActivatedPackages.rst',
],
],
];
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment