2017-11-23 10:49:18 +00:00
UPGRADE FROM 4.0 to 4.1
=======================
2017-04-04 15:56:32 +01:00
Config
------
* Implementing `ParentNodeDefinitionInterface` without the `getChildNodeDefinitions()` method
2018-02-19 11:42:56 +00:00
is deprecated.
2017-04-04 15:56:32 +01:00
2017-12-05 11:42:44 +00:00
Console
-------
* Deprecated the `setCrossingChar()` method in favor of the `setDefaultCrossingChar()` method in `TableStyle` .
2018-03-03 10:07:55 +00:00
* The `Processor` class has been made final
2018-03-28 12:25:12 +01:00
* Deprecated the `setHorizontalBorderChar()` method in favor of the `setDefaultCrossingChars()` method in `TableStyle` .
* Deprecated the `getHorizontalBorderChar()` method in favor of the `getBorderChars()` method in `TableStyle` .
* Deprecated the `setVerticalBorderChar()` method in favor of the `setVerticalBorderChars()` method in `TableStyle` .
* Deprecated the `getVerticalBorderChar()` method in favor of the `getBorderChars()` method in `TableStyle` .
2018-04-06 17:17:35 +01:00
* Added support for `iterable` messages in `write` and `writeln` methods of `Symfony\Component\Console\Output\OutputInterface` .
If you have a custom implementation of the interface, you should make sure it works with iterable as well.
2017-12-05 11:42:44 +00:00
2018-03-22 11:53:13 +00:00
DependencyInjection
-------------------
* Deprecated the `TypedReference::canBeAutoregistered()` and `TypedReference::getRequiringClass()` methods.
2018-04-25 10:49:31 +01:00
* Deprecated support for auto-discovered extension configuration class which does not implement `ConfigurationInterface` .
2018-03-22 11:53:13 +00:00
2017-10-01 21:31:12 +01:00
EventDispatcher
---------------
2018-02-19 11:42:56 +00:00
* The `TraceableEventDispatcherInterface` has been deprecated.
2017-10-01 21:31:12 +01:00
2018-04-22 07:16:01 +01:00
Form
----
* Deprecated the `ChoiceLoaderInterface` implementation in `CountryType` ,
`LanguageType` , `LocaleType` and `CurrencyType` , use the `choice_loader`
option instead.
Before:
```php
class MyCountryType extends CountryType
{
public function loadChoiceList()
{
// override the method
}
}
```
After:
```php
class MyCountryType extends AbstractType
{
public function getParent()
{
return CountryType::class;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefault('choice_loader', ...); // override the option instead
}
}
```
2018-05-31 11:16:29 +01:00
* Added `help` option to the form field. If you have custom Form extension for it, you should remove it.
Also remove it from the custom form theme.
2018-05-27 17:59:28 +01:00
2017-11-10 08:09:11 +00:00
FrameworkBundle
---------------
2018-02-08 02:17:50 +00:00
* Deprecated `bundle:controller:action` and `service:action` syntaxes to reference controllers. Use `serviceOrFqcn::method`
instead where `serviceOrFqcn` is either the service ID when using controllers as services or the FQCN of the controller.
Before:
```yml
bundle_controller:
path: /
defaults:
_controller: FrameworkBundle:Redirect:redirect
service_controller:
path: /
defaults:
_controller: app.my_controller:myAction
```
After:
```yml
bundle_controller:
path: /
defaults:
_controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
service_controller:
path: /
defaults:
_controller: app.my_controller::myAction
2018-02-23 08:25:41 +00:00
```
2018-02-08 02:17:50 +00:00
* Deprecated `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser`
2018-02-23 08:21:43 +00:00
* Warming up a router in `RouterCacheWarmer` that does not implement the `WarmableInterface` is deprecated and will not be
supported anymore in 5.0.
2018-02-19 11:42:56 +00:00
* The `RequestDataCollector` class has been deprecated. Use the `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector` class instead.
2017-11-10 08:09:11 +00:00
2017-12-12 19:03:06 +00:00
HttpFoundation
--------------
2018-02-19 11:42:56 +00:00
* Passing the file size to the constructor of the `UploadedFile` class is deprecated.
2017-12-12 19:03:06 +00:00
* The `getClientSize()` method of the `UploadedFile` class is deprecated. Use `getSize()` instead.
2018-03-16 14:42:26 +00:00
* Deprecated `Symfony\Component\HttpFoundation\Request::getSession()` when no session has been set. Use `Symfony\Component\HttpFoundation\Request::hasSession()` instead.
2017-12-12 19:03:06 +00:00
2017-11-23 10:49:18 +00:00
Security
--------
2018-02-19 11:42:56 +00:00
* The `ContextListener::setLogoutOnUserChange()` method is deprecated.
2017-12-11 09:34:00 +00:00
* Using the `AdvancedUserInterface` is now deprecated. To use the existing
functionality, create a custom user-checker based on the
2018-02-19 11:42:56 +00:00
`Symfony\Component\Security\Core\User\UserChecker` .
2018-03-10 19:15:45 +00:00
* `AuthenticationUtils::getLastUsername()` now always returns a string.
2018-04-04 19:31:33 +01:00
* The `ExpressionVoter::addExpressionLanguageProvider()` method is deprecated. Register the provider directly on the injected ExpressionLanguage instance instead.
2017-11-23 10:49:18 +00:00
SecurityBundle
--------------
2018-02-19 11:42:56 +00:00
* The `logout_on_user_change` firewall option is deprecated.
2018-02-27 13:18:33 +00:00
* The `switch_user.stateless` firewall option is deprecated, use the `stateless` option instead.
2018-02-19 11:42:56 +00:00
* The `SecurityUserValueResolver` class is deprecated, use
2017-12-20 14:22:44 +00:00
`Symfony\Component\Security\Http\Controller\UserValueResolver` instead.
2017-11-23 10:49:18 +00:00
2018-03-07 13:51:08 +00:00
Serializer
----------
* Decoding XML with `XmlEncoder` now ignores comment node types by default.
2017-11-23 10:49:18 +00:00
Translation
-----------
2018-02-19 11:42:56 +00:00
* The `FileDumper::setBackup()` method is deprecated.
* The `TranslationWriter::disableBackup()` method is deprecated.
2017-10-30 06:24:47 +00:00
2018-01-12 21:15:14 +00:00
TwigBundle
----------
* Deprecated relying on the default value (`false`) of the `twig.strict_variables` configuration option. You should use `%kernel.debug%` explicitly instead, which will be the new default in 5.0.
2017-10-05 16:50:07 +01:00
Validator
--------
2018-02-19 11:42:56 +00:00
* The `Email::__construct()` 'strict' property is deprecated. Use 'mode'=>"strict" instead.
* Calling `EmailValidator::__construct()` method with a boolean parameter is deprecated, use `EmailValidator("strict")` instead.
* Deprecated the `checkDNS` and `dnsMessage` options of the `Url` constraint.
2017-10-05 16:50:07 +01:00
2017-10-30 06:24:47 +00:00
Workflow
--------
2018-04-29 17:31:06 +01:00
* Deprecated the `DefinitionBuilder::reset()` method, use the `clear()` one instead.
2017-10-30 06:24:47 +00:00
* Deprecated the `add` method in favor of the `addWorkflow` method in `Workflow\Registry` .
* Deprecated `SupportStrategyInterface` in favor of `WorkflowSupportStrategyInterface` .
* Deprecated the class `ClassInstanceSupportStrategy` in favor of the class `InstanceOfSupportStrategy` .
2018-02-08 17:13:25 +00:00
* Deprecated passing the workflow name as 4th parameter of `Event` constructor in favor of the workflow itself.