Symfony 7.2 is a minor release. According to the Symfony release process, there should be no significant
backward compatibility breaks. Minor backward compatibility breaks are prefixed in this document with
[BC BREAK]
, make sure your code is compatible with these entries before upgrading.
Read more about this in the Symfony documentation.
If you're upgrading from a version below 7.1, follow the 7.1 upgrade guide first.
Bundles
Bridges
Components
- Cache
- Console
- DependencyInjection
- Form
- HttpFoundation
- Ldap
- Lock
- Mailer
- Notifier
- Routing
- Security
- Serializer
- Translation
- Webhook
- Yaml
igbinary_serialize()
is no longer used instead ofserialize()
when the igbinary extension is installed, due to behavior incompatibilities between the two (performance might be impacted)
- [BC BREAK] Add
--silent
global option to enable the silent verbosity mode (suppressing all output, including errors) If a custom command defines thesilent
option, it must be renamed before upgrading. - Add
isSilent()
method toOutputInterface
-
Deprecate
!tagged
Yaml tag, use!tagged_iterator
insteadBefore
services: App\Handler: tags: ['app.handler'] App\HandlerCollection: arguments: [!tagged app.handler]
After
services: App\Handler: tags: ['app.handler'] App\HandlerCollection: arguments: [!tagged_iterator app.handler]
- Deprecate the
VersionAwareTest
trait, use feature detection instead
- [BC BREAK] The
secrets:decrypt-to-local
command terminates with a non-zero exit code when a secret could not be read - Deprecate making
cache.app
adapter taggable, use thecache.app.taggable
adapter instead - Deprecate
session.sid_length
andsession.sid_bits_per_character
config options, following the deprecation of these options in PHP 8.4.
- Deprecate passing
referer_check
,use_only_cookies
,use_trans_sid
,trans_sid_hosts
,trans_sid_tags
,sid_bits_per_character
andsid_length
options toNativeSessionStorage
- Deprecate the
sizeLimit
option ofAbstractQuery
, the option is unused
RedisStore
usesEVALSHA
overEVAL
when evaluating LUA scripts
-
Deprecate
TransportFactoryTestCase
, extendAbstractTransportFactoryTestCase
insteadThe
testIncompleteDsnException()
test is no longer provided by default. If you make use of it by implementing theincompleteDsnProvider()
data providers, you now need to use theIncompleteDsnTestTrait
.
-
Deprecate
TransportFactoryTestCase
, extendAbstractTransportFactoryTestCase
insteadThe
testIncompleteDsnException()
andtestMissingRequiredOptionException()
tests are no longer provided by default. If you make use of them (i.e. by implementing theincompleteDsnProvider()
ormissingRequiredOptionProvider()
data providers), you now need to use theIncompleteDsnTestTrait
orMissingRequiredOptionTestTrait
respectively.
- Deprecate the
AttributeClassLoader::$routeAnnotationClass
property, useAttributeClassLoader::setRouteAttributeClass()
instead
- Deprecate argument
$secret
ofRememberMeToken
andRememberMeAuthenticator
, the argument is unused - Deprecate passing an empty string as
$userIdentifier
argument toUserBadge
constructor - Deprecate returning an empty string in
UserInterface::getUserIdentifier()
- Deprecate the
csv_escape_char
context option ofCsvEncoder
, theCsvEncoder::ESCAPE_CHAR_KEY
constant and theCsvEncoderContextBuilder::withEscapeChar()
method, following its deprecation in PHP 8.4 - Deprecate
AdvancedNameConverterInterface
, useNameConverterInterface
instead
-
Deprecate
ProviderFactoryTestCase
, extendAbstractProviderFactoryTestCase
insteadThe
testIncompleteDsnException()
test is no longer provided by default. If you make use of it by implementing theincompleteDsnProvider()
data providers, you now need to use theIncompleteDsnTestTrait
. -
Deprecate passing an escape character to
CsvFileLoader::setCsvControl()
, following its deprecation in PHP 8.4
- Deprecate passing a tag to the constructor of
FormThemeNode
- Rename
Type::isA()
toType::isIdentifiedBy()
andType::is()
toType::isSatisfiedBy()
- Remove
Type::__call()
- Remove
Type::getBaseType()
, useWrappingTypeInterface::getWrappedType()
instead - Remove
Type::asNonNullable()
, useNullableType::getWrappedType()
instead - Remove
CompositeTypeTrait
- [BC BREAK]
RequestParserInterface::parse()
return type changed fromRemoteEvent|null
toRemoteEvent|array<RemoteEvent>|null
. Projects relying on theWebhookController
of the component are not affected by the BC break. Classes already implementing this interface are unaffected. Custom callers of this method will need to be updated to handle the extra array return type.
- Deprecate parsing duplicate mapping keys whose value is
null