1

I am having some issues with my NotificationService on my UAT environment, but, oddly, this is working fine on my local server.

$ php7 bin/console cache:clear

In DefinitionErrorExceptionPass.php line 54:

Cannot autowire service "App\Service\NotificationService": argument "$hub" of method "__construct()" references interface "Symfony\Component\Mercure\HubInterface" but no such service exists. Did you create a class that implements this interface?

class NotificationService {
  public function __construct(..., HubInterface $hub, ...) {

The symfony/mercure package provided both HubInterface and Hub class implementing this interface. I just resetted the project on UAT server and this error keeps throwing. My Symfony project is up-to-date (v5.2.11) and so mercure & mercure bundle.

Have you an idea about what is missing ?

Loenix
  • 1,057
  • 1
  • 10
  • 23
  • And you have cleared cache, cleared Redis or Memcached if used etc? Maybe run php composer.phar install again to clear autoload? or php composer.phar dump-autoload. – Tom Sep 10 '21 at 08:05

0 Answers0