diff --git a/Resources/config/routing.xml b/Resources/config/routing.xml index a470e8071..dda8ba397 100644 --- a/Resources/config/routing.xml +++ b/Resources/config/routing.xml @@ -5,15 +5,6 @@ xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd"> - - %liip_imagine.controller.filter_runtime_action% - [A-z0-9_\-]* - .+ - + - - %liip_imagine.controller.filter_action% - [A-z0-9_\-]* - .+ - diff --git a/Resources/config/routing.yaml b/Resources/config/routing.yaml new file mode 100644 index 000000000..001f2f7f3 --- /dev/null +++ b/Resources/config/routing.yaml @@ -0,0 +1,19 @@ +liip_imagine_filter_runtime: + path: /media/cache/resolve/{filter}/rc/{hash}/{path} + defaults: + _controller: '%liip_imagine.controller.filter_runtime_action%' + methods: + - GET + requirements: + filter: '[A-z0-9_-]*' + path: .+ + +liip_imagine_filter: + path: /media/cache/resolve/{filter}/{path} + defaults: + _controller: '%liip_imagine.controller.filter_action%' + methods: + - GET + requirements: + filter: '[A-z0-9_-]*' + path: .+ diff --git a/Resources/doc/installation.rst b/Resources/doc/installation.rst index d140e42f3..d9558663b 100644 --- a/Resources/doc/installation.rst +++ b/Resources/doc/installation.rst @@ -61,11 +61,11 @@ routing file: # app/config/routing.yml _liip_imagine: - resource: "@LiipImagineBundle/Resources/config/routing.xml" + resource: "@LiipImagineBundle/Resources/config/routing.yaml" .. code-block:: xml - + Congratulations; you are ready to rock your images! diff --git a/Tests/Binary/Loader/FileSystemLoaderTest.php b/Tests/Binary/Loader/FileSystemLoaderTest.php index ab47d579b..7d0b00396 100644 --- a/Tests/Binary/Loader/FileSystemLoaderTest.php +++ b/Tests/Binary/Loader/FileSystemLoaderTest.php @@ -173,7 +173,7 @@ public function testThrowsIfRootPathDoesNotExist() public function provideOutsideRootPathsData() { return array( - array('../Loader/../../Binary/Loader/../../../Resources/config/routing.xml'), + array('../Loader/../../Binary/Loader/../../../Resources/config/routing.yaml'), array('../../Binary/'), ); } diff --git a/Tests/Binary/Locator/AbstractFileSystemLocatorTest.php b/Tests/Binary/Locator/AbstractFileSystemLocatorTest.php index 0fe0701aa..20583495d 100644 --- a/Tests/Binary/Locator/AbstractFileSystemLocatorTest.php +++ b/Tests/Binary/Locator/AbstractFileSystemLocatorTest.php @@ -117,7 +117,7 @@ public function testMultipleRootLoadCases($root, $path) public function provideOutsideRootPathsData() { return array( - array('../Loader/../../Binary/Loader/../../../Resources/config/routing.xml'), + array('../Loader/../../Binary/Loader/../../../Resources/config/routing.yaml'), array('../../Binary/'), ); } diff --git a/UPGRADE.md b/UPGRADE.md index a7444ba5f..ea6737044 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,10 @@ # Upgrade +## 1.8.0 + + - __[Routing]__ The `Resources/config/routing.xml` file has been deprecated and will be removed in `2.0`. Use the new + YAML variant moving forward `Resources/config/routing.yaml`. + ## 1.7.3 - __[Data Loader]__ The `FileSystemLoader` now allows you to assign keys to data roots, and directly reference them when