2019-11-10 16:23:41 +00:00
UPGRADE FROM 5.0 to 5.1
=======================
2020-02-25 21:52:48 +00:00
Config
------
* The signature of method `NodeDefinition::setDeprecated()` has been updated to `NodeDefinition::setDeprecation(string $package, string $version, string $message)` .
* The signature of method `BaseNode::setDeprecated()` has been updated to `BaseNode::setDeprecation(string $package, string $version, string $message)` .
* Passing a null message to `BaseNode::setDeprecated()` to un-deprecate a node is deprecated
2020-04-04 20:42:42 +01:00
* Deprecated `BaseNode::getDeprecationMessage()` , use `BaseNode::getDeprecation()` instead
2020-02-25 21:52:48 +00:00
2020-01-20 15:05:06 +00:00
Console
-------
* `Command::setHidden()` is final since Symfony 5.1
2020-02-18 17:12:00 +00:00
DependencyInjection
-------------------
* The signature of method `Definition::setDeprecated()` has been updated to `Definition::setDeprecation(string $package, string $version, string $message)` .
* The signature of method `Alias::setDeprecated()` has been updated to `Alias::setDeprecation(string $package, string $version, string $message)` .
* The signature of method `DeprecateTrait::deprecate()` has been updated to `DeprecateTrait::deprecation(string $package, string $version, string $message)` .
2020-02-06 20:02:01 +00:00
* Deprecated the `Psr\Container\ContainerInterface` and `Symfony\Component\DependencyInjection\ContainerInterface` aliases of the `service_container` service,
configure them explicitly instead.
2020-04-04 20:42:42 +01:00
* Deprecated `Definition::getDeprecationMessage()` , use `Definition::getDeprecation()` instead.
* Deprecated `Alias::getDeprecationMessage()` , use `Alias::getDeprecation()` instead.
2020-04-08 15:36:57 +01:00
* The `inline()` function from the PHP-DSL has been deprecated, use `service()` instead
2020-02-18 17:12:00 +00:00
2020-01-11 14:48:32 +00:00
Dotenv
------
* Deprecated passing `$usePutenv` argument to Dotenv's constructor, use `Dotenv::usePutenv()` instead.
2019-12-13 21:39:36 +00:00
EventDispatcher
---------------
* Deprecated `LegacyEventDispatcherProxy` . Use the event dispatcher without the proxy.
2019-07-25 17:09:28 +01:00
Form
----
* Implementing the `FormConfigInterface` without implementing the `getIsEmptyCallback()` method
is deprecated. The method will be added to the interface in 6.0.
* Implementing the `FormConfigBuilderInterface` without implementing the `setIsEmptyCallback()` method
is deprecated. The method will be added to the interface in 6.0.
2019-04-07 21:08:39 +01:00
* Added argument `callable|null $filter` to `ChoiceListFactoryInterface::createListFromChoices()` and `createListFromLoader()` - not defining them is deprecated.
2020-04-11 19:06:08 +01:00
* Using `Symfony\Component\Form\Extension\Validator\Util\ServerParams` class is deprecated, use its parent `Symfony\Component\Form\Util\ServerParams` instead.
2019-07-25 17:09:28 +01:00
2019-11-10 16:23:41 +00:00
FrameworkBundle
---------------
2020-03-23 11:52:41 +00:00
* Deprecated passing a `RouteCollectionBuilder` to `MicroKernelTrait::configureRoutes()` , type-hint `RoutingConfigurator` instead
2020-01-11 18:12:40 +00:00
* Deprecated *not* setting the "framework.router.utf8" configuration option as it will default to `true` in Symfony 6.0
2020-03-28 13:33:33 +00:00
* Deprecated `session.attribute_bag` service and `session.flash_bag` service.
2019-11-10 16:23:41 +00:00
2019-12-03 06:17:06 +00:00
HttpFoundation
--------------
* Deprecate `Response::create()` , `JsonResponse::create()` ,
`RedirectResponse::create()` , and `StreamedResponse::create()` methods (use
`__construct()` instead)
2020-02-20 19:50:53 +00:00
* Made the Mime component an optional dependency
2019-12-03 06:17:06 +00:00
2020-03-29 15:22:37 +01:00
HttpKernel
----------
2020-03-25 17:08:12 +00:00
* Made `WarmableInterface::warmUp()` return a list of classes or files to preload on PHP 7.4+
not returning an array is deprecated
2020-03-29 15:22:37 +01:00
* Deprecated support for `service:action` syntax to reference controllers. Use `serviceOrFqcn::method` instead.
2020-03-20 12:05:35 +00:00
Mailer
------
* Deprecated passing Mailgun headers without their "h:" prefix.
2020-01-21 16:10:46 +00:00
Messenger
---------
* Deprecated AmqpExt transport. It has moved to a separate package. Run `composer require symfony/amqp-messenger` to use the new classes.
* Deprecated Doctrine transport. It has moved to a separate package. Run `composer require symfony/doctrine-messenger` to use the new classes.
* Deprecated RedisExt transport. It has moved to a separate package. Run `composer require symfony/redis-messenger` to use the new classes.
2019-12-10 15:47:33 +00:00
* Deprecated use of invalid options in Redis and AMQP connections.
2020-03-24 09:55:43 +00:00
* Deprecated *not* declaring a `\Throwable` argument in `RetryStrategyInterface::isRetryable()`
* Deprecated *not* declaring a `\Throwable` argument in `RetryStrategyInterface::getWaitingTime()`
2020-01-21 16:10:46 +00:00
2020-01-02 10:02:56 +00:00
Notifier
--------
* [BC BREAK] The `ChatMessage::fromNotification()` method's `$recipient` and `$transport`
arguments were removed.
* [BC BREAK] The `EmailMessage::fromNotification()` and `SmsMessage::fromNotification()`
methods' `$transport` argument was removed.
2020-04-04 20:42:42 +01:00
OptionsResolver
---------------
* The signature of method `OptionsResolver::setDeprecated()` has been updated to `OptionsResolver::setDeprecated(string $option, string $package, string $version, $message)` .
* Deprecated `OptionsResolverIntrospector::getDeprecationMessage()` , use `OptionsResolverIntrospector::getDeprecation()` instead.
2020-03-11 22:37:55 +00:00
PhpUnitBridge
-------------
* Deprecated the `@expectedDeprecation` annotation, use the `ExpectDeprecationTrait::expectDeprecation()` method instead.
2019-11-10 16:23:41 +00:00
Routing
-------
* Deprecated `RouteCollectionBuilder` in favor of `RoutingConfigurator` .
2020-02-05 17:53:43 +00:00
* Added argument `$priority` to `RouteCollection::add()`
2020-02-25 10:55:47 +00:00
* Deprecated the `RouteCompiler::REGEX_DELIMITER` constant
2020-01-16 19:30:36 +00:00
2020-02-28 11:18:46 +00:00
Security
--------
* Deprecated `ROLE_PREVIOUS_ADMIN` role in favor of `IS_IMPERSONATOR` attribute.
*before*
```twig
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
< a href = "" > Exit impersonation< / a >
{% endif %}
```
*after*
```twig
{% if is_granted('IS_IMPERSONATOR') %}
< a href = "" > Exit impersonation< / a >
{% endif %}
```
2020-03-22 11:58:26 +00:00
* Deprecated `LogoutSuccessHandlerInterface` and `LogoutHandlerInterface` , register a listener on the `LogoutEvent` event instead.
* Deprecated `DefaultLogoutSuccessHandler` in favor of `DefaultLogoutListener` .
2020-01-16 19:30:36 +00:00
Yaml
----
* Deprecated using the `!php/object` and `!php/const` tags without a value.