Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-3241

[ezplatform-workflow] MigrateFlexWorkflowCommand connects to the database every time the symfony console is run

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • Workflow
    • None

    Description

      The `ezsystems/ezplatform-workflow` @  v2.0.1 tries to connect to the database during the __construct method. The causes it to try to establish a database connection every time the symfony console is run making it difficult to containerise eZ 3 EE applications.

      Cause:
      Looking under src/bundle/Command/MigrateFlexWorkflowCommand.php:62
      $this->databasePlatform = $connection->getDatabasePlatform();
      Triggers a connection to the database.

      Proposed fix:
      Included is a patch file  which will defer the DB query until the command itself is executed (and not just loaded.) This should be no less efficient than making the query when the command is loaded. dbFix.patch  . To apply the patch  run  `patch -p0 < dbFix.patch`   from the root of the package.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ryanolee ryanolee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: