Skip to content

Move nullable ServiceMap out of ServiceMapProvider constructor - #1073

Merged
TomasVotruba merged 1 commit into
mainfrom
fix-nullable-servicemap-ctor
Oct 6, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
fix-nullable-servicemap-ctor

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Fixes rectorphp/rector#9909.

The DI container autowired ServiceMapProvider's optional ?ServiceMap $serviceMap = null constructor argument by eagerly building a ServiceMap service, instead of passing null.

serviceMap is only an internal lazy cache, never a real dependency - no caller passes it. Moving it to a plain property keeps the lazy-cache behavior and removes the nullable constructor param, so the container no longer tries to construct it.

@TomasVotruba
TomasVotruba merged commit 533ccbb into main Oct 6, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the fix-nullable-servicemap-ctor branch October 6, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant