8000 [DependencyInjection] Improved yaml syntax by hason · Pull Request #13892 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DependencyInjection] Improved yaml syntax #13892

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
Mar 23, 2015

Conversation

hason
Copy link
Contributor
@hason 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
Copy link
Member

👍

@stof
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

@hason
Copy link
Contributor Author
hason commented Mar 18, 2015

@stof Fixed

@fabpot
Copy link
Member
fabpot commented Mar 19, 2015

Looks good to me 👍

@aitboudad aitboudad added the Yaml label Mar 20, 2015
@fabpot
Copy link
Member
fabpot commented Mar 23, 2015

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

@fabpot
Copy link
Member
fabpot commented Mar 23, 2015

Thank you @hason.

@fabpot fabpot merged commit 0eb34f3 into symfony:2.7 Mar 23, 2015
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 di_yaml branch March 27, 2015 21:49
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.

6 participants
0