symfony/symfony — pull request #10778 by timglabisch (2014-04-24 19:26:13+00:00)
Title: Compiler Pass Cusomization Type

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

i stumbled around the problem that i wasn't able to create a compiler pass that looks for tags and create new tags.

For example if you want to provide a tag that allows you to register an amqp worker,
you won't be able to register a command by using a tag.
The main problem is that the default pass type (TYPE_BEFORE_OPTIMIZATION) is the one that will be executed.

The pull request will add a compiler pass type (+ pre and after) that runs before the default one.
This will allow you for example to create other tags by tags.

I added a bunch of tests (also for the existing passes), because the tests passed even if i broke some passes and api methods.

I called the new type CUSTOMIZE because it will allow you to customize the default behaviour, before any kind of OPTIMIZATION.

This is my first symfony related PR, so pls review carefully.