Review main Merged Breaking

54381[!!!][TASK] Replace ClassInfo with ClassSchema

Alexander Schnitzler CR +2 V +2 Nightmare +1565 −2115 updated 07/06/20, 07:58

Commit message

Extbase came along with two main caches for reflection data.
extbase_reflection and extbase_object. The latter mostly stored
information that were relevant to the dependency injection, like
inject methods and properties and constructor parameters. The
information was gathered by actual reflection and by analysing
doc blocks of properties and methods.

extbase_reflection stored similar reflection and doc block data
about objects but mainly for the parts outside dependency injection.
For example, the validation resolver used it to identify @validate
tags, the ActionController used it to identity which properties not
to validate. The ORM also used it a lot to find annotated types via
@var and so on.

There were a few issues with these two approaches:

- A lot of redundant data was fetched
- Data was fetched multiple times at different locations
- The extbase_reflection cache was stored each plugin seperately,
  resulting in a lot of redundant cache data for each plugin cache
- At a lot of places, the reflection service was used to reflect
  objects, but the data wasn't cached or taken from a cache resulting
  in performance drawbacks

This patch solves these issues with several approaches:

- The extbase_object cache has been removed completely and all
  necessary information about objects, mainly @inject stuff, is
  now fetched from the ReflectionService as well.
- The ReflectionService does still create ClassSchema instances
  but these were improved a lot. All necessary information is now
  gathered during the instantiation of ClassSchema instances. That
  means that all necessary data is fetched once and then it can be
  used everywhere making any further reflection superfluous.
- As runtime reflection has been removed completey, along with it
  several reflection classes, that analyzed doc blocks, have been
  removed as well. These are no longer necessary.
- The extbase_reflection cache is no longer plugin based and will
  no longer be stored in the database in the first place. Serialized
  ClassSchema instances will stored in typo3temp.

Review

  • Code review CR +2
    • Susi Moog +2
    • Benni Mack +1
  • Verified V +2
    • Susi Moog +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 2

Files 52

Show 32 more files

Review log 4064

Show 2139 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 10/12/17, 15:00

  2. TYPO3com voted on patch set 1 V -1 10/12/17, 15:00 Completed build in 10s on Thu, 12 Oct, 05:00 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15590

  3. Alexander Schnitzler uploaded patch set 2 10/12/17, 15:01

  4. TYPO3com voted on patch set 2 V -1 10/12/17, 15:11 Completed build in 09m 57s on Thu, 12 Oct, 05:11 PM Test Summary: 362 of 57029 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15591

  5. Alexander Schnitzler uploaded patch set 3 10/12/17, 15:59

  6. TYPO3com voted on patch set 3 V -1 10/12/17, 16:08 Completed build in 09m 06s on Thu, 12 Oct, 06:08 PM Test Summary: 380 of 57035 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15592

  7. Oliver Klee updated the commit message in patch set 4 10/12/17, 16:18

  8. TYPO3com voted on patch set 4 V -1 10/12/17, 16:28 Completed build in 09m 27s on Thu, 12 Oct, 06:28 PM Test Summary: 380 of 57035 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15593

  9. Alexander Schnitzler uploaded patch set 5 10/12/17, 20:27

  10. Alexander Schnitzler updated the commit message in patch set 6 10/12/17, 20:28

  11. Alexander Schnitzler uploaded patch set 7 10/12/17, 20:37

  12. TYPO3com voted on patch set 5 V -1 10/12/17, 20:37 Completed build in 10m 39s on Thu, 12 Oct, 10:37 PM Test Summary: 371 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15599

  13. TYPO3com voted on patch set 6 V -1 10/12/17, 20:39 Completed build in 10m 30s on Thu, 12 Oct, 10:39 PM Test Summary: 370 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15600

  14. TYPO3com voted on patch set 7 V -1 10/12/17, 20:46 Completed build in 09m 15s on Thu, 12 Oct, 10:46 PM Test Summary: 370 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15601

  15. Alexander Schnitzler uploaded patch set 8 10/13/17, 08:23

  16. TYPO3com voted on patch set 8 V -1 10/13/17, 08:32 Completed build in 09m 25s on Fri, 13 Oct, 10:32 AM Test Summary: 362 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15607

  17. Alexander Schnitzler uploaded patch set 9 10/13/17, 09:32

  18. TYPO3com voted on patch set 9 V -1 10/13/17, 09:41 Completed build in 08m 37s on Fri, 13 Oct, 11:41 AM Test Summary: 23 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15613

  19. Alexander Schnitzler uploaded patch set 10 10/13/17, 10:23

  20. TYPO3com voted on patch set 10 V -1 10/13/17, 10:32 Completed build in 08m 43s on Fri, 13 Oct, 12:32 PM Test Summary: 15 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15615

  21. Alexander Schnitzler uploaded patch set 11 10/13/17, 11:37

  22. TYPO3com voted on patch set 11 V -1 10/13/17, 11:46 Completed build in 09m 36s on Fri, 13 Oct, 01:46 PM Test Summary: 11 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15617

  23. Alexander Schnitzler uploaded patch set 12 10/13/17, 12:18

  24. TYPO3com voted on patch set 12 V -1 10/13/17, 12:27 Completed build in 09m 22s on Fri, 13 Oct, 02:27 PM Test Summary: 134 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15618

  25. Alexander Schnitzler uploaded patch set 13 10/13/17, 13:15

  26. TYPO3com voted on patch set 13 V -1 10/13/17, 13:24 Completed build in 08m 40s on Fri, 13 Oct, 03:24 PM Test Summary: 11 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15620

  27. TYPO3com commented on patch set 13 10/13/17, 13:27 Completed build in 20m 35s on Fri, 13 Oct, 03:27 PM Test Summary: 11 of 57059 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15620

  28. Alexander Schnitzler uploaded patch set 14 10/13/17, 13:57

  29. TYPO3com voted on patch set 14 V +1 10/13/17, 14:07 Completed build in 09m 35s on Fri, 13 Oct, 04:07 PM Test Summary: 56700 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15621

  30. Benni Mack uploaded patch set 15 10/16/17, 10:32

  31. TYPO3com voted on patch set 15 V +1 10/16/17, 10:41 Completed build in 09m 16s on Mon, 16 Oct, 12:41 PM Test Summary: 56708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15665

  32. Susi Moog commented on patch set 15 10/17/17, 09:38

    ClassSchema.php:555

    yes, please. remove this check ;)

    ReflectionService.php:56

    cachingEnabled would be sufficient.

    ReflectionService.php:71

    please add a comment here what that part is doing or use a named private method, it's not so clear what the substr is supposed to achieve.
  33. Susi Moog commented on patch set 15 10/17/17, 09:55

    ReflectionService.php:71 Reply

    at a guess: it's removing the php tag - maybe we should have a cache that does not write that tag as we remove it in more than one place.
  34. Susi Moog commented on patch set 15 10/17/17, 10:17

    ReflectionService.php:71 Reply

    >> why is extbase_reflection cache a PhpFrontend? Wouldn't a VariableFrontend make more sense?
  35. Susi Moog uploaded patch set 16 10/17/17, 12:16

  36. TYPO3com voted on patch set 16 V -1 10/17/17, 12:26 Completed build in 09m 43s on Tue, 17 Oct, 02:26 PM Test Summary: 12 of 57055 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15717

  37. Wouter Wolters commented on patch set 16 10/17/17, 12:42

    approaches
  38. Susi Moog uploaded patch set 17 10/17/17, 13:10

  39. TYPO3com voted on patch set 17 V -1 10/17/17, 13:10 Completed build in 11s on Tue, 17 Oct, 03:10 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15719

  1. Susi Moog uploaded patch set 18 10/17/17, 13:15

  2. TYPO3com voted on patch set 18 V +1 10/17/17, 13:24 Completed build in 08m 47s on Tue, 17 Oct, 03:24 PM Test Summary: 56696 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15720

  3. Benni Mack commented on patch set 19 10/17/17, 14:04

    Published edit on patch set 18.
  4. TYPO3com voted on patch set 19 V +1 10/17/17, 14:13 Completed build in 09m 07s on Tue, 17 Oct, 04:13 PM Test Summary: 56696 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15721

  5. Benni Mack uploaded patch set 20 10/17/17, 14:39

  6. TYPO3com voted on patch set 20 V -1 10/17/17, 14:48 Completed build in 08m 52s on Tue, 17 Oct, 04:48 PM Test Summary: 694 of 57055 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15722

  7. Benni Mack uploaded patch set 21 10/17/17, 14:50

  8. TYPO3com voted on patch set 21 V +1 10/17/17, 15:01 Completed build in 10m 24s on Tue, 17 Oct, 05:01 PM Test Summary: 56696 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15724

  9. Benni Mack voted on patch set 21 CR +1 V +1 10/17/17, 15:08

  10. Susi Moog voted on patch set 21 CR +2 V +2 10/17/17, 15:08

  11. Susi Moog voted on patch set 21 CR -1 V 0 10/17/17, 15:09

  12. Benni Mack uploaded patch set 22 10/17/17, 15:12

  13. Benni Mack voted on patch set 22 CR +1 V +1 10/17/17, 15:17

  14. TYPO3com voted on patch set 22 V -1 10/17/17, 15:21 Completed build in 08m 12s on Tue, 17 Oct, 05:21 PM Test Summary: 1 of 57055 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15726

  15. TYPO3com voted on patch set 22 V +1 10/17/17, 15:22 Completed build in 18m 14s on Tue, 17 Oct, 05:22 PM Test Summary: 56696 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15726

  16. Susi Moog voted on patch set 22 CR +2 V +2 10/17/17, 15:35

  17. Gerrit merged patch set 22 10/17/17, 15:35

  18. Tymoteusz Motylewski commented on patch set 23 10/17/17, 15:39

    just to make sure - will the removal of cache per plugin break usages when you have different TS configuration per plugin (e.g. config for overriding classes) ?
  19. Susi Moog commented on patch set 23 10/17/17, 15:52

    Object overwriting uses registerImplementation internally and resolves the different class name before calling the ReflectionService - therefore no change in that behavior. The ReflectionService does not have any information about class name mappings or the like.
  20. Tymoteusz Motylewski commented on patch set 23 10/17/17, 17:25

    awesome, thanks!
  21. Marc Bastian Heinrichs commented on patch set 23 10/18/17, 08:07

    yeah, cool! thx for fixing this long waiting issues. Just had only time for a short overview for now, so no voting from my side for the moment.
  22. Marc Bastian Heinrichs commented on patch set 23 10/18/17, 08:08

    which is too late anyway :-)
  23. Helmut Hummel commented on patch set 23 10/20/17, 12:37

    ReflectionService.php:79

    as far as I understand the PHP documentation, destructing objects may occur in any order, which means, than the dataCache instance might be gone at this point already. I think we should keep the shutdown method and maybe call it in TYPO3 bootstrap shutdown to be sure cache is written
  24. Benni Mack commented on patch set 23 10/20/17, 15:07

    ReflectionService.php:79 Reply

    good catch. However, we can't be quite sure that the bootstrap->shutdown() method is called at all times. mostly because you have "extbase->redirect()" etc logic which does not call bootstrap shutdown. we could add a shutdown() method, called in bootstrap, and also call shutdown in this __destruct() method, checking if the data cache object is still there, then persist here.
  25. Markus Klein commented on patch set 23 07/06/20, 07:58

    ReflectionService.php:498 Unresolved

    This handling for transient properties has been silently removed. I suppose this was done by accident. See also https://forge.typo3.org/issues/91726