Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DI] Fix circular-aliases message #25382

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

Merged
merged 1 commit into from
Dec 8, 2017

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 3.3
Bug fix?
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

The missing bits in #25364

@@ -998,10 +998,14 @@ public function findDefinition($id)
$id = (string) $this->aliasDefinitions[$id];

if (isset($seen[$id])) {
throw new ServiceCircularReferenceException($id, array_keys($seen));
$seen = array_values($seen);
$seen = array_slice($seen, array_search($id, $seen));
Copy link
Member

Choose a reason for hiding this comment

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

the slicing part is not covered by the test (as the tests cover only the case where the loop starts at the beginning of the list).
Can you add another test covering this ?

Copy link
Member Author

Choose a reason for hiding this comment

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

test updated

@nicolas-grekas nicolas-grekas merged commit f1a7b07 into symfony:3.3 Dec 8, 2017
nicolas-grekas added a commit that referenced this pull request Dec 8, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix circular-aliases message

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      |
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The missing bits in #25364

Commits
-------

f1a7b07 [DI] Fix circular-aliases message
@nicolas-grekas nicolas-grekas deleted the di-fix-msg branch December 8, 2017 09:57
@yannickl88
Copy link

man, been debugging the container for 2 hours. Applying this change showed me the issues and could solve it in 5 min.

So...when will there be a release? 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants