Skip to content

Commit

Permalink
deprecate routing xml file in favor of yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrawley committed May 7, 2017
1 parent 09dc0e1 commit 81f9856
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 14 deletions.
11 changes: 1 addition & 10 deletions Resources/config/routing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@
xsi:schemaLocation="http://symfony.com/schema/routing
http://symfony.com/schema/routing/routing-1.0.xsd">

<route id="liip_imagine_filter_runtime" path="/media/cache/resolve/{filter}/rc/{hash}/{path}" methods="GET">
<default key="_controller">%liip_imagine.controller.filter_runtime_action%</default>
<requirement key="filter">[A-z0-9_\-]*</requirement>
<requirement key="path">.+</requirement>
</route>
<import resource="@LiipImagineBundle/Resources/config/routing.yaml" />

<route id="liip_imagine_filter" path="/media/cache/resolve/{filter}/{path}" methods="GET">
<default key="_controller">%liip_imagine.controller.filter_action%</default>
<requirement key="filter">[A-z0-9_\-]*</requirement>
<requirement key="path">.+</requirement>
</route>
</routes>
19 changes: 19 additions & 0 deletions Resources/config/routing.yaml
Original file line number Diff line number Diff line change
@@ -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: .+
4 changes: 2 additions & 2 deletions Resources/doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<import resource="@LiipImagineBundle/Resources/config/routing.xml"/>
<import resource="@LiipImagineBundle/Resources/config/routing.yaml"/>
Congratulations; you are ready to rock your images!

Expand Down
2 changes: 1 addition & 1 deletion Tests/Binary/Loader/FileSystemLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/'),
);
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Binary/Locator/AbstractFileSystemLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/'),
);
}
Expand Down
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 81f9856

Please sign in to comment.