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

[Serializer] Don't fallback to default serializer if tags specify a named one#61526

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.3fromHypeMC:named-serializers-fix
Aug 26, 2025

Conversation

@HypeMC
Copy link
Member

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

An alternative to#61511.

@fabpot
Copy link
Member

Thank you@HypeMC.

@fabpotfabpot merged commit8ec0d38 intosymfony:7.3Aug 26, 2025
10 of 11 checks passed
@HypeMCHypeMC deleted the named-serializers-fix branchAugust 26, 2025 07:16
@fabpotfabpot mentioned this pull requestAug 29, 2025
GromNaN added a commit to symfony/monolog-bundle that referenced this pull requestSep 24, 2025
… or handler (HypeMC)This PR was merged into the 3.x branch.Discussion----------Don't add processor to all loggers if tags specify a channel or handlerSimilar tosymfony/symfony#61526.When you add a custom processor to a specific channel or handler, it gets added to **all** channels because `ProcessorInterface` is [registered for autoconfiguration](https://github.com/symfony/monolog-bundle/blob/58b98dcf5d3c818679f078d514284b16cc986d34/DependencyInjection/MonologExtension.php#L106-L108).Here's a simple example:```php#[AsMonologProcessor('my_channel')]final class MyProcessor implements ProcessorInterface{    public function __invoke(LogRecord $record) {}}```You'd expect this processor to be registered only for `my_channel`, but due to autoconfiguration it's added to every channel.The workaround is to disable autoconfiguration and add an explicit tag.```yamlservices:    App\MyProcessor:        autoconfigure: false        tags:            - monolog.processor: { channel: 'my_channel' }```This PR ensures a processor is not added to all channels when an explicit channel or handler is configured.Commits-------09b4bae Don't add processor to all loggers if tags specify a channel or handler
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

7.3

Development

Successfully merging this pull request may close these issues.

4 participants

@HypeMC@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp