Skip to content

[Registry] Make Container::has() mirror what get() can build - #36

Open
chr-hertel wants to merge 1 commit into
mainfrom
fix/issue-21-container-psr11
Open

[Registry] Make Container::has() mirror what get() can build#36
chr-hertel wants to merge 1 commit into
mainfrom
fix/issue-21-container-psr11

Conversation

@chr-hertel

Copy link
Copy Markdown
Owner

Container::has() returned true for any existing class, so ReferenceHandler's new $className() fallback was unreachable and unbuildable handlers failed with ContainerException. has() now checks resolvability (set instances, autowirable constructors, circular deps), restoring the PSR-11-aligned contract and the fallback path; stale numbered step comments are cleaned up.

Closes #21

Confidence: 9/10 — has() now mirrors resolveParameter() exactly, covered by new unit tests; full unit suite, cs-fixer, and phpstan pass.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[B7] Container::has() breaks the PSR-11 contract, with a downstream effect

1 participant