Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[FrameworkBundle] Auto-exclude DI extensions, test cases, entities and messenger messages#59987
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
3220cbd
to6df5c6d
Compare953288c
to3fbb3a4
Compare This comment was marked as outdated.
This comment was marked as outdated.
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good idea, but I'm not sure for the Kernel.
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
I removed the rule for the kernel: its not needed, we already override the auto-discovered |
Uh oh!
There was an error while loading.Please reload this page.
…d messenger messages
Thank you@nicolas-grekas. |
e09e68f
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Related recipe PR:symfony/recipes#1391 |
janklan commentedApr 7, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It doesn't seem like I can opt-out from this, can I? I wanted several entities to be discoverable by a service locator, so I made some of them implement a tagged interface to do so. The purpose of that is that several our entities define custom SQL behaviour outside of the scope of ORM/DBAL (triggers, stored functions, ...) and because the SQL is tightly coupled with those entities, I thought it would be OK to just add a -- Update: never mind. I tweaked my custom SQL mechanism to rely on Doctrine's class metadata to find known entities that implement specific interfaces. I guess the entire mechanism relates to Doctrine, so using the container to find the right classes was more elegant but not entirely required. |
… from the default services file (Jean-Beru)This PR was merged into the 7.3 branch.Discussion----------[FrameworkBundle] Remove DI, Entity and Kernel exclusion from the default services fileSincesymfony/symfony#59987 and according to the [recipe](https://github.com/symfony/recipes/blob/main/symfony/framework-bundle/7.3/config/services.yaml), the default `config/services.yaml` does not exclude DI, Entity and Kernel file/folders anymore.Commits-------70716ab Update service_container.rst to 7.3
So that we can remove the exclude lines from the default recipe.