Skip to content

Commit

Permalink
added the UPGRADE file for Symfony 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jan 15, 2013
1 parent e84cad2 commit 9fc7def
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions UPGRADE-3.0.md
@@ -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.

Copy link
@Baachi

Baachi Jan 15, 2013

Contributor

Should be path="/article/{id}" or i missed something?

<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

@lsmith77
Copy link
Contributor

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?

@fabpot
Copy link
Member Author

@fabpot fabpot commented on 9fc7def Jan 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@cystbear
Copy link
Contributor

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.

Please sign in to comment.