Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on middleware on 2.6 with logger #1487

Closed
loic425 opened this issue Mar 30, 2022 · 2 comments · Fixed by #1488
Closed

Error on middleware on 2.6 with logger #1487

loic425 opened this issue Mar 30, 2022 · 2 comments · Fixed by #1488

Comments

@loic425
Copy link

loic425 commented Mar 30, 2022

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Argument 1 passed to Doctrine\DBAL\Logging\Middleware::__construct() must implement interface Psr\Log\LoggerInterface, null given, called in /home/runner/work/SyliusResourceBundle/SyliusResourceBundle/src/Bundle/test/var/cache/test/ContainerRRyfIex/srcApp_KernelTestDebugContainer.php on line 3913 in /home/runner/work/SyliusResourceBundle/SyliusResourceBundle/vendor/doctrine/dbal/src/Logging/Middleware.php:16

versions

  • doctrine/dbal 3.3.4

This is not the same error message as #1485 so, I added this one.

@dmaicher
Copy link
Contributor

Indeed this can happen in case the logger service does not exist 😕 We need to handle this case

@l-vo
Copy link
Contributor

l-vo commented Mar 30, 2022

@dmaicher fix suggestion pushed 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants