refactor(deps): inject OpenRegister instead of looking it up (ADR-083) - #515
Draft
rubenvdlinde wants to merge 1 commit into
Draft
refactor(deps): inject OpenRegister instead of looking it up (ADR-083)#515rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
5 file(s) reached OpenRegister through $this->container->get(...) on an UNCONDITIONAL path — no availability check, no degrading catch. The dependency was announced nowhere: not in the constructor, not in the use block, not in any type. It appeared mid-method, as a string. Now constructor-injected and typed, so the dependency is visible to a reader and to tooling. Behaviour is unchanged: the same object, from the same container, resolved at construction instead of at first use. ContainerInterface is dropped only where nothing else used it. Deliberately NOT converted, because they are correct as written (ADR-083 rule 1's exception): lookups behind isInstalled()/getInstalledApps(), and lookups whose catch degrades rather than rethrows. Verified per file: php -l clean, and gate-66's lookup check reports zero remaining findings for each file changed. gate-66 for this app: 23 -> 8.
Contributor
Quality Report — ConductionNL/softwarecatalog @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue-demi | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 130/130 | |||
| npm | ✅ | ✅ 704/704 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ❌ | ||||
| Newman | ⏭️ | ||||
| Playwright | ❌ | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-08-14 19:05 UTC
Download the full PDF report from the workflow artifacts.
rubenvdlinde
marked this pull request as draft
August 14, 2026 19:12
Contributor
Author
|
Marked draft — not mergeable as it stands, same cause as decidesk/pipelinq/shillinq. Removing 7 test file(s) here construct the classes this PR changes and need updating to the new signature first. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
5 file(s) reached OpenRegister through
$this->container->get(...)on an unconditional path — no availability check, no degrading catch. The dependency was announced nowhere: not in the constructor, not in theuseblock, not in any type. It appeared mid-method, as a string.Now constructor-injected and typed. Behaviour is unchanged — same object, same container, resolved at construction instead of at first use.
ContainerInterfaceis dropped only where nothing else used it.Deliberately not converted, because they are correct as written (ADR-083 rule 1's exception): lookups behind
isInstalled()/getInstalledApps(), and lookups whosecatchdegrades rather than rethrows. Converting those would make the service unconstructable without OpenRegister and turn a clean message into a 500.Verified per file:
php -lclean, and gate-66's lookup check reports zero remaining findings for each file changed.gate-66 for this app: 23 → 8.