HellPat / symfony-messenger-standalone

Standalone usage examples for Symfony messenger
0 stars 1 forks source link

I am not able to start the command #1

Open vikbert opened 3 years ago

vikbert commented 3 years ago

after typed bin/console, I got the following errors, Do I forget something else?

symfony-messenger-standalone on  main [!]
➜ bin/console
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#7
  #message: """
    Attempted to load class "ServiceLocator" from namespace "Symfony\Component\DependencyInjection".\n
    Did you forget a "use" statement for another namespace?
    """
  #code: 0
  #file: "./vendor/symfony/messenger/Command/AbstractFailedMessagesCommand.php"
  #line: 59
  trace: {
    ./vendor/symfony/messenger/Command/AbstractFailedMessagesCommand.php:59 { …}
    ./bin/console:148 {
      ›     ServiceIds::TRANSPORTS_FAILED,
      ›     $services->get(ServiceIds::TRANSPORTS_FAILED)
      › ));
      arguments: {
        $globalFailureReceiverName: "transport.failed_messages"
        $failureTransports: Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineTransport {#72 …}
      }
    }
  }
}
2021-08-27T13:11:15+00:00 [info] User Deprecated: Since symfony/messenger 5.3: Passing a SenderInterface value as 1st argument to "Symfony\Component\Messenger\EventListener\SendFailedMessageToFailureTransportListener::__construct()" is deprecated, pass a ServiceLocator instead.
2021-08-27T13:11:15+00:00 [info] User Deprecated: Since symfony/messenger 5.3: Passing a receiver as 2nd argument to "Symfony\Component\Messenger\Command\AbstractFailedMessagesCommand::__construct()" is deprecated, pass a service locator instead.
2021-08-27T13:11:15+00:00 [critical] Uncaught Error: Class "Symfony\Component\DependencyInjection\ServiceLocator" not found
Crell commented 2 years ago

I get the same. The issue is the Symfony API apparently changed in 5.3. This library is written for 5.2. The current version is 5.4/6.0.

Such is life with sample code, unfortunately.