Skip to content

[DependencyInjection] Bind iterable results in fatal error whith php format #41689

Closed
@JakeFr

Description

@JakeFr

Symfony version(s) affected: 4.4 an 5

Description
Defining a bind in defaults configuration result in a fatal error with php format

    $services->defaults()
        ->bind('iterable $elements', tagged_iterator('element'));

Works fine with yaml or if you remove iterable typehint

How to reproduce
https://github.com/JakeFr/iterable

Possible Solution
Modify the regex in
https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php#L37

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