Skip to content

Conversation

@wachterjohannes
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
Docs? no
Issues N/A
License MIT

Summary

When the symfony/ai-cache-platform bridge package is not installed, the parse-time import of ResultNormalizer in services.php causes a fatal error before the container build phase can remove it.

This fix moves the service registration from parse-time configuration (services.php) to runtime conditional registration (AiBundle.php), using a string class name to avoid class loading at parse time.

The service is now only registered when ContainerBuilder::willBeAvailable() confirms the cache platform bridge is present, following the same pattern used for other optional bridge integrations.

@carsonbot carsonbot added Bug Something isn't working Status: Needs Review labels Feb 8, 2026
@carsonbot carsonbot changed the title [AiBundle] Fix ResultNormalizer parse-time import causing fatal error [AI Bundle] Fix ResultNormalizer parse-time import causing fatal error Feb 8, 2026
@carsonbot carsonbot changed the title [AI Bundle] Fix ResultNormalizer parse-time import causing fatal error Fix ResultNormalizer parse-time import causing fatal error Feb 8, 2026
@OskarStark OskarStark added the AI Bundle Issues & PRs about the AI integration bundle label Feb 8, 2026
@carsonbot carsonbot changed the title Fix ResultNormalizer parse-time import causing fatal error [AI Bundle] Fix ResultNormalizer parse-time import causing fatal error Feb 8, 2026
When the symfony/ai-cache-platform bridge package is not installed,
the parse-time import of ResultNormalizer in services.php causes
a fatal error before the container build phase can remove it.

This fix moves the service registration from parse-time configuration
(services.php) to runtime conditional registration (AiBundle.php),
using a string class name to avoid class loading at parse time.

The service is now only registered when ContainerBuilder::willBeAvailable()
confirms the cache platform bridge is present, following the same pattern
used for other optional bridge integrations.
@wachterjohannes wachterjohannes force-pushed the fix/result-normalizer-parse-time-import branch from 4bb180f to aa7cddf Compare February 8, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Bundle Issues & PRs about the AI integration bundle Bug Something isn't working Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants