Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DependencyInjection][FrameworkBundle] Fix precedence ofApp\Kernel alias and ignorecontainer.excluded tag on synthetic services#60392

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

nicolas-grekas
Copy link
Member

QA
Branch?7.3
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#60191
LicenseMIT

Autoconfiguration cannot make a service abstract so I'm removing the related calls, they're confusing.

Then, I'm moving the definition of theApp\Kernel alias after loadingservices.yaml, so that the alias overrides the discovered corresponding class.

And I make instance-of-conditionals ignorecontainer.excluded tags on synthetic services. An alternative could be to check if the class implementsKernelInterface like proposed in#60191 (comment) but I think the rule I'm proposing here is more generic.

welcoMattic and GromNaN reacted with thumbs up emoji
@carsonbotcarsonbot added this to the7.3 milestoneMay 9, 2025
@OskarStarkOskarStark changed the title[DependencyInjection][FrameworkBundle] Fix precedence of App\Kernel alias and ignore container.excluded tag on synthetic services[DependencyInjection][FrameworkBundle] Fix precedence ofApp\Kernel alias and ignorecontainer.excluded tag on synthetic servicesMay 9, 2025
…lias and ignore container.excluded tag on synthetic services
@nicolas-grekasnicolas-grekas merged commit27edcc2 intosymfony:7.3May 9, 2025
10 of 11 checks passed
@fabpotfabpot mentioned this pull requestMay 10, 2025
@adpeyre
Copy link
Contributor

Hello@nicolas-grekas ,
I feel like these additions introduce a bug ?
With doctrine-bundle v2.14.0

Doctrine\ORM\Mapping\Embeddable" has already been autoconfigured and merge() does not support merging autoconfiguration for the same attribute

@nicolas-grekasnicolas-grekas deleted the fix-kernel-service branchMay 12, 2025 15:09
@nicolas-grekas
Copy link
MemberAuthor

@adpeyre I don't know, please provide a reproducer in a new issue if you can (I installed doctrine-bundle with Symfony 7.3 successfully, which means I cannot reproduce).

@nicolas-grekas
Copy link
MemberAuthor

Note that this error message is not found anywhere in Symfony 7.3 so I'm skeptical.

@adpeyre
Copy link
Contributor

I think the person in my team hasn't updated their symfony properly to test 7.3.... This appears to be symfony 7.2 code... Sorry Nicolas.

@kedarkhaire
Copy link

Hi@nicolas-grekas
We are getting issue on Symfony 7.2.6 & Drupal 11
Symfony\Component\DependencyInjection\Exception\RuntimeException: You have requested a synthetic service ("kernel"). The DIC does not know how to construct this service. in Symfony\Component\DependencyInjection\ContainerBuilder->createService() (line 1093 of vendor/symfony/dependency-injection/ContainerBuilder.php).
apigee/apigee-devportal-kickstart-drupal#733

Any plans to release this fix for Symfony 7.2 ?

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedMay 21, 2025
edited
Loading

You might experience something else. The attached patch is for 7.3.

@kedarkhaire
Copy link

Yes, I am experiencing this error on Symfony 7.2 & Drupal 11

Symfony\Component\DependencyInjection\Exception\RuntimeException: You have requested a synthetic service ("kernel"). The DIC does not know how to construct this service. in Symfony\Component\DependencyInjection\ContainerBuilder->createService() (line 1093 of vendor/symfony/dependency-injection/ContainerBuilder.php).

I am asking, can we look for this issue in Symfony7.2 ?
Do you want me to create a issue for this ?

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedMay 21, 2025
edited
Loading

You'd better ask Drupal before, I don't see how this can be related to Symfony itself. It'd rather look like a bug in the way Symfony is used.

@kedarkhaire
Copy link

Thanks@nicolas-grekas for clarifying things here.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@GromNaNGromNaNGromNaN approved these changes

@welcoMatticwelcoMatticwelcoMattic approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

Symfony 7.3 cannot boot if the kernel implements CompilerPassInterface
7 participants
@nicolas-grekas@adpeyre@kedarkhaire@GromNaN@welcoMattic@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp