Review TYPO3_8-7 Merged

62475[BUGFIX] Update local cache upon creation of new storage object

Yann Weyer CR +2 V +2 Easy +3 −0 updated 03/08/20, 21:20

Commit message

When a new storage object for the "local" driver is being created
it is not possible to retrieve the new object instantaneous. The
objects are being cached in a local static variable which needs
to get flushed (set to "null") first.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Ghanshyam Bhava +1
    • Henning Liebe +1
  • Verified V +2 Done
    • Benni Mack +2
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1416

  1. Yann Weyer uploaded patch set 1 11/28/19, 18:50

  2. TYPO3com voted on patch set 1 V -1 11/28/19, 18:57 Completed build in 06m 30s on Thu, 28 Nov, 06:57 PM Test Summary: 39187 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC87-3737

  3. Tymoteusz Motylewski commented on patch set 1 11/28/19, 19:58

    Hi Does this issue exists also in newer versions (v9, v10)? If yes, please first push a patch to master and it will be backported to older branch after merge
  4. Yann Weyer commented on patch set 1 11/28/19, 20:04

    > Patch Set 1: > > Hi > Does this issue exists also in newer versions (v9, v10)? If yes, please first push a patch to master and it will be backported to older branch after merge Hi Tymotedusz, The fix is a backport of a v9 fix (merged one year ago). I suppose it was integrated in the v10 (how can I find out?) Original v9 issue: https://forge.typo3.org/issues/62273 Original v9 changeset: https://forge.typo3.org/projects/typo3cms-core/repository/revisions/5715465d1c7997237d5dd0bbee4ba92fb8186291/diff/typo3/sysext/core/Classes/Resource/StorageRepository.php I basically copied the description of the original commit, since they both are solving the same problem.
  5. TYPO3com voted on patch set 1 V +1 11/28/19, 20:42 Completed build in 1h 57m 46s on Thu, 28 Nov, 08:42 PM Test Summary: 80410 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC87-3737

  6. Oli Bartsch commented on patch set 1 11/28/19, 21:47

    StorageRepository.php:244

    Why not using `self` here?
  7. Yann Weyer commented on patch set 1 11/29/19, 11:29

    > Patch Set 1: > > (1 comment) Doesn't `static::` bring more flexibility and works better if the class gets extended?
  8. Yann Weyer commented on patch set 1 12/02/19, 13:44

    StorageRepository.php:244 Reply

    Hi Oliver, Doesn't `static::` bring more flexibility and works better if the class gets extended? I can change it to `self` if it better fits the Typo3 standards. Both versions are currently being used in the class to access the property, so I wasn't sure which one to pick.
  9. Oli Bartsch commented on patch set 1 12/02/19, 16:09

    StorageRepository.php:244 Reply

    Hi, you are right using static would be needed if an extending class would change the property while using this function. As the method is public and the whole class isn’t internal I think we should go with static here. Thanks for pointing me to this. Maybe we can unify this for findByUid in a following task.
  10. Ghanshyam Bhava commented on patch set 1 CR +1 12/02/19, 16:36

    StorageRepository.php:244 Reply Unresolved

    Hey Oliver & Yann There is no major issue with accessing variables I guess. I will prefer using static instead of self. because self always refers to class it is being executed in. In added self is no longer aware of inheritance. If it is a concern to performance both are probably the same.
  11. Benni Mack commented on patch set 1 CR +2 12/27/19, 22:51

    straight backport, fixed with https://review.typo3.org/56058
  12. Henning Liebe voted on patch set 1 CR +1 01/14/20, 11:56

  13. Yann Weyer commented on patch set 1 02/20/20, 18:56

    Hey, I am not familiar with TYPO3 approval process; since November the patch was reviewed but still needs to be verified (I guess?). => Is there anything I should do, such as mark the thread about static methods as "resolved" (or should Oliver Bartsch do it, since he was the one to raise the question)?
  14. Benni Mack voted on patch set 1 V +1 03/08/20, 21:19

  15. Benni Mack voted on patch set 1 V +2 03/08/20, 21:20

  16. Benni Mack merged patch set 2 03/08/20, 21:20