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
In dbal.xml: <service id="Doctrine\DBAL\Driver\Connection" alias="database_connection" public="false" />
This service enables autowiring on the Doctrine\DBAL\Driver\Connection interface but database_connection is an instance of Doctrine\DBAL\Connection which does not implement Doctrine\DBAL\Driver\Connection anymore in DBAL 3.x
So why keeping this definition? Is it only for backward compatibility? But if it makes autowiring fails it's not really backward compatible.
The text was updated successfully, but these errors were encountered:
Right below that there is a same alias for Doctrine\DBAL\Connection which should explain why nobody complained till now. Or do you have some scenario where you get autowiring error regarding this?
Now developers need to lose the habit of autowiring Doctrine\DBAL\Driver\Connection which I thought would fail with a "no such service error". I was surprised to see instead an "interface not implemented" error, which is confusing.
"doctrine/dbal": "^3.6",
"doctrine/doctrine-bundle": "^2.8",
In dbal.xml:
<service id="Doctrine\DBAL\Driver\Connection" alias="database_connection" public="false" />
This service enables autowiring on the
Doctrine\DBAL\Driver\Connection
interface butdatabase_connection
is an instance ofDoctrine\DBAL\Connection
which does not implementDoctrine\DBAL\Driver\Connection
anymore in DBAL 3.xSo why keeping this definition? Is it only for backward compatibility? But if it makes autowiring fails it's not really backward compatible.
The text was updated successfully, but these errors were encountered: