Skip to content

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

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy