Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.1.1
-
None
Description
Wrong Doctrine DBAL storage connection is used when a new connection is appended in a 3rd party bundle.
Steps to reproduce
- Install clean 3.1.1-EE.
- Install and enable a custom bundle wich appends doctrine DBAL connection. Let's say `MyBundle` appends a new `myconnection` DBAL connection.
- Try open Admin UI
Expected result
**Admin UI loads and the user is able to use it.
Actual result
**Database error is shown
It happens only on EE. Because no default connection is provided in https://github.com/ezsystems/ezplatform-ee/blob/master/config/packages/doctrine.yaml#L12-L30. And when 3rd party bundle appends a new connection, is it listed as the first connection, and it is used for storage:
$ php bin/console debug:container --parameter=doctrine.connections --format=json { "doctrine.connections": { "myconnection": "doctrine.dbal.myconnection_connection", "default": "doctrine.dbal.default_connection", "site_factory": "doctrine.dbal.site_factory_connection" } }