You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Symfony Doctrine bridge does not require Doctrine DBAL nor Doctrine ORM but they are only "suggested" (https://packagist.org/packages/symfony/doctrine-bridge). I am working on a project which uses Doctrine DBAL but does not use Doctrine ORM. Since the last patch of Symfony (v5.0.9) we had to hard code the version doctrine bridge to v5.0.8 to avoid errors (described in the next section).
How to reproduce
Install Symfony project with DoctrineBundle and Doctrine DBAL but withoutDoctrine ORM.
Run bin/console doctrine:database:drop --force
Then you get the error: Attempted to load class "ToolEvents" from namespace "Doctrine\ORM\Tools". Did you forget a "use" statement for another namespace?
arnolanglade
changed the title
Symfony Doctrine bridge needs to Doctrine ORM but it is not required library
Symfony Doctrine bridge needs Doctrine ORM but it is not mandatory dependency
Jun 1, 2020
Symfony version(s) affected: 5.0.9
Description
Symfony Doctrine bridge does not require Doctrine DBAL nor Doctrine ORM but they are only "suggested" (https://packagist.org/packages/symfony/doctrine-bridge). I am working on a project which uses Doctrine DBAL but does not use Doctrine ORM. Since the last patch of Symfony (v5.0.9) we had to hard code the version doctrine bridge to v5.0.8 to avoid errors (described in the next section).
How to reproduce
DoctrineBundle
andDoctrine DBAL
but withoutDoctrine ORM
.bin/console doctrine:database:drop --force
Attempted to load class "ToolEvents" from namespace "Doctrine\ORM\Tools". Did you forget a "use" statement for another namespace?
Additional context
The problem comes from https://github.com/symfony/doctrine-bridge/blob/master/SchemaListener/MessengerTransportDoctrineSchemaSubscriber.php#L93. This class uses Doctrine
ORM
andDBAL
events. Should we move those libraries from "suggested" to "required"?The text was updated successfully, but these errors were encountered: