Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added the UPGRADE file for Symfony 3.0
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
UPGRADE FROM 2.x to 3.0 | ||
======================= | ||
|
||
### Routing | ||
|
||
* Some route settings have been renamed: | ||
|
||
* The `pattern` setting for a route has been deprecated in favor of `path` | ||
* The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings | ||
|
||
Before: | ||
|
||
``` | ||
article_edit: | ||
pattern: /article/{id} | ||
requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' } | ||
<route id="article_edit" pattern="/article/{id}"> | ||
<requirement key="_method">POST|PUT</requirement> | ||
<requirement key="_scheme">https</requirement> | ||
<requirement key="id">\d+</requirement> | ||
</route> | ||
$route = new Route(); | ||
$route->setPattern('/article/{id}'); | ||
$route->setRequirement('_method', 'POST|PUT'); | ||
$route->setRequirement('_scheme', 'https'); | ||
``` | ||
|
||
After: | ||
|
||
``` | ||
article_edit: | ||
path: /article/{id} | ||
methods: [POST, PUT] | ||
schemes: https | ||
requirements: { 'id': '\d+' } | ||
<route id="article_edit" pattern="/article/{id}" methods="POST PUT" schemes="https"> | ||
This comment has been minimized.
Sorry, something went wrong. |
||
<requirement key="id">\d+</requirement> | ||
</route> | ||
$route = new Route(); | ||
$route->setPath('/article/{id}'); | ||
$route->setMethods(array('POST', 'PUT')); | ||
$route->setSchemes('https'); | ||
``` |
3 comments
on commit 9fc7def
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh? is this a file describing planned BC breaks in 3.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which patterns brand new Dependency Teleporter
component will use?
Need some docs as well.
Should be
path="/article/{id}"
or i missed something?