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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 135

Show 115 more files