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/tests/Symfony/Tests/Component/Routing
Jeremy Mikola c8c9fba7d9 [Routing] Add optional "type" param for loader hinting when resource strings are ambiguous
Currently, ambiguities only arise for PHP files, as PhpFileLoader and AnnotationFileLoader would both claim support.  Future conflicts may occur if the XML, YAML, or PHP loaders were to receive Directory and Glob loaders (as annotations have).

Since the "type" parameter is optional, loader resolution will default to awarding resolution to the first loader to claim support.  A previous hack in PhpFileLoader to avoid an AnnotationFileLoader conflict was removed, so that should be the only lost backwards compatibility with this patch.  Unit tests were also created for the various loader classes, although only the supports() method is being tested.

This implementation was proposed on the symfony-dev mailing list in response to Fabien's RFC for custom loader notation: http://groups.google.com/group/symfony-devs/browse_thread/thread/3104c1a9e45799d2/20fbe393c1afe088
2010-12-10 09:48:10 +01:00
..
Fixtures [Routing] Add optional "type" param for loader hinting when resource strings are ambiguous 2010-12-10 09:48:10 +01:00
Loader [Routing] Add optional "type" param for loader hinting when resource strings are ambiguous 2010-12-10 09:48:10 +01:00
Matcher [Routing] Changing the _method route requirement to be a regular expression so that it's consistent with all other requirements. 2010-11-27 11:48:57 +01:00
Resource renamed Symfony\Components to Symfony\Component 2010-08-20 23:09:55 +02:00
CompiledRouteTest.php [Routing] removed the variable_prefixes and variable_regex Route options 2010-11-22 11:04:53 +01:00
RouteCollectionTest.php made some method name changes to have a better coherence throughout the framework 2010-11-25 17:30:06 +01:00
RouteCompiler.php [Routing] removed the variable_prefixes and variable_regex Route options 2010-11-22 11:04:53 +01:00
RouteCompilerTest.php renamed Symfony\Components to Symfony\Component 2010-08-20 23:09:55 +02:00
RouteTest.php [Routing] Changing the _method route requirement to be a regular expression so that it's consistent with all other requirements. 2010-11-27 11:48:57 +01:00