Review 11.5 Merged

73732[TASK] Allow private service container in tests

Christian Kuhn CR +2 V +2 Hard +246 −245 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 req --dev typo3/testing-framework:^6.16.0
  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 56

Show 36 more files