Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate XML routing file in favor of YAML #925

Merged
merged 1 commit into from
May 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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