Skip to content

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

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

Merged
merged 1 commit into from
Apr 29, 2013
Merged
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
96 changes: 54 additions & 42 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,33 @@ UPGRADE FROM 2.x to 3.0
$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

* The `enctype` method of the `form` helper was removed. You should use the
Expand Down Expand Up @@ -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\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.

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.
* The Locale component was removed and replaced by the Intl component.
Instead of the methods in `Symfony\Component\Locale\Locale`, you should use
these equivalent methods in `Symfony\Component\Intl\Intl` now:

* `Locale::getDisplayCountries()` -> `Intl::getRegionBundle()->getCountryNames()`
* `Locale::getCountries()` -> `array_keys(Intl::getRegionBundle()->getCountryNames())`
* `Locale::getDisplayLanguages()` -> `Intl::getLanguageBundle()->getLanguageNames()`
* `Locale::getLanguages()` -> `array_keys(Intl::getLanguageBundle()->getLanguageNames())`
* `Locale::getDisplayLocales()` -> `Intl::getLocaleBundle()->getLocaleNames()`
* `Locale::getLocales()` -> `array_keys(Intl::getLocaleBundle()->getLocaleNames())`

### Routing

Expand Down Expand Up @@ -342,22 +354,6 @@ UPGRADE FROM 2.x to 3.0
{{ 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

* The constraints `Optional` and `Required` were moved to the
Expand Down Expand Up @@ -391,3 +387,19 @@ UPGRADE FROM 2.x to 3.0
*/
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));
```