symfony/AsseticBundle — pull request #89 by lavoiesl (2012-07-05 14:25:52+00:00)
Title: Added priority support for services tagged assetic.factory_worker.

The issue:

* When using `use_controller`, `Asset::getTargetPath()` returns "_controller/…".
* `UseControllerWorker` is used to remove '_controller/' from the path, but when using `apply_to`, it may be registered after the `EnsureFilterWorker` so the filter will not have the updated path.
* When also using `cssrewrite`, it uses `getTargetPath` wrongly adds an extra `../` because of the leading `_controller`.

The fix:

* Added `priority="-10"` to `assetic.use_controller_worker` in `controller.xml`.
* Sorted services tagged `assetic.factory_worker` in `AssetFactoryPass`.

An idea:

* Add priority sorting to [ContainerBuilder::findTaggedServiceIds()](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/ContainerBuilder.php#L838)