Skip to content
Snippets Groups Projects
Commit 783a3105 authored by Benni Mack's avatar Benni Mack Committed by Stefan Bürk
Browse files

[BUGFIX] Ensure SchemaMigrator does not re-apply ext_localconf.php

SchemaMigrator / ConnectionMigrator calls
ClearCacheService->clearAll(), which in turn
just re-applies ext_localconf.php and ext_tables.php,
which in turn could re-apply hooks which have been
registered via

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = MyHook::class;

Thus, for such cases, it is important the ext_localconf.php
is not loaded again.

clearAll() now has an optional argument, to flush caches
(due to configuration changes, or with DB upgrade in place) so
they are completely emptied

This is less "brutal" than the original "clearAll" method, as it does
not re-load TYPO3_CONF_VARS.

This problem comes from https://review.typo3.org/c/Packages/TYPO3.CMS/+/76553/20/typo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php

The solution can be found in the now corrected test in EXT:webhooks,
which actually registers a hook like this.

Resolves: #100840
Related: #99062
Releases: main, 12.4
Change-Id: I9d53df80b119cfec37a5d8d40d5fbd881b14307f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78968


Reviewed-by: default avatarStefan Froemken <froemken@gmail.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Froemken <froemken@gmail.com>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent fe0c750c
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