[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/+/78976 Tested-by:core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php 1 addition, 1 deletion...ysext/core/Classes/Database/Schema/ConnectionMigrator.php
- typo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Database/Schema/SchemaMigrator.php
- typo3/sysext/install/Classes/Service/ClearCacheService.php 10 additions, 8 deletionstypo3/sysext/install/Classes/Service/ClearCacheService.php
- typo3/sysext/webhooks/Tests/Functional/WebhookExecutionTest.php 1 addition, 2 deletions...sysext/webhooks/Tests/Functional/WebhookExecutionTest.php
Please register or sign in to comment