Skip to content

[DependencyInjection] Fix parsing nested AutowireInline attributes #58631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 7.1
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

A service definition like the following is supposed to work, yet we missed parsing it correctly. This fixes it.

    public function __construct(
        #[AutowireInline(
            MarkdownConverter::class,
            [
                new AutowireInline(
                    Environment::class,
                    calls: [
                        ['addExtension', [new AutowireInline(CommonMarkCoreExtension::class)]],
                        ['addExtension', [new AutowireInline(AutolinkExtension::class)]],
                    ],
                )
            ]
        )]
        private ConverterInterface $markdownConverter,
    ) {
    }

@nicolas-grekas nicolas-grekas merged commit 155ac0d into symfony:7.1 Oct 22, 2024
10 checks passed
@nicolas-grekas nicolas-grekas deleted the di-autowire-inline branch October 22, 2024 18:37
@fabpot fabpot mentioned this pull request Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants