有没有办法在信使路由中使用 .env 变量?
例如,这个配置:
framework:
messenger:
transports:
test: '%env(MESSENGER_TRANSPORT_DSN_TEST)%'
test1: '%env(MESSENGER_TRANSPORT_DSN_TEST_1)%'
other: '%env(MESSENGER_TRANSPORT_DSN_OTHER)%'
routing:
'App\Message\Oss': '%env(json:ROUTING_OSS)%'
给我这个错误:
In Compiler.php line 108:
Incompatible use of dynamic environment variables "json:ROUTING_OSS" found in parameters.
In FrameworkExtension.php line 1864:
Invalid Messenger routing configuration: the "App\Message\Oss" class is being routed to a sender called "%env(json:ROUTING_OSS)%". This is not a valid transport or service id.