symfony/symfony — pull request #4745 by vicb (2012-07-04 12:35:56+00:00)
Title: [FrameworkBundle] Allow using kernel parameters in routes

Kernel parameters can now be used at any position in patterns, defaults and requirements.

Relates to: #3316, #3276

**Differences from 3316:**

- The substitution is now done in the `Router`,
- 3316 uses `$container->getParameterBag()` which is not part of the `ContainerInterface`. The way it been solved in this PR is that some code have been duplicated inside the `Router`, see `resolveString()`.

**BC break:**

Before this PR, nonexistent parameters would have be silently ignored (ie `%idontexist%` would not have been replaced). After this PR, they will throw an exception. However you can escape the value (ie `%%idontexist%%` will be accepted and replaced by `%idontexist%`).

_This behavior is not mandatory and can be reverted if needed. However this keeps the router more consistent with the DI_.

Any feedback ? @helmer @Koc