Skip to content

[Feat] DI - auto wire container params using annotation #22467

Closed
@akomm

Description

@akomm
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.x.x

I would be nice if you could auto wire container params using annotation like in this example:

    /**
     * @ContainerParam(name="kernelEnvironment", param="kernel.environment")
     */
    public function __construct($kernelEnvironment)
    {
    }

This would play nice with bundles like DunglasActionBundle and with auto wire in general.

I could make a compler pass which makes the conversion, but the default AutowirePass from symfony throws when auto wire is enabled and an argument could not be resolved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions