Closed
Description
Symfony version(s) affected: 4.1.x
Description
test.service_container doesn't work with private shared:false services
App\MyService:
shared: false
public: false
When we try to load the MyService from the new "test.service_container" we have an exception :
$client = static::createClient();
$privateContainer = $client->getContainer();
$privateContainer->get(App\MyService::class);
The 'AppMyService' service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.
Possible Solution
Additional context