This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
2016-05-05 07:52:44 +01:00
|
|
|
UPGRADE FROM 3.1 to 3.2
|
|
|
|
=======================
|
|
|
|
|
|
|
|
DependencyInjection
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
* Calling `get()` on a `ContainerBuilder` instance before compiling the
|
|
|
|
container is deprecated and will throw an exception in Symfony 4.0.
|
2015-12-31 16:39:30 +00:00
|
|
|
|
2016-02-01 19:26:57 +00:00
|
|
|
Form
|
|
|
|
----
|
|
|
|
|
|
|
|
* Calling `isValid()` on a `Form` instance before submitting it
|
|
|
|
is deprecated and will throw an exception in Symfony 4.0.
|
|
|
|
|
|
|
|
Before:
|
|
|
|
|
|
|
|
```php
|
|
|
|
if ($form->isValid()) {
|
|
|
|
// ...
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
After:
|
|
|
|
|
|
|
|
```php
|
|
|
|
if ($form->isSubmitted() && $form->isValid()) {
|
|
|
|
// ...
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2015-12-31 16:39:30 +00:00
|
|
|
Validator
|
|
|
|
---------
|
|
|
|
|
|
|
|
* `Tests\Constraints\AbstractConstraintValidatorTest` has been deprecated in
|
|
|
|
favor of `Test\ConstraintValidatorTestCase`.
|
|
|
|
|
|
|
|
Before:
|
|
|
|
|
|
|
|
```php
|
|
|
|
// ...
|
|
|
|
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
|
|
|
|
|
|
|
|
class MyCustomValidatorTest extends AbstractConstraintValidatorTest
|
|
|
|
{
|
|
|
|
// ...
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
After:
|
|
|
|
|
|
|
|
```php
|
|
|
|
// ...
|
|
|
|
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
|
|
|
|
|
|
|
|
class MyCustomValidatorTest extends ConstraintValidatorTestCase
|
|
|
|
{
|
|
|
|
// ...
|
|
|
|
}
|
|
|
|
```
|