- Deprecated
Definition::setPrivate()andAlias::setPrivate(), usesetPublic()instead
- Deprecated the public
form.factory,form.type.file,translator,security.csrf.token_manager,serializer,cache_clearer,filesystemandvalidatorservices to private. - If you configured the
framework.cache.prefix_seedoption, you might want to add the%kernel.environment%to its value to keep cache namespaces separated by environment of the app. The%kernel.container_class%(which includes the environment) used to be added by default to the seed, which is not the case anymore. This allows sharing caches between apps or different environments. - Deprecated the
lock.RESOURCE_NAMEandlock.RESOURCE_NAME.storeservices and thelock,LockInterface,lock.storeandPersistingStoreInterfacealiases, uselock.RESOURCE_NAME.factory,lock.factoryorLockFactoryinstead.
-
Deprecated
PropertyPathMapperin favor ofDataMapperandPropertyPathAccessor.Before:
use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper; $builder->setDataMapper(new PropertyPathMapper());
After:
use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; $builder->setDataMapper(new DataMapper(new PropertyPathAccessor()));
- Deprecated not passing a
Closuretogether withFILTER_CALLBACKtoParameterBag::filter(); wrap your filter in a closure instead. - Deprecated the
Request::HEADER_X_FORWARDED_ALLconstant, use eitherRequest::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTOorRequest::HEADER_X_FORWARDED_AWS_ELBorRequest::HEADER_X_FORWARDED_TRAEFIKconstants instead. - Deprecated
BinaryFileResponse::create(), use__construct()instead
MongoDbStoredoes not implementBlockingStoreInterfaceanymore, typehint againstPersistingStoreInterfaceinstead.- deprecated
NotSupportedException, it shouldn't be thrown anymore. - deprecated
RetryTillSaveStore, logic has been moved inLockand is not needed anymore.
- Deprecated
Address::fromString(), useAddress::create()instead
- The
$actionLevelconstructor argument ofSymfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategyhas been deprecated and replaced by the$innerone which expects an ActivationStrategyInterface to decorate instead.Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategywill become final in 6.0. - The
$actionLevelconstructor argument ofSymfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategyhas been deprecated and replaced by the$innerone which expects an ActivationStrategyInterface to decorate instead.Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategywill become final in 6.0
- [BC BREAK] The
TransportInterface::send()andAbstractTransport::doSend()methods changed to return a?SentMessageinstance instead ofvoid. - [BC BREAK] Changed the type-hint of the
$recipientargument in theas*Message()method ofEmailNotificationInterfaceandSmsNotificationInterfacetoEmailRecipientInterfaceandSmsRecipientInterface. - [BC BREAK] Removed the
AdminRecipient. - [BC BREAK] Changed the type-hint of the
$recipientargument inNotifierInterface::send(),Notifier::getChannels(),ChannelInterface::notifiy()andChannelInterface::supports()toRecipientInterface.
- Deprecated passing a boolean as the first argument of
PropertyAccessor::__construct(). Pass a combination of bitwise flags instead.
- Deprecated the
enable_magic_call_extractioncontext option inReflectionExtractor::getWriteInfo()andReflectionExtractor::getReadInfo()in favor ofenable_magic_methods_extraction.
- Deprecated the public
twigservice to private.
- Changed 2nd argument type of
TranslationExtension::__construct()toTranslationNodeVisitor
-
Deprecated the
allowEmptyStringoption of theLengthconstraint.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) * }) */
-
Deprecated the
NumberConstraintTraittrait. -
Deprecated setting a Doctrine annotation reader via
ValidatorBuilder::enableAnnotationMapping()Before:
$builder->enableAnnotationMapping($reader);
After:
$builder->enableAnnotationMapping(true) ->setDoctrineAnnotationReader($reader);
-
Deprecated creating a Doctrine annotation reader via
ValidatorBuilder::enableAnnotationMapping()Before:
$builder->enableAnnotationMapping();
After:
$builder->enableAnnotationMapping(true) ->addDefaultDoctrineAnnotationReader();
-
[BC break] In the experimental authenticator-based system, *
TokenInterface::getUser()returnsnullin case of unauthenticated session. -
[BC break]
AccessListener::PUBLIC_ACCESShas been removed in favor ofAuthenticatedVoter::PUBLIC_ACCESS. -
Deprecated
setProviderKey()/getProviderKey()in favor ofsetFirewallName()/getFirewallName()inPreAuthenticatedToken,RememberMeToken,SwitchUserToken,UsernamePasswordToken,DefaultAuthenticationSuccessHandler, the old methods will be removed in 6.0. -
Deprecated the
AbstractRememberMeServices::$providerKeyproperty in favor ofAbstractRememberMeServices::$firewallName, the old property will be removed in 6.0.