Review main Merged

73646[TASK] Allow private service container in tests

Benjamin Franzke CR +2 V +2 Expert +519 −549 updated 02/27/22, 14:41

Commit message

The private container now provides access to non-public
services that have been at least once injected (and thus
be considered as service during DI compilation phase).

This may be used to provide dependencies to functional
test setups where some dependencies needs to be mocked
while other should receive the vanilla dependency
the container would normally inject.

A functional test case does implement the ContainerInterface
now, allowing tests to access both public and private
services.

$this->getContainer() may still be used if the default
container (delivering public services only) needs to
be injected into a service.

Related testing-framework pull request:
https://github.com/TYPO3/testing-framework/pull/331

Commands executed:
  composer u typo3/testing-framework
  git grep -l "this->getContainer()->get("  | xargs sed -i 's/this->getContainer()->get(/this->get(/g'

Review

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

Issues 1

Files 135

Show 115 more files

Review log 1524

  1. Benjamin Franzke uploaded patch set 1 02/22/22, 15:56

  2. core-ci voted on patch set 1 V -1 02/22/22, 16:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24048

  3. Benjamin Franzke uploaded patch set 2 02/22/22, 16:19

  4. core-ci voted on patch set 2 V +1 02/22/22, 16:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24050

  5. Benjamin Franzke uploaded patch set 3 02/22/22, 19:06

  6. core-ci voted on patch set 3 V +1 02/22/22, 19:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24060

  7. Stefan Bürk uploaded patch set 4 02/25/22, 00:48

  8. Stefan Bürk uploaded patch set 5 02/25/22, 00:51

  9. core-ci voted on patch set 4 V -1 02/25/22, 00:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24245

  10. core-ci voted on patch set 5 V -1 02/25/22, 01:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24246

  11. Stefan Bürk uploaded patch set 6 02/25/22, 01:04

  12. Stefan Bürk uploaded patch set 7 02/25/22, 01:08

  13. Christian Kuhn commented on patch set 7 02/25/22, 01:16

    ResetPasswordControllerTest.php:78

    stuff like this is the true benefit of this TF feature.
  14. Christian Kuhn updated the commit message in patch set 8 02/25/22, 01:19

  15. core-ci voted on patch set 7 V +1 02/25/22, 01:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24249

  16. core-ci voted on patch set 8 V +1 02/25/22, 01:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24250

  17. Christian Kuhn uploaded patch set 9 02/27/22, 13:27

  18. core-ci voted on patch set 9 V +1 02/27/22, 13:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24364

  19. Christian Kuhn commented on patch set 9 CR -1 02/27/22, 13:59

    temp -1
  20. Christian Kuhn updated the commit message in patch set 10 02/27/22, 14:13

  21. core-ci voted on patch set 10 V +1 02/27/22, 14:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24368

  22. Stefan Bürk voted on patch set 10 V +1 CR +1 02/27/22, 14:37

  23. Christian Kuhn voted on patch set 10 V +2 CR +2 02/27/22, 14:41

  24. Christian Kuhn merged patch set 11 02/27/22, 14:41