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/Routing/Generator
Fabien Potencier 5ac4c2abf5 bug #27601 [Routing] fix URL generation with look-around requirements (nasimnabavi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] fix URL generation with look-around requirements

| Q             | A
| ------------- | ---
| Branch?       | 2.8 up to 4.1 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10548
| License       | MIT
| Doc PR        |

If you have a non-catchable pattern in requirements like f.e. a positive lookahead (.+(?=/foo/)), the generator will not accept the parameter as the parameter itself cannot fulfil the requirement, but only matches in the context of the entire path.
This fix looks for lookAround in the path and ignores checking the requirements if any lookAround exists.

Commits
-------

c474451176 [Routing] fix URL generation with look-around requirements
2019-02-21 11:17:01 +01:00
..
Dumper fixed short array CS in comments 2019-01-16 14:27:11 +01:00
ConfigurableRequirementsInterface.php Docblock fixes 2014-11-30 13:33:44 +00:00
UrlGenerator.php bug #27601 [Routing] fix URL generation with look-around requirements (nasimnabavi) 2019-02-21 11:17:01 +01:00
UrlGeneratorInterface.php switched array() to [] 2019-01-16 10:39:14 +01:00