Repository navigation
6.4.1
Bug fix only. No dependency or API changes since 6.4.0.
Connection services no longer connect eagerly
6.4.0 guarded the DBAL 4 removal of markDoctrineTypeCommented() like this:
if (method_exists($connection->getDatabasePlatform(), 'markDoctrineTypeCommented')) {which resolves the platform unconditionally. On any server whose version has to be negotiated (PostgreSQL, MySQL), DBAL connects in order to resolve it — so merely building a doctrine.connection.* service opened a socket.
Before 6.4.0, getDatabasePlatform() was only reached inside the two foreach loops, and therefore not called at all when neither doctrineTypeMappings nor doctrineCommentedTypes were configured.
The platform is now resolved once, and only when there is something to apply.
Test coverage
The existing testNoConnectWithoutCustomMappingsAndCommentedTypes asserts exactly the right thing (isConnected() is false) but could not catch this — it uses SQLite, whose platform resolves without connecting.
The new testDoesNotResolvePlatformWhenThereIsNothingToApply points the factory at an unreachable MySQL connection. It throws Connection refused against the 6.4.0 behaviour and passes now.