Review main Merged

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

Benni Mack CR +2 V +2 Easy +13 −12 updated 05/10/23, 23:14

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 4