Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Implement quoted services references for Symfony 3 #461

Merged
merged 1 commit into from
Jan 5, 2016
Merged

Implement quoted services references for Symfony 3 #461

merged 1 commit into from
Jan 5, 2016

Conversation

gabiudrescu
Copy link
Contributor

I think by using Gherkin is the easiest to describe the scope of this pull request:

Given the symfony instance is 2.8 or upper
If the service has a dependency on another service
Then the service argument should be quoted in "
And no deprecation notice will be raised

If the generator is currently used to create a bundle on a 2.8 / 3 instance of Symfony, the services.yml file will have examples of services without quotes.

E.g:

services:
#    game.example:
#        class: GameBundle\Example
#        arguments: [@service_id, "plain_value", %parameter%]

To avoid potential troubles, I thought the example should be as I have modified it with my pull request.

I think by using Gherkin is the easiest to describe the scope of this pull request:

Given the symfony instance is 2.8 or upper
If the service has a dependency on another service
Then the service argument should be quoted in "
And no deprecation notice will be raised
@gabiudrescu gabiudrescu changed the title Implement quoted services references Implement quoted services references for Symfony 3 Jan 1, 2016
@xabbuh
Copy link
Contributor

xabbuh commented Jan 1, 2016

I think we should simply always removed single quotes instead of double quotes (in double quotes you need to be careful to not use escape sequences, for example).

@gabiudrescu
Copy link
Contributor Author

@xabbuh not a bad idea. I kinda followed the example in place right now, but if you or anyone else finds this a good idea, it can be modified.

@fabpot
Copy link
Member

fabpot commented Jan 5, 2016

Thank you @gabiudrescu.

@fabpot fabpot merged commit b5cb5c7 into sensiolabs:master Jan 5, 2016
fabpot added a commit that referenced this pull request Jan 5, 2016
…rescu)

This PR was merged into the 3.0.x-dev branch.

Discussion
----------

Implement quoted services references for Symfony 3

I think by using Gherkin is the easiest to describe the scope of this pull request:

Given the symfony instance is 2.8 or upper
If the service has a dependency on another service
Then the service argument should be quoted in "
And no deprecation notice will be raised

If the generator is currently used to create a bundle on a 2.8 / 3 instance of Symfony, the services.yml file will have examples of services without quotes.

E.g:
```
services:
#    game.example:
#        class: GameBundle\Example
#        arguments: [@service_id, "plain_value", %parameter%]
```

To avoid potential troubles, I thought the example should be as I have modified it with my pull request.

Commits
-------

b5cb5c7 Implement quoted services references
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants