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-5.2.md
Wouter de Jong e37091541c Use NullToken while checking authorization
This allows to e.g. have some objects that can be viewed by anyone (even unauthenticated users).
2020-07-20 21:46:53 +02:00

956 B

UPGRADE FROM 5.1 to 5.2

DependencyInjection

  • Deprecated Definition::setPrivate() and Alias::setPrivate(), use setPublic() instead

Mime

  • Deprecated Address::fromString(), use Address::create() instead

TwigBundle

  • Deprecated the public twig service to private.

Validator

  • Deprecated the allowEmptyString option of the Length constraint.

    Before:

    use Symfony\Component\Validator\Constraints as Assert;
    
    /**
     * @Assert\Length(min=5, allowEmptyString=true)
     */
    

    After:

    use Symfony\Component\Validator\Constraints as Assert;
    
    /**
     * @Assert\AtLeastOneOf({
     *     @Assert\Blank(),
     *     @Assert\Length(min=5)
     * })
     */
    

Security

  • [BC break] In the experimental authenticator-based system, * TokenInterface::getUser() returns null in case of unauthenticated session.