-
-
Notifications
You must be signed in to change notification settings - Fork 9.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3220cbd
to
6df5c6d
Compare
953288c
to
3fbb3a4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Show resolved
Hide resolved
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.php
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Outdated
Show resolved
Hide resolved
I removed the rule for the kernel: its not needed, we already override the auto-discovered |
…d messenger messages
Thank you @nicolas-grekas. |
Related recipe PR: symfony/recipes#1391 |
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 file Since symfony/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.