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

[DI] Fix not working if only "default_index_method" used#39203

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:4.4frommalteschlueter:bugfix/dependency-injection-default-index-method-not-working
Dec 10, 2020
Merged

[DI] Fix not working if only "default_index_method" used#39203

fabpot merged 1 commit intosymfony:4.4frommalteschlueter:bugfix/dependency-injection-default-index-method-not-working
Dec 10, 2020

Conversation

@malteschlueter
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#35349
LicenseMIT

The default index method wasn't used if the "index_by" attribute is missing. The documentation is showing an example, seehttps://symfony.com/doc/current/service_container/tags.html#tagged-services-with-index.

This problem also appears in symfony 5.

I created two example projects, the first in the current behaviour and the second with my bugfix branch.

Current 4.4:https://github.com/malteschlueter/symfony-reproducers/blob/bugfix/dependency-injection-default-index-method-not-working--not-fixed/tests/HandlerCollectionTest.php

This bugfix branch:https://github.com/malteschlueter/symfony-reproducers/blob/bugfix/dependency-injection-default-index-method-not-working--with-fix/tests/HandlerCollectionTest.php

@nicolas-grekasnicolas-grekas changed the title[DependencyInjection] Fix not working if only "default_index_method" used[DI] Fix not working if only "default_index_method" usedDec 8, 2020
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I updated the implementation to improve the error messages and fix the behavior specifically when an index method is defined.
Tests are now green.

malteschlueter reacted with thumbs up emoji
@carsonbotcarsonbot changed the title[DI] Fix not working if only "default_index_method" used[DependencyInjection] [DI] Fix not working if only "default_index_method" usedDec 8, 2020
@nicolas-grekasnicolas-grekas changed the title[DependencyInjection] [DI] Fix not working if only "default_index_method" used[DI] Fix not working if only "default_index_method" usedDec 8, 2020
@malteschlueter
Copy link
ContributorAuthor

Thank you very much for your support@nicolas-grekas!

@fabpot
Copy link
Member

Thank you@malteschlueter.

@fabpotfabpot merged commit2dd4561 intosymfony:4.4Dec 10, 2020
This was referencedDec 18, 2020
@malteschluetermalteschlueter deleted the bugfix/dependency-injection-default-index-method-not-working branchNovember 24, 2021 11:00
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jderussejderussejderusse left review comments

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@malteschlueter@fabpot@nicolas-grekas@jderusse@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp