Skip to content

Commit d240703

Browse files
committed
bug #1131 [AI Bundle] Make expression_language service optional (camilleislasse)
This PR was merged into the main branch. Discussion ---------- [AI Bundle] Make expression_language service optional | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | no | Issues | n/a | License | MIT The `ai.platform.template_renderer.expression` service was configured to depend on `expression_language` without `>nullOnInvalid()`. This causes a container build failure when: 1. The `ExpressionLanguage` class exists (installed as a transitive dependency) 2. But the `expression_language` service is not registered in the application **Error:** ```The service "ai.platform.template_renderer.expression" has a dependency on a non-existent service "expression_language"``` **Fix:** Add `->nullOnInvalid()` to make the service optional, consistent with other similar usages in the same file (e.g.,`ai.security.is_granted_attribute_listener` at line 203) Commits ------- 078c9c3 [AI Bundle] Make expression_language service optional
2 parents 93d31c6 + 078c9c3 commit d240703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ai-bundle/config/services.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
$container->services()
127127
->set('ai.platform.template_renderer.expression', ExpressionLanguageTemplateRenderer::class)
128128
->args([
129-
service('expression_language'),
129+
service('expression_language')->nullOnInvalid(),
130130
])
131131
->tag('ai.platform.template_renderer');
132132
}

0 commit comments

Comments
 (0)