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 Done
    • Stefan Bürk +2
    • Stefan Froemken +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Stefan Froemken +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 913

  1. Benni Mack uploaded patch set 1 05/08/23, 20:07

  2. Benni Mack updated the commit message in patch set 2 05/08/23, 20:08

  3. core-ci voted on patch set 1 V +1 05/08/23, 20:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41674

  4. core-ci voted on patch set 2 V +1 05/08/23, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41675

  5. Benni Mack uploaded patch set 3 V +1 05/08/23, 20:47

  6. core-ci voted on patch set 3 V -1 05/08/23, 20:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41676

  7. Andreas Kienast commented on patch set 3 CR -1 05/09/23, 06:16

    ClearCacheService.php:63

    This method looks like a left-over
  8. Benni Mack commented on patch set 4 CR -1 V -1 05/09/23, 06:17

    Published edit on patch set 3.
  9. Benni Mack commented on patch set 4 05/09/23, 06:17

    ClearCacheService.php:63 Reply

    Done

    WebhookExecutionTest.php:106

    get rid of the @todo
  10. core-ci voted on patch set 4 V +1 05/09/23, 06:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41686

  11. Stefan Froemken voted on patch set 4 V +1 CR +1 05/10/23, 20:57

  12. Stefan Bürk voted on patch set 4 V +2 CR +2 05/10/23, 23:14

  13. Stefan Bürk merged patch set 5 05/10/23, 23:14