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

[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

Merged
fabpot merged 1 commit intosymfony:7.3fromnicolas-grekas:exclude
Mar 17, 2025

Conversation

nicolas-grekas
Copy link
Member

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
Issues-
LicenseMIT

So that we can remove the exclude lines from the default recipe.

Kocal, GromNaN, dunglas, Nayte91, and yceruto reacted with heart emoji
@nicolas-grekasnicolas-grekasforce-pushed theexclude branch 2 times, most recently from953288c to3fbb3a4CompareMarch 16, 2025 15:10
@nicolas-grekasnicolas-grekas changed the title[FrameworkBundle] Auto-exclude DI extensions, kernel, test cases and messenger messages[FrameworkBundle] Auto-exclude DI extensions, kernel, test cases, entities and messenger messagesMar 16, 2025
@nicolas-grekas

This comment was marked as outdated.

Copy link
Member

@GromNaNGromNaN left a 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.

@nicolas-grekasnicolas-grekas changed the title[FrameworkBundle] Auto-exclude DI extensions, kernel, test cases, entities and messenger messages[FrameworkBundle] Auto-exclude DI extensions, test cases, entities and messenger messagesMar 17, 2025
@nicolas-grekas
Copy link
MemberAuthor

I removed the rule for the kernel: its not needed, we already override the auto-discoveredApp\Kernel class by an alias tokernel.

GromNaN, mtarld, imiroslavov, and yceruto reacted with thumbs up emoji

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commite09e68f intosymfony:7.3Mar 17, 2025
9 of 11 checks passed
@fabpot
Copy link
Member

Related recipe PR:symfony/recipes#1391

@janklan
Copy link

janklan commentedApr 7, 2025
edited
Loading

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 apublic function provideCustomQueries(): \Generator method to entities that need it. Later on, I'm listening to themigrationsMigrated event in a service that collects said entities, iterates through the list, extracts the custom SQL and executes whatever the entities want to do.

--

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.

mmarton reacted with thumbs up emoji

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestApr 9, 2025
… 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
@fabpotfabpot mentioned this pull requestMay 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@chalasrchalasrchalasr left review comments

@fabpotfabpotfabpot approved these changes

@dunglasdunglasdunglas approved these changes

@GromNaNGromNaNGromNaN approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

7 participants
@nicolas-grekas@fabpot@janklan@dunglas@GromNaN@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp