- Implementing
ParentNodeDefinitionInterfacewithout thegetChildNodeDefinitions()method is deprecated.
- Deprecated the
setCrossingChar()method in favor of thesetDefaultCrossingChar()method inTableStyle. - The
Processorclass has been made final - Deprecated the
setHorizontalBorderChar()method in favor of thesetDefaultCrossingChars()method inTableStyle. - Deprecated the
getHorizontalBorderChar()method in favor of thegetBorderChars()method inTableStyle. - Deprecated the
setVerticalBorderChar()method in favor of thesetVerticalBorderChars()method inTableStyle. - Deprecated the
getVerticalBorderChar()method in favor of thegetBorderChars()method inTableStyle. - Added support for
iterablemessages inwriteandwritelnmethods ofSymfony\Component\Console\Output\OutputInterface. If you have a custom implementation of the interface, you should make sure it works with iterable as well.
- Deprecated the
TypedReference::canBeAutoregistered()andTypedReference::getRequiringClass()methods. - Deprecated support for auto-discovered extension configuration class which does not implement
ConfigurationInterface.
- The
TraceableEventDispatcherInterfacehas been deprecated.
-
Deprecated the
ChoiceLoaderInterfaceimplementation inCountryType,LanguageType,LocaleTypeandCurrencyType, use thechoice_loaderoption instead.Before:
class MyCountryType extends CountryType { public function loadChoiceList() { // override the method } }
After:
class MyCountryType extends AbstractType { public function getParent() { return CountryType::class; } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefault('choice_loader', ...); // override the option instead } }
-
Added
helpoption to the form field. If you have custom Form extension for it, you should remove it. Also remove it from the custom form theme.
-
Deprecated
bundle:controller:actionandservice:actionsyntaxes to reference controllers. UseserviceOrFqcn::methodinstead whereserviceOrFqcnis either the service ID when using controllers as services or the FQCN of the controller.Before:
bundle_controller: path: / defaults: _controller: FrameworkBundle:Redirect:redirect service_controller: path: / defaults: _controller: app.my_controller:myAction
After:
bundle_controller: path: / defaults: _controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction service_controller: path: / defaults: _controller: app.my_controller::myAction
-
Deprecated
Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser -
Warming up a router in
RouterCacheWarmerthat does not implement theWarmableInterfaceis deprecated and will not be supported anymore in 5.0. -
The
RequestDataCollectorclass has been deprecated. Use theSymfony\Component\HttpKernel\DataCollector\RequestDataCollectorclass instead.
- Passing the file size to the constructor of the
UploadedFileclass is deprecated. - The
getClientSize()method of theUploadedFileclass is deprecated. UsegetSize()instead. - Deprecated
Symfony\Component\HttpFoundation\Request::getSession()when no session has been set. UseSymfony\Component\HttpFoundation\Request::hasSession()instead.
- The
ContextListener::setLogoutOnUserChange()method is deprecated. - Using the
AdvancedUserInterfaceis now deprecated. To use the existing functionality, create a custom user-checker based on theSymfony\Component\Security\Core\User\UserChecker. AuthenticationUtils::getLastUsername()now always returns a string.- The
ExpressionVoter::addExpressionLanguageProvider()method is deprecated. Register the provider directly on the injected ExpressionLanguage instance instead.
- The
logout_on_user_changefirewall option is deprecated. - The
switch_user.statelessfirewall option is deprecated, use thestatelessoption instead. - The
SecurityUserValueResolverclass is deprecated, useSymfony\Component\Security\Http\Controller\UserValueResolverinstead.
- Decoding XML with
XmlEncodernow ignores comment node types by default.
- The
FileDumper::setBackup()method is deprecated. - The
TranslationWriter::disableBackup()method is deprecated.
- Deprecated relying on the default value (
false) of thetwig.strict_variablesconfiguration option. You should use%kernel.debug%explicitly instead, which will be the new default in 5.0.
- The
Email::__construct()'strict' property is deprecated. Use 'mode'=>"strict" instead. - Calling
EmailValidator::__construct()method with a boolean parameter is deprecated, useEmailValidator("strict")instead. - Deprecated the
checkDNSanddnsMessageoptions of theUrlconstraint.
- Deprecated the
DefinitionBuilder::reset()method, use theclear()one instead. - Deprecated the
addmethod in favor of theaddWorkflowmethod inWorkflow\Registry. - Deprecated
SupportStrategyInterfacein favor ofWorkflowSupportStrategyInterface. - Deprecated the class
ClassInstanceSupportStrategyin favor of the classInstanceOfSupportStrategy. - Deprecated passing the workflow name as 4th parameter of
Eventconstructor in favor of the workflow itself.