1.8 KiB
1.8 KiB
UPGRADE FROM 5.1 to 5.2
DependencyInjection
- Deprecated
Definition::setPrivate()
andAlias::setPrivate()
, usesetPublic()
instead
FrameworkBundle
- Deprecated the public
form.factory
,form.type.file
,translator
,security.csrf.token_manager
,serializer
,cache_clearer
,filesystem
andvalidator
services to private.
Mime
- Deprecated
Address::fromString()
, useAddress::create()
instead
PropertyAccess
- Deprecated passing a boolean as the first argument of
PropertyAccessor::__construct()
. Pass a combination of bitwise flags instead.
PropertyInfo
- Deprecated the
enable_magic_call_extraction
context option inReflectionExtractor::getWriteInfo()
andReflectionExtractor::getReadInfo()
in favor ofenable_magic_methods_extraction
.
TwigBundle
- Deprecated the public
twig
service to private.
TwigBridge
- Changed 2nd argument type of
TranslationExtension::__construct()
toTranslationNodeVisitor
Validator
-
Deprecated the
allowEmptyString
option of theLength
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()
returnsnull
in case of unauthenticated session. -
[BC break]
AccessListener::PUBLIC_ACCESS
has been removed in favor ofAuthenticatedVoter::PUBLIC_ACCESS
.