Closed pounard closed 3 years ago
Done https://github.com/pounard/goat-query/commit/8a600130bed942998508bab842af881cea8bf435
Now we have to deal with platform, which sometime gets early initialized when calling dialect specific functions that don't need the connection.
Further, platform only need the connection for the escaper, find a way to decouple those two.
Fixed !
When services are requested from the Symfony dependency injection container, Runner is most often the required dependency. This forces the Driver to connect, then create the runner giving it the connection.
In most cases, it's not a problem, you'll need this connection anyway, but in the console context, it's wrong, because the Runner can be spawed to be injected to some console commands, if the connection fail, it prevent the user from user the console since it'll raise exceptions, and prevent the console from registering commands.