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.
symfony/UPGRADE-3.2.md
Fabien Potencier f208ac8a69 minor #19538 [Yaml] update changelog and upgrade files (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] update changelog and upgrade files

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19504
| License       | MIT
| Doc PR        |

Commits
-------

3cd2932 [Yaml] update changelog and upgrade files
2016-08-13 11:49:42 -07:00

1.6 KiB

UPGRADE FROM 3.1 to 3.2

FrameworkBundle

  • The Controller::getUser() method has been deprecated and will be removed in Symfony 4.0; typehint the security user object in the action instead.

DependencyInjection

  • Calling get() on a ContainerBuilder instance before compiling the container is deprecated and will throw an exception in Symfony 4.0.

Form

  • Calling isValid() on a Form instance before submitting it is deprecated and will throw an exception in Symfony 4.0.

    Before:

    if ($form->isValid()) {
        // ...
    }
    

    After:

    if ($form->isSubmitted() && $form->isValid()) {
        // ...
    }
    

FrameworkBundle

  • The service serializer.mapping.cache.doctrine.apc is deprecated. APCu should now be automatically used when available.

Validator

  • Tests\Constraints\AbstractConstraintValidatorTest has been deprecated in favor of Test\ConstraintValidatorTestCase.

    Before:

    // ...
    use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
    
    class MyCustomValidatorTest extends AbstractConstraintValidatorTest
    {
        // ...
    }
    

    After:

    // ...
    use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
    
    class MyCustomValidatorTest extends ConstraintValidatorTestCase
    {
        // ...
    }
    

Yaml

  • Support for silently ignoring duplicate keys in YAML has been deprecated and

  • Mappings with a colon that is not followed by a space are deprecated and will lead to a ParseException in Symfony 4.0.