Skip to content

[DependencyInjection] non-conflicting anonymous service ids across files #23490

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
Jul 12, 2017

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jul 12, 2017

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

Copy link
Contributor

@ro0NL ro0NL left a comment

Choose a reason for hiding this comment

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

XML loader has the same issue?

@@ -546,7 +546,7 @@ public function testAnonymousServices()
$this->assertInternalType('array', $factory);
$this->assertInstanceOf(Reference::class, $factory[0]);
$this->assertTrue($container->has((string) $factory[0]));
$this->assertStringStartsWith('1', (string) $factory[0]);
$this->assertRegExp('/^\d+_[A-Z0-9]{64}$/i', (string) $factory[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Coul add a-z range to avoid i modifier

@xabbuh xabbuh force-pushed the issue-23483 branch 2 times, most recently from ab2034a to 80d2085 Compare July 12, 2017 18:00
@xabbuh
Copy link
Member Author

xabbuh commented Jul 12, 2017

No, the XmlFileLoader use the absolute path of the XML files when generating the internal id. But that made me think we should probably just do the same here (code updated accordingly).

@fabpot
Copy link
Member

fabpot commented Jul 12, 2017

Thank you @xabbuh.

@fabpot fabpot merged commit 8289ca6 into symfony:3.3 Jul 12, 2017
fabpot added a commit that referenced this pull request Jul 12, 2017
…s across files (xabbuh)

This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] non-conflicting anonymous service ids across files

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

Commits
-------

8289ca6 non-conflicting anonymous service ids across files
@xabbuh xabbuh deleted the issue-23483 branch July 13, 2017 05:06
@fabpot fabpot mentioned this pull request Jul 17, 2017
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.

4 participants