merged branch bschussek/doc-fix (PR #7867)

This PR was merged into the master branch.

Discussion
----------

Added missing information to the UPGRADE-3.0 file and sorted its sections

Commits
-------

7e7e4c0 Added missing information to the UPGRADE-3.0 file and sorted its sections
This commit is contained in:
Fabien Potencier 2013-04-29 09:12:44 +02:00
commit 2bfc57d08f

View File

@ -132,6 +132,33 @@ UPGRADE FROM 2.x to 3.0
$iterator = new InheritDataAwareIterator($forms); $iterator = new InheritDataAwareIterator($forms);
``` ```
* The `TypeTestCase` class was moved from the `Symfony\Component\Form\Tests\Extension\Core\Type` namespace to the `Symfony\Component\Form\Test` namespace.
Before:
```
use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase
class MyTypeTest extends TypeTestCase
{
// ...
}
```
After:
```
use Symfony\Component\Form\Test\TypeTestCase;
class MyTypeTest extends TypeTestCase
{
// ...
}
```
* The `FormItegrationTestCase` and `FormPerformanceTestCase` classes were moved form the `Symfony\Component\Form\Tests` namespace to the `Symfony\Component\Form\Test` namespace.
### FrameworkBundle ### FrameworkBundle
* The `enctype` method of the `form` helper was removed. You should use the * The `enctype` method of the `form` helper was removed. You should use the
@ -210,33 +237,18 @@ UPGRADE FROM 2.x to 3.0
* `Symfony\Component\HttpKernel\Exception\FatalErrorException` -> `Symfony\Component\Debug\Exception\FatalErrorException` * `Symfony\Component\HttpKernel\Exception\FatalErrorException` -> `Symfony\Component\Debug\Exception\FatalErrorException`
* `Symfony\Component\HttpKernel\Exception\FlattenException` -> `Symfony\Component\Debug\Exception\FlattenException` * `Symfony\Component\HttpKernel\Exception\FlattenException` -> `Symfony\Component\Debug\Exception\FlattenException`
### Form ### Locale
* The `TypeTestCase` class was moved from the `Symfony\Component\Form\Tests\Extension\Core\Type` namespace to the `Symfony\Component\Form\Test` namespace. * The Locale component was removed and replaced by the Intl component.
Instead of the methods in `Symfony\Component\Locale\Locale`, you should use
Before: these equivalent methods in `Symfony\Component\Intl\Intl` now:
``` * `Locale::getDisplayCountries()` -> `Intl::getRegionBundle()->getCountryNames()`
use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase * `Locale::getCountries()` -> `array_keys(Intl::getRegionBundle()->getCountryNames())`
* `Locale::getDisplayLanguages()` -> `Intl::getLanguageBundle()->getLanguageNames()`
class MyTypeTest extends TypeTestCase * `Locale::getLanguages()` -> `array_keys(Intl::getLanguageBundle()->getLanguageNames())`
{ * `Locale::getDisplayLocales()` -> `Intl::getLocaleBundle()->getLocaleNames()`
// ... * `Locale::getLocales()` -> `array_keys(Intl::getLocaleBundle()->getLocaleNames())`
}
```
After:
```
use Symfony\Component\Form\Test\TypeTestCase;
class MyTypeTest extends TypeTestCase
{
// ...
}
```
* The `FormItegrationTestCase` and `FormPerformanceTestCase` classes were moved form the `Symfony\Component\Form\Tests` namespace to the `Symfony\Component\Form\Test` namespace.
### Routing ### Routing
@ -342,22 +354,6 @@ UPGRADE FROM 2.x to 3.0
{{ form_end(form) }} {{ form_end(form) }}
``` ```
### Yaml
* The ability to pass file names to `Yaml::parse()` has been removed.
Before:
```
Yaml::parse($fileName);
```
After:
```
Yaml::parse(file_get_contents($fileName));
```
### Validator ### Validator
* The constraints `Optional` and `Required` were moved to the * The constraints `Optional` and `Required` were moved to the
@ -391,3 +387,19 @@ UPGRADE FROM 2.x to 3.0
*/ */
private $property; private $property;
``` ```
### Yaml
* The ability to pass file names to `Yaml::parse()` has been removed.
Before:
```
Yaml::parse($fileName);
```
After:
```
Yaml::parse(file_get_contents($fileName));
```