diff --git a/framework/php/config/services.yaml b/framework/php/config/services.yaml index 91fd1d3..d387388 100644 --- a/framework/php/config/services.yaml +++ b/framework/php/config/services.yaml @@ -12,10 +12,21 @@ services: arguments: $expectedToken: '%env(default::BRIDGE_TOKEN)%' - PhpQml\Bridge\Maker\BridgeResourceMaker: - arguments: - $qmlPath: '%bridge.qml_path%' +# Maker classes extend symfony/maker-bundle's AbstractMaker, which is a +# require-dev dependency. In `composer install --no-dev` builds (the +# staging-symfony tree the AppImage is assembled from) AbstractMaker is +# absent: PHP fails to autoload BridgeResourceMaker etc., so the glob +# above silently drops them — that's fine. But a top-level explicit +# `services.PhpQml\Bridge\Maker\BridgeResourceMaker:` block forces +# ResolveClassPass to load the class regardless of dev/prod, which then +# crashes the prod container compile. Scope the qml_path injection to +# `when@dev:` so prod builds never touch these definitions. +when@dev: + services: + PhpQml\Bridge\Maker\BridgeResourceMaker: + arguments: + $qmlPath: '%bridge.qml_path%' - PhpQml\Bridge\Maker\BridgeWindowMaker: - arguments: - $qmlPath: '%bridge.qml_path%' + PhpQml\Bridge\Maker\BridgeWindowMaker: + arguments: + $qmlPath: '%bridge.qml_path%'