diff --git a/src/Codeception/Module/Symfony.php b/src/Codeception/Module/Symfony.php index 39756533..cffeec4a 100644 --- a/src/Codeception/Module/Symfony.php +++ b/src/Codeception/Module/Symfony.php @@ -571,7 +571,9 @@ public function grabService($service) { $container = $this->_getContainer(); if (!$container->has($service)) { - $this->fail("Service $service is not available in container"); + $this->fail("Service $service is not available in container. + If the service isn't injected anywhere in your app, you need to set it to `public` in your `config/services_test.php`/`.yaml`, + see https://symfony.com/doc/current/testing.html#accessing-the-container"); } return $container->get($service); }