Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e84cad2

Browse filesBrowse files
committed
[Routing] updated CHANGELOG
1 parent 65eca8a commit e84cad2
Copy full SHA for e84cad2

File tree

Expand file treeCollapse file tree

1 file changed

+43
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+43
-0
lines changed

‎src/Symfony/Component/Routing/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/CHANGELOG.md
+43Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,49 @@ CHANGELOG
44
2.2.0
55
-----
66

7+
* [DEPRECATION] Several route settings have been renamed (the old ones will be removed in 3.0):
8+
9+
* The `pattern` setting for a route has been deprecated in favor of `path`
10+
* The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings
11+
12+
Before:
13+
14+
```
15+
article_edit:
16+
pattern: /article/{id}
17+
requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' }
18+
19+
<route id="article_edit" pattern="/article/{id}">
20+
<requirement key="_method">POST|PUT</requirement>
21+
<requirement key="_scheme">https</requirement>
22+
<requirement key="id">\d+</requirement>
23+
</route>
24+
25+
$route = new Route();
26+
$route->setPattern('/article/{id}');
27+
$route->setRequirement('_method', 'POST|PUT');
28+
$route->setRequirement('_scheme', 'https');
29+
```
30+
31+
After:
32+
33+
```
34+
article_edit:
35+
path: /article/{id}
36+
methods: [POST, PUT]
37+
schemes: https
38+
requirements: { 'id': '\d+' }
39+
40+
<route id="article_edit" pattern="/article/{id}" methods="POST PUT" schemes="https">
41+
<requirement key="id">\d+</requirement>
42+
</route>
43+
44+
$route = new Route();
45+
$route->setPath('/article/{id}');
46+
$route->setMethods(array('POST', 'PUT'));
47+
$route->setSchemes('https');
48+
```
49+
750
* [BC BREAK] RouteCollection does not behave like a tree structure anymore but as
851
a flat array of Routes. So when using PHP to build the RouteCollection, you must
952
make sure to add routes to the sub-collection before adding it to the parent

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.