Closed as not planned
Description
Symfony version(s) affected
6.2
Description
I can pass one enum as argument to a service, but not an array or an object.
If I call the parameter directly from the container (getParameter("app.myParam")) I get the array or the object. The issue is only when I use it argument for my service.
How to reproduce
I have a service defined like this :
services:
My\Service:
arguments:
$myArg: '%app.myParam%'
✅ I can pass one enum like this, it is working fine.
parameters:
app.myParam: !php/enum MyEnum::Test
🚫 but when I try to pass enums as array or as object I have an Warning: Undefined array key "app.myParam"
error
parameters:
app.myParam: [!php/enum MyEnum::Test]
parameters:
app.myParam:
test: !php/enum MyEnum::Test
Possible Solution
No response
Additional Context
No response