Skip to content

[DependencyInjection] Fixed support for backslashes in service ids. #9834

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 21, 2013

Conversation

jakzal
Copy link
Contributor

@jakzal jakzal commented Dec 20, 2013

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

This change is needed for consistency with camelize() which is used in ProxyDumper and PhpDumper.

Either this PR needs to be merged for consistency or #9610 rolled back (if we don't want to support backslashes in service ids).

Anyone could tell me why we're not using the camelize() method internally in the Container?

This change is for consistency with camelize() which is used in ProxyDumper and PhpDumper.
fabpot added a commit that referenced this pull request Dec 21, 2013
…ice ids. (jakzal)

This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Fixed support for backslashes in service ids.

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

This change is needed for consistency with `camelize()` which is used in [`ProxyDumper`](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php#L69) and [`PhpDumper`](https://github.com/symfony/DependencyInjection/blob/2.3/Dumper/PhpDumper.php#L1275).

Either this PR needs to be merged for consistency or #9610 rolled back (if we don't want to support backslashes in service ids).

Anyone could tell me why we're not using the `camelize()` method internally in the `Container`?

Commits
-------

c6f210b [DependencyInjection] Fixed support for backslashes in service ids.
@fabpot fabpot merged commit c6f210b into symfony:2.3 Dec 21, 2013
@jakzal jakzal deleted the backslashes-in-service-ids branch December 21, 2013 14:42
@stof
Copy link
Member

stof commented Dec 22, 2013

Merging this for consistency is better than nothing, but #9610 was flawed (see my comment just after the merge). And now, that the dumper supports dumping services with a \ in it, it becomes possible to use them and be impacted by the flaw in the implementation

@jakzal
Copy link
Contributor Author

jakzal commented Dec 22, 2013

@stof since it's only about the generated name, could we just drop __ instead of replacing it with ___?

@stof
Copy link
Member

stof commented Dec 23, 2013

@jakzal if you drop it, the conflict will be between foobar and foo\bar instead of foo.bar and foo\bar. It would not fix the issue, just modify it. We need something which avoids conflicts

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.

3 participants