Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.27 KB

UPGRADE-5.2.md

File metadata and controls

62 lines (42 loc) · 1.27 KB

UPGRADE FROM 5.1 to 5.2

DependencyInjection

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

FrameworkBundle

  • Deprecated the public form.factory, form.type.file, translator, security.csrf.token_manager, serializer, cache_clearer, filesystem and validator services to private.

Mime

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

TwigBundle

  • Deprecated the public twig service to private.

TwigBridge

  • Changed 2nd argument type of TranslationExtension::__construct() to TranslationNodeVisitor

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.