Skip to content
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

[DependencyInjection] Improved yaml syntax #13892

Merged
merged 1 commit into from Mar 23, 2015
Merged

[DependencyInjection] Improved yaml syntax #13892

merged 1 commit into from Mar 23, 2015

Conversation

@hason
Copy link
Contributor

hason commented Mar 10, 2015

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

This PR adds support for this:

services:
    manager:
        class: UserManager
        arguments:
          - true
        calls:
          - method: setLogger
            arguments:
              - @logger
          - method: setClass
            arguments:
              - User
        tags:
          - name: manager
            alias: user
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Mar 18, 2015

👍

@stof

This comment has been minimized.

Copy link
Member

stof commented Mar 18, 2015

This implementatio currently supports mixing numeric keys and name keys for the method and the arguments, which can be confusing

… in "calls" statement for yaml format
@hason hason force-pushed the hason:di_yaml branch from 7549dd8 to 0eb34f3 Mar 18, 2015
@hason

This comment has been minimized.

Copy link
Contributor Author

hason commented Mar 18, 2015

@stof Fixed

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 19, 2015

Looks good to me 👍

@aitboudad aitboudad added the Yaml label Mar 20, 2015
@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 23, 2015

@hason Can you make a PR on the docs to document this new possibility? Thanks.

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 23, 2015

Thank you @hason.

@fabpot fabpot merged commit 0eb34f3 into symfony:2.7 Mar 23, 2015
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
fabbot.io Doing some proofreading and checking your coding style.
Details
fabpot added a commit that referenced this pull request Mar 23, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] Improved yaml syntax

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

This PR adds support for this:
```yaml
services:
    manager:
        class: UserManager
        arguments:
          - true
        calls:
          - method: setLogger
            arguments:
              - @logger
          - method: setClass
            arguments:
              - User
        tags:
          - name: manager
            alias: user
```

Commits
-------

0eb34f3 [DependencyInjection] Added support for keys "method" and "arguments" in "calls" statement for yaml format
@hason hason deleted the hason:di_yaml branch Mar 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.