Closed pedrocasado closed 1 month ago
In case of actual parameters it might be preferable to use #[Autowire(param: 'certificate_name')]
, and in case of %env(...)%
it might be preferable to use #[Autowire(env: 'CERT_NAME')]
, as they're more explicit.
And/or a separate rule might exist for this. This as the #[Autowire('%param%')]
works since 6.1 (the version where #[Autowire]
was added). Only in 6.3 (named) arguments were added for param: 'param name'
, env: 'environment variable name'
, etc
Replace ParameterBagInterface with #[Autowire()] attribute
Example below:
Does it makes sense?
This can also be replaced with constructor property promotion further.