Skip to content

Make doctrine/dbal an optional or suggested package #26

Description

@johanib

Currently, when using this bundle, it adds a composer dependency, doctrine/dbal. However, some projects, like stepup-azuremfa, do not use a database.
But the monitor bundle causes doctrine/dbal to be installed in those projects.

This is not really a problem, as the connection is optional in the DoctrineConnectionHealthCheck.

        if ($this->connection === null) {

But it would be nice to not packages without reason.

Possible solution:

  1. Move doctrine/dbal from require to suggest in composer.json.
  2. Exclude DoctrineConnectionHealthCheck.php from resource discovery in services.yaml to prevent autoloading errors?
  3. Conditionally register DoctrineConnectionHealthCheck in OpenConextMonitorBundle.php only if Doctrine\DBAL\Connection exists.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions