https://gist.github.com/lyrixx/fd5cd60d85265c26bfe8565d735db1b5
See the run.sh
to see how to generate theses files
Requirements:
- ripgrep
- common bash utils
EntityChoiceList
$manager
(2nd) and $class
(3th) arguments of ORMQueryBuilderLoader
ORMQueryBuilderLoader
loader
and property
options of the DoctrineType
Symfony\Component\HttpKernel\Log\LoggerInterface
has been removedLogger::crit()
, Logger::emerg()
, Logger::err()
and Logger::warn()
have been removedSymfony\Bridge\ProxyManager
validator.api
parameteralias
option of the form.type
tagenabled
to true
and collect
to false
Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass
was moved
to Component\HttpKernel\DependencyInjection\RegisterListenersPass
router:match
commandTimedPhpEngine
--clean
option to the translation:update
commandhttp_method_override
optionsecurity.context
service.autoescape_service
and autoescape_service_method
)Client::followRedirect()
won't redirect responses with
a non-3xx Status Code and Location
header anymore, as per
http://tools.ietf.org/html/rfc2616#section-14.30ReferenceDumper
classResourceInterface::isFresh()
methodBCResourceInterfaceChecker
classResourceInterface::getResource()
methodApplication
ApplicationTester::getDisplay()
and CommandTester::getDisplay()
setCurrent
method'-a|-b|-c'
getListenerPriority($eventName, $listener)
has been added to the
EventDispatcherInterface
.Event::setDispatcher()
, Event::getDispatcher()
, Event::setName()
and Event::getName()
have been removed.
The event dispatcher and the event name are passed to the listener call.$mode
argument from Filesystem::dumpFile()
FormTypeInterface::setDefaultOptions()
methodAbstractType::setDefaultOptions()
methodFormTypeExtensionInterface::setDefaultOptions()
methodAbstractTypeExtension::setDefaultOptions()
methodFormTypeInterface::configureOptions()
methodFormTypeExtensionInterface::configureOptions()
methodRequest::get()
changed from "GET, PATH, BODY" to "PATH, GET, BODY"UploadedFile::isValid
now returns false if the file was not uploaded via HTTP (in a non-test mode)\Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
to ensure the supplied PDO handler throws Exceptions on error (as the class expects). Added related test cases
to verify that Exceptions are properly thrown when the PDO queries fail.Symfony\Component\HttpKernel\Kernel::init()
Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()
and Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()
Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher::setProfiler()
Symfony\Component\HttpKernel\EventListener\FragmentListener::getLocalIpAddresses()
Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()
Symfony\Component\HttpKernel\EventListener\RouterListener::setRequest()
Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest()
Symfony\Component\HttpKernel\Fragment\FragmentHandler::setRequest()
Symfony\Component\HttpKernel\HttpCache\Esi::hasSurrogateEsiCapability()
Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateEsiCapability()
Symfony\Component\HttpKernel\HttpCache\Esi::needsEsiParsing()
Symfony\Component\HttpKernel\HttpCache\HttpCache::getEsi()
Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel
Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass
Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener
Symfony\Component\HttpKernel\EventListener\EsiListener
Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategy
Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategyInterface
Symfony\Component\HttpKernel\Log\LoggerInterface
Symfony\Component\HttpKernel\Log\NullLogger
Symfony\Component\HttpKernel\Profiler::import()
Symfony\Component\HttpKernel\Profiler::export()
Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener
to Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener
and changed its constructorSymfony\Component\HttpKernel\Debug\ErrorHandler
, Symfony\Component\HttpKernel\Debug\ExceptionHandler
,
Symfony\Component\HttpKernel\Exception\FatalErrorException
and Symfony\Component\HttpKernel\Exception\FlattenException
Symfony\Component\HttpKernel\Kernel::init()
require_previous_session
option to AbstractAuthenticationListener
GetSetMethodNormalizer::setCamelizedAttributes
to allow calling
camel cased methods for underscored propertiesFileDumper::format()
method.Translator
from protected to private.Optional
and Required
to the
Symfony\Component\Validator\Constraints\
namespace and deprecated the original
classes.MergeDoctrineCollectionListener::onBind
in favor of
MergeDoctrineCollectionListener::onSubmit
ChoiceListFactoryInterface
as first argument of
DoctrineChoiceLoader
's constructorController::json
to simplify creating JSON responses when using the Serializer componentSymfony\Component\HttpHernel\DataCollector\RequestDataCollector::onKernelResponse()
Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector
serializer.mapping.cache.apc
(use serializer.mapping.cache.doctrine.apc
instead)AbstractUriElement
class.
The Link
class is now a child of AbstractUriElement
.Image
class to crawl images and parse their src
attribute,
and selectImage
, image
, images
methods in the Crawler
(the image version of the equivalent link
methods).Traversable
and
ArrayAccess
in ResizeFormListener::preSubmit
methodChoiceType
has been deprecated
and will be used as PropertyPath
instead of callable in Symfony 4.0.DataTransformerInterface
in TextType
LazyChoiceList::$loadedList
JsonResponse
with a string of JSON dataJsonSerializable
DenormalizerAwareTrait
and NormalizerAwareTrait
traits to
support normalizer/denormalizer awarenessDenormalizerAwareInterface
and NormalizerAwareInterface
interfaces to support normalizer/denormalizer awarenessMaxDepth
option to limit the depth of the object graph when
serializing objectsSplFileInfo
objectsDateTimeInterface
AbstractObjectNormalizer
as a base class for normalizers that deal
with objectsDateTimeValidator::PATTERN
constantformat
option to the DateTime
constraintadded AppVariable::getToken()
Deprecated the possibility to inject the Form TwigRenderer
into the FormExtension
.
[BC BREAK] Registering the FormExtension
without configuring a runtime loader for the TwigRenderer
doesn't work anymore.
Before:
doctrine/annotations
from the list of required dependencies in composer.json
symfony/security-core
and symfony/security-csrf
from the list of required dependencies in composer.json
symfony/templating
from the list of required dependencies in composer.json
symfony/translation
from the list of required dependencies in composer.json
symfony/asset
from the list of required dependencies in composer.json
Resources/public/images/*
files have been removed.Resources/public/css/*.css
files have been removed (they are now inlined in TwigBundle).'priority'
attribute on tags form.type_extension
SecurityUserValueResolver
to inject the security users in actions via
Symfony\Component\Security\Core\User\UserInterface
in the method signature.setInputs()
method to CommandTester for ease testing of commands expecting inputssetStream()
and getStream()
methods to Input (implement StreamableInputInterface)FlattenException::getTrace()
now returns additional type descriptions
integer
and float
.PassConfig::addPass()
, to Compiler::addPass
and to ContainerBuilder::addCompilerPass()
Container::set()
methodContainer::has()
methodContainer::get()
methodContainer
without populating the method mapreadlink()
as a platform independent method to read linksCallbackChoiceLoader
ChoiceLoaderInterface
in children of ChoiceType
DataCollector::varToString()
, use cloneVar()
insteadAbstractSurrogate::addSurrogateCapability
to 'symfony'bool
, int
, float
, string
, list
and map
defaults in XML configurations.$attributes
and $subject
with getters/setters to Symfony\Component\Security\Core\Exception\AccessDeniedException
|
in plural translations with double pipe.Tests\Constraints\AbstractContraintValidatorTest
in favor of Test\ConstraintValidatorTestCase
:
) that is not followed by a whitespace are deprecated
when the mapping key is not quoted and will lead to a ParseException
in
Symfony 4.0 (e.g. foo:bar
must be foo: bar
).testLegacy
prefix in method names to mark a test as legacy is
deprecated, use the @group legacy
notation insteadLegacy
prefix in class names to mark a test as legacy is deprecated,
use the @group legacy
notation insteadProxyDumper
class is now finalworkflow_has_marked_place
functionworkflow_marked_places
functiontype
option of the framework.workflows.*
configuration entries is deprecated.
The default value will be state_machine
in Symfony 4.0.CompilerDebugDumpPass
classJsonManifestVersionStrategy
.Symfony\Bundle\FrameworkBundle\Controller\AbstractController
. It provides
the same helpers as the Controller
class, but does not allow accessing the dependency
injection container, in order to encourage explicit dependency declarations.controller.service_arguments
tag, for injecting services into controllers' actionscanBeEnabled()
to
canBeDisabled()
when Flex is usedframework.translator
option
is disabled.GlobalVariables::getToken()
Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass
. Use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass
instead.SerializerPass
, use Symfony\Component\Serializer\DependencyInjection\SerializerPass
insteadFormPass
, use Symfony\Component\Form\DependencyInjection\FormPass
insteadSessionListener
TestSessionListener
Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass
.
Use Symfony\Component\Console\DependencyInjection\ConfigCachePass
instead.PropertyInfoPass
, use Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass
insteadControllerArgumentValueResolverPass
. Use
Symfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass
insteadRoutingResolverPass
, use Symfony\Component\Routing\DependencyInjection\RoutingResolverPass
insteadserver:run
, server:start
, server:stop
and
server:status
console commands have been moved to a dedicated bundle.
Require symfony/web-server-bundle
in your composer.json and register
Symfony\Bundle\WebServerBundle\WebServerBundle
in your AppKernel to use them.$defaultLocale
as 3rd argument of Translator::__construct()
making Translator
works with any PSR-11 containerframework.serializer.mapping
config option allowing to define custom
serialization mapping files and directoriesAddValidatorInitializersPass
, use
Symfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass
insteadAddConstraintValidatorsPass
, use
Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass
insteadValidateWorkflowsPass
, use
Symfony\Component\Workflow\DependencyInjection\ValidateWorkflowsPass
insteadConstraintValidatorFactory
, use
Symfony\Component\Validator\ContainerConstraintValidatorFactory
instead.UserPasswordEncoderCommand
without its constructor
arguments fully provided.UserPasswordEncoderCommand::getContainer()
and relying on the
ContainerAwareCommand
sub class or ContainerAwareInterface
implementation for this command.FirewallMap::$map
and $container
properties.users
node for in_memory
user provider are no longer normalized.FirewallContext::getListeners()
ContainerAwareRuntimeLoader
ReflectionClassResource
class$exists
constructor argument to ClassExistenceResource
ClassExistenceResource
work with interfaces and traitsConfigCachePass
(originally in FrameworkBundle)castToArray()
helper to turn any config value into an arrayExceptionListener
AddConsoleCommandPass
(originally in FrameworkBundle)Input::getOption()
no longer returns the default value for options
with value optional explicitly passed emptyCommandNotFoundException
through the
console.error
eventContextErrorException
class: use \ErrorException directly now!service
tag.ServiceLocator
- a PSR-11 container holding a set of services to be lazily loadedContainerBuilder::getReflectionClass()
for retrieving and tracking reflection class infoContainerBuilder::getClassResource()
, use ContainerBuilder::getReflectionClass()
or ContainerBuilder::addObjectResource()
insteadContainerBuilder::fileExists()
for checking and tracking file or directory existencePhpDumper
with an uncompiled ContainerBuilder
is deprecated and
will not be supported anymore in 4.0DefinitionDecorator
class in favor of ChildDefinition
NullDumper
class is now finalappendToFile()
to append contents to existing filesCountryType
, CurrencyType
, LanguageType
, LocaleType
, and
TimezoneType
when "choice_loader" is not null
Symfony\Component\Form\FormErrorIterator::findByCodes()
getTypedExtensions
, getTypes
, and getTypeGuessers
to Symfony\Component\Form\Test\FormIntegrationTestCase
FormPass
Request::setTrustedProxies()
method takes a new $trustedHeaderSet
argument,
see http://symfony.com/doc/current/components/http_foundation/trusting_proxies.html for more info,Request::setTrustedHeaderName()
and Request::getTrustedHeaderName()
methods,File\Stream
, to be passed to BinaryFileResponse
when the size of the served file is unknown,
disabling Range
and Content-Length
handling, switching to chunked encoding insteadCookie::fromString()
method that allows to create a cookie from a
raw header stringkernel.project_dir
and Kernel::getProjectDir()
kernel.root_dir
and Kernel::getRootDir()
Kernel::getEnvParameters()
SYMFONY__
environment variablesUriSigner
LazyLoadingFragmentHandler::addRendererService()
Extension::addClassesToCompile()
and Extension::getClassesToCompile()
Psr6CacheClearer::addPool()
RenameEntryInterface
inferface is deprecated, and will be merged with EntryManagerInterface
in 4.0.Process
class$env
argument to Process::start()
, run()
, mustRun()
and restart()
methodsProcessUtils::escapeArgument()
methodproc_open()
optionsPropertyInfoPass
AccessDecisionManager::setVoters()
in favor of passing the
voters to the constructor.json_login
listener for stateless authenticationSerializerPass
AddValidatorInitializersPass
AddConstraintValidatorsPass
ContainerConstraintValidatorFactory
is_granted()
function that can be used in these expressions to use the authorization checker.DefinitionBuilder
class now provides a fluent interface.AuditTrailListener
now includes the workflow name in its log entries.workflow.entered
events which is fired after the marking has been set.WorkflowRegistry::add()
as second parameter.
Wrap the class name in an instance of ClassInstanceSupportStrategy instead.Event::getWorkflowName()
.SupportStrategyInterface
to allow custom strategies to decide whether
or not a workflow supports a subject.ValidateWorkflowPass
.ParseException
in Symfony 4.0.DbalSessionHandler
and DbalSessionHandlerSchema
in favor of
Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
CoverageListener
to enhance the code coverage report@group legacy
are always
displayed when not in weak
modeonly
keyword to form_theme
tag to disable usage of default themes when rendering a formSymfony\Bridge\Twig\Form\TwigRenderer
DebugCommand::set/getTwigEnvironment
. Pass an instance of
Twig\Environment
as first argument of the constructor insteadLintCommand::set/getTwigEnvironment
. Pass an instance of
Twig\Environment
as first argument of the constructor insteadtranslator.default_path
option and parameteruse_strict_mode
is now enabled by default and the corresponding option has been deprecatedcache:clear
command to not clear "app" PSR-6 cache pools anymore,
but to still clear "system" ones; use the cache:pool:clear
command to clear "app" pools insteadstderr
profiler.matcher
optionEventSubscriberInterface
on MicroKernelTrait
doctrine/cache
from the list of required dependencies in composer.json
validator.mapping.cache.doctrine.apc
servicesymfony/stopwatch
dependency has been removed, require it via composer require symfony/stopwatch
in your dev
environment.KERNEL_DIR
environment variable with KernelTestCase::getKernelClass()
.KernelTestCase::getPhpUnitXmlDir()
and KernelTestCase::getPhpUnitCliConfigArgument()
methods.AddCacheClearerPass
, use tagged iterator arguments instead.AddCacheWarmerPass
, use tagged iterator arguments instead.TranslationDumperPass
, use
Symfony\Component\Translation\DependencyInjection\TranslationDumperPass
insteadTranslationExtractorPass
, use
Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass
insteadTranslatorPass
, use
Symfony\Component\Translation\DependencyInjection\TranslatorPass
insteadcommand
attribute to the console.command
tag which takes the command
name as value, using it makes the command lazycache:pool:prune
command to allow manual stale cache item pruning of supported PSR-6 and PSR-16 cache pool
implementationsSymfony\Bundle\FrameworkBundle\Translation\TranslationLoader
, use
Symfony\Component\Translation\Reader\TranslationReader
insteadtranslation.loader
service, use translation.reader
insteadAssetsInstallCommand::__construct()
now takes an instance of
Symfony\Component\Filesystem\Filesystem
as first argumentCacheClearCommand::__construct()
now takes an instance of
Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface
as
first argumentCachePoolClearCommand::__construct()
now takes an instance of
Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer
as
first argumentEventDispatcherDebugCommand::__construct()
now takes an instance of
Symfony\Component\EventDispatcher\EventDispatcherInterface
as
first argumentRouterDebugCommand::__construct()
now takes an instance of
Symfony\Component\Routing\RouterInterface
as
first argumentRouterMatchCommand::__construct()
now takes an instance of
Symfony\Component\Routing\RouterInterface
as
first argumentTranslationDebugCommand::__construct()
now takes an instance of
Symfony\Component\Translation\TranslatorInterface
as
first argumentTranslationUpdateCommand::__construct()
now takes an instance of
Symfony\Component\Translation\TranslatorInterface
as
first argumentAssetsInstallCommand
, CacheClearCommand
, CachePoolClearCommand
,
EventDispatcherDebugCommand
, RouterDebugCommand
, RouterMatchCommand
,
TranslationDebugCommand
, TranslationUpdateCommand
, XliffLintCommand
and YamlLintCommand
classes have been marked as finalasset.request_context.base_path
and asset.request_context.secure
parameters
to provide a default request context in case the stack is empty (similar to router.request_context.*
parameters)Dotenv
in AboutCommand
security.helper
service that is an instance of Symfony\Component\Security\Core\Security
and provides shortcuts for common security tasks.security.voter
tag without implementing the
VoterInterface
on the class is now deprecated and will be removed in 4.0.FirewallContext::getListeners()
now returns \Traversable|array
logout_on_user_change
to the firewall options. This config item will
trigger a logout when the user has changed. Should be set to true to avoid
deprecations in the configuration.acl:set
along with SetAclCommand
classinit:acl
along with InitAclCommand
classstateless
option to the switch_user
listenerSymfony\Bundle\TwigBundle\Command\DebugCommand
, use Symfony\Bridge\Twig\Command\DebugCommand
insteadContainerAwareInterface
implementation for Symfony\Bundle\TwigBundle\Command\LintCommand
default_path
)web_profiler.position
config option (in 4.0 version the toolbar
will always be displayed at the bottom) and the web_profiler.debug_toolbar.position
container parameter.*
as a wildcard to bind to 0.0.0.0 (INADDR_ANY)$basePath
and $secure
in RequestStackContext::__construct()
to provide a default request context in case the stack is emptysetDeprecated()
method to indicate a deprecated nodeXmlUtils::parse()
method to parse an XML stringConfigCachePass
SHELL_VERBOSITY
env var to control verbosityCommandLoaderInterface
, FactoryCommandLoader
and PSR-11
ContainerCommandLoader
for commands lazy-loadingCommand::$defaultName/getDefaultName()
, allowing for
commands to be registered at compile time in the application command loader.
Setting the $defaultName
property avoids the need for filling the command
attribute on the console.command
tag when using AddConsoleCommandPass
.ErrorHandler::stackErrors()
and ErrorHandler::unstackErrors()
ExtensionCompilerPass
to before-optimization passes with priority -1000EnvVarProcessorInterface
and corresponding "container.env_var_processor" tag for processing env varsContainer::initialized()
methodResolveDefinitionTemplatesPass
class in favor of ResolveChildDefinitionsPass
TaggedIteratorArgument
with YAML (!tagged foo
) and XML (<service type="tagged"/>
) supportAutowireExceptionPass
and AutowirePass::getAutowiringExceptions()
, use Definition::addError()
and the DefinitionErrorExceptionPass
insteadTraceableEventDispatcherInterface
without the reset()
method has been deprecated.Filesystem::makePathRelative()
is deprecated and will be removed in 4.0Symfony\Component\Finder\Iterator\FilterIterator
DebugCommand
ChoiceLoaderInterface
implementation in TimezoneType
TimezoneType
Symfony\Component\Form\FormRendererEngineInterface::setTheme()
and
Symfony\Component\Form\FormRendererInterface::setTheme()
to disable usage of default themes when rendering a formSessionUpdateTimestampHandlerInterface
with a new
AbstractSessionHandler
base class and a new StrictSessionHandler
wrapperWriteCheckSessionHandler
, NativeSessionHandler
and NativeProxy
classes\SessionHandlerInterface
in NativeSessionStorage::setSaveHandler()
MongoDbSessionHandler
with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb insteadMemcacheSessionHandler
; use MemcachedSessionHandler
insteadLogger
class that writes in stderr
CompilerPassInterface
able to process the containerRebootableInterface
and implemented it in Kernel
EnvParametersResource
Symfony\Component\HttpKernel\Client::catchExceptions()
ChainCacheClearer::add()
methodCacheaWarmerAggregate::add()
and setWarmers()
methodsCacheWarmerAggregate
and ChainCacheClearer
classes finalreset()
methodDebugLoggerInterface
without a clear()
methodOptionsResolverIntrospector
to inspect options definitions inside an OptionsResolver
instanceProcess::start()
without setting a valid working directory beforehand (via setWorkingDirectory()
or constructor)NoConfigurationException
.controller
keyword for configuring route controllers in YAML and XML configurations.getUser
, getToken
and isGranted
methods to Security
.setToken()
method to the SwitchUserEvent
class to allow to replace the created token while switching users
when custom token generation is required by application.VoterInterface
is now deprecated in
the AccessDecisionManager
and this functionality will be removed in 4.0.ContextListener
without setting the logoutOnUserChange
property will trigger a deprecation when the user has changed. As of 4.0
the user will always be logged out when the user has changed between
requests.GuardAuthenticatorInterface
in favor of AuthenticatorInterface
null
from getCredentials()
in classes that extend
AbstractGuardAuthenticator
. Return false
from supports()
instead.AbstractObjectNormalizer::DISABLE_TYPE_ENFORCEMENT
context option
to disable throwing an UnexpectedValueException
on a type mismatchDateInterval
objectsExtraAttributesException
CsvEncoder
to handle variable nested structuresCsvEncoder
via the csv_headers
serialization context variable$context
when checking for encoding, decoding and normalizing in Serializer
Stopwatch::reset()
methodStopwatch
TranslationDumperPass
TranslationExtractorPass
TranslatorPass
TranslationReader
and TranslationReaderInterface
<notes>
section to the Xliff 2.0 dumper.<notes>
section.TranslationWriterInterface
TranslationWriter::writeTranslations
in favor of TranslationWriter::write
PhpExtractor
PhpStringTokenParser
Valid
constraintstrict
option of the Choice
constraint to true
is
deprecated and will throw an exception in Symfony 4.0checkDNS
option of the Url
constraint to true
is deprecated in favor of
the Url::CHECK_DNS_TYPE_*
constants values and will throw an exception in Symfony 4.0Image
constraint via minPixels
and maxPixels
AbstractCloner::setMinDepth()
function to ensure minimum tree depthMongoCaster
is_valid()
method support.Event::getWorkflowName()
for "announce" events.workflow.completed
events which are fired after a transition is completed.Yaml::parseFile()
or Parser::parseFile()
methodDoctrineChoiceLoader
class must be
an ObjectManager
implementationMergeDoctrineCollectionListener::onBind()
methodManagerRegistry::resetService()
method throws an exceptionDoctrineParserCache
classDbalSessionHandler
and DbalSessionHandlerSchema
in favor of
Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
$format
, $dateFormat
, $allowInlineLineBreaks
, and $ignoreEmptyContextAndExtra
constructor arguments of the ConsoleFormatter
class have been removed, use
$options
insteadDebugHandler
class has been removedtestLegacy
prefix in method names to mark a test as legacy
has been dropped, use the @group legacy
notation insteadLegacy
prefix in class names to mark tests as legacy has
been dropped, use the @group legacy
notation insteadSymfonyTestsListenerTrait
class was
droppedCoverageListener
to enhance the code coverage report@group legacy
are always
displayed when not in weak
modeonly
keyword to form_theme
tag to disable usage of default themes when rendering a formSymfony\Bridge\Twig\Form\TwigRenderer
DebugCommand::set/getTwigEnvironment
. Pass an instance of
Twig\Environment
as first argument of the constructor insteadLintCommand::set/getTwigEnvironment
. Pass an instance of
Twig\Environment
as first argument of the constructor insteadtype
option of the framework.workflows.*
configuration entries is state_machine
AddConsoleCommandPass
, AddConstraintValidatorsPass
,
AddValidatorInitializersPass
, CompilerDebugDumpPass
, ConfigCachePass
,
ControllerArgumentValueResolverPass
, FormPass
, PropertyInfoPass
,
RoutingResolverPass
, SerializerPass
, ValidateWorkflowsPass
Translator::__construct()
$defaultLocale
argument requiredSessionListener
, TestSessionListener
cache:clear
warmup part along with the --no-optional-warmers
optionframework.serializer.cache
option and serializer.mapping.cache.apc
, serializer.mapping.cache.doctrine.apc
servicesConstraintValidatorFactory
KERNEL_DIR
environment variable with KernelTestCase::getKernelClass()
.KernelTestCase::getPhpUnitXmlDir()
and KernelTestCase::getPhpUnitCliConfigArgument()
methods.PhpStringTokenParser
, use Symfony\Component\Translation\Extractor\PhpStringTokenParser
instead.PhpExtractor
, use Symfony\Component\Translation\Extractor\PhpExtractor
instead.use_strict_mode
session option, it's is now enabled by defaulttranslator.default_path
option and parameteruse_strict_mode
is now enabled by default and the corresponding option has been deprecatedcache:clear
command to not clear "app" PSR-6 cache pools anymore,
but to still clear "system" ones; use the cache:pool:clear
command to clear "app" pools insteadstderr
profiler.matcher
optionEventSubscriberInterface
on MicroKernelTrait
doctrine/cache
from the list of required dependencies in composer.json
validator.mapping.cache.doctrine.apc
servicesymfony/stopwatch
dependency has been removed, require it via composer require symfony/stopwatch
in your dev
environment.KERNEL_DIR
environment variable with KernelTestCase::getKernelClass()
.KernelTestCase::getPhpUnitXmlDir()
and KernelTestCase::getPhpUnitCliConfigArgument()
methods.AddCacheClearerPass
, use tagged iterator arguments instead.AddCacheWarmerPass
, use tagged iterator arguments instead.TranslationDumperPass
, use
Symfony\Component\Translation\DependencyInjection\TranslationDumperPass
insteadTranslationExtractorPass
, use
Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass
insteadTranslatorPass
, use
Symfony\Component\Translation\DependencyInjection\TranslatorPass
insteadcommand
attribute to the console.command
tag which takes the command
name as value, using it makes the command lazycache:pool:prune
command to allow manual stale cache item pruning of supported PSR-6 and PSR-16 cache pool
implementationsSymfony\Bundle\FrameworkBundle\Translation\TranslationLoader
, use
Symfony\Component\Translation\Reader\TranslationReader
insteadtranslation.loader
service, use translation.reader
insteadAssetsInstallCommand::__construct()
now takes an instance of
Symfony\Component\Filesystem\Filesystem
as first argumentCacheClearCommand::__construct()
now takes an instance of
Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface
as
first argumentCachePoolClearCommand::__construct()
now takes an instance of
Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer
as
first argumentEventDispatcherDebugCommand::__construct()
now takes an instance of
Symfony\Component\EventDispatcher\EventDispatcherInterface
as
first argumentRouterDebugCommand::__construct()
now takes an instance of
Symfony\Component\Routing\RouterInterface
as
first argumentRouterMatchCommand::__construct()
now takes an instance of
Symfony\Component\Routing\RouterInterface
as
first argumentTranslationDebugCommand::__construct()
now takes an instance of
Symfony\Component\Translation\TranslatorInterface
as
first argumentTranslationUpdateCommand::__construct()
now takes an instance of
Symfony\Component\Translation\TranslatorInterface
as
first argumentAssetsInstallCommand
, CacheClearCommand
, CachePoolClearCommand
,
EventDispatcherDebugCommand
, RouterDebugCommand
, RouterMatchCommand
,
TranslationDebugCommand
, TranslationUpdateCommand
, XliffLintCommand
and YamlLintCommand
classes have been marked as finalasset.request_context.base_path
and asset.request_context.secure
parameters
to provide a default request context in case the stack is empty (similar to router.request_context.*
parameters)Dotenv
in AboutCommand
FirewallContext::getContext()
FirewallMap::$container
and ::$map
privateUserPasswordEncoderCommand::_construct()
argument mandatoryUserPasswordEncoderCommand
does not extend ContainerAwareCommand
anymoreVoterInterface
acl:set
along with SetAclCommand
classinit:acl
along with InitAclCommand
classacl
configuration key and related services, use symfony/acl-bundle insteadlogout_on_user_change
is now always true, which will trigger a logout if the user changes
between requestsswitch_user.stateless
firewall option is true
for stateless firewallssecurity.helper
service that is an instance of Symfony\Component\Security\Core\Security
and provides shortcuts for common security tasks.security.voter
tag without implementing the
VoterInterface
on the class is now deprecated and will be removed in 4.0.FirewallContext::getListeners()
now returns \Traversable|array
logout_on_user_change
to the firewall options. This config item will
trigger a logout when the user has changed. Should be set to true to avoid
deprecations in the configuration.acl:set
along with SetAclCommand
classinit:acl
along with InitAclCommand
classstateless
option to the switch_user
listenerContainerAwareRuntimeLoader
Symfony\Bundle\TwigBundle\Command\DebugCommand
, use Symfony\Bridge\Twig\Command\DebugCommand
insteadContainerAwareInterface
implementation for Symfony\Bundle\TwigBundle\Command\LintCommand
default_path
)WebProfilerExtension::dumpValue()
methodgetTemplates()
method of the TemplateManager
class in favor of the getNames()
methodweb_profiler.position
config option and the
web_profiler.debug_toolbar.position
container parameterweb_profiler.position
config option (in 4.0 version the toolbar
will always be displayed at the bottom) and the web_profiler.debug_toolbar.position
container parameter.$basePath
and $secure
in RequestStackContext::__construct()
to provide a default request context in case the stack is emptyConfigCachePass
setDeprecated()
method to indicate a deprecated nodeXmlUtils::parse()
method to parse an XML stringConfigCachePass
OutputFormatter
throws an exception when unknown options are usedQuestionHelper::setInputStream()/getInputStream()
Application::getTerminalWidth()/getTerminalHeight()
and
Application::setTerminalDimensions()/getTerminalDimensions()
ConsoleExceptionEvent
ConsoleEvents::EXCEPTION
SHELL_VERBOSITY
env var to control verbosityCommandLoaderInterface
, FactoryCommandLoader
and PSR-11
ContainerCommandLoader
for commands lazy-loadingCommand::$defaultName/getDefaultName()
, allowing for
commands to be registered at compile time in the application command loader.
Setting the $defaultName
property avoids the need for filling the command
attribute on the console.command
tag when using AddConsoleCommandPass
.ContextErrorException
ErrorHandler::stackErrors()
and ErrorHandler::unstackErrors()
ExtensionCompilerPass
to before-optimization passes with priority -1000EnvVarProcessorInterface
and corresponding "container.env_var_processor" tag for processing env varsContainer::initialized()
methodResolveDefinitionTemplatesPass
class in favor of ResolveChildDefinitionsPass
TaggedIteratorArgument
with YAML (!tagged foo
) and XML (<service type="tagged"/>
) supportAutowireExceptionPass
and AutowirePass::getAutowiringExceptions()
, use Definition::addError()
and the DefinitionErrorExceptionPass
insteadCrawler::addXmlContent()
removes the default document namespace again if it's an only namespace.Crawler::filterXPath()
and Crawler::filter()
Crawler::addContent()
Crawler::addXmlContent()
no longer removes the default document
namespaceContainerAwareEventDispatcher
classreset()
method to the TraceableEventDispatcherInterface
TraceableEventDispatcherInterface
without the reset()
method has been deprecated.ExpressionLanguage
constructor must be an instance
of CacheItemPoolInterface
ArrayParserCache
and ParserCacheAdapter
classesParserCacheInterface
LockHandler
Filesystem::makePathRelative()
has been removed.Filesystem::makePathRelative()
is deprecated and will be removed in 4.0ExceptionInterface
Symfony\Component\Finder\Iterator\FilterIterator
Symfony\Component\Finder\Iterator\FilterIterator
choices
option in CountryType
, CurrencyType
, LanguageType
,
LocaleType
, and TimezoneType
when the choice_loader
option is not null
is not supported anymore and the configured choices will be ignoredChoiceType
are
treated as property pathschoices_as_values
option of the ChoiceType
has been removedLazyChoiceList
,
cache the choice list in the used ChoiceLoaderInterface
implementation
instead\Traversable
and \ArrayAccess
in ResizeFormListener::preSubmit()
FormDataCollector
without the symfony/var-dumper
componentValueExporter
instance to the FormDataExtractor::__construct()
methodDependencyInjectionExtension::__construct()
ChoiceLoaderInterface
implementation in TimezoneType
DebugCommand
ChoiceLoaderInterface
implementation in TimezoneType
TimezoneType
Symfony\Component\Form\FormRendererEngineInterface::setTheme()
and
Symfony\Component\Form\FormRendererInterface::setTheme()
to disable usage of default themes when rendering a formRequest::setTrustedHeaderName()
and Request::getTrustedHeaderName()
methods have been removedRequest::HEADER_CLIENT_IP
constant has been removed, use
Request::HEADER_X_FORWARDED_FOR
insteadRequest::HEADER_CLIENT_HOST
constant has been removed, use
Request::HEADER_X_FORWARDED_HOST
insteadRequest::HEADER_CLIENT_PROTO
constant has been removed, use
Request::HEADER_X_FORWARDED_PROTO
insteadRequest::HEADER_CLIENT_PORT
constant has been removed, use
Request::HEADER_X_FORWARDED_PORT
insteadRequest::isMethodSafe()
method (by not passing false
as its argument) is not supported anymore and
throws a \BadMethodCallException
WriteCheckSessionHandler
, NativeSessionHandler
and NativeProxy
classes have been removed\SessionHandlerInterface
in
NativeSessionStorage::setSaveHandler()
is not supported anymore and throws a
\TypeError
SessionUpdateTimestampHandlerInterface
with a new
AbstractSessionHandler
base class and a new StrictSessionHandler
wrapperWriteCheckSessionHandler
, NativeSessionHandler
and NativeProxy
classes\SessionHandlerInterface
in NativeSessionStorage::setSaveHandler()
MongoDbSessionHandler
with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb insteadMemcacheSessionHandler
; use MemcachedSessionHandler
insteadDataCollector::varToString()
method, use DataCollector::cloneVar()
insteadDataCollector::cloneVar()
method requires the VarDumper componentValueExporter
classControllerResolverInterface::getArguments()
TraceableControllerResolver::getArguments()
ControllerResolver::getArguments()
and the ability to resolve argumentsargument_resolver
service dependency from the debug.controller_resolver
LazyLoadingFragmentHandler::addRendererService()
Psr6CacheClearer::addPool()
Extension::addClassesToCompile()
and Extension::getClassesToCompile()
Kernel::loadClassCache()
, Kernel::doLoadClassCache()
, Kernel::setClassCache()
,
and Kernel::getEnvParameters()
X-Status-Code
when handling exceptions in the HttpKernel
has been dropped, use the HttpKernel::allowCustomResponseCode()
method
insteadChainCacheClearer::add()
methodCacheaWarmerAggregate::add()
and setWarmers()
methodsCacheWarmerAggregate
and ChainCacheClearer
classes finalLogger
class that writes in stderr
CompilerPassInterface
able to process the containerRebootableInterface
and implemented it in Kernel
EnvParametersResource
Symfony\Component\HttpKernel\Client::catchExceptions()
ChainCacheClearer::add()
methodCacheaWarmerAggregate::add()
and setWarmers()
methodsCacheWarmerAggregate
and ChainCacheClearer
classes finalreset()
methodDebugLoggerInterface
without a clear()
methodLdapClient
class and the LdapClientInterface
RenameEntryInterface
interface and merged with EntryManagerInterface
OptionsResolverIntrospector
to inspect options definitions inside an OptionsResolver
instancearray $env = array()
argument to the start()
, run()
,
mustRun()
, and restart()
methods of the Process
classarray $env = array()
argument to the start()
method of the
PhpProcess
classProcessUtils::escapeArgument()
method has been removedareEnvironmentVariablesInherited()
, getOptions()
, and setOptions()
methods of the Process
class have been removedproc_open()
options has been removedProcessBuilder
class, use the Process
class insteadgetEnhanceWindowsCompatibility()
and setEnhanceWindowsCompatibility()
methods of the Process
classSymfony\Component\Process\Process
class is not
supported anymoreProcess::start()
without setting a valid working directory beforehand (via setWorkingDirectory()
or constructor)StringUtil
class, use Symfony\Component\Inflector\Inflector
utf8
optionutf8
optionNoConfigurationException
.controller
keyword for configuring route controllers in YAML and XML configurations.AbstractFormLoginAuthenticator::onAuthenticationSuccess()
was removed.
You should implement this method yourself in your concrete authenticator.AccessDecisionManager::setVoters()
methodRoleInterface
VoterInterface
string $context
argument to LogoutUrlGenerator::registerListener()
GuardAuthenticatorInterface
in favor of AuthenticatorInterface
AbstractGuardAuthenticator::supports()
getUser
, getToken
and isGranted
methods to Security
.setToken()
method to the SwitchUserEvent
class to allow to replace the created token while switching users
when custom token generation is required by application.VoterInterface
is now deprecated in
the AccessDecisionManager
and this functionality will be removed in 4.0.ContextListener
without setting the logoutOnUserChange
property will trigger a deprecation when the user has changed. As of 4.0
the user will always be logged out when the user has changed between
requests.GuardAuthenticatorInterface
in favor of AuthenticatorInterface
null
from getCredentials()
in classes that extend
AbstractGuardAuthenticator
. Return false
from supports()
instead.src/Symfony/Component/Security/Resources/translations/
directory are deprecated, ones in src/Symfony/Component/Security/Core/Resources/translations/
must be used instead.SerializerAwareEncoder
and SerializerAwareNormalizer
classes,
use the SerializerAwareTrait
insteadSerializer::$normalizerCache
and Serializer::$denormalizerCache
propertiesstring $format = null
argument to AbstractNormalizer::instantiateObject
array $context = array()
to Serializer::supportsNormalization
, Serializer::supportsDenormalization
,
Serializer::supportsEncoding
and Serializer::supportsDecoding
AbstractObjectNormalizer::DISABLE_TYPE_ENFORCEMENT
context option
to disable throwing an UnexpectedValueException
on a type mismatchDateInterval
objectsExtraAttributesException
CsvEncoder
to handle variable nested structuresCsvEncoder
via the csv_headers
serialization context variable$context
when checking for encoding, decoding and normalizing in Serializer
$context
support for XMLEncoder.Stopwatch::reset()
methodStopwatch
FileDumper
classTranslationWriter::writeTranslations()
methodMessageSelector
instances to the constructor of the Translator
classTranslationDumperPass
TranslationExtractorPass
TranslatorPass
TranslationReader
and TranslationReaderInterface
<notes>
section to the Xliff 2.0 dumper.<notes>
section.TranslationWriterInterface
TranslationWriter::writeTranslations
in favor of TranslationWriter::write
PhpExtractor
PhpStringTokenParser
strict
option of the Choice
constraint to anything but true
is not supported anymore.DateTimeValidator::PATTERN
constantAbstractConstraintValidatorTest
classcheckDNS
option of the Url
constraint to true
Valid
constraintstrict
option of the Choice
constraint to true
is
deprecated and will throw an exception in Symfony 4.0checkDNS
option of the Url
constraint to true
is deprecated in favor of
the Url::CHECK_DNS_TYPE_*
constants values and will throw an exception in Symfony 4.0Image
constraint via minPixels
and maxPixels
minRatio
, maxRatio
, allowSquare
, allowLandscape
, and allowPortrait
to Image validator\ReflectionClass
instances to the Caster::castObject()
method has been dropped, pass class names as strings insteadData::getRawData()
method has been removedVarDumperTestTrait::assertDumpEquals()
method expects a 3rd $context = null
argument and moves $message = ''
argument at 4th position.VarDumperTestTrait::assertDumpMatchesFormat()
method expects a 3rd $context = null
argument and moves $message = ''
argument at 4th position.AbstractCloner::setMinDepth()
function to ensure minimum tree depthMongoCaster
WorkflowRegistry::add()
as second parameter.is_valid()
method support.Event::getWorkflowName()
for "announce" events.workflow.completed
events which are fired after a transition is completed.!
is changed and now forces
non-evaluating your values.ParseException
!!php/object
tag has been dropped, use the !php/object
tag insteadParseException
ParseException
, use the Yaml::PARSE_KEYS_AS_STRINGS
flag to cast them to strings%
at the beginning of an unquoted string throw a ParseException
:
) that is not followed by a whitespace throw a
ParseException
Dumper::setIndentation()
method has been removedYaml::parse()
, Yaml::dump()
,
Parser::parse()
, and Dumper::dump()
methods to configure the behavior of
the parser and dumper is no longer supported, pass bitmask flags insteadParser
class have been removedInline
class is internal and no longer part of the BC promise!str
tag, use the !!str
tag insteadYaml::parseFile()
or Parser::parseFile()
methodWebProcessor
now implements EventSubscriberInterface
in order to be easily autoconfiguredSYMFONY_PHPUNIT_VERSION
, SYMFONY_PHPUNIT_REMOVE
,
SYMFONY_PHPUNIT_DIR
env var in phpunit.xml
then in phpunit.xml.dist
workflow_metadata
functionserver:dump
command to run a server collecting and displaying
dumps on a single place with multiple formats supportLoggerInterface $logger
instance to the Router
parameter_bag
service with related autowiring aliases to access parameters as-a-serviceRouter
to work with any PSR-11 containerRouterInterface
that does not implement the WarmableInterface
is deprecated.RouterCacheWarmer
that does not implement the WarmableInterface
is deprecated and will not
be supported anymore in 5.0.RequestDataCollector
class has been deprecated. Use the Symfony\Component\HttpKernel\DataCollector\RequestDataCollector
class instead.RedirectController
class allows for 307/308 HTTP status codesbundle:controller:action
syntax to reference controllers. Use serviceOrFqcn::method
instead where serviceOrFqcn
is either the service ID or the FQCN of the controller.Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser
container.service_locator
tag of ServiceLocator
s is now autoconfigured.debug:router
.logout_on_user_change
firewall option is deprecated.SecurityUserValueResolver
, use
Symfony\Component\Security\Http\Controller\UserValueResolver
instead.false
) of the twig.strict_variables
configuration option. The %kernel.debug%
parameter will be the new default in 5.0Symfony-Debug-Toolbar-Replace header
to 1
setPathSeparator
method to NodeBuilder
class$pathSeparator
constructor argument to BaseNode
Processor
class has been made finalwrite
and writeln
methodsContainerBagInterface
and its ContainerBag
implementation to access parameters as-a-serviceTypedReference::canBeAutoregistered()
and TypedReference::getRequiringClass()
methodsConfigurationInterface
kernel.event_listener
by defaultTraceableEventDispatcher::getOrphanedEvents()
method has been added.TraceableEventDispatcherInterface
has been deprecated.input=datetime_immutable
to DateType
, TimeType
, DateTimeType
rounding_mode
option to MoneyType
choice_translation_locale
option to CountryType
, LanguageType
, LocaleType
and CurrencyType
ChoiceLoaderInterface
implementation in CountryType
, LanguageType
, LocaleType
and CurrencyType
input=datetime_immutable
to DateType, TimeType, DateTimeTyperounding_mode
option to MoneyTypeparse_str()
instead of custom parsing logic.UploadedFile
class is deprecated.getClientSize()
method of the UploadedFile
class is deprecated. Use getSize()
instead.RedisSessionHandler
to use Redis as a session storageget()
method of the AcceptHeader
class now takes into account the
*
and */*
default values (if they are present in the Accept HTTP header)
when looking for items.Request::getSession()
when no session has been set. Use Request::hasSession()
instead.CannotWriteFileException
, ExtensionFileException
, FormSizeFileException
,
IniSizeFileException
, NoFileException
, NoTmpDirFileException
, PartialFileException
to
handle failed UploadedFile
.MigratingSessionHandler
for migrating between two session handlers without losing sessionsHeaderUtils
.EventDataCollector
ExceptionListener
now logs exceptions at priority 0
(previously logged at -128
)service::method
to reference controllers, making it consistent with other cases. It is recommended over the service:action
syntax with a single colon, which will be deprecated in the future.Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver
Process::isTtySupported()
method that allows to check for TTY supportPhpExecutableFinder
look for the PHP_BINARY
env var when searching the php binaryProcessSignaledException
class to properly catch signaled process errorsContextListener::setLogoutOnUserChange()
method is deprecated.UserValueResolver
.Symfony\Component\Security\Core\User\UserChecker
.AuthenticationUtils::getLastUsername()
now always returns a string.CacheableSupportsMethodInterface
for normalizers and denormalizers that use
only the type and the format in their supports*()
methodsMissingConstructorArgumentsException
new exception for deserialization failure
of objects that needs data insertion in constructordefault_constructor_arguments
option of context to specify a default data in
case the object is not initializable by its constructor because of data missingbool $escapeFormulas = false
argument to CsvEncoder::__construct
AbstractObjectNormalizer::setMaxDepthHandler
to set a handler to call when the configured
maximum depth is reachedint[] $ignoredNodeTypes
argument to XmlEncoder::__construct
. XML decoding now
ignores comment node types by default.ConstraintViolationListNormalizer
FileDumper::setBackup()
method is deprecated.TranslationWriter::disableBackup()
method is deprecated.XliffFileDumper
will write "name" on the "unit" node when dumping XLIFF 2.0.checkDNS
and dnsMessage
options of the Url
constraint.values
option to the Expression
constraintLocale
constraint without setting true
at "canonicalize" option, which will be the default value in 5.0ServerDumper
to send serialized Data clones to a serverServerDumpCommand
and DumpServer
to run a server collecting
and displaying dumps on a single place with multiple formats supportCliDescriptor
and HtmlDescriptor
descriptors for server:dump
CLI and HTML formats supportDefinitionBuilder::reset()
method, use the clear()
one instead.add(Workflow $workflow, $supportStrategy)
in Workflow/Registry
, use addWorkflow(WorkflowInterface, $supportStrategy)
instead.SupportStrategyInterface
, use WorkflowSupportStrategyInterface
instead.Workflow
class now implements WorkflowInterface
.ClassInstanceSupportStrategy
in favor of the class InstanceOfSupportStrategy
.MetadataStore
.Registry::all
to return all the workflows associated with the
specific subject.ClassMetadataFactory
in DoctrineExtractor
,
an instance of EntityManagerInterface
should be injected insteadsimple_array
typeDoctrineTransactionMiddlewareFactory
class has been removedDebugProcessor::getLogs()
, DebugProcessor::countErrors()
, Logger::getLogs()
and Logger::countErrors()
will have a new $request
argument in version 5.0, not defining
it is deprecatedname
argument in debug:twig
command and changed filter
argument as --filter
optiontranschoice
tag and filter, use the trans
ones instead with a %count%
parameterAbstractController::addLink()
method to add Link headers to the current responseframework.cache.pools.tags
option (bool|service-id)cache.adapter.pdo
abstract servicesecurity.expression_language_provider
in favor of a new AddExpressionLanguageProvidersPass
in SecurityBundle.Symfony\Bundle\FrameworkBundle\Controller\Controller
class in favor of Symfony\Bundle\FrameworkBundle\Controller\AbstractController
.Psr\Log\LoggerAwareInterface
framework.session.cookie_secure
to turn it on when HTTPS is usedframework.messenger.encoder
and framework.messenger.decoder
options. Use the framework.messenger.serializer.id
option to replace the Messenger serializer.ContainerAwareCommand
class in favor of Symfony\Component\Console\Command\Command
debug:container
and debug:autowiring
ignore backslashes in service idsTemplating\Helper\TranslatorHelper::transChoice()
method, use the trans()
one instead with a %count%
parameterCacheCollectorPass
. Use Symfony\Component\Cache\DependencyInjection\CacheCollectorPass
instead.CachePoolClearerPass
. Use Symfony\Component\Cache\DependencyInjection\CachePoolClearerPass
instead.CachePoolPass
. Use Symfony\Component\Cache\DependencyInjection\CachePoolPass
instead.CachePoolPrunerPass
. Use Symfony\Component\Cache\DependencyInjection\CachePoolPrunerPass
instead.src/Resources/translations/
and src/Resources/<BundleName>/translations/
, use translations/
instead.translation:update
and debug:translation
commands.security.authentication.trust_resolver.anonymous_class
and
security.authentication.trust_resolver.rememberme_class
parameters to define
the token classes is deprecated. To use custom tokens extend the existing
Symfony\Component\Security\Core\Authentication\Token\AnonymousToken
.
or Symfony\Component\Security\Core\Authentication\Token\RememberMeToken
.Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass
json_login_ldap
authentication provider to use LDAP authentication with a REST API.framework.session.cookie_*
and added an "auto" mode to their "secure" config option to make them secure on HTTPS automatically.simple_form
and simple_preauth
authentication listeners, use Guard instead.SimpleFormFactory
and SimplePreAuthenticationFactory
classes, use Guard instead.port
in access_controlsrc/Resources/views/
and src/Resources/<BundleName>/views/
, use templates/
and templates/bundles/<BundleName>/
instead.Client::submit()
will have a new $serverParameters
argument
in version 5.0, not defining it is deprecatedCookie::getSameSite()
MarshallerInterface
and DefaultMarshaller
to allow changing the serializer and provide one that automatically uses igbinary when availableCacheInterface
, which provides stampede protection via probabilistic early expiration and should become the preferred way to use a cachecompression
and tcp_keepalive
optionsLogicException
when CacheItem::tag()
is called on an item coming from a non tag-aware poolCacheItem::getPreviousTags()
, use CacheItem::getMetadata()
insteadAbstractAdapter::unserialize()
and AbstractCache::unserialize()
methodsCacheCollectorPass
(originally in FrameworkBundle
)CachePoolClearerPass
(originally in FrameworkBundle
)CachePoolPass
(originally in FrameworkBundle
)CachePoolPrunerPass
(originally in FrameworkBundle
)TreeBuilder
without passing root node informationFileLoaderLoadException
to LoaderLoadException
[$process, 'ENV_VAR' => 'value']
to
ProcessHelper::run()
to pass environment variablesProcessHelper::run()
,
pass it the command as an array of its arguments insteadProcessHelper
class finalWrappableOutputFormatterInterface::formatAndWrap()
(implemented in OutputFormatter
)capture_stderr_separately
option to CommandTester::execute()
ContainerBuilder::registerAliasForArgument()
to support autowiring by type+nameServiceSubscriberTrait
to ease implementing ServiceSubscriberInterface
using methods' return typesServiceLocatorArgument
and !service_locator
config tag for creating optimized service-locators%env(key:...)%
processor to fetch a specific key from an arrayServiceSubscriberInterface
, use the same interface from the Symfony\Contracts\Service
namespace insteadResettableContainerInterface
, use Symfony\Contracts\Service\ResetInterface
instead$currentUri
constructor argument of the AbstractUriElement
, Link
and
Image
classes is now optional.Crawler::children()
method will have a new $selector
argument in version 5.0,
not defining it is deprecated.Dotenv::overload()
and $overrideExistingVars
as optional parameter of Dotenv::populate()
Dotenv::loadEnv()
to load a .env file and its corresponding .env.local, .env.$env and .env.$env.local files if they existFinder::sortByName()
method will have a new $useNaturalSort
argument in version 5.0, not defining it is deprecatedFinder::reverseSorting()
to reverse the sortinggetExtendedType()
method of the FormTypeExtensionInterface
is deprecated and will be removed in 5.0. Type
extensions must implement the static getExtendedTypes()
method instead and return an iterable of extended types.matchPort()
in RequestMatcherKernelInterface::getRootDir()
and the kernel.root_dir
parameterKernelInterface::getName()
and the kernel.name
parameterConfigDataCollector
ConfigDataCollector::getApplicationName()
ConfigDataCollector::getApplicationVersion()
mis
, mul
, und
and zxx
EntryManager::applyOperations
ConnectionOptions
HandleTrait
leveraging a message bus instance to return a single
synchronous message handling resultHandledStamp
& SentStamp
stampsMessageBusInterface::dispatch()
, MiddlewareInterface::handle()
and SenderInterface::send()
return Envelope
MiddlewareInterface::handle()
now require an Envelope
as first argument and a StackInterface
as secondEnvelopeAwareInterface
has been removedAmqp*
classes changed to take a Connection
as a first argument and an optional
Serializer
as a second argument.MessageSubscriberInterface::getHandledMessages()
return value has changed. The value of an array item
needs to be an associative array or the method name.StampInterface
replaces EnvelopeItemInterface
and doesn't extend Serializable
anymoreConsumeMessagesCommand
class now takes an instance of Psr\Container\ContainerInterface
as first constructor argumentEncoderInterface
and DecoderInterface
have been replaced by a unified Symfony\Component\Messenger\Transport\Serialization\SerializerInterface
.EnvelopeItemInterface
to StampInterface
Envelope
's constructor and with()
method now accept StampInterface
objects as variadic parametersReceivedMessage
, ValidationConfiguration
and SerializerConfiguration
in the Stamp
namespaceWrapIntoReceivedMessage
classMessengerDataCollector::getMessages()
returns an iterable, not just an array anymoreHandlerLocatorInterface::resolve()
has been removed, use HandlersLocator::getHandlers()
insteadSenderLocatorInterface::getSenderForMessage()
has been removed, use SendersLocator::getSenders()
insteadMiddleware\Enhancers
sub-namespace have been moved to the Middleware
oneAsynchronous\Routing
sub-namespace have been moved to the Transport\Sender\Locator
sub-namespaceAsynchronous/Middleware/SendMessageMiddleware
class has been moved to the Middleware
namespaceSenderInterface
has been moved to the Transport\Sender
sub-namespaceChainHandler
and ChainSender
classes have been removedReceiverInterface
and its implementations have been moved to the Transport\Receiver
sub-namespaceActivationMiddlewareDecorator
has been renamed ActivationMiddleware
AllowNoHandlerMiddleware
has been removed in favor of a new constructor argument on HandleMessageMiddleware
ContainerHandlerLocator
, AbstractHandlerLocator
, SenderLocator
and AbstractSenderLocator
classes have been removedEnvelope::all()
takes a new optional $stampFqcn
argument and returns the stamps for the specified FQCN, or all stamps by their class nameEnvelope::get()
has been renamed Envelope::last()
setDeprecated
and isDeprecated
methodsProcess::fromShellCommandline()
to run commands in a shell wrapperProcess
instanceProcess::setCommandline()
and the PhpProcess::setPhpBinary()
methodsProcess::waitUntil()
method to wait for the process only for a
specific output, then continue the normal execution of your applicationPropertyInitializableExtractorInterface
to test if a property can be initialized through the constructor (implemented by ReflectionExtractor
)is_granted()
function in security expressionshas_role()
function in security expressions, use is_granted()
insteadSymfony\Component\Security\Core\Authentication\AuthenticationTrustResolver
to define
custom anonymous and remember me token classes is deprecated. To
use custom tokens, extend the existing Symfony\Component\Security\Core\Authentication\Token\AnonymousToken
or Symfony\Component\Security\Core\Authentication\Token\RememberMeToken
.UserInterface
from Security::getUser()
is deprecatedSimpleAuthenticatorInterface
, SimpleFormAuthenticatorInterface
,
SimplePreAuthenticatorInterface
, SimpleAuthenticationProvider
, SimpleAuthenticationHandler
,
SimpleFormAuthenticationListener
and SimplePreAuthenticationListener
. Use Guard instead.skip_null_values
context option to not serialize properties with a null
valuesAbstractNormalizer::handleCircularReference
is now final and receives
two optional extra arguments: the format and the context['#comment' => ' foo ']
results <!-- foo -->
)int[] $encoderIgnoredNodeTypes
argument to XmlEncoder::__construct
to configure node types to be ignored during encodingAdvancedNameConverterInterface
to access the class,
the format and the context in a name converterAbstractNormalizer::handleCircularReference()
method will have two new $format
and $context
arguments in version 5.0, not defining them is deprecatedSerializer
with normalizers which do not implement
either NormalizerInterface
or DenormalizerInterface
Serializer
with normalizers which do not implement
either NormalizerInterface
or DenormalizerInterface
Serializer
with encoders which do not implement
either EncoderInterface
or DecoderInterface
$objectClassResolver
argument in AbstractObjectNormalizer
and ObjectNormalizer
constructorMetadataAwareNameConverter
to configure the serialized name of properties through metadataYamlEncoder
now handles the .yml
extension tooAbstractNormalizer::$circularReferenceLimit
, AbstractNormalizer::$circularReferenceHandler
,
AbstractNormalizer::$callbacks
, AbstractNormalizer::$ignoredAttributes
,
AbstractNormalizer::$camelizedAttributes
, AbstractNormalizer::setCircularReferenceLimit()
,
AbstractNormalizer::setCircularReferenceHandler()
, AbstractNormalizer::setCallbacks()
and
AbstractNormalizer::setIgnoredAttributes()
are deprecated, use the default context instead.AbstractObjectNormalizer::$maxDepthHandler
and AbstractObjectNormalizer::setMaxDepthHandler()
are deprecated, use the default context instead.CsvEncoder
, JsonDecode
and
XmlEncoder
is deprecated since Symfony 4.2, use the default context instead.Translator::transChoice()
in favor of using Translator::trans()
with a %count%
parameterTranslatorInterface
in favor of Symfony\Contracts\Translation\TranslatorInterface
MessageSelector
, Interval
and PluralizationRules
; use IdentityTranslator
insteadIntlFormatter
and IntlFormatterInterface
XliffLintCommand
Translator::getFallbackLocales()
and TranslationDataCollector::getFallbackLocales()
as internalUnexpectedValueException
that can be thrown by constraint validators, these exceptions are caught by
the validator and are converted into constraint violationsDivisibleBy
constraintsymfony/translation
by using Symfony\Contracts\Translation\TranslatorInterface
ValidatorBuilderInterface
ValidatorBuilder::setTranslator()
finalformat
the default option in DateTime
constraint\DateTimeInterface
in DateTimeValidator
, DateValidator
and TimeValidator
.Bic
, Country
, Currency
, Language
and Locale
constraints without symfony/intl
Email
constraint without egulias/email-validator
Expression
constraint without symfony/expression-language
VAR_DUMPER_FORMAT
to html
or cli
LintCommand
input
option of NumberType
to stringIdReader
to the DoctrineChoiceLoader
when query can be optimized with a single id fieldIdReader
to the DoctrineChoiceLoader
when entities have a composite idDoctrinePingConnectionMiddleware
and DoctrineCloseConnectionMiddleware
ConsoleCommandProcessor
: monolog processor that adds command name and argumentsRouteProcessor
: monolog processor that adds route name, controller::action and route paramsClassExistsMock
form_parent()
function that allows to reliably retrieve the parent form in Twig templatesworkflow_transition_blockers()
function$requestStack
and $requestContext
arguments of the
HttpFoundationExtension
, pass a Symfony\Component\HttpFoundation\UrlHelper
instance as the only argument insteadframework.templating
option, configure the Twig bundle instead.WebTestAssertionsTrait
(included by default in WebTestCase
)Client
to KernelBrowser
AssetsInstallCommand
is deprecated. This argument will
be mandatory in 5.0.serializer
option for each
transport underframework.messenger.transports
.RegisterLocaleAwareServicesPass
and configured the LocaleAwareListener
PhpSerializer
, which uses
PHP's native serialize()
and unserialize()
functions. To use the
original serialization method, set the framework.messenger.default_serializer
config option to messenger.transport.symfony_serializer
. Or set the
serializer
option under one specific transport
.framework.messenger.serializer
config key changed to
framework.messenger.default_serializer
, which holds the string service
id and framework.messenger.symfony_serializer
, which configures the
options if you're using Symfony's serializer.framework.messenger.routing.send_and_handle
configuration.
Instead of setting it to true, configure a SyncTransport
and route messages to it.debug:autowiring
sid_length
and sid_bits_per_character
to the session
section of the configurationmessenger:setup-transports
command to setup messenger transportsInMemoryTransport
to Messenger. Use it with a DSN starting with in-memory://
.framework.property_access.throw_exception_on_invalid_property_path
config option.cache:pool:list
command to list all available cache pools.auto
(recommended), native
and sodium
logout.delete_cookies
option is deprecated and will be disabled in Symfony 5.0. This affects to cookies
with dashes in their names. For example, starting from Symfony 5.0, the my-cookie
name will delete my-cookie
(with a dash) instead of my_cookie
(with an underscore).argon2i
as algorithm, use auto
insteadBrowserCookieValueSame
and BrowserHasCookie
HttpBrowser
, an implementation of a browser with the HttpClient componentClient
to AbstractBrowser
Response
final.Response::buildHeader()
Response::getStatus()
, use Response::getStatusCode()
insteadpsr/simple-cache
dependency, run composer require psr/simple-cache
if you need itPsr16Cache
or Symfony\Contracts\Cache\CacheInterface
implementations insteadSimpleCacheAdapter
, use Psr16Adapter
insteadcannotBeEmpty()
if the value is validated with validate()
Resource\*
classes final and not implement Serializable
anymoreroot()
method in TreeBuilder
, pass the root node information to the constructor insteadProgressBar::iterate()
method that simplify updating the progress bar when iteratingQuestion::setAutocompleterCallback()
to provide a callback function
that dynamically generates suggestions as the user typesErrorHandler
and ExceptionHandler
classes finalException\FlattenException::getAsString
and
Exception\FlattenException::getTraceAsString
to increase compatibility to php
exception objects%env(trim:...)%
processor to trim a string value%env(default:param_name:...)%
processor to fallback to a parameter or to null when using %env(default::...)%
%env(url:...)%
processor to convert an URL or DNS into an array of components%env(query_string:...)%
processor to convert a query string into an array of key valuesContainerParametersResource
final and not implement Serializable
anymoreReverseContainer
: a container that turns services back to their idsServiceLocator
implement ServiceProviderInterface
%env(require:...)%
processor to require()
a PHP file and use the value returned from itCrawlerSelectorAttributeValueSame
, CrawlerSelectorExists
, CrawlerSelectorTextContains
and CrawlerSelectorTextSame
_name
) in extract()
method.text()
and html()
instead of throwing an exception when node is empty.putenv()
by default. This feature will be opted-in with a constructor argument to Dotenv
EventDispatcherInterface::dispatch()
method should be updated to dispatch($event, string $eventName = null)
, not doing so is deprecatedEvent
class, use Symfony\Contracts\EventDispatcher\Event
insteadFilesystem::dumpFile()
is deprecated and will be removed in 5.0Filesystem::appendToFile()
is deprecated and will be removed in 5.0added a symbol
option to the PercentType
that allows to disable or customize the output of the percent character
Using the format
option of DateType
and DateTimeType
when the html5
option is enabled is deprecated.
Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated and will lead to an exception in 5.0.
Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons is deprecated and will lead to an exception in 5.0.
added html5
option to NumberType
that allows to render type="number"
input fields
deprecated using the date_format
, date_widget
, and time_widget
options of the DateTimeType
when the widget
option is set to single_text
added block_prefix
option to BaseType
.
added help_html
option to display the help
text as HTML.
FormError
doesn't implement Serializable
anymore
FormDataCollector
has been marked as final
added label_translation_parameters
, attr_translation_parameters
, help_translation_parameters
options
to FormType
to pass translation parameters to form labels, attributes (placeholder
and title
) and help text respectively.
The passed parameters will replace placeholders in translation messages.
class OrderType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('comment', TextType::class, [
'label' => 'Comment to the order to %company%',
'label_translation_parameters' => [
'%company%' => 'Acme',
],
'help' => 'The address of the %company% is %address%',
'help_translation_parameters' => [
'%company%' => 'Acme Ltd.',
'%address%' => '4 Form street, Symfonyville',
],
])
}
}
added the input_format
option to DateType
, DateTimeType
, and TimeType
to specify the input format when setting
the input
option to string
dispatch PreSubmitEvent
on form.pre_submit
dispatch SubmitEvent
on form.submit
dispatch PostSubmitEvent
on form.post_submit
dispatch PreSetDataEvent
on form.pre_set_data
dispatch PostSetDataEvent
on form.post_set_data
added an input
option to NumberType
removed default option grouping in TimezoneType
, use group_by
instead
RequestAttributeValueSame
, ResponseCookieValueSame
, ResponseHasCookie
,
ResponseHasHeader
, ResponseHeaderSame
, ResponseIsRedirected
, ResponseIsSuccessful
, and ResponseStatusCodeSame
MimeTypeGuesserInterface
and ExtensionGuesserInterface
in favor of Symfony\Component\Mime\MimeTypesInterface
.MimeType
and MimeTypeExtensionGuesser
in favor of Symfony\Component\Mime\MimeTypes
.FileBinaryMimeTypeGuesser
in favor of Symfony\Component\Mime\FileBinaryMimeTypeGuesser
.FileinfoMimeTypeGuesser
in favor of Symfony\Component\Mime\FileinfoMimeTypeGuesser
.UrlHelper
that allows to get an absolute URL and a relative path for a given pathClient
to HttpKernelBrowser
KernelInterface
doesn't extend Serializable
anymoreKernel::serialize()
and unserialize()
methodsSymfony\Component\HttpKernel\EventListener\AddRequestFormatsListener
Symfony\Component\HttpKernel\EventListener\LocaleListener
set the default locale earlyTranslatorListener
in favor of LocaleAwareListener
LocaleAwareInterface
implementations into the LocaleAwareListener
FileLinkFormatter
final and not implement Serializable
anymoreDataCollector
doesn't implement Serializable
anymore, you should
store all the serialized state in the data property insteadDumpDataCollector
has been marked as final
FilterControllerArgumentsEvent
to ControllerArgumentsEvent
FilterControllerEvent
to ControllerEvent
FilterResponseEvent
to ResponseEvent
GetResponseEvent
to RequestEvent
GetResponseForControllerResultEvent
to ViewEvent
GetResponseForExceptionEvent
to ExceptionEvent
PostResponseEvent
to TerminateEvent
HttpClientKernel
for handling requests with an HttpClientInterface
instancetrace_header
and trace_level
configuration options to HttpCache
ResourceBundle
namespaceCurrencies
in favor of Intl::getCurrencyBundle()
Languages
and Scripts
in favor of Intl::getLanguageBundle()
Locales
in favor of Intl::getLocaleBundle()
Countries
in favor of Intl::getRegionBundle()
Timezones
Zzzz
EntryManager::move
, not implementing it is deprecatedNonSendableStampInterface
that a stamp can implement if
it should not be sent to a transport. Transport serializers
must now check for these stamps and not encode them.SendersLocatorInterface
has an additional method:
getSenderByAlias()
.?bool &$handle = false
from SendersLocatorInterface::getSenders
ListableReceiverInterface
was added, which a receiver
can implement (when applicable) to enable listing and fetching
individual messages by id (used in the new "Failed Messages" commands).SenderInterface::send()
and ReceiverInterface::get()
should now (when applicable) add a TransportMessageIdStamp
.WorkerStoppedEvent
dispatched when a worker is stopped.MessageCountAwareInterface
that receivers can implement
to give information about how many messages are waiting to be processed.Envelope::__construct()
signature changed:
you can no longer pass an unlimited number of stamps as the second,
third, fourth, arguments etc: stamps are now an array passed to the
second argument.MessageBusInterface::dispatch()
signature changed:
a second argument array $stamps = []
was added.messenger:stop-workers
command that sends a signal
to stop all messenger:consume
workers.TransportFactoryInterface::createTransport()
signature
changed: a required 3rd SerializerInterface
argument was added.SyncTransport
to explicitly handle messages synchronously.AmqpStamp
allowing to provide a routing key, flags and attributes on message publishing.routing_key
option from queue configuration, for
AMQP. Use exchange default_publish_routing_key
or AmqpStamp
instead.queue
option in the AMQP transport DSN to be queues[name]
. You can
therefore name the queue but also configure binding_keys
, flags
and arguments
.get
, ack
, nack
and queue
of the AMQP Connection
have a new argument: the queue name.prefetch_count
in connection configuration,
to setup channel prefetch count.RoutableMessageBus
, AddBusNameStampMiddleware
and BusNameStamp
were added, which allow you to add a bus identifier
to the Envelope
then find the correct bus when receiving from
the transport. See ConsumeMessagesCommand
.$busNames
constructor argument of the class ConsumeMessagesCommand
was removed.ReceiverInterface
:
ack()
, reject()
and get()
. The methods receive()
and stop()
were removed.Worker
. Implementations of ReceiverInterface::handle()
should now allow all exceptions to be thrown, except for transport
exceptions. They should also not retry (e.g. if there's a queue,
remove from the queue) if there is a problem decoding the message.RejectMessageExceptionInterface
was removed and replaced
by Symfony\Component\Messenger\Exception\UnrecoverableMessageHandlingException
,
which has the same behavior: a message will not be retriedConsumeMessagesCommand
was
changed from messenger:consume-messages
to messenger:consume
ConsumeMessagesCommand
has two new optional constructor argumentsReceiverInterface
to an array of ReceiverInterface
.Worker
has 3 new optional constructor arguments.Worker
class now handles calling pcntl_signal_dispatch()
the
receiver no longer needs to call this.AmqpSender
will now retry messages using a dead-letter exchange
and delayed queues, instead of retrying via nack()
Envelope
with the SentStamp
on it. Previously,
the Envelope
was passed to the sender and then the SentStamp
was added.SerializerInterface
implementations should now throw a
Symfony\Component\Messenger\Exception\MessageDecodingFailedException
if decode()
fails for any reason.Serializer
will now throw a
MessageDecodingFailedException
if decode()
fails, instead
of the underlying exceptions from the Serializer component.PhpSerializer
which uses PHP's native serialize()
and
unserialize()
to serialize messages to a transportSerializer
to PhpSerializer
inside AmqpReceiver
,
AmqpSender
, AmqpTransport
and AmqpTransportFactory
.TransportException
to mark an exception transport-relatedAmqpSender
or AmqpReceiver
, \AMQPException
is
no longer thrown in favor of TransportException
.LoggingMiddleware
, pass a logger to SendMessageMiddleware
instead.Connection::__construct()
and Connection::fromDsn()
both no longer have $isDebug
arguments.auto_setup
connection option to control this.SetupTransportsCommand
command to setup the transportsdoctrine://default
DSN (this uses the default
Doctrine entity manager)getConnectionConfiguration
method on Amqp's Connection
has been removed.HandlerFailedException
exception will be thrown if one or more handler fails.HandlersLocationInterface::getHandlers
method needs to return HandlerDescriptor
instances instead of callables.HandledStamp
stamp has changed: handlerAlias
has been renamed to handlerName
,
getCallableName
has been removed and its constructor only has 2 arguments now.ReceivedStamp
needs to exposes the name of the transport from which the message
has been received.OptionsResolver::addNormalizer
method$throwExceptionOnInvalidPropertyPath
argument to the PropertyAccessor constructor.enableExceptionOnInvalidPropertyPath()
, disableExceptionOnInvalidPropertyPath()
and
isExceptionOnInvalidPropertyPath()
methods to PropertyAccessorBuilder
ReflectionExtractor
CompiledUrlMatcher
and CompiledUrlMatcherDumper
CompiledUrlGenerator
and CompiledUrlGeneratorDumper
PhpGeneratorDumper
and PhpMatcherDumper
generator_base_class
, generator_cache_class
, matcher_base_class
and matcher_cache_class
router optionsSerializable
implementing methods for Route
and CompiledRoute
are marked as @internal
and @final
.
Instead of overwriting them, use __serialize
and __unserialize
as extension points which are forward compatible
with the new serialization methods in PHP 7.4.utf8
Route option, defaults "locale" and "format" in configuration loaders and configurators__serialize
and __unserialize
to the TokenInterface
SodiumPasswordEncoder
and NativePasswordEncoder
Role
and SwitchUserRole
classes are deprecated and will be removed in 5.0. Use strings for roles
instead.getReachableRoles()
method of the RoleHierarchyInterface
is deprecated and will be removed in 5.0.
Role hierarchies must implement the getReachableRoleNames()
method instead and return roles as strings.getRoles()
method of the TokenInterface
is deprecated. Tokens must implement the getRoleNames()
method instead and return roles as strings.serialize()
and unserialize()
methods of AbstractToken
and
AuthenticationException
final, use __serialize()
/__unserialize()
insteadAuthenticationException
doesn't implement Serializable
anymoreListenerInterface
, turn your listeners into callables insteadFirewall::handleRequest()
, use Firewall::callListeners()
insteadAuthenticationSuccessEvent
on security.authentication.success
AuthenticationFailureEvent
on security.authentication.failure
InteractiveLoginEvent
on security.interactive_login
SwitchUserEvent
on security.switch_user
Argon2iPasswordEncoder
, use SodiumPasswordEncoder
insteadBCryptPasswordEncoder
, use NativePasswordEncoder
insteadDeauthenticatedEvent
dispatched in case the user has changed when trying to refresh the tokenConstraintViolationListNormalizer
DateTimeZone
objectsdeep_object_to_populate
context option to recursive denormalize on object_to_populate
object.TranslatorPathsPass
Timezone
constraintNotCompromisedPassword
constraintiban
and ibanPropertyPath
to Bic constraintCardSchemeValidator
allowNull
to NotBlank constraintJson
constraintUnique
constraintnormalizer
option to the string constraints and to the NotBlank
constraintPositive
constraintPositiveOrZero
constraintNegative
constraintNegativeOrZero
constraintDsCaster
to support dumping the contents of data structures from the Ds extensionentered
event for subject entering in the Workflow for the first time.Workflow::apply()
. The MethodMarkingStore
could be used to leverage this feature.TransitionEvent
is able to modify the context.ParseException
in 5.0.$classValidatorRegexp
value in DoctrineLoader::__construct
will not enable auto-mapping for all classes anymore, use '{.*}'
instead.DoctrineClearEntityManagerWorkerSubscriber
RegistryInterface
, use Doctrine\Persistence\ManagerRegistry
getMetadataDriverClass
method to deprecate class parameters in service configuration filesRouteProcessor
class has been made finalElasticsearchLogstashHandler
ServerLogCommand
. Backport from the deprecated WebServerBundleSetUpTearDownTrait
to allow working around the void
return-type added by PHPUnit 8TwigErrorRenderer
for html
format, integrated with the ErrorHandler
component@final
$rootDir
and $fileLinkFormatter
as 5th and 6th argument respectively to the
DebugCommand::__construct()
method, swap the variables position.LintCommand
lints all the templates stored in all configured Twig paths if none argument is providedlint:twig
command, use lint:twig -
(append a dash) instead to make it explicit.--show-deprecations
option to the lint:twig
commandswitch-custom
class to the label attributes of a CheckboxType
TwigDataCollector
class as @final
.lint:container
command to check that services wiring matches type declarationsMailerAssertionsTrait
templating
engine in TemplateController
, use Twig instead$parser
argument of ControllerResolver::__construct()
and DelegatingLoader::__construct()
controller_name_converter
and resolve_controller_name_subscriber
servicesControllerResolver
and DelegatingLoader
classes have been marked as final
WebTestCase::createClient()
while a kernel has been booted, ensure the kernel is shut down before calling the methodrouting.loader.service
, use routing.loader.container
instead.routing.route_loader
has been deprecated.KernelTestCase::tearDown()
and WebTestCase::tearDown()
without the void
return-type is deprecated.error_controller
configuration to handle system exceptionstranslation:update
command.framework.messenger.routing.senders
config key is not deeply merged anymore.secrets:*
commands to deal with secrets seamlessly.framework.session.handler_id
accept a DSNRouterDataCollector
class as @final
.framework.messenger.buses.<name>.middleware
config key is not deeply merged anymore.anonymous: lazy
mode to firewalls to make them (not) start the session as late as possiblemigrate_from
option to encoders configuration.argon2id
encoder, undeprecated the bcrypt
and argon2i
ones (using auto
is still recommended by default.)SecurityDataCollector
class as @final
.TemplateIterator
as internal
exception_full.html.twig
ExceptionController
and PreviewErrorController
controllers, use ErrorController
from the HttpKernel
component insteadtwig.exception_controller
configuration option, set it to "null" and use framework.error_controller
configuration insteadExceptionController::templateExists()
methodTemplateManager::templateExists()
methodExceptionController
in favor of ExceptionPanelController
$prefix
to AdapterInterface::clear()
RedisTagAwareAdapter
to support Redis server >= 2.8 and up to 4B items per tagTagAwareMarshaller
for optimized data storage when using AbstractTagAwareAdapter
DeflateMarshaller
to compress serialized valuescompression
RedisTagAwareAdapter
is not compatible with RedisCluster
from Predis
anymore, use phpredis
insteadCacheDataCollector
class as @final
.import()
methodQuestion::setTrimmable
default to true to allow the answer to be trimmedminSecondsBetweenRedraws()
and maxSecondsBetweenRedraws()
on ProgressBar
Application
implements ResetInterface
@final
null
from Command::execute()
, return 0
insteadApplication::renderException()
and Application::doRenderException()
methods,
use renderThrowable()
and doRenderThrowable()
instead.NO_COLOR
env var (https://no-color.org/)*:only-of-type
FlattenException
, use the FlattenException
of the ErrorHandler
componentErrorHandler
componentCheckTypeDeclarationsPass
to check injected parameters type during compilationtagged_iterator
alias for tagged
which might be deprecated in a future versionSymfony\Component\DependencyInjection\Parameter
as class name to Symfony\Component\DependencyInjection\Definition
%env(base64:...)%
processor able to decode base64urlForm::getName()
method.Crawler::matches()
method.Crawler::closest()
method.Crawler::outerHtml()
method.Crawler::text()
method to opt-in normalizing whitespaces.ErrorHandler::call()
method utility to turn any PHP error into \ErrorException
AddEventAliasesPass
has been added, allowing applications and bundles to extend the event alias mapping used by RegisterListenersPass
.event
attribute of the kernel.event_listener
tag optional for FQCN events.null
value to Filesystem::isAbsolutePath()
is deprecated and will be removed in 5.0WeekType
TimeType
without configuring a
reference date is deprecatedint
or float
as data for the NumberType
when the input
option is set to string
FormIntegrationTestCase::setUp()
, TypeTestCase::setUp()
and TypeTestCase::tearDown()
without the void
return-type is deprecated.@final
validate
option to SubmitType
to toggle the browser built-in form validation.alpha3
option to LanguageType
and CountryType
to use alpha3 instead of alpha2 codescanceled
to ResponseInterface::getInfo()
HttpClient::createForBaseUri()
HttplugClient
with support for sync and async requestsmax_duration
optionStreamWrapper
to cast any ResponseInterface
instances to PHP streams.$response->toStream()
to cast responses to regular PHP streamsPsr18Client
implement relevant PSR-17 factories and have streaming responsesTraceableHttpClient
, HttpClientDataCollector
and HttpClientPass
to integrate with the web profilerRequest::isMethodSafe()
is deprecated.ApacheRequest
is deprecated, use the Request
class instead.HeaderBag::get()
is deprecated, use method all()
insteadPdoSessionHandler
with MySQL changed the type of the lifetime column,
make sure to run ALTER TABLE sessions MODIFY sess_lifetime INTEGER UNSIGNED NOT NULL
to
update your database.PdoSessionHandler
now precalculates the expiry timestamp in the lifetime column,
make sure to run CREATE INDEX EXPIRY ON sessions (sess_lifetime)
to update your database
to speed up garbage collection of expired sessions.SessionHandlerFactory
to create session handlers with a DSNIpUtils::anonymize()
to help with GDPR compliance.DebugHandlersListener
class has been marked as final
KernelInterface::locateResource
FileLocator::__construct
%kernel.root_dir%/Resources
and %kernel.root_dir%
as
fallback directories. Resources like service definitions are usually loaded relative to the
current directory or with a glob pattern. The fallback directories have never been advocated
so you likely do not use those in any app based on the SF Standard or Flex edition.@final
ErrorController
to enable the preview and error rendering mechanismAjaxDataCollector
, ConfigDataCollector
, EventDataCollector
,
ExceptionDataCollector
, LoggerDataCollector
, MemoryDataCollector
,
RequestDataCollector
and TimeDataCollector
classes as @final
.RouterDataCollector::collect()
method as @final
.DataCollectorInterface::collect()
and Profiler::collect()
methods third parameter signature
will be \Throwable $exception = null
instead of \Exception $exception = null
in Symfony 5.0.ExceptionEvent::get/setException()
, use get/setThrowable()
insteadExceptionListener
, use ErrorListener
insteadroot
Countries
and Languages
the methods getAlpha3Codes
, getAlpha3Code
, getAlpha2Code
, alpha3CodeExists
, getAlpha3Name
and getAlpha3Names
en_US
) from Languages
in getLanguageCodes()
and getNames()
StoreInterface
in favor of BlockingStoreInterface
and PersistingStoreInterface
Factory
is deprecated, use LockFactory
insteadStoreFactory::createStore
allows PDO and Zookeeper DSN.lock.store.flock
, lock.store.semaphore
, lock.store.memcached.abstract
and lock.store.redis.abstract
,
use StoreFactory::createStore
instead.Symfony\Component\Mailer\Bridge\Amazon\Http\Api\SesTransport
to Symfony\Component\Mailer\Bridge\Amazon\Transpor\SesApiTransport
, Symfony\Component\Mailer\Bridge\Amazon\Http\SesTransport
to Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpTransport
, Symfony\Component\Mailer\Bridge\Amazon\Smtp\SesTransport
to Symfony\Component\Mailer\Bridge\Amazon\Transport\SesSmtpTransport
.Symfony\Component\Mailer\Bridge\Google\Smtp\GmailTransport
to Symfony\Component\Mailer\Bridge\Google\Transport\GmailSmtpTransport
.Symfony\Component\Mailer\Bridge\Mailchimp\Http\Api\MandrillTransport
to Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillApiTransport
, Symfony\Component\Mailer\Bridge\Mailchimp\Http\MandrillTransport
to Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillHttpTransport
, Symfony\Component\Mailer\Bridge\Mailchimp\Smtp\MandrillTransport
to Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillSmtpTransport
.Symfony\Component\Mailer\Bridge\Mailgun\Http\Api\MailgunTransport
to Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunApiTransport
, Symfony\Component\Mailer\Bridge\Mailgun\Http\MailgunTransport
to Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunHttpTransport
, Symfony\Component\Mailer\Bridge\Mailgun\Smtp\MailgunTransport
to Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunSmtpTransport
.ReplyTo
optionSymfony\Component\Mailer\Bridge\Postmark\Http\Api\PostmarkTransport
to Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkApiTransport
, Symfony\Component\Mailer\Bridge\Postmark\Smtp\PostmarkTransport
to Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkSmtpTransport
.Symfony\Component\Mailer\Bridge\Sendgrid\Http\Api\SendgridTransport
to Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridApiTransport
, Symfony\Component\Mailer\Bridge\Sendgrid\Smtp\SendgridTransport
to Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridSmtpTransport
.NullTransport
DSN from smtp://null
to null://null
SmtpEnvelope
to Envelope
, renamed DelayedSmtpEnvelope
to
DelayedEnvelope
InMemoryTransport
handle acknowledged and rejected messages.from_transport
attribute on messenger.message_handler
tag.dbindex
as a query parameter to the redis transport DSN.WorkerStartedEvent
and WorkerRunningEvent
SendersLocatorInterface::getSenderByAlias
added in 4.3.$retryStrategies
argument from Worker::__construct
.ConsumeMessagesCommand::__construct
.$senderClassOrAlias
argument from RedeliveryStamp::__construct
.UnknownSenderException
.WorkerInterface
.$onHandledCallback
of Worker::run(array $options = [], callable $onHandledCallback = null)
.StopWhenMemoryUsageIsExceededWorker
in favor of StopWorkerOnMemoryLimitListener
.StopWhenMessageCountIsExceededWorker
in favor of StopWorkerOnMessageLimitListener
.StopWhenTimeLimitIsReachedWorker
in favor of StopWorkerOnTimeLimitListener
.StopWhenRestartSignalIsReceived
in favor of StopWorkerOnRestartSignalListener
.@experimental
anymore.MessengerDataCollector
class as @final
.DelayStamp
to the redis
transport.NamedAddress
(Address
now supports a name)AbstractPart::asDebugString()
Address::fromString()
Process::inheritEnvironmentVariables()
: env variables are always inherited.Process::getLastOutputTime()
methodnull
as $defaultLifetime
2nd argument of PropertyAccessor::createCache()
method,
pass 0
insteadServiceRouterLoader
in favor of ContainerLoader
.ObjectRouteLoader
in favor of ObjectLoader
.import()
methodLdapUserProvider
, use Symfony\Component\Ldap\Security\LdapUserProvider
insteadneedsRehash()
to PasswordEncoderInterface
and UserPasswordEncoderInterface
MigratingPasswordEncoder
PasswordUpgraderInterface
, for opportunistic password migrationsGuard\PasswordAuthenticatedInterface
, an optional interface
for "guard" authenticators that deal with user passwords@final
Guard\AuthenticatorInterface::checkCredentials()
.AccessDecisionManager::decide()
and AuthorizationChecker::isGranted()
argon2id
encoder, undeprecated the bcrypt
and argon2i
ones (using auto
is still recommended by default.)AbstractListener
which replaces the deprecated ListenerInterface
XmlEncoder::TYPE_CASE_ATTRIBUTES
constant, use XmlEncoder::TYPE_CAST_ATTRIBUTES
insteadCsvEncoder::OUTPUT_UTF8_BOM_KEY
context optionProblemNormalizer
to normalize errors according to the API Problem spec (RFC 7807)null
as 1st ($id
) argument of Section::get()
method, pass a valid child section identifier instead.null
as the locale in Translator
lint:xliff
command, use lint:xliff -
(append a dash) instead to make it explicit.TranslationDataCollector
class as @final
.$classValidatorRegexp
value in PropertyInfoLoader::__construct
will not enable auto-mapping for all classes anymore, use '{.*}'
instead.EnableAutoMapping
and DisableAutoMapping
constraints to enable or disable auto mapping for class or a propertystring
as the code of a ConstraintViolation
is deprecated, a string
type-hint will
be added to the constructor of the ConstraintViolation
class and to the ConstraintViolationBuilder::setCode()
method in 5.0ExpressionLanguage
instance as the second argument of ExpressionValidator::__construct()
. Pass it as the first argument instead.compared_value_path
parameter in violations when using any
comparison constraint with the propertyPath
option.TypeValidator
allowEmptyString
option to the Length
constraint to allow rejecting empty strings when min
is set, by setting it to false
.minPropertyPath
and maxPropertyPath
options
to Range
constraint in order to get the value to compare
from an array or objectmin_limit_path
and max_limit_path
parameters in violations when using
Range
constraint with respectively the minPropertyPath
and
maxPropertyPath
optionsnotInRangeMessage
option to the Range
constraint that will
be used in the violation builder when both min
and max
are not nullConstraintValidatorTestCase::setUp()
and ConstraintValidatorTestCase::tearDown()
without the void
return-type is deprecated.Symfony\Component\Validator\Mapping\Cache\CacheInterface
in favor of PSR-6.ValidatorBuilder::setMetadataCache
, use ValidatorBuilder::setMappingCache
instead.ValidatorDataCollector
class as @final
.VarDumperTestTrait::setUpVarDumper()
and VarDumperTestTrait::tearDownVarDumper()
to configure casters & flags to use in testsImagineCaster
and infrastructure to dump imagesTraceableMessageBus
and MessengerDataCollector
collected dataUuidCaster
NO_COLOR
env var (https://no-color.org/)@final
null
as ~
by using the Yaml::DUMP_NULL_AS_TILDE
flag.lint:yaml
command, use lint:yaml -
(append a dash) instead to make it explicit.getMetadataDriverClass()
method is abstract and must be implemented by class extending AbstractDoctrineExtension
IdReader
to the DoctrineChoiceLoader
when the query cannot be optimized with single id field, throws an exception; pass null
insteadIdReader
to DoctrineChoiceLoader
when it can optimize single id field, will not apply any optimizationDoctrineExtractor
now requires an EntityManagerInterface
on instantiationDebugProcessor::getLogs()
, DebugProcessor::countErrors()
, Logger::getLogs()
and Logger::countErrors()
have a new $request
argument.weak_vendor
mode, use max[self]=0
insteadTwigEngine
class, use \Twig\Environment
instead.transChoice
filter and tokenHttpFoundationExtension
requires a UrlHelper
on instantiationlint:twig
command, use lint:twig -
(append a dash) instead to make it explicit.twig:lint
from TwigBundle
src/Resources/translations/
and src/Resources/<BundleName>/translations/
ControllerNameParser
.ResolveControllerNameSubscriber
bundle:controller:action
to reference controllers. Use serviceOrFqcn::method
insteadController
, use AbstractController
insteadClient
, use KernelBrowser
insteadContainerAwareCommand
, use dependency injection insteadvalidation.strict_email
option, use validation.email_validation_mode
insteadcache.app.simple
service and its corresponding PSR-16 autowiring aliasRequestDataCollector
translator.selector
and session.save_listener
servicesSecurityUserValueResolver
, use UserValueResolver
insteadrouting.loader.service
.routing.route_loader
.slugger
service and SluggerInterface
aliaslock.store.flock
, lock.store.semaphore
, lock.store.memcached.abstract
and lock.store.redis.abstract
services.router.cache_class_prefix
parameter.translation:debug
command--no-backup
option to translation:update
commandconfig:debug
commandyaml:lint
commandRouterApacheDumperCommand
which will be removed in Symfony 3.0.switch_user.stateless
firewall option has been removed.argon2i
or bcrypt
as algorithm, use auto
insteadsimple_form
and simple_preauth
authentication listeners have been removed,
use Guard instead.SimpleFormFactory
and SimplePreAuthenticationFactory
classes have been removed,
use Guard instead.LogoutUrlHelper
and SecurityHelper
templating helpers, use Twig insteadlogout_on_user_change
firewall optionthreads
encoder optionsecurity.authentication.trust_resolver.anonymous_class
parametersecurity.authentication.trust_resolver.rememberme_class
parametersecurity.user.provider.in_memory.user
service.strict_variables
option to %kernel.debug%
parametersrc/Resources/views/
and src/Resources/<BundleName>/views/
TwigEngine
class, use Twig\Environment
insteadFilesystemLoader
and NativeFilesystemLoader
, use Twig notation for templates insteadtwig.exception_controller
configuration option, use framework.error_controller
option insteadExceptionController
, PreviewErrorController
and all built-in error templates in favor of the new error renderer mechanismExceptionController
, use ExceptionPanelController
insteadTemplateManager::templateExists()
methodSimple
namespaceSimpleCacheAdapter
AbstractAdapter::unserialize()
CacheItem::getPreviousTags()
TreeBuilder
without passing root node information.root()
method in TreeBuilder
, pass the root node information to the constructor insteadgetChildNodeDefinitions()
to ParentNodeDefinitionInterfaceFileLoaderLoadException
, use LoaderLoadException
insteadTableStyle::setCrossingChar()
method in favor of TableStyle::setDefaultCrossingChar()
TableStyle::setHorizontalBorderChar()
method in favor of TableStyle::setDefaultCrossingChars()
TableStyle::getHorizontalBorderChar()
method in favor of TableStyle::getBorderChars()
TableStyle::setVerticalBorderChar()
method in favor of TableStyle::setVerticalBorderChars()
TableStyle::getVerticalBorderChar()
method in favor of TableStyle::getBorderChars()
null
from Command::execute()
, return 0
insteadProcessHelper::run()
accepts only array|Symfony\Component\Process\Process
for its command
argumentApplication::setDispatcher
accepts only Symfony\Contracts\EventDispatcher\EventDispatcherInterface
for its dispatcher
argumentApplication::renderException()
and Application::doRenderException()
to renderThrowable()
and doRenderThrowable()
respectively.ListCommand
ConfigurationInterface
ServiceSubscriberInterface
to the Symfony\Contracts\Service
namespaceRepeatedPass
and RepeatablePassInterface
YamlFileLoader
ResettableContainerInterface
, use ResetInterface
instead$returnsClone
to Definition::addMethodCall()
tagged
, use tagged_iterator
instead$selector
to ``Crawler::children()`$default
to ``Crawler::text()and
html()`Link
, Form
and FormField
classes have been changed from
\DOMNode
to DOMElement
. Using any other type of DOMNode
was triggering fatal errors in previous
versions. Code extending these classes will need to update the typehints when overwriting these methods.putenv()
is disabled by defaultEventDispatcherInterface::dispatch()
method has been changed to dispatch($event, string $eventName = null): object
.Event
class has been removed in favor of Symfony\Contracts\EventDispatcher\Event
.TraceableEventDispatcherInterface
has been removed.WrappedListener
class is now final.Filesystem::dumpFile()
and appendToFile()
don't accept arrays anymore$useNaturalSort
argument to Finder::sortByName()
TimeType
without configuring a reference date.scale
option of the IntegerType
.date_format
, date_widget
, and time_widget
options of the DateTimeType
when the widget
option is
set to single_text
is not supported anymore.format
option of DateType
and DateTimeType
cannot be used when the html5
option is enabled.ChoiceLoaderInterface
implementation in CountryType
, LanguageType
, LocaleType
and CurrencyType
getExtendedType()
method of the FormTypeExtensionInterface
getExtendedTypes()
method to the FormTypeExtensionInterface
FormRenderer::searchAndRenderBlock()
method for fields which were already rendered throw a BadMethodCallException
regions
option of the TimezoneType
$scale
argument of the IntegerToLocalizedStringTransformer
TemplatingExtension
and TemplatingRendererEngine
classes, use Twig insteadSymfony\Component\Form\FormError
is not allowedint
or float
as data for the NumberType
when the input
option is set to string
FormInterface::getTransformationFailure()
Cookie
auto-secure and lax by defaultMimeType
namespace, use the Symfony Mime component insteadUploadedFile::getClientSize()
and the related constructor argumentRequest::getSession()
throw if the session has not been set beforeResponse::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL
RedirectResponse
is not allowedJsonResponse::setEncodingOptions()
& JsonResponse::getEncodingOptions()
for easier manipulation
of the options used while encoding data to JSON format.ConfigDataCollector
ConfigDataCollector::getApplicationName()
ConfigDataCollector::getApplicationVersion()
Symfony\Component\Templating\EngineInterface
in HIncludeFragmentRenderer
, use a Twig\Environment
onlyTranslatorListener
in favor of LocaleAwareListener
getRootDir()
and getName()
from Kernel
and KernelInterface
FilterControllerArgumentsEvent
, use ControllerArgumentsEvent
insteadFilterControllerEvent
, use ControllerEvent
insteadFilterResponseEvent
, use ResponseEvent
insteadGetResponseEvent
, use RequestEvent
insteadGetResponseForControllerResultEvent
, use ViewEvent
insteadGetResponseForExceptionEvent
, use ExceptionEvent
insteadPostResponseEvent
, use TerminateEvent
insteadSaveSessionListener
in favor of AbstractSessionListener
Client
, use HttpKernelBrowser
insteadgetProjectDir()
to KernelInterface
serialize
and unserialize
from DataCollector
, store the serialized state in the data property insteadProfilerStorageInterface
internalKernelInterface::locateResource
FileLocator::__construct
%kernel.root_dir%/Resources
and %kernel.root_dir%
as
fallback directories.ExceptionListener
, use ErrorListener
insteadSymfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass
, use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass
insteadResourceBundle
namespacemove() to
EntryManagerInterface`Factory
has been removed, use LockFactory
instead.StoreInterface
has been removed, use BlockingStoreInterface
and PersistingStoreInterface
instead.waitAndSave()
method from CombinedStore
, MemcachedStore
, RedisStore
, and ZookeeperStore
LoggingMiddleware
class has been removed, pass a logger to SendMessageMiddleware
instead.SendersLocator
require a ContainerInterface
as 2nd argument$triggerDeprecation
to OptionsResolver::offsetGet()
Process::inheritEnvironmentVariables()
PhpProcess::setPhpBinary()
Process
must be instantiated with a command array, use Process::fromShellCommandline()
when the command should be parsed by the shellProcess::setCommandLine()
PhpGeneratorDumper
and PhpMatcherDumper
generator_base_class
, generator_cache_class
, matcher_base_class
and matcher_cache_class
router optionsSerializable
implementing methods for Route
and CompiledRoute
are finalServiceRouterLoader
and ObjectRouteLoader
.ApacheMatcherDumper
and ApacheUrlMatcher
were deprecated and
will be removed in Symfony 3.0, since the performance gains were minimal and
it's hard to replicate the behavior of PHP implementation.AccessDecisionManager::decide()
and AuthorizationChecker::isGranted()
(and indirectly the is_granted()
Twig and ExpressionLanguage function):Serializer
with normalizers which neither implement NormalizerInterface
nor DenormalizerInterface
Serializer
with encoders which neither implement EncoderInterface
nor DecoderInterface
CsvEncoder
"as_collection" option to true
AbstractNormalizer::$circularReferenceLimit
, AbstractNormalizer::$circularReferenceHandler
,
AbstractNormalizer::$callbacks
, AbstractNormalizer::$ignoredAttributes
,
AbstractNormalizer::$camelizedAttributes
, AbstractNormalizer::setCircularReferenceLimit()
,
AbstractNormalizer::setCircularReferenceHandler()
, AbstractNormalizer::setCallbacks()
and
AbstractNormalizer::setIgnoredAttributes()
, use the default context instead.AbstractObjectNormalizer::$maxDepthHandler
and AbstractObjectNormalizer::setMaxDepthHandler()
,
use the default context instead.XmlEncoder::setRootNodeName()
& XmlEncoder::getRootNodeName()
, use the default context instead.DataUriNormalizer
with a default MIME type guesser when the symfony/mime
component isn't installed.XmlEncoder::TYPE_CASE_ATTRIBUTES
constant. Use XmlEncoder::TYPE_CAST_ATTRIBUTES
instead.is.*
getters in GetSetMethodNormalizer
null
as 1st ($id
) argument of Section::get()
method, pass a valid child section identifier instead.null
as the locale in Translator
TranslatorInterface
MessageSelector
ChoiceMessageFormatterInterface
PluralizationRule
Interval
transChoice()
methods, use the trans() method instead with a %count% parameterFileDumper::setBackup()
and TranslationWriter::disableBackup()
MessageFormatter::choiceFormat()
$filename
to PhpExtractor::parseTokens()
lint:xliff
command, use lint:xliff -
(append a dash) instead to make it explicit.ExpressionLanguage
instance or null must be passed as the first argument of ExpressionValidator::__construct()
checkDNS
and dnsMessage
options of the Url
constraintcheckMX
, checkHost
and strict
options of the Email
constraint\DateTimeInterface
in DateTimeValidator
, DateValidator
and TimeValidator
Bic
, Country
, Currency
, Language
and Locale
constraints without symfony/intl
Email
constraint without egulias/email-validator
Expression
constraint without symfony/expression-language
canonicalize
option of Locale
constraint to true
ValidatorBuilderInterface
ConstraintViolation
is not allowedLength::$allowEmptyString
to false
and made it optionalSymfony\Component\Validator\Mapping\Cache\CacheInterface
in favor of PSR-6.ValidatorBuilder::setMetadataCache
, use ValidatorBuilder::setMappingCache
instead.ApcCache
in favor of DoctrineCache
DoctrineCache
to adapt any Doctrine cacheGroupSequence
now implements ArrayAccess
, Countable
and Traversable
ClassMetadata::getGroupSequence()
to return a GroupSequence
instance instead of an arrayCallback
can now be put onto properties (useful when you pass a closure to the constraint)ClassBasedInterface
MetadataInterface
PropertyMetadataInterface
PropertyMetadataContainerInterface
Mapping\ElementMetadata
Mapping\MetadataInterface
Mapping\ClassMetadataInterface
Mapping\PropertyMetadataInterface
Mapping\GenericMetadata
Mapping\CascadingStrategy
Mapping\TraversalStrategy
Mapping\ClassMetadata::accept()
Mapping\MemberMetadata::accept()
Mapping\ClassMetadata::setGroupSequence()
MetadataFactoryInterface
Mapping\BlackholeMetadataFactory
Mapping\ClassMetadataFactory
Mapping\Factory\MetadataFactoryInterface
Mapping\Factory\BlackHoleMetadataFactory
Mapping\Factory\LazyLoadingMetadataFactory
ExecutionContextInterface
ExecutionContext
GlobalExecutionContextInterface
Context\ExecutionContextInterface
Context\ExecutionContext
Context\ExecutionContextFactoryInterface
Context\ExecutionContextFactory
ValidatorInterface
Validator
ValidationVisitorInterface
ValidationVisitor
Validator\ValidatorInterface
Validator\RecursiveValidator
Validator\ContextualValidatorInterface
Validator\RecursiveContextualValidator
Violation\ConstraintViolationBuilderInterface
Violation\ConstraintViolationBuilder
ConstraintViolation::getParameters()
ConstraintViolation::getPlural()
Constraints\Traverse
$deep
property in Constraints\Valid
ValidatorBuilderInterface::setApiVersion()
Validation::API_VERSION_2_4
Validation::API_VERSION_2_5
Exception\OutOfBoundsException
Exception\UnsupportedMetadataException
Exception\ValidatorException
extend Exception\RuntimeException
Util\PropertyPath
ValidatorBuilder::setPropertyAccessor()
validate
and validateValue
on Validator\Context\ExecutionContext
use getValidator()
together with inContext()
instead$context
to MarkingStoreInterface::setMarking()
lint:yaml
command, use lint:yaml -
(append a dash) instead to make it explicit.ExpectDeprecationTrait
to be able to define an expected deprecation from inside a test@expectedDeprecation
annotation, use the ExpectDeprecationTrait::expectDeprecation()
method insteadAnonymousFactory
, FormLoginFactory
, FormLoginLdapFactory
, GuardAuthenticationFactory
, HttpBasicFactory
, HttpBasicLdapFactory
, JsonLoginFactory
, JsonLoginLdapFactory
, RememberMeFactory
, RemoteUserFactory
and X509Factory
as @internal
AbstractFactory#createEntryPoint()
to AbstractFactory#createDefaultEntryPoint()
RemoteJsonManifestVersionStrategy
to download manifest over HTTP.ArrayCache
CouchbaseBucketAdapter
cache-adapter
to log messagesNodeDefinition::setDeprecated()
to NodeDefinition::setDeprecation(string $package, string $version, string $message)
BaseNode::setDeprecated()
to BaseNode::setDeprecation(string $package, string $version, string $message)
BaseNode::setDeprecated()
to un-deprecate a nodeBaseNode::getDeprecationMessage()
, use BaseNode::getDeprecation()
insteadCommand::setHidden()
is final since Symfony 5.1SingleCommandApplication
Cursor
classinline()
in favor of inline_service()
and ref()
in favor of service()
when using the PHP-DSL.inner
idInlineServiceConfigurator
Definition::setDeprecated()
to Definition::setDeprecation(string $package, string $version, string $message)
Alias::setDeprecated()
to Alias::setDeprecation(string $package, string $version, string $message)
DeprecateTrait::deprecate()
to DeprecateTrait::deprecation(string $package, string $version, string $message)
Psr\Container\ContainerInterface
and Symfony\Component\DependencyInjection\ContainerInterface
aliases of the service_container
service,
configure them explicitly insteadSymfony\Component\DependencyInjection\Dumper\Preloader
to help with preloading on PHP 7.4+container.preload
/.no_preload
to declare extra classes to preload/services to not preloadDefinition::getDeprecationMessage()
, use Definition::getDeprecation()
insteadAlias::getDeprecationMessage()
, use Alias::getDeprecation()
insteadAliasDeprecatedPublicServicesPass
to deprecate public services to privateUriResolver
to resolve an URI according to a base URIDotenv::bootEnv()
to check for .env.local.php
before calling Dotenv::loadEnv()
Dotenv::setProdEnvs()
and Dotenv::usePutenv()
$envKey
and $debugKey
arguments, to define
the name of the env vars that configure the env name and debug settings$usePutenv
argument to Dotenv's constructorHtmlErrorRenderer
and SerializerErrorRenderer
add X-Debug-Exception
and X-Debug-Exception-File
headers in debug mode.LegacyEventDispatcherProxy
class has been deprecated.dispatcher
attribute to the listener and subscriber tags in RegisterListenerPass
.lint
method to ExpressionLanguage
classlint
method to Parser
classrounding_mode
option of the PercentType
. It will default to \NumberFormatter::ROUND_HALFUP
in Symfony 6.PercentToLocalizedStringTransformer
. It will default to \NumberFormatter::ROUND_HALFUP
in Symfony 6.collection_entry
block prefix to CollectionType
entrieschoice_filter
option to ChoiceType
callable|null $filter
to ChoiceListFactoryInterface::createListFromChoices()
and createListFromLoader()
- not defining them is deprecated.ChoiceList
facade to leverage explicit choice list caching based on optionsAbstractChoiceLoader
to simplify implementations and handle global optimizationsview_timezone
option defaults to the model_timezone
if no reference_date
is configured.FormConfigInterface
without implementing the getIsEmptyCallback()
method
is deprecated. The method will be added to the interface in 6.0.FormConfigBuilderInterface
without implementing the setIsEmptyCallback()
method
is deprecated. The method will be added to the interface in 6.0.rounding_mode
option for the PercentType and correctly round the value when submittedSymfony\Component\Form\Extension\Validator\Util\ServerParams
in favor of its parent class Symfony\Component\Form\Util\ServerParams
html5
option to the ColorType
to validate the inputNumberToLocalizedStringTransformer::ROUND_*
constants, use \NumberFormatter::ROUND_*
insteadNoPrivateNetworkHttpClient
decoratorAmpHttpClient
, a portable HTTP/2 implementation based on AmpLoggerAwareInterface
to ScopingHttpClient
and TraceableHttpClient
HttpClient::create()
return an AmpHttpClient
when amphp/http-client
is found but curl is not or too oldCookie::withValue
, Cookie::withDomain
, Cookie::withExpires
,
Cookie::withPath
, Cookie::withSecure
, Cookie::withHttpOnly
,
Cookie::withRaw
, Cookie::withSameSite
Response::create()
, JsonResponse::create()
,
RedirectResponse::create()
, and StreamedResponse::create()
methods (use
__construct()
instead)Request::preferSafeContent()
and Response::setContentSafe()
to handle "safe" HTTP preference
according to RFC 8674MarshallingSessionHandler
, IdentityMarshaller
Session
accept a callback to report when the session is being usedSymfony\Component\HttpFoundation\InputBag
InputBag::get()
, use InputBag::all()
if you need access to the collection of valuesWarmableInterface::warmUp()
return a list of classes or files to preload on PHP 7.4+;
not returning an array is deprecatedWarmableInterface
be part of the cache warmup stageservice:action
syntax to reference controllers, use serviceOrFqcn::method
instead_stateless
attribute of the request is set to true
AbstractSessionListener::onSessionUsage()
to report when the session is used while a request is statelessEnglishInflector
from the String component instead.Security\LdapBadge
, Security\LdapAuthenticator
and Security\CheckLdapCredentialsListener
to integrate with the authenticator Security systemasync-aws/ses
to communicate with AWS API.LISTEN
/NOTIFY
.redis://127.0.0.1?tls=1
redeliver_timeout
and claim_interval
options.delete_after_ack
option to the DSN as an alternative to
stream_max_entries
to avoid leaking memory.symfony/amqp-messenger
. All classes in Symfony\Component\Messenger\Transport\AmqpExt
have been moved to Symfony\Component\Messenger\Bridge\Amqp\Transport
symfony/doctrine-messenger
. All classes in Symfony\Component\Messenger\Transport\Doctrine
have been moved to Symfony\Component\Messenger\Bridge\Doctrine\Transport
symfony/redis-messenger
. All classes in Symfony\Component\Messenger\Transport\RedisExt
have been moved to Symfony\Component\Messenger\Bridge\Redis\Transport
\Throwable
argument to RetryStrategyInterface
methods. This allows to define strategies based on the reason of the handling failure.StopWorkerOnFailureLimitListener
to stop the worker after a specified amount of failed messages is reached.RecoverableExceptionInterface
interface to force retry.ChatMessage::fromNotification()
method's $recipient
and $transport
arguments were removed.EmailMessage::fromNotification()
and SmsMessage::fromNotification()
methods' $transport
argument was removed.OptionResolver::define()
setInfo()
and getInfo()
methodsOptionsResolver::setDeprecated()
to OptionsResolver::setDeprecation(string $option, string $package, string $version, $message)
OptionsResolverIntrospector::getDeprecationMessage()
, use OptionsResolverIntrospector::getDeprecation()
insteadProcess::getStartTime()
to retrieve the start time of the process as floatUninitializedPropertyException
PhpFileLoader::callConfigurator()
as extension point to ease custom routing configurationRouteCollectionBuilder
in favor of RoutingConfigurator
.$priority
to RouteCollection::add()
RouteCompiler::REGEX_DELIMITER
constantExpressionLanguageProvider
to expose extra functions to route conditionsstateless
keyword for configuring route stateless in PHP, YAML and XML configurations.RequestContext::fromUri()
to ease building the default contextIS_ANONYMOUS
, IS_REMEMBERED
, IS_IMPERSONATOR
LogoutEvent
to allow custom logout listeners.LogoutSuccessHandlerInterface
and LogoutHandlerInterface
in favor of listening on the LogoutEvent
.Http\Authenticator\AuthenticatorInterface
, Http\Authentication\AuthenticatorManager
and Http\Firewall\AuthenticatorManagerListener
.CustomUserMessageAccountStatusException
to be used when extending UserCheckerInterface
RememberMeServicesInterface
implementations without logout(Request $request, Response $response, TokenInterface $token)
method, this method will be required in Symfony 6.0.\stdClass
to ObjectNormalizer
@Symfony\Component\Serializer\Annotation\Ignore
)AbstractString::reverse()
methodAbstractString::width()
follow POSIX.1-2001LazyString
which provides memoizing stringable objects@experimental
anymores()
helper method to get either an UnicodeString
or ByteString
instance,
depending of the input string UTF-8 compliancy$cut
parameter to Symfony\Component\String\AbstractString::truncate()
AbstractString::containsAny()
ByteString::fromRandom()
name
attribute on unit
element from xliff2 to be used as a translation key instead of always the source
elementHostname
constraint and validatoralpha3
option to the Country
and Language
constraintsCompound
constraintSequentially
constraint, to sequentially validate a set of constraints (any violation raised will prevent further validation of the nested constraints)divisibleBy
option to the Count
constraintExpressionLanguageSyntax
constraintRdKafka
supportarray &$foundClasses
to VarExporter::export()
to ease with preloading exported valuesTransitionException
and its child classes whenever they are thrown in Workflow::apply()
Registry::has()
to check if a workflow exists$context[Workflow::DISABLE_ANNOUNCE_EVENT] = true
when calling workflow->apply()
to not fire the announce event0o
as octal numbers.0
as octal numbers. They will be parsed as strings as of Symfony 6.0. Prefix numbers with 0o
so that they are parsed as octal numbers.UlidType
and UuidType
as Doctrine typesUlidGenerator
, UuidV1Generator
, UuidV4Generator
and UuidV6Generator
$actionLevel
constructor argument of Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy
has been deprecated and replaced by the $inner
one which expects an ActivationStrategyInterface to decorate instead. Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy
will become final in 6.0.$actionLevel
constructor argument of Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy
has been deprecated and replaced by the $inner
one which expects an ActivationStrategyInterface to decorate instead. Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy
will become final in 6.0impersonation_exit_url()
and impersonation_exit_path()
functions. They return a URL that allows to switch back to the original user.workflow_transition()
function to easily retrieve a specific transition objectTranslatableInterface
objectst()
function to easily create TranslatableMessage
objectst()
functionfield_*
Twig functions to access string values from Form fieldsimportance
context option of NotificationEmail
to allow null
framework.http_cache
configuration treeframework.trusted_proxies
and framework.trusted_headers
configuration optionsform.factory
, form.type.file
, translator
, security.csrf.token_manager
, serializer
,
cache_clearer
, filesystem
and validator
services to private.TemplateAwareDataCollectorInterface
and AbstractDataCollector
to simplify custom data collector creation and leverage autoconfigurationcache.adapter.redis_tag_aware
tag to use RedisCacheAwareAdapter
framework.http_client.retry_failing
configuration treeassertCheckboxChecked()
and assertCheckboxNotChecked()
in WebTestCase
assertFormValue()
and assertNoFormValue()
in WebTestCase
translation:update
command to dump messages as a tree-like structure. The given value defines the level where to switch to inline YAMLlock.RESOURCE_NAME
and lock.RESOURCE_NAME.store
services and the lock
, LockInterface
, lock.store
and PersistingStoreInterface
aliases, use lock.RESOURCE_NAME.factory
, lock.factory
or LockFactory
instead.FirewallListenerFactoryInterface
, which can be implemented by security factories to add firewall listenersSortFirewallListenersPass
to make the execution order of firewall listeners configurable by
leveraging Symfony\Component\Security\Http\Firewall\FirewallListenerInterface
security.access_control
EntryPointFactoryInterface
, authenticators must now implement AuthenticationEntryPointInterface
if
they require autoregistration of a Security entry point.twig
service to privateRequest::__construct()
.SingleCommandApplication::setAutoExit()
to allow testing via CommandTester
Question::setMultiline()
and Question::isMultiline()
SignalRegistry
class to stack signals handlersApplication::getSignalRegistry()
and Application::setSignalsToDispatchEvent()
methodsSignalableCommandInterface
interfaceTableCellStyle
class to customize table cellphp
prefix invocation from help messages.param()
and abstract_arg()
in the PHP-DSLDefinition::setPrivate()
and Alias::setPrivate()
, use setPublic()
instead#[Required]
attributeHtmlErrorRenderer::$template
to a custom template to render when not in debug mode.{{ label }}
placeholder in constraint messages, which is replaced in the ViolationMapper
by the corresponding field form label.DataMapper
, ChainAccessor
, PropertyPathAccessor
and CallbackAccessor
with new callable getter
and setter
options for each form typePropertyPathMapper
in favor of DataMapper
and PropertyPathAccessor
html5
option to MoneyType
and PercentType
, to use <input type="number" />
AsyncDecoratorTrait
to ease processing responses without breaking asyncpause_handler
callable exposed as an info itemStreamableInterface
to ease turning responses into PHP streamsMockResponse::getRequestMethod()
and getRequestUrl()
to allow inspecting which request has been sentEventSourceHttpClient
a Server-Sent events stream implementing the EventSource specificationCurlHttpClient
RetryableHttpClient
to automatically retry failed HTTP requests.extra.trace_content
option to TraceableHttpClient
to prevent it from keeping the content in memoryX-Forwarded-Prefix
headerHeaderUtils::parseQuery()
: it does the same as parse_str()
but preserves dots in variable namesFile::getContent()
RequestMatcher::matchIps()
Request::toArray()
to parse a JSON request body to an arrayRateLimiter\RequestRateLimiterInterface
and RateLimiter\AbstractRequestRateLimiter
Closure
together with FILTER_CALLBACK
to ParameterBag::filter()
; wrap your filter in a closure instead.Request::HEADER_X_FORWARDED_ALL
constant, use either HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO
or HEADER_X_FORWARDED_AWS_ELB
or HEADER_X_FORWARDED_TRAEFIK
constants instead.BinaryFileResponse::create()
, use __construct()
insteadhttp_cache
service handle requests when availablekernel.trusted_hosts
,
kernel.trusted_proxies
and kernel.trusted_headers
parameters_password
is now also hidden
in the request profiler raw content sectionExtensionInterface
will now be auto-registered to the containerkernel.runtime_environment
, defined as %env(default:kernel.environment:APP_RUNTIME_ENV)%
Accept
HTTP header when using HttpKernelBrowser
MongoDbStore
does not implement BlockingStoreInterface
anymore, typehint against PersistingStoreInterface
instead.NoLock
NotSupportedException
, it shouldn't be thrown anymore.RetryTillSaveStore
, logic has been moved in Lock
and is not needed anymore.InMemoryStore
PostgreSqlStore
LockFactory::CreateLockFromKey()
method.NativeTransportFactory
to configure a transport based on php.ini settingslocal_domain
, restart_threshold
, restart_threshold_sleep
and ping_threshold
options for smtp
command
option for sendmail
delete_after_reject
option to the DSN to allow control over message
deletion, similar to delete_after_ack
.lazy
to delay connecting to Redis server until we first use it.RedeliveryStamp
will no longer be populated with error data. This information is now stored in the ErrorDetailsStamp
instead.FlattenExceptionNormalizer
to give more information about the exception on Messenger background processes. The FlattenExceptionNormalizer
has a higher priority than ProblemNormalizer
and it is only used when the Messenger serialization context is set.DelayStamp::delayFor(\DateInterval)
and DelayStamp::delayUntil(\DateTimeInterface)
.DispatchAfterCurrentBusStamp
and not in a context of another dispatch callWorkerMessageRetriedEvent
WorkerMessageReceivedEvent::setEnvelope()
and made event mutableAddress::fromString()
, use Address::create()
insteadTransportInterface::send()
and AbstractTransport::doSend()
methods changed to return a ?SentMessage
instance instead of void
.EmailRecipientInterface
and RecipientInterface
were introduced.email
and phone
properties to Recipient
.$recipient
argument in the as*Message()
method
of EmailNotificationInterface
and SmsNotificationInterface
to EmailRecipientInterface
and SmsRecipientInterface
.AdminRecipient
.EmailRecipientInterface
and SmsRecipientInterface
now extend the RecipientInterface
.EmailRecipient
and SmsRecipient
were introduced.$recipient
argument in NotifierInterface::send()
,
Notifier::getChannels()
, ChannelInterface::notifiy()
and ChannelInterface::supports()
to
RecipientInterface
.EmailChannel
to only support recipients which implement the EmailRecipientInterface
.SmsChannel
to only support recipients which implement the SmsRecipientInterface
.Process::setOptions()
to set Process
specific optionscreate_new_console
to allow a subprocess to continue
to run after the main script exited, both on Linux and on WindowsPropertyAccessor::__construct()
, expecting a combination of bitwise flags instead__get
& __set
methodsenable_magic_call_extraction
context option in ReflectionExtractor::getWriteInfo()
and ReflectionExtractor::getReadInfo()
. in favor of enable_magic_methods_extraction
\A
and \z
as regex start and end for route requirement#[Route]
attributesPassport
AuthorizationChecker
to call the access decision manager in unauthenticated sessions with a NullToken
AccessListener::PUBLIC_ACCESS
in favor of AuthenticatedVoter::PUBLIC_ACCESS
Passport
to LoginFailureEvent
.setProviderKey()
/getProviderKey()
in favor of setFirewallName()/getFirewallName()
in PreAuthenticatedToken
, RememberMeToken
, SwitchUserToken
, UsernamePasswordToken
, DefaultAuthenticationSuccessHandler
; and deprecated the AbstractRememberMeServices::$providerKey
property in favor of AbstractRememberMeServices::$firewallName
FirewallListenerInterface
to make the execution order of firewall listeners configurable\Symfony\Component\Security\Http\Authenticator\JsonLoginAuthenticator
and \Symfony\Component\Security\Http\Firewall\UsernamePasswordJsonAuthenticationListener
to translate authentication failure messagesLoginThrottlingListener
.LoginLinkAuthenticator
.supports()
and authenticate()
from AbstractListener
to FirewallListenerInterface
.PasswordUpgradeBadge::getPasswordUpgrader()
changed its return type to return null or a PasswordUpgraderInterface
implementation.CompiledClassMetadataFactory
and ClassMetadataFactoryCompiler
for faster metadata loading.UidNormalizer
FormErrorNormalizer
MimeMessageNormalizer
name
argument to the StopWatchEvent
constructor, accessible via a new StopwatchEvent::getName()
FrenchInflector
classtrans
with ICU formatted messagesPseudoLocalizationTranslator
TranslatableMessage
objects that represent a message that can be translatedt()
function to easily create TranslatableMessage
objectsTranslatableMessage
objectsCascade
constraint to ease validating nested typed object propertiesallowEmptyString
option of the Length
constraint--colors
optionVAR_DUMPER_FORMAT=server
env var value supportVAR_DUMPER_FORMAT
env var is setWorkflow::getEnabledTransition()
to easily retrieve a specific transition objectworkflow->apply()
UserLoaderInterface::loadUserByUsername()
in favor of `UserLoaderInterface::loadUserByIdentifier()DoctrineTestHelper
and TestRepositoryFactory
UuidV*Generator
classesUuidGenerator
TokenVerifierInterface
in DoctrineTokenProvider
, fixing parallel requests handling in remember-meResetLoggersWorkerSubscriber
to reset buffered logs in messenger workersSetUpTearDownTrait
trait, use original methods with "void" return typehint.logFile
option to write deprecations to a file instead of echoing themmarkAsPublic
method on NotificationEmail
to change the importance
context option to null after creationfragment_uri()
helper to generate the URI of a fragmentserialize
filter to serialize objects using the Serializer componentsession.storage
alias and session.storage.*
services, use the session.storage.factory
alias and session.storage.factory.*
services insteadframework.session.storage_id
configuration option, use the framework.session.storage_factory_id
configuration option insteadsession
service and the SessionInterface
alias, use the Request::getSession()
or the new RequestStack::getSession()
methods insteadAbstractController::renderForm()
to render a form and set the appropriate HTTP status codedispatcher
option to debug:event-dispatcher
event_dispatcher.dispatcher
tagassertResponseFormatSame()
in BrowserKitAssertionsTrait
assets.package
to register asset packagesframework.annotation.cache
KernelTestCase::getContainer()
as the best way to get a container in testsprofiler_listener.only_master_requests
to profiler_listener.only_main_requests
fragment.uri_generator
to generate the URI of a fragment--xliff-version
of the translation:update
command, use e.g. --format=xlf20
instead--output-format
of the translation:update
command, use e.g. --format=xlf20
insteadrequired_badges
firewall config optionlogin_throttling.lock_factory
setting defaulting to null
(instead of lock.factory
)login_throttling.interval
(in security.firewalls
) option to change the default throttling interval.debug:firewall
command.UserPasswordEncoderCommand
class and the corresponding user:encode-password
command,
use UserPasswordHashCommand
and user:hash-password
insteadsecurity.encoder_factory.generic
service, the security.encoder_factory
and Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface
aliases,
use security.password_hasher_factory
and Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface
insteadsecurity.user_password_encoder.generic
service, the security.password_encoder
and the Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface
aliases,
use security.user_password_hasher
, security.password_hasher
and Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface
insteadsecurity.authorization_checker
and security.token_storage
services to privateenable_authenticator_manager
config option to true
is deprecatedsecurity.authentication.provider.*
services, use the new authenticator system insteadsecurity.authentication.listener.*
services, use the new authenticator system insteadserialize
filter (from Twig Bridge)RemoteJsonManifestVersionStrategy
, use JsonManifestVersionStrategy
instead.jsonRequest
method to AbstractBrowser
ApcuAdapter
classGithubActionReporter
to render annotations in a Github ActionInputOption::VALUE_NEGATABLE
flag to handle --foo
/--no-foo
optionsCommand::$defaultDescription
static property and the description
attribute
on the console.command
tag to allow the list
command to instantiate commands lazily--short
to the list
command#[AsCommand]
attribute for declaring commands on PHP 8Helper::width()
and Helper::length()
--ansi
and --no-ansi
options now default to null
.ServicesConfigurator::remove()
in the PHP-DSL%env(not:...)%
processor to negate boolean values#[Autoconfigure]
and #[AutoconfigureTag]
attributes on PHP 8#[AsTaggedItem]
attribute for defining the index and priority of classes found in tagged iterators/locatorsContainerBuilder::willBeAvailable()
to help with conditional configuration#[When(env: 'foo')]
to skip autoregistering a class when the env doesn't matchenv()
and EnvConfigurator
in the PHP-DSLConfigBuilder
in the PhpFileLoader
ContainerConfigurator::env()
to get the current environment#[Target]
to tell how a dependency is used and hint named autowiring aliasesparents()
method is deprecated. Use ancestors()
instead.containsOption()
, availableOptionValues()
, and disableValidation()
methods of the
ChoiceFormField
class as internal#[AsEventListener]
attribute for declaring listeners on PHP 8$forms
parameter type of the DataMapperInterface::mapDataToForms()
method from iterable
to \Traversable
.$forms
parameter type of the DataMapperInterface::mapFormsToData()
method from iterable
to \Traversable
.DataMapper::mapDataToForms()
method, pass \Traversable
instead.DataMapper::mapFormsToData()
method, pass \Traversable
instead.CheckboxListMapper::mapDataToForms()
method, pass \Traversable
instead.CheckboxListMapper::mapFormsToData()
method, pass \Traversable
instead.RadioListMapper::mapDataToForms()
method, pass \Traversable
instead.RadioListMapper::mapFormsToData()
method, pass \Traversable
instead.choice_translation_parameters
option to ChoiceType
UuidType
and UlidType
symfony/intl
was removed. Install symfony/intl
if you are using LocaleType
, CountryType
, CurrencyType
, LanguageType
or TimezoneType
.priority
option to BaseType
and sorting view fieldsHttpClientInterface::withOptions()
from symfony/contracts
v2.4DecoratorTrait
to ease writing simple decoratorsSessionFactory
, NativeSessionStorageFactory
, PhpBridgeSessionStorageFactory
and MockFileSessionStorageFactory
classesRequest::getSession()
when there is no available session throws a SessionNotFoundException
RequestStack::getSession
methodNamespacedAttributeBag
classResponseFormatSame
PHPUnit constraintRequestStack::getMasterRequest()
method and add getMainRequest()
as replacementArgumentInterface
ArgumentMetadata::getAttributes()
ArgumentMetadata::getAttribute()
, use getAttributes()
insteadSymfony\Component\HttpKernel\EventListener\DebugHandlersListener
as internalContainerBuilder
from KernelInterface::registerContainerConfiguration()
HttpKernelInterface::MASTER_REQUEST
and add HttpKernelInterface::MAIN_REQUEST
as replacementKernelEvent::isMasterRequest()
and add isMainRequest()
as replacement#[AsController]
attribute for declaring standalone controllers on PHP 8FragmentUriGeneratorInterface
and FragmentUriGenerator
to generate the URI of a fragmentCurrencies::getCashFractionDigits()
and Currencies::getCashRoundingIncrement()
X-SES-SOURCE-ARN
mailer
monolog channel and set it on all transport definitionsdebug
option to log HTTP requests and responses.prefetch_count
parameter, it has no effect and will be removed in Symfony 6.0.AmqpReceiver
implements QueueReceiverInterface
to fetch messages from a specific set of queues.rediss://
DSN scheme support for TLS protocolrediss://127.0.0.1
instead of redis://127.0.0.1?tls=1
\RedisCluster
instance in Connection
constructorRouterContextMiddleware
to restore the original router context when handling a messageInMemoryTransport
can perform message serialization through dsn in-memory://?serialize=true
.queues
option to Worker
to only fetch messages from a specific queue from a receiver implementing QueueReceiverInterface
.@experimental
anymore@experimental
anymoreEsendexTransport::__construct()
method from:
public function __construct(string $token, string $accountReference, string $from, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
to:
public function __construct(string $email, string $password, string $accountReference, string $from, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
@experimental
anymoredata
field to options@experimental
anymore@experimental
anymoreGoogleChatTransport::setThreadKey()
method, this parameter should now be provided via the constructor,
which has changed from:
__construct(string $space, string $accessKey, string $accessToken, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
to:
__construct(string $space, string $accessKey, string $accessToken, string $threadKey = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
threadKey
to thread_key
in DSN@experimental
anymore@experimental
anymoreLinkedInTransportFactory
is now final@experimental
anymoreMattermostTransport::__construct()
method from:
public function __construct(string $token, string $channel, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, string $path = null)
to:
public function __construct(string $token, string $channel, ?string $path = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
@experimental
anymore@experimental
anymoresender
option to the DSN that allows configuring the sender@experimental
anymore@experimental
anymore@experimental
anymore@experimental
anymore@experimental
anymoreSlackOptions::threadTs()
to send message as reply@experimental
anymore@experimental
anymore@experimental
anymoreZulipTransport
is now finalZulipTransportFactory
is now final@experimental
anymoreDsn::__construct()
method from:
public function __construct(string $scheme, string $host, ?string $user = null, ?string $password = null, ?int $port = null, array $options = [], ?string $path = null)
to:
public function __construct(string $dsn)
Dsn::fromString()
methodAbstractTransportFactory::getEndpoint()
from ?string
to string
DSN::getRequiredOption
method which throws a new MissingRequiredOptionException
.bcrypt
as default algorithm in NativePasswordHasher
Type::getCollectionKeyType()
and Type::getCollectionValueType()
methods, use Type::getCollectionKeyTypes()
and Type::getCollectionValueTypes()
insteadRoute
annotation class by passing an array of parametersRoutingConfigurator::env()
to get the current environmentAuthenticationManagerInterface
, AuthenticationProviderManager
, AnonymousAuthenticationProvider
,
AuthenticationProviderInterface
, DaoAuthenticationProvider
, LdapBindAuthenticationProvider
,
PreAuthenticatedAuthenticationProvider
, RememberMeAuthenticationProvider
, UserAuthenticationProvider
and
AuthenticationFailureEvent
from security-core. Use the new authenticator system insteadAbstractAuthenticationListener
, AbstractPreAuthenticatedListener
, AnonymousAuthenticationListener
,
BasicAuthenticationListener
, RememberMeListener
, RemoteUserAuthenticationListener
,
UsernamePasswordFormAuthenticationListener
, UsernamePasswordJsonAuthenticationListener
and X509AuthenticationListener
from security-http, use the new authenticator system insteadgetPassport()
method and a second $passport
constructor argument to AuthenticationTokenCreatedEvent
RememberMeConditionsListener
to check if remember me is requested and supported, and set priority of RememberMeListener
to -63RememberMeHandlerInterface
and implementations, used as a replacement of RememberMeServicesInterface
when using the AuthenticatorManagerTokenDeauthenticatedEvent
that is dispatched when the current security token is deauthenticatedLoginLinkHandler
to __construct(UrlGeneratorInterface $urlGenerator, UserProviderInterface $userProvider, SignatureHasher $signatureHashUtil, array $options)
Core\Signature\SignatureHasher
and moved Http\LoginLink\ExpiredLoginLinkStorage
to Core\Signature\ExpiredLoginLinkStorage
PersistentTokenInterface::getUsername()
in favor of PersistentTokenInterface::getUserIdentifier()
UsernameNotFoundException
in favor of UserNotFoundException
and getUsername()
/setUsername()
in favor of getUserIdentifier()
/setUserIdentifier()
UserProviderInterface::loadUserByUsername()
in favor of UserProviderInterface::loadUserByIdentifier()
TokenInterface::getUsername()
in favor of TokenInterface::getUserIdentifier()
UserInterface::getUsername()
in favor of getUserIdentifier()
PassportInterface:getBadges()
, implemented by PassportTrait
checkIfCompletelyResolved()
from PassportInterface
, checking that passport badges are
resolved is up to AuthenticatorManager
User
, use InMemoryUser
insteadUserChecker
, use InMemoryUserChecker
or your own implementation insteadUserInterface
implementation to Passport
, use the UserBadge
instead.PasswordAuthenticatedUserInterface
for user classes that use passwordsLegacyPasswordAuthenticatedUserInterface
for user classes that use user-provided salts in addition to passwordsCore\Encoder\
sub-namespace, use the PasswordHasher
component insteadSessionInterface $session
constructor argument of SessionTokenStorage
, inject a \Symfony\Component\HttpFoundation\RequestStack $requestStack
insteadsession
service provided by the ServiceLocator injected in UsageTrackingTokenStorage
, provide a request_stack
service insteadSessionTokenStorage
outside a request context, it will throw a SessionNotFoundException
in Symfony 6.0vote
method.Serializable
implementation of NullToken
as @internal
and @final
TokenVerifierInterface
to allow fixing parallel requests handling in remember-meCacheTokenVerifier
implementation that stores outdated token in a cache, which is more correct and efficient as the default DoctrineTokenProvider
implementationThe CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md
The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md
The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md
The CHANGELOG for version 5.3 and earlier can be found at https://github.com/symfony/symfony/blob/5.3/src/Symfony/Component/Security/CHANGELOG.md
@experimental
anymore@Symfony\Component\Serializer\Annotation\Context
)ArrayDenormalizer::setSerializer()
, call setDenormalizer()
insteadUidNormalizer
CsvEncoder::END_OF_LINE
context optionAsciiSlugger
fallback to parent locale's symbolsMaptranslation:pull
and translation:push
commands to manage translations with third-party providersTranslatorBagInterface::getCatalogues
methodXliffFileLoader
@experimental
anymoreAbstractUid::fromBinary()
, AbstractUid::fromBase58()
, AbstractUid::fromBase32()
and AbstractUid::fromRfc4122()
UuidV1::getTime()
, UuidV6::getTime()
and Ulid::getTime()
by UuidV1::getDateTime()
, UuidV6::getDateTime()
and Ulid::getDateTime()
Uuid::NAMESPACE_*
constants from RFC4122UlidFactory
, UuidFactory
, RandomBasedUuidFactory
, TimeBasedUuidFactory
and NameBasedUuidFactory
InvalidTokenConfigurationException
MermaidDumper
to dump Workflow graphs in the Mermaid.js flowchart formatgithub
format support & autodetection to render errors as annotations
when running the YAML linter command in a Github Action environment.DoctrineOpenTransactionLoggerMiddleware
to log when a transaction has been left openPdoCacheAdapterDoctrineSchemaSubscriber
and add DoctrineDbalCacheAdapterSchemaSubscriber
insteadUniqueEntity
constraint retrieves a maximum of two entities if the default repository method is used.AbstractDoctrineExtension::loadMappingInformation()
$bundleDir
to AbstractDoctrineExtension::getMappingDriverBundleConfigDefaults()
$bundleDir
to AbstractDoctrineExtension::getMappingResourceConfigDirectory()
ResetLoggersWorkerSubscriber
to reset buffered logs in messenger
workers, use "reset_on_message" option in messenger configuration instead.github
format & autodetection to render errors as annotations when
running the Twig linter command in a Github Actions environment.set_locale_from_accept_language
config option to automatically set the request locale based on the Accept-Language
HTTP request header and the framework.enabled_locales
config optionset_content_language_from_locale
config option to automatically set the Content-Language
HTTP response header based on the Request localeframework.translator.enabled_locales
, use framework.enabled_locales
insteadHttpCache\StoreInterface
AdapterInterface
autowiring alias, use CacheItemPoolInterface
insteadprofiler
service to privateget()
, has()
, getDoctrine()
, and dispatchMessage()
in AbstractController
, use method/constructor injection insteadcache.adapter.doctrine
serviceconfigureContainer()
, configureRoutes()
, getConfigDir()
and getBundlesPath()
to MicroKernelTrait
default_context
parameter onto serializer's encoders and normalizersstatusCode
default parameter when loading a template directly from route using the Symfony\Bundle\FrameworkBundle\Controller\TemplateController
controllertranslation:update
command, use translation:extract
insteadPhpStanExtractor
support for the PropertyInfo componentcache.adapter.doctrine_dbal
service to replace cache.adapter.pdo
when a Doctrine DBAL connection is used.FirewallConfig::getListeners()
, use FirewallConfig::getAuthenticators()
insteadsecurity.authentication.basic_entry_point
and security.authentication.retry_entry_point
services, the logic is moved into the
HttpBasicAuthenticator
and ChannelListener
respectivelyFirewallConfig::allowsAnonymous()
and the allows_anonymous
from the data collector data, there will be no anonymous concept as of version 6.$authenticatorManagerEnabled
to true
in SecurityDataCollector
and DebugFirewallCommand
SecurityFactoryInterface
and SecurityExtension::addSecurityListenerFactory()
in favor of
AuthenticatorFactoryInterface
and SecurityExtension::addAuthenticatorFactory()
AuthenticatorFactoryInterface::getPriority()
which replaces SecurityFactoryInterface::getPosition()
MainConfiguration
, pass a sorted flat array of
factories instead.always_authenticate_before_granting
optionsecurity.access_decision_manager.strategy_service
optionDoctrineProvider
and DoctrineAdapter
because these classes have been added to the doctrine/cache
packageDoctrineDbalAdapter
identical to PdoAdapter
for Doctrine\DBAL\Connection
or DBAL URLPdoAdapter
with Doctrine\DBAL\Connection
or DBAL URLTesterTrait::assertCommandIsSuccessful()
to test commandHelperSet::setCommand()
and getCommand()
without replacementCrawler::innerText
method.dotenv:dump
command to compile the contents of the .env files into a PHP-optimized file called .env.local.php
debug:dotenv
command to list all dotenv files with variables and values$overrideExistingVars
on Dotenv::bootEnv()
and Dotenv::loadEnv()
DebugClassLoader
trigger deprecation notices on missing return typesSYMFONY_PATCH_TYPE_DECLARATIONS='force=2'
mode to DebugClassLoader
to turn annotations into native return types#[AsEventListener]
attribute on methodsPath
class$lock
argument to Filesystem::appendToFile()
Comparator::setTarget()
and Comparator::setOperator()
Comparator
that allows setting target and operatorSymfony\Component\Finder\SplFileInfo
inner type specifiedFormErrorIterator::children()
if the current element is not iterable.TranslatableMessage
objects to the help
optionEnumType
MockHttpClient::setResponseFactory()
method to be able to set response factory after client creatingnull
as $requestIp
to IpUtils::__checkIp()
, IpUtils::__checkIp4()
or IpUtils::__checkIp6()
, pass an empty string instead.litespeed_finish_request
method to work with Litespeedupload_progress.*
and url_rewriter.tags
session optionsAbstractTestSessionListener
and TestSessionListener
, use AbstractSessionListener
and SessionListener
insteadfileLinkFormat
parameter of DebugHandlersListener
DoctrineDbalStore
identical to PdoStore
for Doctrine\DBAL\Connection
or DBAL urlPdoStore
with Doctrine\DBAL\Connection
or DBAL urlDoctrineDbalPostgreSqlStore
identical to PdoPostgreSqlStore
for Doctrine\DBAL\Connection
or DBAL urlPdoPostgreSqlStore
with Doctrine\DBAL\Connection
or DBAL urlTagHeader
and MetadataHeader
to the Sendgrid API transportdelete_after_ack
config option (or DSN parameter),
its default value will change to true
in 6.0AsMessageHandler
attribute for declaring message handlers on PHP 8.BatchHandlerInterface
and corresponding traitStopWorkerExceptionInterface
and its implementation StopWorkerException
to stop the worker.WorkerMetadata
class which allows you to access the configuration details of a worker, like queueNames
and transportNames
it consumes from.getMetadata()
was added to Worker
class which returns the WorkerMetadata
object.reset_on_message
config option, its default value will change to true
in 6.0SIGTERM
is received.SentMessage
FakeChatLoggerTransport
FakeSmsLoggerTransport
SentMessageEvent
and FailedMessageEvent
push
channelGenericRuntime
and SymfonyRuntime
SymfonyRuntime
CacheableVoterInterface
for voters that vote only on identified attributes and subjectsAuthenticationEvents::AUTHENTICATION_FAILURE
, use the LoginFailureEvent
insteadAnonymousToken
, as the related authenticator was deprecated in 5.3Token::getCredentials()
, tokens should no longer contain credentials (as they represent authenticated sessions)string|\Stringable
from Token::getUser()
(it must return a UserInterface
)AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY
and AuthenticatedVoter::IS_ANONYMOUS
,
use AuthenticatedVoter::IS_AUTHENTICATED_FULLY
or AuthenticatedVoter::IS_AUTHENTICATED
instead.AuthenticationTrustResolverInterface::isAnonymous()
and the is_anonymous()
expression
function as anonymous no longer exists in version 6, use the isFullFledged()
or the new
isAuthenticated()
instead if you want to check if the request is (fully) authenticated.$authenticationManager
argument of the AuthorizationChecker
constructor$alwaysAuthenticate
argument to true
and not setting the
$exceptionOnNoToken
argument to false
of AuthorizationChecker
TokenInterface::isAuthenticated()
and setAuthenticated
,
return null from "getUser()" instead when a token is not authenticatedAccessDecisionStrategyInterface
to allow custom access decision strategiesAffirmativeStrategy
, ConsensusStrategy
, PriorityStrategy
, UnanimousStrategy
AccessDecisionManager
,
pass an instance of AccessDecisionStrategyInterface
insteadAccessDecisionManager
as @final
$authenticationEntryPoint
argument of ChannelListener
, and add $httpPort
and $httpsPort
argumentsRetryAuthenticationEntryPoint
, this code is now inlined in the ChannelListener
FormAuthenticationEntryPoint
and BasicAuthenticationEntryPoint
, in the new system the FormLoginAuthenticator
and HttpBasicAuthenticator
should be used insteadAbstractRememberMeServices
, PersistentTokenBasedRememberMeServices
, RememberMeServicesInterface
,
TokenBasedRememberMeServices
, use the remember me handler alternatives instead$authManager
argument of AccessListener
$exceptionOnNoToken
argument of AccessListener
to false
DeauthenticatedEvent
, use TokenDeauthenticatedEvent
insteadCookieClearingLogoutHandler
, SessionLogoutHandler
and CsrfTokenClearingLogoutHandler
.
Use CookieClearingLogoutListener
, SessionLogoutListener
and CsrfTokenClearingLogoutListener
insteadPassportInterface
, UserPassportInterface
and PassportTrait
, use Passport
insteadArrayObject
from Serializer::normalize()
when PRESERVE_EMPTY_OBJECTS
is setMissingConstructorArgumentsException
trimSuffix()
and trimPrefix()
methodsgithub
format & autodetection to render errors as annotations when
running the XLIFF linter command in a Github Actions environment.NilUlid
Cidr
constraint to validate CIDR notationsCssColor
constraint to validate CSS colorsConstraintViolationList::createFromMessage()
Count
and Length
constraints with "exactly" option enabledFiber
lint:yaml dirname --exclude=/dirname/foo.yaml --exclude=/dirname/bar.yaml
option to exclude one or more specific files from multiple file list--no-parse-tags
DoctrineTestHelper
and TestRepositoryFactory
$actionLevel
constructor argument of NotFoundActivationStrategy
has been replaced by the $inner
one which expects an ActivationStrategyInterface
to decorate instead$actionLevel
constructor argument of HttpCodeActivationStrategy
has been replaced by the $inner
one which expects an ActivationStrategyInterface
to decorate insteadResetLoggersWorkerSubscriber
in favor of "reset_on_message" option in messenger configurationSwiftMailerHandler
, use MailerHandler
insteadSetUpTearDownTrait
session.storage
alias and session.storage.*
services, use the session.storage.factory
alias and session.storage.factory.*
services insteadframework.session.storage_id
configuration option, use the framework.session.storage_factory_id
configuration option insteadsession
service and the SessionInterface
alias, use the \Symfony\Component\HttpFoundation\Request::getSession()
or the new \Symfony\Component\HttpFoundation\RequestStack::getSession()
methods insteadsession.attribute_bag
service and session.flash_bag
servicelock.RESOURCE_NAME
and lock.RESOURCE_NAME.store
services and the lock
, LockInterface
, lock.store
and PersistingStoreInterface
aliases, use lock.RESOURCE_NAME.factory
, lock.factory
or LockFactory
insteadform.factory
, form.type.file
, translator
, security.csrf.token_manager
, serializer
,
cache_clearer
, filesystem
and validator
services are now privateoutput-format
and xliff-version
options from TranslationUpdateCommand
has()
, get()
, getDoctrine()
n and dispatchMessage()
from AbstractController
, use method/constructor injection insteadtrue
AdapterInterface
autowiring alias, use CacheItemPoolInterface
insteadprofiler
service privateframework.annotation.cache
RouteCollectionBuilder
to MicroKernelTrait::configureRoutes()
, type-hint RoutingConfigurator
insteadcache.adapter.doctrine
serviceframework.translator.enabled_locales
config option, use framework.enabled_locales
insteadframework.messenger.reset_on_message
configuration option default to true
server:start
, server:stop
and server:status
) to control the built-in web
server in the backgroundController::isCsrfTokenValid
helperController::redirectToRoute
helperController::addFlash
helperController::isGranted
helperController::denyAccessUnlessGranted
helperapp.security
in twig as app.user
and is_granted()
are already availablesecurity.authorization_checker
and security.token_storage
services are now privateUserPasswordEncoderCommand
class and the corresponding user:encode-password
command,
use UserPasswordHashCommand
and user:hash-password
insteadsecurity.encoder_factory.generic
service, the security.encoder_factory
and Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface
aliases,
use security.password_hasher_factory
and Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface
insteadsecurity.user_password_encoder.generic
service, the security.password_encoder
and the Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface
aliases,
use security.user_password_hasher
, security.password_hasher
and Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface
insteadlogout.success_handler
and logout.handlers
config options, register a listener on the LogoutEvent
event insteadFirewallConfig::getListeners()
, use FirewallConfig::getAuthenticators()
insteadsecurity.context
service for the security.token_storage
and
security.authorization_checker
services.twig
service is now privateRemoteJsonManifestVersionStrategy
, use JsonManifestVersionStrategy
insteadDoctrineProvider
and DoctrineAdapter
PdoAdapter
BaseNode::getDeprecationMessage()
Command::setHidden()
has a default value (true
) for $hidden
parameter and is finalHelper::strlen()
, use Helper::width()
insteadHelper::strlenWithoutDecoration()
, use Helper::removeDecoration()
insteadAddConsoleCommandPass
can not be configured anymoreHelperSet::setCommand()
and getCommand()
without replacementDefinition::setPrivate()
and Alias::setPrivate()
, use setPublic()
insteadinline()
in favor of inline_service()
and ref()
in favor of service()
when using the PHP-DSLDefinition::getDeprecationMessage()
, use Definition::getDeprecation()
insteadAlias::getDeprecationMessage()
, use Alias::getDeprecation()
insteadPsr\Container\ContainerInterface
and Symfony\Component\DependencyInjection\ContainerInterface
aliases of the service_container
serviceCrawler::parents()
method, use ancestors()
insteadLegacyEventDispatcherProxy
Comparator::setTarget()
and Comparator::setOperator()
PropertyPathMaper
Symfony\Component\Form\Extension\Validator\Util\ServerParams
FormPass
configurationNumberToLocalizedStringTransformer::ROUND_*
constants, use \NumberFormatter::ROUND_*
insteadrounding_mode
option of the PercentType
defaults to \NumberFormatter::ROUND_HALFUP
PercentToLocalizedStringTransformer
defaults to \NumberFormatter::ROUND_HALFUP
FormConfigInterface::getIsEmptyCallback()
and FormConfigBuilderInterface::setIsEmptyCallback()
$forms
parameter type of the DataMapper::mapDataToForms()
method from iterable
to \Traversable
$forms
parameter type of the DataMapper::mapFormsToData()
method from iterable
to \Traversable
$checkboxes
parameter type of the CheckboxListMapper::mapDataToForms()
method from iterable
to \Traversable
$checkboxes
parameter type of the CheckboxListMapper::mapFormsToData()
method from iterable
to \Traversable
$radios
parameter type of the RadioListMapper::mapDataToForms()
method from iterable
to \Traversable
$radios
parameter type of the RadioListMapper::mapFormsToData()
method from iterable
to \Traversable
NamespacedAttributeBag
classResponse::create()
, JsonResponse::create()
,
RedirectResponse::create()
, StreamedResponse::create()
and
BinaryFileResponse::create()
methods (use __construct()
instead)Closure
together with FILTER_CALLBACK
to ParameterBag::filter()
throws an \InvalidArgumentException
; wrap your filter in a closure insteadClosure
together with FILTER_CALLBACK
to InputBag::filter()
throws an \InvalidArgumentException
; wrap your filter in a closure insteadRequest::HEADER_X_FORWARDED_ALL
constant, use either Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO
or Request::HEADER_X_FORWARDED_AWS_ELB
or Request::HEADER_X_FORWARDED_TRAEFIK
constants insteadRequestStack::getMasterRequest()
to getMainRequest()
FILTER_REQUIRE_ARRAY
or FILTER_FORCE_ARRAY
flags to InputBag::filter()
when filtering an array will throw BadRequestException
Request::HEADER_X_FORWARDED_ALL
constantInputBag::get()
will throw BadRequestException
(use InputBad::all()
instead to retrieve an array)InputBag::get()
will throw \InvalidArgumentException
InputBag::set()
will throw \InvalidArgumentException
null
as $requestIp
to IpUtils::__checkIp()
, IpUtils::__checkIp4()
or IpUtils::__checkIp6()
is not supported anymore.ArgumentInterface
ArgumentMetadata::getAttribute()
, use getAttributes()
insteadContainerBuilder
from KernelInterface::registerContainerConfiguration()
KernelEvent::isMasterRequest()
, use isMainRequest()
insteadservice:action
syntax to reference controllers, use serviceOrFqcn::method
insteadSymfony\Component\HttpKernel\EventListener\ErrorsLoggerListener
, use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener
insteadSymfony\Component\HttpKernel\Kernel::isClassInActiveBundle
and Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle
DateFormatter\*
, Collator
, NumberFormatter
, Locale
, IntlGlobals
, MethodArgumentNotImplementedException
, MethodArgumentValueNotImplementedException
, MethodNotImplementedException
and NotImplementedException
classes, use symfony/polyfill-intl-icu ^1.21 insteadLdapUser::getUsername()
method, use getUserIdentifier()
insteadLdapUserProvider::loadUserByUsername()
method, use loadUserByIdentifier()
insteadNotSupportedException
. It shouldn't be thrown anymoreRetryTillSaveStore
. Logic has been moved in Lock
and is not needed anymorePdoStore
and PostgreSqlStore
SesApiTransport
class, use SesApiAsyncAwsTransport
insteadSesHttpTransport
class, use SesHttpAsyncAwsTransport
insteadHttpTransportException
class takes a string at first argumentprefetch_count
LogicException
tls
LogicException
delete_after_ack
config option now defaults to true
Symfony/Component/Messenger/Transport/AmqpExt
, Symfony/Component/Messenger/Transport/Doctrine
and Symfony/Component/Messenger/Transport/Redis
.MessengerPass
cannot be configured with constructor argumentsRedeliveryStamp
's properties exceptionMessage
and flattenException
Address::fromString()
, use Address::create()
insteadSerializable
interface from RawMessage
SlackOptions::channel()
, use SlackOptions::recipient()
insteadOptionsResolverIntrospector::getDeprecationMessage()
PropertyAccessor::__construct()
accept a combination of bitwise flags as first and second argumentsType::getCollectionKeyType()
and Type::getCollectionValueType()
methods, use Type::getCollectionKeyTypes()
and Type::getCollectionValueTypes()
insteadenable_magic_call_extraction
context option in ReflectionExtractor::getWriteInfo()
and ReflectionExtractor::getReadInfo()
in favor of enable_magic_methods_extraction
SecurityContext
class in favor of the AuthorizationChecker
and TokenStorage
classesTokenInterface
does not extend Serializable
anymoreCore\Encoder\
sub-namespace, use the PasswordHasher
component insteadgetPassword()
and getSalt()
from UserInterface
, use PasswordAuthenticatedUserInterface
or LegacyPasswordAuthenticatedUserInterface
insteadAccessDecisionManager
requires the strategy to be passed as in instance of AccessDecisionStrategyInterface
SessionInterface $session
constructor argument of SessionTokenStorage
, inject a \Symfony\Component\HttpFoundation\RequestStack $requestStack
insteadSessionTokenStorage
outside a request context throws a SessionNotFoundException
LogoutSuccessHandlerInterface
and LogoutHandlerInterface
, register a listener on the LogoutEvent
event insteadCookieClearingLogoutHandler
, SessionLogoutHandler
and CsrfTokenClearingLogoutHandler
.
Use CookieClearingLogoutListener
, SessionLogoutListener
and CsrfTokenClearingLogoutListener
insteadArrayDenormalizer::setSerializer()
, call setDenormalizer()
insteadPropertyNormalizer
. Like GetSetMethodNormalizer
,
this normalizer will map an object's properties to an array.GetSetMethodNormalizer
allowEmptyString
option from the Length
constraintNumberConstraintTrait
traitValidatorBuilder::enableAnnotationMapping()
does not accept a Doctrine annotation reader anymoreValidatorBuilder::enableAnnotationMapping()
won't automatically setup a Doctrine annotation reader anymoreFileValidator
disallow empty filesUserPasswordValidator
source message changeExecutionContextInterface::setConstraint()
ConstraintViolation::getConstraint()
ExpressionValidator
will now evaluate the Expression even when the property value is null or an empty stringClassMetadata::hasMemberMetadatas()
ClassMetadata::getMemberMetadatas()
ClassMetadata::addMemberMetadata()
Mapping\MetadataInterface::getConstraints()
ConstraintViolationBuilderInterface::setCause()
InvalidTokenConfigurationException
ignoreFile
to configure a file that lists deprecation messages to ignorediv
instead of p
SYMFONY_IDE
is read by default when framework.ide
config is not setMicroKernelTrait
cache:pool:invalidate-tags
commandxliff
support in addition to xlf
for XliffFileDumper
reset_on_message
config option. It can be set to true
only and does nothing nowtrust_x_sendfile_type_header
optionMicroKernelTrait
routing.condition_service
to autoconfigure routing condition servicesSymfony\Component\Routing\Annotation\Route
attribute or annotation as controllers in MicroKernelTrait
http_method_override
config option. The default value will change to false
in 7.0.framework.profiler.collect_serializer_data
config option, set it to true
to enable the serializer data collector and profiler panelsecurity.access_control
now accepts a RequestMatcherInterface
under the request_matcher
option as scope configurationtwig.file_name_pattern
to restrict which files are compiled by cache warmer and lintertwig.autoescape
, use twig.autoescape_service[_method]
insteadUrlPackage
accepts empty strings as base_url
, in order to simplify local dev configurationtoArray
method to Response
TagAwareAdapter
by making tag versions an integral part of item valueEnumNode
DefinitionFileLoader
class to load a TreeBuilder definition from an external fileDefinitionConfigurator
helper__toString()
to InputInterface
Command::$defaultName
and Command::$defaultDescription
, use the AsCommand
attribute instead#[MapDecorated]
attribute telling to which parameter the decorated service should be mapped in a decorator#[AsDecorator]
attribute to make a service decorates another$exclude
to TaggedIterator
and TaggedLocator
attributes$exclude
to tagged_iterator
and tagged_locator
configuratorenv
function to the expression language providerAutowire
attribute to tell a parameter how to be autowiredclosure
to help passing closures to servicesReferenceSetArgumentTrait
AbstractExtension
class for DI configuration/definition on a single file@final
constants and propertiesSYMFONY_IDE
to configure file link formatcontains
, starts with
and ends with
_
prototype_options
option to CollectionType
Exception
from MockResponse's $body
to mock transport errorsBackedEnumValueResolver
to resolve backed enum cases from request attributes in controller argumentsDateTimeValueResolver
to resolve request attributes into DateTime objects in controller argumentsProfiler::isEnabled()
so collaborating collector services may elect to omit themselvesUidValueResolver
argument value resolverAbstractBundle
class for DI configuration/definition on a single filesrc/
directory to the parent directory when AbstractBundle
is usedInvalidSearchCredentialsException
to differentiate between cases where user-provided credentials are invalid and cases where the configured search credentials are invalidX-SES-MESSAGE-TAGS
TagHeaders
with MailgunApiTransport
start()
and stop()
methods public on SmtpTransport
EsmtpTransport
session_token
option to support short-lived AWS credentialsSerializedMessageStamp
to avoid serializing a message when a retry occurs__invoke
is used as handler#[AsMessageHandler]
attribute on methodsDataPart::getFilename()
and DataPart::getContentType()
no_stop_clause
option to the DSN that allows removing "STOP clause" at the end of the message for non-commercial usefast
option to the DSN that allows sending message with the highest priority that ensures the quickest possible time of deliverytest
option to the DSN that allows sending message in test mode (message is validated, but not sent)@param
mutation support to PhpDocExtractor
@param
mutation support to PhpStanExtractor
getMissingParameters
and getRouteName
methods on MissingMandatoryParametersException
attribute
type (alias of annotation
) in annotation loadersEnumRequirement
to help generate route requirements from a \BackedEnum
Requirement
, a collection of universal regular-expression constants to use as route parameter requirementsparams
variable to condition expressionUrlMatcher::handleRouteRequirements()
TraceableSerializer
, TraceableNormalizer
, TraceableEncoder
and SerializerDataCollector
to integrate with the web profilerContext
annotation as not finalContextAwareNormalizerInterface
, use NormalizerInterface
insteadContextAwareDenormalizerInterface
, use DenormalizerInterface
insteadAbstractUid
in UidNormalizer
, use one of AbstractUid
child class insteadUidNormalizer
can*()
methods to ObjectNormalizer
If-Modified-Since
as catalog metadata to support verifying whether a translation value was changed$translatorBag
constructor argument of TranslatorBagInterface
to LocoProviderFactory
and LocoProvider
TranslatableInterface
are processedXliffFileDumper
constructorfields
option to the Unique
constraint, to define which collection keys should be checked for uniquenessConstraint::$errorNames
, use Constraint::ERROR_NAMES
insteadExpressionLanguageSyntax
, use ExpressionSyntax
instead__toString()
to ConstraintViolationInterface
& ConstraintViolationListInterface
#[MapEntity]
with its corresponding EntityValueResolver
NAME
constant to UlidType
and UuidType
hrtime()
functionform_label_content
and form_help_content
block to form themes#[Template()]
to describe how to render arrays returned by controllersapp.current_route
and app.current_route_parameters
variablesresolve-env
option to debug:config
command to display actual values of environment variables in dumped configurationNotificationAssertionsTrait
framework.handle_all_throwables
to allow Symfony\Component\HttpKernel\HttpKernel
to handle all kinds of Throwable
AbstractController::render()
able to deal with forms and deprecate renderForm()
Symfony\Component\Serializer\Normalizer\ObjectNormalizer
and
Symfony\Component\Serializer\Normalizer\PropertyNormalizer
autowiring aliases, type-hint against
Symfony\Component\Serializer\Normalizer\NormalizerInterface
or implement NormalizerAwareInterface
insteaddebug:container
command outputdebug:container [<name>]
outputworkflow
, those with type=workflow are
tagged with workflow.workflow
, and those with type=state_machine with
workflow.state_machine
rate_limiter
configuration option to messenger.transport
to allow rate limited transports using the RateLimiter component@internal
tag from secret vaults to allow them to be used directly outside the framework bundle and custom vaults to be addedframework.form.legacy_error_messages
config nodeframework.router.cache_dir
configuration option to configure the default Router
cache_dir
optionframework.messenger.buses.*.default_middleware.allow_no_senders
to enable throwing when a message doesn't have a senderAbstractController::renderForm()
, use render()
insteadFrameworkExtension::registerRateLimiter()
Security
helper classSymfony\Component\Security\Core\Security
service alias, use Symfony\Bundle\SecurityBundle\Security
insteadSecurity::getFirewallConfig()
to help to get the firewall configuration associated to the RequestSecurity::login()
to login programmaticallySecurity::logout()
to logout programmaticallysecurity.firewalls.logout.enable_csrf
to enable CSRF protection using the default CSRF token generatorsecurity.firewalls.switch_user.target_route
option to configure redirect target route on switch usersecurity.enable_authenticator_manager
config optiontwig.mailer.html_to_text_converter
option to allow configuring custom HtmlToTextConverterInterface
implementations to be used by the twig.mime_body_renderer
serviceNodeBuilder::setParent()
without any arguments*Command::setApplication()
, *FormatterStyle::setForeground/setBackground()
, Helper::setHelpSet()
, Input*::setDefault()
, Question::setAutocompleterCallback/setValidator()
without any argumentsOutputFormatterStyleInterface::setForeground/setBackground()
to setForeground/setBackground(?string)
HelperInterface::setHelperSet()
to setHelperSet(?HelperSet)
&$asGhostObject
and $id
to LazyProxy's DumperInterface
to allow using ghost objects for lazy loading servicesenum
env var processorshuffle
env var processorContainerAwareInterface::setContainer()
to setContainer(?ContainerInterface)
ContainerAwareTrait::setContainer()
without argumentsexclude
option to the xml and yaml loaders/dumpersstring $env
into php config closuresfilter
argument to debug:dotenv
command to filter variable namesFinder::sortByExtension()
and Finder::sortBySize()
Finder::sortByCaseInsensitiveName()
to sort by name with case insensitive sorting methodsTranslatableInterface
objects to the ChoiceView
labelTranslatableInterface
objects to the help
optionButton/Form::setParent()
, ButtonBuilder/FormConfigBuilder::setDataMapper()
, TransformationFailedException::setInvalidMessage()
without argumentsFormConfigBuilderInterface::setDataMapper()
to setDataMapper(?DataMapperInterface)
FormInterface::setParent()
to setParent(?self)
PasswordHasherExtension
with support for hash_property_path
option in PasswordType
model_timezone
and view_timezone
options for TimeType
, DateType
and BirthdayType
HttplugClient
implement Psr\Http\Message\RequestFactoryInterface
, StreamFactoryInterface
and UriFactoryInterface
Http\Message\RequestFactory
, StreamFactory
and UriFactory
on HttplugClient
withOptions()
to HttplugClient
and Psr18Client
xxh128
algorithmJsonResponse::setCallback()
, Response::setExpires/setLastModified/setEtag()
, MockArraySessionStorage/NativeSessionStorage::setMetadataBag()
, NativeSessionStorage::setSaveHandler()
without argumentsSymfony\Component\HttpFoundation\RequestMatcher
namespaceRequestMatcher
in favor of ChainRequestMatcher
Symfony\Component\HttpFoundation\ExpressionRequestMatcher
in favor of Symfony\Component\HttpFoundation\RequestMatcher\ExpressionRequestMatcher
bool $handleAllThrowable
to HttpKernel
ControllerEvent::getAttributes()
to handle attributes on controllers#[Cache]
to describe the default HTTP cache headers on controllersabsolute_uri
option to surrogate fragment renderersValueResolverInterface
and deprecate ArgumentValueResolverInterface
$reflector
to ArgumentResolverInterface
and ArgumentMetadataFactoryInterface
ConfigDataCollector::setKernel()
, RouterListener::setCurrentRequest()
without argumentsEmojiTransliterator
to translate emoji to many locales{username}
parameter use in favour of {user_identifier}
mailer:test
commandSentMessageEvent
and FailedMessageEvent
eventsmessenger:stats
command that returns a list of transports with their "to be processed" message countTransportNamesStamp
to change the transport while dispatching a messageMessageHandlerInterface
and MessageSubscriberInterface
, use #[AsMessageHandler]
insteadallowNoSenders
to SendMessageMiddleware
to enable throwing when a message doesn't have a senderFile
Email::attachPart()
, use addPart()
insteadMessage::setBody()
without argumentsSmsMessage->from
when definedSmsMessage->from
definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
when definedSmsMessage->from
definedfrom
property in SmsMessage
SensitiveParameter
attribute to redact sensitive values in back tracesPropertyAccessorBuilder::setCacheItemPool()
without argumentsisNullSafe()
to PropertyPathInterface
, implementing the interface without implementing this method
is deprecatedsymfony/lock
to dev dependency in composer.json
Requirement::POSITIVE_INT
for common ids and paginationSecurity
class, use Symfony\Bundle\SecurityBundle\Security
insteadTokenStorageInterface::setToken()
to setToken(?TokenInterface $token)
TokenStorage::setToken()
without argumentsChainUserChecker
to allow calling multiple user checkers for a firewallUserBadge
#[IsGranted()]
JsonLoginAuthenticator
$lifetime
parameter to LoginLinkHandlerInterface::createLoginLink()
#[IsGranted()]
attribute and subjectContext
attributePropertyNormalizer::NORMALIZE_VISIBILITY
with bitmask flags PropertyNormalizer::NORMALIZE_PUBLIC
, PropertyNormalizer::NORMALIZE_PROTECTED
, PropertyNormalizer::NORMALIZE_PRIVATE
withNormalizeVisibility
to PropertyNormalizerContextBuilder
AttributeMetadata::setSerializedName()
, ClassMetadata::setClassDiscriminatorMapping()
without argumentsAttributeMetadataInterface::setSerializedName()
to setSerializedName(?string)
ClassMetadataInterface::setClassDiscriminatorMapping()
to setClassDiscriminatorMapping(?ClassDiscriminatorMapping)
SerializedPath
annotation to flatten nested attributesAsciiSlugger
PhpStringTokenParser
PhpExtractor
in favor of PhpAstExtractor
PhpAstExtractor
(requires nikic/php-parser to be installed)UuidV7
and UuidV8
TimeBasedUidInterface
to describe UIDs that embed a timestampMaxUuid
and MaxUlid
Email::VALIDATION_MODE_HTML5_ALLOW_NO_TLD
with "html5-allow-no-tld" e-mail validation mode, to match with the W3C official specificationgetCause()
to ConstraintViolationInterface
When
constraint and validatornegate
option to the Expression
constraint, to inverse the logic of the violation's creationextensions
option to the File
constraint as an alternative to mimeTypes
which checks the mime type of the file, its extension, and the consistency between themNotCompromisedPasswordValidator
FFI\CData
and FFI\CType
VarDumper::setHandler()
without argumentsHydrator::hydrate()
Hydrator::hydrate()
or Instantiator::instantiate()
Symfony\Component\Workflow\Registry
as internalDefinition::setInitialPlaces()
without arguments!php/enum
and !php/enum *->value
!php/const:
tag in key which will be replaced by the !php/const
tag (without the colon) since 3.4ContainerAwareEventManager
class, use listeners insteadAbstractSchemaListener
, LockStoreSchemaListener
and PdoSessionHandlerSchemaListener
DoctrineDbalCacheAdapterSchemaSubscriber
in favor of DoctrineDbalCacheAdapterSchemaListener
MessengerTransportDoctrineSchemaSubscriber
in favor of MessengerTransportDoctrineSchemaListener
RememberMeTokenProviderDoctrineSchemaSubscriber
in favor of RememberMeTokenProviderDoctrineSchemaListener
$isSameDatabase
to DoctrineTokenProvider::configureSchema()
enum_exists
functionAppVariable::getLocale()
to retrieve the current locale when using the LocaleSwitcher
extra
option for http_client.default_options
and http_client.scoped_client
DomCrawlerAssertionsTrait::assertSelectorCount(int $count, string $selector)
limit
definition in a RateLimiter configuration when using the no_limit
policy--format
option to the debug:config
commandframework.messenger.routing
framework:exceptions
tag, unwrap it and replace framework:exception
tags' name
attribute by class
notifier.logger_notification_listener
service, use the notifier.notification_logger_listener
service insteadErrorHandler
on FrameworkBundle::boot()
debug.container.dump
to false
to disable dumping the container to XMLframework.http_cache.skip_response_headers
optioncache:clear
commandAbstractController::sendEarlyHints()
to send HTTP Early HintsHttp\Client\HttpAsyncClient
Http\Client\HttpClient
service, use Psr\Http\Client\ClientInterface
insteadstop_worker_on_signals
configuration option to messenger
to define signals which would stop a worker--all
option to clear all cache pools with cache:pool:clear
command_stateless
attribute to the request when firewall is stateless and the attribute is not already setStatelessAuthenticatorFactoryInterface
for authenticators targeting stateless
firewalls only and that don't require a user providerSecurity::login()
return the authenticator responsesecurity.firewalls.logout.csrf_token_generator
config option, use security.firewalls.logout.csrf_token_manager
insteadTokenHandlerFactoryInterface
, OidcUserInfoTokenHandlerFactory
, OidcTokenHandlerFactory
and ServiceTokenHandlerFactory
for AccessTokenFactory
Twig_Environment
autowiring alias, use Twig\Environment
insteadAbstractBrowser::useHtml5Parser()
$isSameDatabase
to DoctrineDbalAdapter::configureSchema()
ClockAwareTrait
to help write time-sensitive classesClock
class and now()
functionEnumNode
ProgressBar::setPlaceholderFormatter
to set a placeholder attached to a instance, instead of being global.ReStructuredTextDescriptor
:scope
inline_factories
and inline_class_loader
to PhpDumper::dump()
PhpDumper
options inline_factories_parameter
and inline_class_loader_parameter
RemoveBuildParametersPass
, which removes parameters starting with a dot during compilation#[Autowire(...)]
service_locator
configContainerBuilder::deprecateParameter()
#[AsAlias]
attribute to tell under which alias a service should be registered or to use the implemented interface if no parameter is giventrim="true"
attributeAutowire
attribute#[Exclude]
to skip autoregistering a class#[AutowireCallable]
or #[AutowireServiceClosure]
#[Autowire(lazy: true|class-string)]
#[MapDecorated]
, use #[AutowireDecorated]
instead@required
annotation, use the Symfony\Contracts\Service\Attribute\Required
attribute insteadconstructor
option to services declaration and to #[Autoconfigure]
$useHtml5Parser
argument to Crawler
CrawlerSelectorCount
test constraint$normalizeWhitespace
to Crawler::innerText()
Crawler::innerText()
return the first non-empty textenum
expression functionplaceholder_attr
option to ChoiceType
crypto_method
to set the minimum TLS version and make it default to v1.2UriTemplateHttpClient
to use URI templates as specified in the RFC 6570ServerSentEvent::getArrayData()
to get the Server-Sent Event's data decoded as an array when it's a JSON payloadbase_uri
option value in RetryableHttpClient
to retry on a new url each timeJsonMockResponse
, a MockResponse
shortcut that automatically encodes the passed body to JSON and sets the content type to application/json
by defaultParameterBag::getDigit()
, getAlnum()
, getAlpha()
on an array
throws a UnexpectedValueException
instead of a TypeError
ParameterBag::getString()
to convert a parameter into string and throw an exception if the value is invalidParameterBag::getEnum()
Response::sendHeaders()
method now takes an optional HTTP status code as parameter, allowing to send informational responses such as Early Hints responses (103 status code)IpUtils::isPrivateIp()
Request::getPayload(): InputBag
ParameterBag::getInt()
and ParameterBag::getBoolean()
,ParameterBag::filter()
, unless flag FILTER_NULL_ON_FAILURE
is setcontainer.dumper.inline_factories
and container.dumper.inline_class_loader
, use .container.dumper.inline_factories
and .container.dumper.inline_class_loader
insteadFileProfilerStorage
removes profiles automatically after two days#[WithHttpStatus]
for defining status codes for exceptionsPsr\Clock\ClockInterface
to generate the current date time in DateTimeValueResolver
#[WithLogLevel]
for defining log levels for exceptionsskip_response_headers
to the HttpCache
options#[ValueResolver]
and #[AsTargetedValueResolver]
#[MapRequestPayload]
to map and validate request payload from Request::getContent()
or Request::$request->all()
to typed objects#[MapQueryString]
to map and validate request query string from Request::$query->all()
to typed objects#[MapQueryParameter]
to map and validate individual query parameters to controller argumentsstrip
locale to EmojiTransliterator
to strip all emojis from a stringcompress
script to compress the Resources/data
directory when disk space matters$isSameDatabase
to DoctrineDbalStore::configureSchema()
gcProbablity
option to gcProbability
to fix a typo in its nameMessageEvent::reject()
to allow rejecting an email before sending itmailgun+smtp
transport from 465 to 587$authenticators
parameter in EsmtpTransport
constructor and EsmtpTransport::setAuthenticators()
to allow overriding of default eSMTP authenticatorsSymfony\Component\Messenger\Transport\InMemoryTransport
and
Symfony\Component\Messenger\Transport\InMemoryTransportFactory
in favor of
Symfony\Component\Messenger\Transport\InMemory\InMemoryTransport
and
Symfony\Component\Messenger\Transport\InMemory\InMemoryTransportFactory
TransportNamesStamp
BatchHandlerTrait
with getBatchSize()
StopWorkerOnSigtermSignalListener
in favor of
StopWorkerOnSignalsListener
and make it configurable with SIGINT and
SIGTERM by defaultRedispatchMessage
and RedispatchMessageHandler
$isSameDatabase
to DoctrineTransport::configureSchema()
Content-Id
is used instead of the nameTextPart::getDisposition()
AllMySmsOptions
classContactEveryoneOptions
classEsendexOptions
classGatewayApiOptions
classGoogleChatOptions::card()
in favor of cardV2()
MessageBirdOptions
classMessageMediaOptions
classfrom
to optional to enable sending "eco" messagessendPhoto
API methodFromNotificationInterface
for MessageInterface
implementationsOptionsResolver::setIgnoreUndefined()
and OptionConfigurator::ignoreUndefined()
to ignore not defined options while resolving.
and [
with \
in PropertyPath
AttributesBasedUserProviderInterface
to allow $attributes
optional argument on loadUserByIdentifier
OidcUser
with OIDC support for OidcUserInfoTokenHandler
RememberMeBadge
to JsonLoginAuthenticator
and enable reading parameter in JSON request body$exceptionCode
to #[IsGranted]
Symfony\Component\Security\Http\RememberMe\PersistentRememberMeHandler
OidcUserInfoTokenHandler
and OidcTokenHandler
with OIDC support for AccessTokenAuthenticator
attributes
optional array argument in UserBadge
UserBadge::userLoader
with attributes if the argument is setPassport::addBadge
SecurityTokenValueResolver
to inject token as controller argumentAbstractNormalizer::REQUIRE_ALL_PROPERTIES
context flag to require all properties to be listed in the input instead of falling back to null for nullable onesXmlEncoder::SAVE_OPTIONS
context optionBackedEnumNormalizer::ALLOW_INVALID_VALUES
context optionUnsupportedFormatException
which is thrown when there is no decoder for a given formatgetSupportedTypes(?string $format)
to NormalizerInterface
and DenormalizerInterface
ProblemNormalizer
give details about ValidationFailedException
and PartialDenormalizationException
CacheableSupportsMethodInterface
in favor of the new getSupportedTypes(?string $format)
methodsConstraintViolationListNormalizer
CustomNormalizer
DataUriNormalizer
DateIntervalNormalizer
DateTimeNormalizer
DateTimeZoneNormalizer
GetSetMethodNormalizer
JsonSerializableNormalizer
ObjectNormalizer
PropertyNormalizer
getConstraint()
to ConstraintViolationInterface
Uuid::TIME_BASED_VERSIONS
to match that a UUID being validated embeds a timestamppattern
parameter in violations of the Regex
constraintNoSuspiciousCharacters
constraint to validate a string is not a spoofing attemptPasswordStrength
constraint to check the strength of a passwordcountUnit
option to the Length
constraint to allow counting the string length either by code points (like before, now the default setting Length::COUNT_CODEPOINTS
), bytes (Length::COUNT_BYTES
) or graphemes (Length::COUNT_GRAPHEMES
)filenameMaxLength
option to the File
constraintexclude
option to the Cascade
constraintvalue_length
parameter to Length
constraintConstraintViolationInterface
messagesWeakMap
dd()
and dump()
to display the argument nameRelay\Relay
Yaml::DUMP_NUMERIC_KEY_AS_STRING
flag$buildDir
to ProxyCacheWarmer::warmUp()
EntityFactory
DbalLogger
, use a middleware insteadDoctrineDataCollector
with an instance of DebugDataHolder
DoctrineDataCollector::addLogger()
, use a DebugDataHolder
insteadContainerAwareLoader
, use dependency injection in your fixtures insteadRequest
object to EntityValueResolver
's expression$lastUsed
of DoctrineTokenProvider::updateToken()
to accept DateTimeInterface
Logger::clear()
and to DebugProcessor::clear()
Logger
, use HttpKernel's DebugLoggerConfigurator
insteadSYMFONY_PHPUNIT_LOCALE
env varArgumentValueResolverInterface
from PsrServerRequestResolver
php-http/discovery
for auto-detecting PSR-17 factoriesimportmap()
Twig functionTemplatedEmail::locale()
to set the locale for the email renderingAppVariable::getEnabledLocales()
to retrieve the enabled localesimpersonation_path()
and impersonation_url()
Twig functionsHttpClientAssertionsTrait
AbstractController::renderBlock()
and renderBlockView()
Translator
and to Application::reset()
doctrine/annotations
package or disable the integration by setting framework.annotations
to false
json_decode_detailed_errors
context for Serializer by default if kernel.debug
is true and the seld/jsonlint
package is installedDomCrawlerAssertionsTrait::assertAnySelectorTextContains(string $selector, string $text)
DomCrawlerAssertionsTrait::assertAnySelectorTextSame(string $selector, string $text)
DomCrawlerAssertionsTrait::assertAnySelectorTextNotContains(string $selector, string $text)
EnableLoggerDebugModePass
, use argument $debug
of HttpKernel's Logger
insteadAddDebugLogProcessorPass::configureLogger()
, use HttpKernel's DebugLoggerConfigurator
insteadframework.handle_all_throwables
config option; it will default to true
in 7.0framework.php_errors.log
config option; it will default to true
in 7.0framework.session.cookie_secure
config option; it will default to auto
in 7.0framework.session.cookie_samesite
config option; it will default to lax
in 7.0framework.session.handler_id
or save_path
config options; handler_id
will
default to null in 7.0 if save_path
is not set and to session.handler.native_file
otherwiseframework.uid.default_uuid_version
config option; it will default to 7
in 7.0framework.uid.time_based_uuid_version
config option; it will default to 7
in 7.0framework.validation.email_validation_mode
config option; it will default to html5
in 7.0framework.validation.enable_annotations
, use framework.validation.enable_attributes
insteadframework.serializer.enable_annotations
, use framework.serializer.enable_attributes
insteadarray $tokenAttributes = []
optional parameter to KernelBrowser::loginUser()
framework.asset_mapper.provider
config option--exclude
option to the cache:pool:clear
commanddebug:container
commandframework.asset_mapper.importmap_polyfill
from a URL to the name of an item in the importmap$buildDir
when running CacheWarmer
to build read-only resources--profile
option to the console to enable profiling commandsrouting.loader.annotation
service, use the routing.loader.attribute
service insteadrouting.loader.annotation.directory
service, use the routing.loader.attribute.directory
service insteadrouting.loader.annotation.file
service, use the routing.loader.attribute.file
service insteadAnnotatedRouteControllerLoader
, use AttributeRouteControllerLoader
insteadAddExpressionLanguageProvidersPass
, use Symfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass
insteadDataCollectorTranslatorPass
, use Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass
insteadLoggingTranslatorPass
, use Symfony\Component\Translation\DependencyInjection\LoggingTranslatorPass
insteadWorkflowGuardListenerPass
, use Symfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass
insteadSecurity::ACCESS_DENIED_ERROR
, AUTHENTICATION_ERROR
and LAST_USERNAME
constants, use the ones on SecurityRequestAttributes
insteadpattern
in firewall configuration$badges
argument to Security::login
require_previous_session
config option. Setting it has no effect anymoreLogoutRouteLoader
autoescape_service_method
option when autoescape_service
is set to an invokable service id_links
attribute for preload CSS files for WebLink integrationPreAssetsCompileEvent
event when running asset-map:compile
importmap:export
commandimportmap:install
command to download all missing downloaded packagesimportmap:update
commandimportmap:audit
command to check for security vulnerability advisories in dependenciesimportmap:outdated
command to check for outdated packages$serverParameters
to AbstractBrowser::click()
and AbstractBrowser::clickLink()
EarlyExpirationHandler
no longer implements MessageHandlerInterface
, rely on AsMessageHandler
insteadDatePoint
: an immutable DateTime implementation with stricter error handling and return typesDateMalformedStringException
/DateInvalidTimeZoneException
when appropriate$modifier
argument to the now()
helperSignalMap
to map signal value to its nameApplication::setCatchErrors(true)
RunCommandMessage
and RunCommandMessageHandler
ConsoleTerminateEvent
after an exit on signal handling and add ConsoleTerminateEvent::getInterruptingSignal()
#[Target]
with no arguments to state that a parameter must match a named autowiring aliasContainerAwareInterface
and ContainerAwareTrait
, use dependency injection insteaddefined
env var processor that returns true
for defined and neither null nor empty env vars#[AutowireLocator]
and #[AutowireIterator]
attributesCrawlerAnySelectorTextContains
test constraintCrawlerAnySelectorTextSame
test constraint$default
to Crawler::attr()
FlattenExceptionNormalizer
no longer implements ContextAwareNormalizerInterface
Finder::filter()
DateTime
or DateTimeImmutable
model data with a different timezone than configured with the
model_timezone
option in DateType
, DateTimeType
, and TimeType
PostSetDataEvent::setData()
, use PreSetDataEvent::setData()
insteadPostSubmitEvent::setData()
, use PreSubmitDataEvent::setData()
or SubmitDataEvent::setData()
insteadduplicate_preferred_choices
option in ChoiceType
$duplicatePreferredChoices
parameter to ChoiceListFactoryInterface::createView()
HarFileResponseFactory
testing utility, allow to replay responses from .har
filesmax_retries
option to RetryableHttpClient
to adjust the retry logic on a per request levelPingWehookMessage
and PingWebhookMessageHandler
HeaderBag::getDate()
, Response::getDate()
, getExpires()
and getLastModified()
return a DateTimeImmutable
Generator
in StreamedJsonResponse
UriSigner
from the HttpKernel componentpartitioned
flag to Cookie
(CHIPS Cookie)bool $flush = true
to Response::send()
MongoDbSessionHandler
instantiable with the mongodb extension directlyBundleInterface
no longer extends ContainerAwareInterface
$className
parameter to ControllerEvent::getAttributes()
TraceableEventDispatcher
and to MergeExtensionConfigurationPass
$validationFailedStatusCode
to #[MapQueryString]
and #[MapRequestPayload]
$debug
to Logger
DebugLoggerConfigurator
kernel.runtime_mode
and kernel.runtime_mode.*
, all set from env var APP_RUNTIME_MODE
Kernel::stripComments()
!
character at the beginning of a string as a negation operator in the url filter of the profilerUriSigner
, use UriSigner
from the HttpFoundation component insteadFileLinkFormatter
, use FileLinkFormatter
from the ErrorHandler component instead$buildDir
to WarmableInterface
$filter
to Profiler::find()
and FileProfilerStorage::find()
ControllerResolver::allowControllers()
to define which callables are legit controllers when the _check_controller_is_allowed
request attribute is setCountries::getNumericCode()
, Countries::getNumericCodes()
,
Countries::numericCodeExists()
and Countries::getAlpha2FromNumeric()
MongoDbStore
instantiable with the mongodb extension directlyRemoteEvent
and Webhook
RemoteEvent
and Webhook
supportpeer_fingerprint
to verify TLS certificate fingerprintmailjet+smtp
transport from 465 to 587AddFifoStampMiddleware
to help adding AmazonSqsFifoStamp
StopWorkerOnSignalsListener
in favor of using the SignalableCommandInterface
HandlerDescriptor::getOptions
--all
option to the messenger:failed:remove
commandWrappedExceptionsInterface
interface for exceptions that hold multiple individual exceptionsHandlerFailedException::getNestedExceptions()
, HandlerFailedException::getNestedExceptionsOfClass()
and DelayedMessageHandlingException::getExceptions()
which are replaced by a new getWrappedExceptions()
methodSMSLong
and SMSLongNBr
API parameterssendLocation
, sendAudio
, sendDocument
, sendVideo
, sendAnimation
, sendVenue
, sendContact
and sendSticker
API methodsRemoteEvent
and Webhook
PhpSubprocess
to handle PHP subprocesses that take over the
configuration from their parentRunProcessMessage
and RunProcessMessageHandler
SlidingWindowLimiter::reserve()
AnnotationClassLoader::setResolver()
AnnotationClassLoader
to __construct(?string $env = null)
, passing an annotation reader as first argument is deprecatedAnnotationClassLoader
, use AttributeClassLoader
insteadAnnotationDirectoryLoader
, use AttributeDirectoryLoader
insteadAnnotationFileLoader
, use AttributeFileLoader
insteadAddExpressionLanguageProvidersPass
(moved from FrameworkBundle
)Annotation
namespace to Attribute
bool $debug = false
to HttpKernelRunner::__construct()
from()
to CheckpointInterface
--date
and --all
options to the schedule:debug
commandAbstractTriggerDecorator
ScheduledStamp
"send-able"ScheduledStamp
to RedispatchMessage
MessageProviderInterface
to trigger unique messages at runtimePreRunEvent
and PostRunEvent
eventsDispatchSchedulerEventListener
FailureEvent
eventPersistentToken
immutableDateTime
for TokenProviderInterface::updateToken()
, use DateTimeInterface
insteadUserValueResolver
no longer implements ArgumentValueResolverInterface
DefaultLoginRateLimiter
with an empty secretTranslatableNormalizer
Context
attribute to target classesGroups
attribute/annotation on classesjson_decode_detailed_errors
optionProblemNormalizer
give details about Messenger's ValidationFailedException
XmlEncoder::CDATA_WRAPPING
context optionAnnotationLoader
, use AttributeLoader
insteadAnnotation
namespace to Attribute
LocaleSwitcher::runWithLocale()
's callback--as-tree
option to translation:pull
command to write YAML messages as a tree-like structure$buildDir
to DataCollectorTranslator::warmUp()
DataCollectorTranslatorPass
and LoggingTranslatorPass
(moved from FrameworkBundle
)PhraseTranslationProvider
is_valid
function to the Expression
constraint, its behavior is the same as ValidatorInterface::validate
versions
option of the Uuid
constraintconstraints
option of the When
constraintValidatorBuilder::setDoctrineAnnotationReader()
ValidatorBuilder::addDefaultDoctrineAnnotationReader()
number
, finite-number
and finite-float
types to Type
constraintwithSeconds
option to the Time
constraint that allows to pass time without secondsValidatorBuilder::enableAnnotationMapping()
, use ValidatorBuilder::enableAttributeMapping()
insteadValidatorBuilder::disableAnnotationMapping()
, use ValidatorBuilder::disableAttributeMapping()
insteadAnnotationLoader
, use AttributeLoader
insteadGroupProviderInterface
to implement validation group providers outside the underlying classwith-metadata
option to the workflow:dump
command to include places,
transitions and workflow's metadata into dumped graphGuardEvent::getContext()
method that will be removed in 7.0Symfony\Component\Workflow\Registry
as internalWorkflowGuardListenerPass
(moved from FrameworkBundle
)DoctrineDbalCacheAdapterSchemaSubscriber
, use DoctrineDbalCacheAdapterSchemaListener
insteadMessengerTransportDoctrineSchemaSubscriber
, use MessengerTransportDoctrineSchemaListener
insteadRememberMeTokenProviderDoctrineSchemaSubscriber
, use RememberMeTokenProviderDoctrineSchemaListener
insteadDbalLogger
, use a middleware insteadDoctrineDataCollector::addLogger()
, use a DebugDataHolder
insteadContainerAwareLoader
, use dependency injection in your fixtures insteadContainerAwareEventManager::getListeners()
must be called with an event namedoctrine/event-manager:^2
$isSameDatabase
to DoctrineTokenProvider::configureSchema()
Logger
, use HttpKernel's DebugLoggerConfigurator
insteadlogout_url
and logout_path
)absolute_url
and the relative_path
functions)asset
and asset_version
functions)translation:update
, use translation:extract
insteadhttp_method_override
config option default to false
AbstractController::renderForm()
, use render()
insteadSymfony\Component\Serializer\Normalizer\ObjectNormalizer
and
Symfony\Component\Serializer\Normalizer\PropertyNormalizer
autowiring aliases, type-hint against
Symfony\Component\Serializer\Normalizer\NormalizerInterface
or implement NormalizerAwareInterface
insteadHttp\Client\HttpClient
service, use Psr\Http\Client\ClientInterface
insteadEnableLoggerDebugModePass
, use argument $debug
of HttpKernel's Logger
insteadAddDebugLogProcessorPass::configureLogger()
, use HttpKernel's DebugLoggerConfigurator
insteadframework.handle_all_throwables
config option default to true
framework.php_errors.log
config option default to true
framework.session.cookie_secure
config option default to auto
framework.session.cookie_samesite
config option default to lax
framework.session.handler_id
default to null if save_path
is not set and to session.handler.native_file
otherwiseframework.uid.default_uuid_version
config option default to 7
framework.uid.time_based_uuid_version
config option default to 7
framework.validation.email_validation_mode
config option default to html5
framework.validation.enable_annotations
config option, use framework.validation.enable_attributes
insteadframework.serializer.enable_annotations
config option, use framework.serializer.enable_attributes
insteadrouting.loader.annotation
service, use the routing.loader.attribute
service insteadrouting.loader.annotation.directory
service, use the routing.loader.attribute.directory
service insteadrouting.loader.annotation.file
service, use the routing.loader.attribute.file
service insteadAnnotatedRouteControllerLoader
, use AttributeRouteControllerLoader
insteadAddExpressionLanguageProvidersPass
, use Symfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass
insteadDataCollectorTranslatorPass
, use Symfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass
insteadLoggingTranslatorPass
, use Symfony\Component\Translation\DependencyInjection\LoggingTranslatorPass
insteadWorkflowGuardListenerPass
, use Symfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass
insteadTranslationsCacheWarmer
to create catalogues at warmupenable_authenticator_manager
config optionsecurity.firewalls.logout.csrf_token_generator
config option, use security.firewalls.logout.csrf_token_manager
insteadrequire_previous_session
config option from authenticatorsTwig_Environment
autowiring alias, use Twig\Environment
insteadtwig.autoescape
; create a class that implements your escaping strategy
(check FileExtensionEscapingStrategy::guess()
for inspiration) and reference it using
the twig.autoescape_service
option insteaddate
and the number_format
filter$isSameDatabase
to DoctrineDbalAdapter::configureSchema()
DoctrineDbalAdapter
NodeBuilder::setParent()
ConfigCacheInterface
, ConfigCacheFactoryInterface
and a basic ConfigCacheFactory
implementation to delegate creation of ConfigCache instances__toString()
to InputInterface
Command::$defaultName
and Command::$defaultDescription
, use the AsCommand
attribute instead*Command::setApplication()
, *FormatterStyle::setForeground/setBackground()
, Helper::setHelpSet()
, Input*::setDefault()
and Question::setAutocompleterCallback/setValidator()
StringInput::REGEX_STRING
#[MapDecorated]
, use #[AutowireDecorated]
insteadProxyHelper
, use Symfony\Component\VarExporter\ProxyHelper
insteadReferenceSetArgumentTrait
@required
annotation, use the Symfony\Contracts\Service\Attribute\Required
attribute insteadContainerAwareTrait::setContainer()
PhpDumper
options inline_factories_parameter
and inline_class_loader_parameter
, use options inline_factories
and inline_class_loader
insteadParameterBag
cannot be numericsContainerAwareInterface
and ContainerAwareTrait
, use dependency injection instead$id
and $asGhostObject
to DumperInterface::isProxyCandidate()
and getProxyCode()
$source
to FileLoader::registerClasses()
$normalizeWhitespace
to Crawler::innerText()
$default
to Crawler::attr()
in
and not in
operators now use strict comparison$lock
to Filesystem::appendToFile()
DateTime
or DateTimeImmutable
model data with a different timezone than configured with the
model_timezone
option in DateType
, DateTimeType
, and TimeType
Button/Form::setParent()
, ButtonBuilder/FormConfigBuilder::setDataMapper()
, TransformationFailedException::setInvalidMessage()
Http\Message\RequestFactory
from HttplugClient
ParameterBag::filter()
throws an UnexpectedValueException
on invalid value, unless flag FILTER_NULL_ON_FAILURE
is setParameterBag::getInt()
and ParameterBag::getBool()
throws an UnexpectedValueException
on invalid valueRequestMatcher
and ExpressionRequestMatcher
Request::getContentType()
, use Request::getContentTypeFormat()
insteadInvalidArgumentException
when calling Request::create()
with a malformed URIJsonResponse::setCallback()
, Response::setExpires/setLastModified/setEtag()
, MockArraySessionStorage/NativeSessionStorage::setMetadataBag()
, NativeSessionStorage::setSaveHandler()
$statusCode
to Response::sendHeaders()
and StreamedResponse::sendHeaders()
$reflector
to ArgumentResolverInterface::getArguments()
and ArgumentMetadataFactoryInterface::createArgumentMetadata()
ArgumentValueResolverInterface
, use ValueResolverInterface
insteadStreamedResponseListener
AbstractSurrogate::$phpEscapeMap
HttpKernelInterface::MASTER_REQUEST
terminate_on_cache_hit
option from HttpCache
ConfigDataCollector::setKernel()
, RouterListener::setCurrentRequest()
Kernel::stripComments()
FileLinkFormatter
, use FileLinkFormatter
from the ErrorHandler component insteadUriSigner
, use UriSigner
from the HttpFoundation component instead$buildDir
to WarmableInterface
$filter
to Profiler::find()
and FileProfilerStorage::find()
{username}
parameter, use {user_identifier}
instead$isSameDatabase
to DoctrineDbalStore::configureSchema()
gcProbablity
(notice the typo) option, use gcProbability
instead$isSameDatabase
to DoctrineTransport::configureSchema()
MessageHandlerInterface
and MessageSubscriberInterface
, use #[AsMessageHandler]
insteadStopWorkerOnSigtermSignalListener
in favor of using the SignalableCommandInterface
StopWorkerOnSignalsListener
in favor of using the SignalableCommandInterface
Symfony\Component\Messenger\Transport\InMemoryTransport
and
Symfony\Component\Messenger\Transport\InMemoryTransportFactory
in favor of
Symfony\Component\Messenger\Transport\InMemory\InMemoryTransport
and
Symfony\Component\Messenger\Transport\InMemory\InMemoryTransportFactory
HandlerFailedException::getNestedExceptions()
, HandlerFailedException::getNestedExceptionsOfClass()
and DelayedMessageHandlingException::getExceptions()
which are replaced by a new getWrappedExceptions()
methodEmail::attachPart()
, use Email::addPart()
instead$body
is now required (at least null) in Message::setBody()
Message::setBody()
GoogleChatOptions::card()
in favor of cardV2()
isNullSafe()
to PropertyPathInterface
PropertyAccessorBuilder::setCacheItemPool()
UnexpectedTypeException
now expects three constructor arguments: The invalid property value,
the PropertyPathInterface
object and the current index of the property path.$routeParameters
to UrlMatcher::handleRouteRequirements()
AnnotationClassLoader
, use AttributeClassLoader
insteadAnnotationDirectoryLoader
, use AttributeDirectoryLoader
insteadAnnotationFileLoader
, use AttributeFileLoader
insteadSymfony\Component\Security\Http\SecurityEvents::INTERACTIVE_LOGIN
in Symfony\Component\Security\Http\Firewall\SimplePreAuthenticationListener
Symfony\Component\Security\Acl\Permission\AbstractMaskBuilder
and described in the Symfony\Component\Security\Acl\Permission\MaskBuilderInterface
Symfony\Component\Security\Acl\Permission\MaskBuilderRetrievalInterface
Security
class, use Symfony\Bundle\SecurityBundle\Security
insteadTokenStorage::setToken()
$lastUsed
of TokenProviderInterface::updateToken()
to accept DateTimeInterface
$badgeFqcn
to Passport::addBadge()
$lifetime
to LoginLinkHandlerInterface::createLoginLink()
DefaultLoginRateLimiter
with an empty secretgetSupportedTypes()
to DenormalizerInterface
and NormalizerInterface
AbstractUid
in UidNormalizer
, use one of AbstractUid
child class insteadUidNormalizer
now throws an \Error
ContextAwareDenormalizerInterface
, use DenormalizerInterface
insteadContextAwareNormalizerInterface
, use NormalizerInterface
insteadCacheableSupportsMethodInterface
, use NormalizerInterface
and DenormalizerInterface
insteadAttributeMetadata::setSerializedName()
and ClassMetadata::setClassDiscriminatorMapping()
$context
to NormalizerInterface::supportsNormalization()
and DenormalizerInterface::supportsDenormalization()
AnnotationLoader
, use AttributeLoader
insteadAbstractNormalizer
to factorise code and ease normalizers developmentPropertyNormalizer
object_to_populate
in AbstractNormalizer
to reuse existing objects in the deserialization processNameConverterInterface
and CamelCaseToSnakeCaseNameConverter
GetSetMethodNormalizer::setCamelizedAttributes()
and
PropertyNormalizer::setCamelizedAttributes()
are replaced by
CamelCaseToSnakeCaseNameConverter
Exception
interface has been renamed to ExceptionInterface
ObjectNormalizer
leveraging the PropertyAccess
component to normalize
objects containing both properties and getters / setters / issers / hassers methods.xml_type_cast_attributes
context option for allowing users to opt-out of typecasting
xml attributes.PhpStringTokenParser
PhpExtractor
in favor of PhpAstExtractor
getConstraint()
, getCause()
and __toString()
to ConstraintViolationInterface
__toString()
to ConstraintViolationListInterface
disableTranslation()
to ConstraintViolationBuilderInterface
$errorNames
from all constraints, use const ERROR_NAMES
instead$versions
from the Ip
constraint, use the VERSIONS
constant insteadVALIDATION_MODE_LOOSE
from Email
constraint, use VALIDATION_MODE_HTML5
insteadExpressionLanguageSyntax
, use ExpressionSyntax
insteadAnnotationLoader
ValidatorBuilder::setDoctrineAnnotationReader()
ValidatorBuilder::addDefaultDoctrineAnnotationReader()
ValidatorBuilder::enableAnnotationMapping()
, use ValidatorBuilder::enableAttributeMapping()
insteadValidatorBuilder::disableAnnotationMapping()
, use ValidatorBuilder::disableAttributeMapping()
insteadAnnotationLoader
, use AttributeLoader
insteadDefaultTranslator
in favor of Symfony\Component\Translation\IdentityTranslator
Is
-prefixed equivalent$label
to VarDumper::dump()
VarDumper::setHandler()
Twig_Template
, only Twig\Template
is supportedCloner\Data::getLimitedClone()
. Use withMaxDepth
, withMaxItemsPerDepth
or withRefHandles
instead.Definition::setInitialPlaces()
GuardEvent::getContext()
method has been removed. Method was not supposed to be called within guard event listeners as it always returned an empty array anyway.GuardEvent::getContext()
method without replacement!php/const:
tag, use !php/const
instead (without the colon)EntityValueResolver
to return a list of entitiesUniqueEntity
constraintemojify
Twig filterCheckAliasValidityPass
to lint:container
commandprivate_ranges
as a shortcut for private IP address ranges to the trusted_proxies
optionConfigBuilderCacheWarmer
, Router
, SerializerCacheWarmer
, TranslationsCacheWarmer
, Translator
and ValidatorCacheWarmer
as final
cache_dir
to kernel.build_dir
router.cache_dir
config optionrate_limiter
tags to rate limiter servicessecrets:reveal
commandrate_limiter
option to http_client.default_options
and http_client.scoped_clients
workflow
tagallowed_recipients
option for mailer to allow some users to receive
emails even if recipients
is defined.ExpressionCacheWarmer
as final
TemplateCacheWarmer
as final
XDEBUG_IGNORE
query parameter when sending toolbar XHRImportMapConfigReader::splitPackageNameAndFilePath()
, use ImportMapEntry::splitPackageNameAndFilePath()
insteadsentinel_master
as an alias for redis_sentinel
CouchbaseBucketAdapter
, use CouchbaseCollectionAdapter
DatePoint::getMicrosecond()
and DatePoint::setMicrosecond()
ResourceCheckerConfigCache
ConfigCache
ArgvInput::getRawTokens()
:is()
:where()
CheckAliasValidityPass
to check service compatibility with aliased interface$prepend
to ContainerConfigurator::extension()
to prepend the configuration instead of appending itServiceLocator
implement ServiceCollectionInterface
#[Lazy]
attribute as shortcut for #[Autowire(lazy: [bool|string])]
and #[Autoconfigure(lazy: [bool|string])]
#[AutowireMethodOf]
attribute to autowire a method of a service as a callableContainerBuilder::registerAttributeForAutoconfiguration()
propagate to attribute classes that extend the registered class$prepend
to FileLoader::construct()
to prepend loaded configuration instead of appending itprependExtension()
method, the ContainerConfigurator::import()
method now prepends the configuration instead of appending it#[Autowire(env: '...')]
depending on the signature of the corresponding parameter#[AutowireInline]
attribute to allow service definition at the class levelStaticEnvVarLoader
SYMFONY_DOTENV_PATH
variable with the path to the .env
file loaded by Dotenv::loadEnv()
or Dotenv::bootEnv()
gitlab
locale to EmojiTransliterator
text
locale to EmojiTransliterator
min
and max
functionsParser::IGNORE_UNKNOWN_VARIABLES
and Parser::IGNORE_UNKNOWN_FUNCTIONS
flags to control whether
parsing and linting should check for unknown variables and functions.null
as the allowed variable names to ExpressionLanguage::lint()
and Parser::lint()
,
pass the IGNORE_UNKNOWN_VARIABLES
flag instead to ignore unknown variables during lintingFilesystem::readFile()
methodseparator
to ChoiceType
to use a custom separator after preferred choices (use the new separator_html
option to display the separator text as HTML)default_protocol
option of the UrlType
, it will default to null
in 8.0 (the current default is 'http'
)keep_as_list
option to CollectionType
input
option to MoneyType
, to be able to cast the transformed value to integer
HttpOptions::setHeader()
to add or replace a single headerstart_time
info in MockResponse
MockResponse::fromFile()
and JsonMockResponse::fromFile()
methods to help using fixtures filesThrottlingHttpClient
to enable limiting the number of requests within a certain periodsetLogger()
methods of the NoPrivateNetworkHttpClient
, TraceableHttpClient
and ScopingHttpClient
classes, configure the logger of the wrapped clients directly instead$expirationParameter
argument to UriSigner::__construct()
$expiration
argument to UriSigner::sign()
$parameter
argument of UriSigner::__construct()
to $hashParameter
UploadedFile::getClientOriginalPath()
QueryParameterRequestMatcher
HeaderRequestMatcher
\SplTempFileObject
in BinaryFileResponse
verbose
argument to response test constraintsisKernelTerminating()
to ExceptionEvent
that allows to check if an exception was thrown while the kernel is being terminatedHttpException::fromStatusCode()
$validationFailedStatusCode
argument to #[MapQueryParameter]
that allows setting a custom HTTP status code when validation failsNearMissValueResolverException
to let value resolvers report when an argument could be under their watch but failed to be resolved$type
argument to #[MapRequestPayload]
that allows mapping a list of itemsExtension
class is marked as internal, extend the Extension
class from the DependencyInjection component insteadExtension::addAnnotatedClassesToCompile()
AddAnnotatedClassesToCachePass
setAnnotatedClassCache()
and getAnnotatedClassesToCompile()
methods of the Kernel
class#[MapUploadedFile]
attribute to fetch, validate, and inject uploaded files into controller argumentssymfony/emoji
componentEmojiTransliterator
in favor of Symfony\Component\Emoji\EmojiTransliterator
X-SES-LIST-MANAGEMENT-OPTIONS
RemoteEvent
and Webhook
PostmarkDeliveryEvent
instead of throwing an exceptionauto_tls
to disable automatic STARTTLSrecipients
is defined in EnvelopeListener
delay[arguments]
in the transport definitionSKIP LOCKED
in the doctrine transport for MySQL, PostgreSQL and MSSQLInMemoryTransportFactory
creates the InMemoryTransport
with a clock (if configured in the factory)redis_sentinel
as an alias for sentinel_master
--all
option to the messenger:consume
command$jitter
to MultiplierRetryStrategy
in order to randomize delay and prevent the thundering herd effectSIGQUIT
signal among list of signals that gracefully shut down messenger:consume
and messenger:failed:retry
commandsEnvelopeAwareExceptionInterface
for exceptions thrown from middlewares to prevent stamps added by previous middlewares being droppedOneSignalOptions::isExternalUserId()
to indicate that recipient is an external user idProcess::setIgnoredSignals()
to disable signal propagation to the child processPropertyDocBlockExtractorInterface
to extract a property's doc blockPhpStanExtractor
based on visibilityPropertyTypeExtractorInterface::getType()
as experimental{foo:bar}
syntax to define a mapping between a route parameter and its corresponding request attribute#[IsCsrfTokenValid]
attribute$class
, $format
and $context
to NameConverterInterface::normalize()
and NameConverterInterface::denormalize()
DateTimeNormalizer::CAST_KEY
context optionDefault
and "class name" default groupsAbstractNormalizer::FILTER_BOOL
context optionCamelCaseToSnakeCaseNameConverter::REQUIRE_SNAKE_CASE_PROPERTIES
context optionAbstractNormalizerContextBuilder::withDefaultContructorArguments(?array $defaultContructorArguments)
, use withDefaultConstructorArguments(?array $defaultConstructorArguments)
instead (note the missing s
character in Contructor word in deprecated method)XmlEncoder::CDATA_WRAPPING_PATTERN
context optionlocaleLower()
, localeUpper()
, localeTitle()
methods to AbstractUnicodeString
DataCollectorTranslator
as final
UuidV1::toV6()
, UuidV1::toV7()
and UuidV6::toV7()
AbstractUid::toString()
requireTld
option to the Url
constraint (the default value will become true
in 8.0)PasswordStrengthValidator
Stringable
values when using the Cidr
, CssColor
, ExpressionSyntax
and PasswordStrength
constraintsMacAddress
constraint*_NO_PUBLIC
, *_ONLY_PRIVATE
and *_ONLY_RESERVED
versions to Ip
constraintIp
constraint versions for Cidr
constraintlist
and associative_array
types to Type
constraintCharset
constraintrequireTld
option to the Url
constraintBic::INVALID_BANK_CODE_ERROR
DOMCaster
getEnabledTransition()
to WorkflowInterface
getName()
in event classes to build event names in subscribers!php/enum Foo
ReadableCollection
in CollectionToArrayTransformer
DebugClassLoader
from the ErrorHandler component if presentExpectUserDeprecationMessageTrait
with a polyfill of PHPUnit's expectUserDeprecationMessage()
total
for asserting deprecation count when a group is not definedFormThemeNode
--sort
option when extracting translations with translation:extract
command and --force
optionheaders
with Symfony\Bundle\FrameworkBundle\Controller\TemplateController
--resolve-env-vars
option to lint:container
commandkernel.secret
from the decryption secret when its env var is not definedconfig/
directory optional in MicroKernelTrait
, add support for service arguments in the
invokable Kernel class, and register FrameworkBundle
by default when the bundles.php
file is missingsecrets:decrypt-to-local
command terminates with a non-zero exit code when a secret could not be readcache.app
adapter taggable, use the cache.app.taggable
adapter insteadjson_decode_detailed_errors
in the default serializer context in debug mode by default when seld/jsonlint
is installedSymfony\Component\Serializer\NameConverter\SnakeCaseToCamelCaseNameConverter
as a service named serializer.name_converter.snake_case_to_camel_case
if availableframework.csrf_protection.stateless_token_ids
, .cookie_name
, and .check_header
options to use stateless headers/cookies-based CSRF protectionframework.form.csrf_protection.field_attr
optionsession.sid_length
and session.sid_bits_per_character
config optionsSYMFONY_TRUSTED_PROXIES
, SYMFONY_TRUSTED_HEADERS
, SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER
and SYMFONY_TRUSTED_HOSTS
env vars--no-fill
option to translation:extract
commandSecurity::login()
igbinary_serialize()
is not used by default when the igbinary extension is installedPsr\Clock\ClockInterface
parameter to ArrayAdapter
#[WhenNot]
attribute to prevent service from being registered in a specific environmentSkippingResourceChecker
defaultNull()
on BooleanNode
StringNode
and StringNodeDefinition
ArrayNodeDefinition::stringPrototype()
methodNodeBuilder::stringNode()
methodFORCE_COLOR
environment variableverbosity
argument to mustRun
process helper method--silent
/SHELL_VERBOSITY=-2
) to suppress all output, including errorsOutputInterface::isSilent()
, Output::isSilent()
, OutputStyle::isSilent()
methodsConsoleAlarmEvent
!tagged
tag, use !tagged_iterator
insteadContainerBuilder::registerChild()
shortcut method for registering child definitionskey-type
in XmlFileLoader
ParameterBag::cannotBeEmpty()
and ContainerBuilder::parameterCannotBeEmpty()
methods/*
& */
$providers
list to ExpressionLanguage
constructor<<
, >>
, and ~
bitwise operatorsxor
operatorVersionAwareTest
trait, use feature detection insteadcalendar
option in DateType
LazyChoiceLoader
and choice_lazy
option in ChoiceType
for loading and rendering choices on demandform.post_set_data
instead of form.pre_set_data
in ResizeFormListener
DataCollectorListener
from 255 to -255$requests
parameter to RequestStack::__construct()
$v4Bytes
and $v6Bytes
parameters to IpUtils::anonymize()
PRIVATE_SUBNETS
as a shortcut for private IP address ranges to Request::setTrustedProxies()
referer_check
, use_only_cookies
, use_trans_sid
, trans_sid_hosts
, trans_sid_tags
, sid_bits_per_character
and sid_length
options to NativeSessionStorage
@internal
flag and add @final
to ServicesResetter
SYMFONY_DISABLE_RESOURCE_TRACKING
env varsaslBind()
and whoami()
to ConnectionInterface
and LdapInterface
sizeLimit
option of AbstractQuery
EVALSHA
over EVAL
when evaluating LUA scriptsNullStore
TransportFactoryTestCase
, extend AbstractTransportFactoryTestCase
insteadKeepaliveReceiverInterface
to enable asynchronously notifying Beanstalkd that the job is still being processed, in order to avoid timeouts$previous
to the exception output at the messenger:failed:show
commandWrappedExceptionsInterface
now extends PHP's Throwable
interface#[AsMessage]
attribute with $transport
parameter for message routing--format
option to the messenger:stats
commandgetRetryDelay()
method to RecoverableExceptionInterface
skip
option to messenger:failed:retry
command when run interactively to skip message and requeue itpcntl_alarm()
GatewayApiOptions
classSlackButtonBlockElement
to add button as accessory to a section blockemoji
and verbatim
options to text
and field
methods in SlackSectionBlock
TransportFactoryTestCase
, extend AbstractTransportFactoryTestCase
insteadRequirement::UID_RFC9562
constant to validate UUIDs in the RFC 9562 formatAttributeClassLoader::$routeAnnotationClass
propertyAccessDecisionStrategyTestCase
compatible with PHPUnit 10+$token
argument to UserCheckerInterface::checkPostAuth()
$secret
of RememberMeToken
UserInterface::getUserIdentifier()
SameOriginCsrfTokenManager
checkPostAuth()
method of user checkers$secret
of RememberMeAuthenticator
$userIdentifier
argument to UserBadge
constructorUserAuthenticatorInterface::authenticateUser()
methodcsv_escape_char
context option of CsvEncoder
and the CsvEncoder::ESCAPE_CHAR_KEY
constantCsvEncoderContextBuilder::withEscapeChar()
methodSnakeCaseToCamelCaseNameConverter
\DateTime
and \DateTimeImmutable
for denormalizationUidNormalizer::NORMALIZATION_FORMAT_RFC9562
constantAdvancedNameConverterInterface
, use NameConverterInterface
insteadgetLastPeriod()
to StopwatchEvent
getRootSectionEvents()
method and ROOT
constant to Stopwatch
TruncateMode
enum to handle more truncate methodsAbstractString::kebab()
methodstatus
query parameter of Loco translation APIProviderFactoryTestCase
, extend AbstractTransportFactoryTestCase
insteadPhpDocAwareReflectionTypeResolver
resolverAbstractUid
implement Ds\Hashable
if availableUuid::isValid()
Uuid::FORMAT_RFC_9562
constant to validate UUIDs in the RFC 9562 formatIbanValidator
accepts IBANs containing non-breaking and narrow non-breaking spacesPasswordStrengthValidator::estimateStrength()
publicYaml
constraint for validating YAML contenterrorPath
to Unique constraintformat
option to the Ulid
constraint to allow accepting different ULID formatsWordCount
constraintWeek
constraintCompoundConstraintTestCase
to ease testing Compound ConstraintsWhenValidator
FORCE_COLOR
environment variableAbstractRequestParserTestCase
compatible with PHPUnit 10+PayloadSerializerInterface
with implementations to decouple the remote event handling from the Serializer component$request
argument to RequestParserInterface::createSuccessfulResponse()
and RequestParserInterface::createRejectedResponse()
RequestParserInterface::parse()
to RemoteEvent|array<RemoteEvent>|null
(from ?RemoteEvent
)null
#!/usr/bin/env bash | |
# YOLO | |
VERSION=${1:-7.2} | |
PATH_TO_SYMFONY=$HOME/dev/github.com/symfony/symfony | |
(cd $PATH_TO_SYMFONY && git fetch && git co $VERSION && git reset --hard origin/$VERSION) | |
for file in `find $PATH_TO_SYMFONY -name CHANGELOG.md ! -path '*vendor*' | sort` ; do changelog=`rg "$VERSION(\.0)?\n---+\n\n(.*?)\n(\n|$)" -U --multiline-dotall -or '$2' $file` ; if [[ ! -z $changelog ]] ; then echo `echo "$file" | sed -e 's|^.*src/Symfony/|## |' -e 's#/CHANGELOG.md##'` && echo && echo "$changelog" && echo ; fi done > CHANGELOG-$VERSION.md |