Skip to content

[DependencyInjection] Create a new trait or class to resolve values with the container #17160

Closed
@GuilhemN

Description

@GuilhemN

Actually, to resolve a value we can use ParameterBag::resolveValue() which is accessible in the Container.
This works fine but the problem is when we want to resolve a value at runtime and we have a custom ContainerInterface instance.

So I would like to have a trait or a class which would allow to resolve values without an access to a ParameterBag instance.

You can find an example of use case in FOSRestBundle where we need to resolve values at runtime.
We actually use a trait but I'd prefer to use something from the core.

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