This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection/Dumper
Fabien Potencier a00687f43a feature #15416 [DependencyInjection] Added a way to define the priority of service decoration (dosten)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Added a way to define the priority of service decoration

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10634
| License       | MIT
| Doc PR        | symfony/symfony-docs#5600

This PR adds a way to define the priority of service decoration, so, the service with the highest priority will be applied first (the default priority is zero).

```yaml
services:
    foo:
        class: Foo

    bar:
        class: Bar
        arguments: ['@bar.inner']
        decorates: foo
        public: false

    foobar:
        class: Foobar
        arguments: ['@foobar.inner']
        decorates: foo
        decoration_priority: 1
        public: false
```

This will result in this code:

```php
$this->services['foo'] = new Bar(new Foobar(new Foo)));
```

Commits
-------

75c98cb Added a way to define the priority of service decoration
2015-08-05 17:50:26 +02:00
..
Dumper.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
DumperInterface.php fixed CS 2012-07-09 14:54:20 +02:00
GraphvizDumper.php Merge branch '2.7' into 2.8 2015-08-01 11:43:59 +02:00
PhpDumper.php Merge branch '2.7' into 2.8 2015-08-01 11:43:59 +02:00
XmlDumper.php feature #15416 [DependencyInjection] Added a way to define the priority of service decoration (dosten) 2015-08-05 17:50:26 +02:00
YamlDumper.php feature #15416 [DependencyInjection] Added a way to define the priority of service decoration (dosten) 2015-08-05 17:50:26 +02:00