Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31780

Default doctrine dbal connection issue

    XMLWordPrintable

    Details

      Description

      Wrong Doctrine DBAL storage connection is used when a new connection is appended in a 3rd party bundle.

      Steps to reproduce

      1. Install clean 3.1.1-EE.
      2. Install and enable a custom bundle wich appends doctrine DBAL connection. Let's say `MyBundle` appends a new `myconnection` DBAL connection.
      3. 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"
          }
      } 

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            L0rdJ Serhey Dolgushev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: