Review main Merged

29811[BUGFIX] Clear all cache in install tool throws exception

Sascha Wilking CR +2 V +2 Easy +12 −12 updated 05/03/14, 18:58

Commit message

reinitializeClassLoaderAndCachesAndPackageManagement
not only reloads the class loader and package management
but also reloads LocalConfiguratzion and
AdditionalConfiguration. This can lead to errors if
AdditionalConfiguration contains require_once calls.
The method is only used by ClearCacheService which
does not need the configuration reload.

Solution is to remove the method and introduce a new
one to unregister only the class loader. The other
bootstrap methods are now called directly in clear
cache of install tool.

Review

  • Code review CR +2
    • Anja Leichsenring +2
    • Jan Runte +1
    • Christian Kuhn +1
  • Verified V +2
    • Anja Leichsenring +2
    • Jan Runte +1
    • Christian Kuhn +1

Issues 1

Files 2

Review log 18

  1. Helmut Hummel commented on patch set 1 CR -1 05/03/14, 14:09

    Thanks for your patch. While the code changes might make sense (did not look into the details yet), the reasons for the change seems invalid to me. If there are other reasons tho change the code besides the described one (which I would say is a wrong startingpoint), please elaborate on them. Thanks
    If you include an external configuration file (which I also do in every installation), you *must not* use require_once. If you have function or class definitions in that file, move them into a different file and require_once this file in your extra configuration file.
  2. Jan Runte commented on patch set 1 V +1 CR +1 05/03/14, 14:34

    Simple Example: out-of-doc-root/secure.php: $db = array(...); typo3conf/LocalConfiguration.php: require_once('...secure.php'); return array( ... 'DB' => $db, ... ); TYPO3-Backend: "Install" -> "Important actions" -> "Clear all caches" Works for fine!
  3. Sascha Wilking updated the commit message in patch set 1 05/03/14, 14:42

  4. Sascha Wilking updated the commit message in patch set 2 05/03/14, 14:42

  5. Christian Kuhn updated the commit message in patch set 3 05/03/14, 14:51

  6. Christian Kuhn updated the commit message in patch set 4 05/03/14, 14:52

  7. Christian Kuhn uploaded patch set 6 05/03/14, 14:56

  8. Christian Kuhn commented on patch set 6 V +1 CR +1 05/03/14, 15:03

    As discussed, this patch is very fine with me. The former method in the bootstrap did too much and was not nicely encaplulated. While it is true that having a require() in AdditionalConfiguration instead of an require_once() is the better choice, it does not hurt if we fix this issue here, to not let the clearCacheService fatal.
  9. Jan Runte voted on patch set 6 V +1 CR +1 05/03/14, 15:14

  10. Mr. Jenkins commented on patch set 1 05/03/14, 15:28

  11. Helmut Hummel commented on patch set 6 05/03/14, 15:42

    Bootstrap.php:278

    ok trying to understand the changes here: the change basically removes the … ->populateLocalConfiguration() … call. What is the reasoning behind renaming the method and not just removing this line?
  12. Anja Leichsenring voted on patch set 6 V +2 CR +2 05/03/14, 16:43

  13. Anja Leichsenring merged patch set 7 05/03/14, 16:43

  14. Mr. Jenkins commented on patch set 2 05/03/14, 17:44

  15. Mr. Jenkins commented on patch set 3 05/03/14, 17:58

  16. Mr. Jenkins commented on patch set 4 05/03/14, 18:14

  17. Mr. Jenkins commented on patch set 5 05/03/14, 18:45

  18. Mr. Jenkins commented on patch set 6 05/03/14, 18:58