2019-11-10 16:23:41 +00:00
UPGRADE FROM 5.x to 6.0
=======================
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 not supported anymore.
2020-04-04 20:42:42 +01:00
* Removed `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()` has a default value (`true`) for `$hidden` parameter
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
* Removed 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
* Removed `Definition::getDeprecationMessage()` , use `Definition::getDeprecation()` instead.
* Removed `Alias::getDeprecationMessage()` , use `Alias::getDeprecation()` instead.
2020-05-13 07:28:35 +01:00
* The `inline()` function from the PHP-DSL has been removed, use `inline_service()` instead.
* The `ref()` function from the PHP-DSL has been removed, use `service()` instead.
2020-06-21 16:48:06 +01:00
* Removed `Definition::setPrivate()` and `Alias::setPrivate()` , use `setPublic()` instead
2020-02-18 17:12:00 +00:00
2020-01-11 14:48:32 +00:00
Dotenv
------
* Removed argument `$usePutenv` from Dotenv's constructor, use `Dotenv::usePutenv()` instead.
2019-12-13 21:39:36 +00:00
EventDispatcher
---------------
* Removed `LegacyEventDispatcherProxy` . Use the event dispatcher without the proxy.
2019-07-25 17:09:28 +01:00
Form
----
2020-05-05 16:23:23 +01:00
* The default value of the `rounding_mode` option of the `PercentType` has been changed to `\NumberFormatter::ROUND_HALFUP` .
* The default rounding mode of the `PercentToLocalizedStringTransformer` has been changed to `\NumberFormatter::ROUND_HALFUP` .
2019-07-25 17:09:28 +01:00
* Added the `getIsEmptyCallback()` method to the `FormConfigInterface` .
* Added the `setIsEmptyCallback()` method to the `FormConfigBuilderInterface` .
2019-04-07 21:08:39 +01:00
* Added argument `callable|null $filter` to `ChoiceListFactoryInterface::createListFromChoices()` and `createListFromLoader()` .
2020-04-11 19:06:08 +01:00
* The `Symfony\Component\Form\Extension\Validator\Util\ServerParams` class has been removed, use its parent `Symfony\Component\Form\Util\ServerParams` instead.
2020-05-05 16:23:23 +01:00
* The `NumberToLocalizedStringTransformer::ROUND_*` constants have been removed, use `\NumberFormatter::ROUND_*` instead.
2020-08-27 11:09:23 +01:00
* Removed `PropertyPathMapper` in favor of `DataMapper` and `PropertyPathAccessor` .
2019-07-25 17:09:28 +01:00
2019-11-10 16:23:41 +00:00
FrameworkBundle
---------------
2019-12-07 15:49:34 +00:00
* `MicroKernelTrait::configureRoutes()` is now always called with a `RoutingConfigurator`
2020-01-11 18:12:40 +00:00
* The "framework.router.utf8" configuration option defaults to `true`
2020-03-28 13:33:33 +00:00
* Removed `session.attribute_bag` service and `session.flash_bag` service.
2020-05-04 18:01:18 +01:00
* The `form.factory` , `form.type.file` , `translator` , `security.csrf.token_manager` , `serializer` ,
`cache_clearer` , `filesystem` and `validator` services are now private.
2019-11-10 16:23:41 +00:00
2019-12-03 06:17:06 +00:00
HttpFoundation
--------------
* Removed `Response::create()` , `JsonResponse::create()` ,
`RedirectResponse::create()` , and `StreamedResponse::create()` methods (use
`__construct()` instead)
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+
2020-03-29 15:22:37 +01:00
* Removed support for `service:action` syntax to reference controllers. Use `serviceOrFqcn::method` instead.
2019-12-23 16:57:23 +00:00
Inflector
---------
* The component has been removed, use `EnglishInflector` from the String component instead.
2020-03-15 22:41:30 +00:00
Mailer
------
* Removed the `SesApiTransport` class. Use `SesApiAsyncAwsTransport` instead.
* Removed the `SesHttpTransport` class. Use `SesHttpAsyncAwsTransport` instead.
2020-01-21 16:10:46 +00:00
Messenger
---------
* Removed AmqpExt transport. Run `composer require symfony/amqp-messenger` to keep the transport in your application.
* Removed Doctrine transport. Run `composer require symfony/doctrine-messenger` to keep the transport in your application.
* Removed RedisExt transport. Run `composer require symfony/redis-messenger` to keep the transport in your application.
2019-12-10 15:47:33 +00:00
* Use of invalid options in Redis and AMQP connections now throws an error.
2020-03-24 09:55:43 +00:00
* The signature of method `RetryStrategyInterface::isRetryable()` has been updated to `RetryStrategyInterface::isRetryable(Envelope $message, \Throwable $throwable = null)` .
* The signature of method `RetryStrategyInterface::getWaitingTime()` has been updated to `RetryStrategyInterface::getWaitingTime(Envelope $message, \Throwable $throwable = null)` .
2020-01-21 16:10:46 +00:00
2020-06-09 16:20:00 +01:00
Mime
----
* Removed `Address::fromString()` , use `Address::create()` instead
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)` .
* Removed `OptionsResolverIntrospector::getDeprecationMessage()` , use `OptionsResolverIntrospector::getDeprecation()` instead.
2020-03-11 22:37:55 +00:00
PhpUnitBridge
-------------
* Removed support for `@expectedDeprecation` annotations, use the `ExpectDeprecationTrait::expectDeprecation()` method instead.
2019-06-21 16:41:54 +01:00
PropertyAccess
--------------
* Dropped support of a boolean as the first argument of `PropertyAccessor::__construct()` .
Pass a combination of bitwise flags instead.
PropertyInfo
------------
* Dropped the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()` in favor of `enable_magic_methods_extraction` .
2019-11-10 16:23:41 +00:00
Routing
-------
* Removed `RouteCollectionBuilder` .
2020-02-05 17:53:43 +00:00
* Added argument `$priority` to `RouteCollection::add()`
2020-02-25 10:55:47 +00:00
* Removed the `RouteCompiler::REGEX_DELIMITER` constant
2020-02-28 11:18:46 +00:00
Security
--------
* Removed `ROLE_PREVIOUS_ADMIN` role in favor of `IS_IMPERSONATOR` attribute
2020-03-22 11:58:26 +00:00
* Removed `LogoutSuccessHandlerInterface` and `LogoutHandlerInterface` , register a listener on the `LogoutEvent` event instead.
* Removed `DefaultLogoutSuccessHandler` in favor of `DefaultLogoutListener` .
2020-05-16 11:36:39 +01:00
* Added a `logout(Request $request, Response $response, TokenInterface $token)` method to the `RememberMeServicesInterface` .
2020-08-25 13:54:02 +01:00
* Removed `setProviderKey()` /`getProviderKey()` in favor of `setFirewallName()/getFirewallName()`
in `PreAuthenticatedToken` , `RememberMeToken` , `SwitchUserToken` , `UsernamePasswordToken` ,
`DefaultAuthenticationSuccessHandler` .
* Removed the `AbstractRememberMeServices::$providerKey` property in favor of `AbstractRememberMeServices::$firewallName`
2020-04-21 07:45:37 +01:00
2020-06-24 15:32:54 +01:00
TwigBundle
----------
* The `twig` service is now private.
2020-05-15 09:30:39 +01:00
Validator
---------
* Removed the `allowEmptyString` option from the `Length` constraint.
Before:
```php
use Symfony\Component\Validator\Constraints as Assert;
/**
* @Assert \Length(min=5, allowEmptyString=true)
*/
```
After:
```php
use Symfony\Component\Validator\Constraints as Assert;
/**
* @Assert \AtLeastOneOf({
* @Assert \Blank(),
* @Assert \Length(min=5)
* })
*/
```
2020-04-21 07:45:37 +01:00
Yaml
----
2019-12-04 11:12:45 +00:00
* Added support for parsing numbers prefixed with `0o` as octal numbers.
* Removed support for parsing numbers starting with `0` as octal numbers. They will be parsed as strings. Prefix numbers with `0o`
so that they are parsed as octal numbers.
Before:
```yaml
Yaml::parse('072');
```
After:
```yaml
Yaml::parse('0o72');
```
2020-04-21 07:45:37 +01:00
* Removed support for using the `!php/object` and `!php/const` tags without a value.