Review main Merged

76634[TASK] Replace instance cache in FormProtectionFactory

Stefan Bürk CR +2 V +2 Hard +416 −229 updated 11/16/22, 13:22

Commit message

Implementing class internal caches has been done in the
past, which however came with a lot of headaches. Mainly
in tests it's a epic quest to properly clear the state
between test runs, but it's not a good design at all.

Some work has been already done to make static class
`\TYPO3\CMS\Core\FormProtection\FormProtectionFactory`
injectable through the DI container, which moved some
parts from static to the instance part. This allows us
to transform methods from static to non-static.

This change injects the runtime cache, if the class is
instanciated through the DI. Thus the internal static
property cache for instances is removed.

Tests are adjusted. TestCases testing deprecated method
are moved to the UnitDeprecated to avoid failing tests.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 3

Files 10

Review log 1624

  1. Stefan Bürk uploaded patch set 1 11/15/22, 18:42

  2. Stefan Bürk uploaded patch set 2 11/15/22, 18:48

  3. core-ci voted on patch set 1 V +1 11/15/22, 18:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33776

  4. core-ci voted on patch set 2 V +1 11/15/22, 18:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33778

  5. Benni Mack commented on patch set 2 11/15/22, 20:40

    MfaConfigurationControllerTest.php:73

    you can remove this method now
  6. Stefan Bürk uploaded patch set 3 11/15/22, 20:44

  7. Stefan Bürk commented on patch set 3 11/15/22, 20:44

    MfaConfigurationControllerTest.php:73 Reply

    Ack & done (+ another superflous tearDown)
  8. core-ci voted on patch set 3 V +1 11/15/22, 20:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33784

  9. Stefan Bürk uploaded patch set 4 11/15/22, 23:19

  10. core-ci voted on patch set 4 V +1 11/15/22, 23:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33785

  11. Stefan Bürk commented on patch set 4 11/16/22, 01:40

  12. core-ci commented on patch set 4 11/16/22, 02:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33791

  13. Benni Mack uploaded patch set 5 11/16/22, 08:07

  14. core-ci voted on patch set 5 V +1 11/16/22, 08:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33808

  15. Benni Mack voted on patch set 5 V +1 CR +1 11/16/22, 08:19

  16. Christian Kuhn commented on patch set 5 CR -1 11/16/22, 11:39

    on it.
  17. Christian Kuhn uploaded patch set 6 11/16/22, 13:02

  18. Christian Kuhn uploaded patch set 7 11/16/22, 13:03

  19. core-ci voted on patch set 6 V +1 11/16/22, 13:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33825

  20. core-ci voted on patch set 7 V +1 11/16/22, 13:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33826

  21. Christian Kuhn voted on patch set 7 V +1 CR +1 11/16/22, 13:16

  22. Benni Mack voted on patch set 7 V +1 CR +1 11/16/22, 13:17

  23. Stefan Bürk voted on patch set 7 V +2 CR +2 11/16/22, 13:22

  24. Stefan Bürk merged patch set 8 11/16/22, 13:22