OpenConext / OpenConext/Monitor-bundle
Make `doctrine/dbal` an optional or suggested package
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 6
- Forks
- 2
- Avg merge
- 17d 43m
- Merged PRs (30d)
- 1
Description
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:
- Move doctrine/dbal from require to suggest in composer.json.
- Exclude DoctrineConnectionHealthCheck.php from resource discovery in services.yaml to prevent autoloading errors?
- Conditionally register DoctrineConnectionHealthCheck in OpenConextMonitorBundle.php only if Doctrine\DBAL\Connection exists.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review composer.json, services.yaml, OpenConextMonitorBundle.php, and DoctrineConnectionHealthCheck.php to compare the proposed ways of making doctrine/dbal optional. Start by tracing service resource discovery and bundle registration without the package installed. Done means projects without a database no longer install doctrine/dbal and do not encounter autoloading or registration errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100