Review main Merged

28101[TASK] Deprecate usage of $GLOBALS['typo3CacheManager']

Helmut Hummel CR +2 V +2 Hard +326 −176 updated 03/07/14, 18:45

Commit message

* Replace all instances of $GLOBALS['typo3CacheManager']
  in the core with a makeInstance call.
* Adapt the tests.
* Make use of dependency injection where possible.
* Add compatibility layer with deprecation message
  for $GLOBALS['typo3CacheManager'] and $GLOBALS['typo3CacheFactory']

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Christian Kuhn +1
  • Verified V +2
    • Wouter Wolters +2
    • Christian Kuhn +1

Issues 1

Files 42

Show 22 more files

Review log 21

  1. Mr. Jenkins commented on patch set 1 CR -1 V -1 03/06/14, 13:18

  2. Helmut Hummel uploaded patch set 2 03/06/14, 13:43

  3. Mr. Jenkins commented on patch set 2 CR -1 V -1 03/06/14, 14:00

  4. Markus Klein uploaded patch set 3 03/06/14, 14:13

  5. Markus Klein commented on patch set 3 03/06/14, 14:13

    Fixed Jenkins
  6. Mr. Jenkins commented on patch set 3 03/06/14, 14:27

  7. Markus Klein commented on patch set 3 CR -1 03/06/14, 14:47

    Cache.php:48

    what is the reason for having them private? I mean I usually like private stuff, but it's uncommon in TYPO3 CMS ;-)

    Cache.php:57

    that should be part of the comment above

    Cache.php:85

    self::$isCachingFrameworkInitialized can never be FALSE when self::$cache* is already initialized.

    Cache.php:101

    Why? If self::$* is NULL then we set the singletonInstance to NULL. Ok. if self::$* is not NULL, then we just set the same instances again. What is the benefit? Just set them NULL directly.

    Cache.php:103

    unset() vs. directly setting it null. Unset on a static member of a class is a bit weird for my taste.

    GlobalObjectDeprecationDecorator.php:69

    trailing space

    CachingFrameworkGarbageCollectionTest.php:44

    parent::setUp() ?

    DataHandlerHook.php:31

    nope!! Documentation is wrong, I'm pretty sure.
  8. Helmut Hummel uploaded patch set 4 03/06/14, 22:17

  9. Mr. Jenkins commented on patch set 4 03/06/14, 22:31

  10. Markus Klein commented on patch set 4 CR +1 03/06/14, 23:03

    will test tomorrow
  11. Helmut Hummel commented on patch set 3 03/06/14, 23:33

    Cache.php:48 Reply

    Yeah. In this case I do not want to expose the instances by any means. I also do not need them in tests, so they can be private. Hm, but isCachingFrameworkInitialized is protected. Well, for consistency I change this to protected

    Cache.php:57 Reply

    Done

    Cache.php:85 Reply

    true, we don't need this any more

    Cache.php:101 Reply

    wrong method call ^^ must be remove singleton instance!

    Cache.php:103 Reply

    Yeah, also thought about that. Will set them to NULL

    GlobalObjectDeprecationDecorator.php:69 Reply

    Done

    CachingFrameworkGarbageCollectionTest.php:44 Reply

    none of our tests call parent and all call parent in tearDown ^^ Let's be consistent. We need the parent call in tearDown as we do cleanup stuff in the parent class (not possible otherwise with current phpunit) but we should keep setUp clean.

    DataHandlerHook.php:31 Reply

    I really *$%&§"$ that we have a GeneralUtility in Documentation. Could you do me a favor and submit a patch that applies a proper class name to this? I will do anything for you in return... well almost everything ;)
  12. Christian Kuhn commented on patch set 4 CR -1 03/07/14, 15:34

    will push another set.

    FrontendBackendUserAuthentication.php:263

    use statement is given.
  13. Christian Kuhn uploaded patch set 5 03/07/14, 16:03

  14. Mr. Jenkins commented on patch set 5 03/07/14, 16:17

  15. Christian Kuhn voted on patch set 5 V +1 CR +1 03/07/14, 16:30

  16. Wouter Wolters commented on patch set 5 CR -1 03/07/14, 18:08

    ExtensionManagementUtility.php:71

    wront type here. Should be \TYPO3\CMS\Core\Cache\CacheManager

    InstallUtility.php:300

    why not use $this->cacheManager here? it is injected here..
  17. Christian Kuhn uploaded patch set 6 03/07/14, 18:27

  18. Christian Kuhn commented on patch set 6 V +1 CR +1 03/07/14, 18:27

    fixed wouters remarks.
  19. Wouter Wolters voted on patch set 6 V +2 CR +2 03/07/14, 18:44

  20. Wouter Wolters merged patch set 7 03/07/14, 18:44

  21. Mr. Jenkins commented on patch set 6 03/07/14, 18:45