2017-11-23 10:49:18 +00:00
UPGRADE FROM 4.x to 5.0
=======================
2018-08-29 10:05:16 +01:00
BrowserKit
----------
2019-03-12 20:10:42 +00:00
* Removed `Client` , use `AbstractBrowser` instead
2019-01-14 14:42:11 +00:00
* Removed the possibility to extend `Response` by making it final.
2019-01-14 14:23:01 +00:00
* Removed `Response::buildHeader()`
2019-01-14 14:19:12 +00:00
* Removed `Response::getStatus()` , use `Response::getStatusCode()` instead
2018-08-29 10:05:16 +01:00
* The `Client::submit()` method has a new `$serverParameters` argument.
2018-04-23 17:02:04 +01:00
Cache
-----
* Removed `CacheItem::getPreviousTags()` , use `CacheItem::getMetadata()` instead.
2018-11-15 20:07:46 +00:00
* Removed all PSR-16 adapters, use `Psr16Cache` or `Symfony\Contracts\Cache\CacheInterface` implementations instead.
2019-03-13 16:05:30 +00:00
* Removed `SimpleCacheAdapter` , use `Psr16Adapter` instead.
2019-06-25 16:29:23 +01:00
* Added argument `$prefix` to `AdapterInterface::clear()`
2018-04-23 17:02:04 +01:00
2017-04-04 15:56:32 +01:00
Config
------
2018-06-02 19:20:34 +01:00
* Dropped support for constructing a `TreeBuilder` without passing root node information.
2017-04-04 15:56:32 +01:00
* Added the `getChildNodeDefinitions()` method to `ParentNodeDefinitionInterface` .
2018-03-03 10:07:55 +00:00
* The `Processor` class has been made final
2018-07-22 21:38:19 +01:00
* Removed `FileLoaderLoadException` , use `LoaderLoadException` instead.
2018-10-14 13:18:54 +01:00
* Using environment variables with `cannotBeEmpty()` if the value is validated with `validate()` will throw an exception.
2019-04-09 00:07:36 +01:00
* Removed the `root()` method in `TreeBuilder` , pass the root node information to the constructor instead
2017-04-04 15:56:32 +01:00
2017-12-05 11:42:44 +00:00
Console
-------
2019-09-01 18:33:46 +01:00
* Removed support for finding hidden commands using an abbreviation, use the full name instead
2017-12-05 11:42:44 +00:00
* Removed the `setCrossingChar()` method in favor of the `setDefaultCrossingChar()` method in `TableStyle` .
2018-03-28 12:25:12 +01:00
* Removed the `setHorizontalBorderChar()` method in favor of the `setDefaultCrossingChars()` method in `TableStyle` .
* Removed the `getHorizontalBorderChar()` method in favor of the `getBorderChars()` method in `TableStyle` .
* Removed the `setVerticalBorderChar()` method in favor of the `setVerticalBorderChars()` method in `TableStyle` .
* Removed the `getVerticalBorderChar()` method in favor of the `getBorderChars()` method in `TableStyle` .
2019-09-30 19:52:02 +01:00
* Removed support for returning `null` from `Command::execute()` , return `0` instead
2018-07-03 12:59:14 +01:00
* The `ProcessHelper::run()` method takes the command as an array of arguments.
Before:
```php
$processHelper->run($output, 'ls -l');
```
After:
```php
$processHelper->run($output, array('ls', '-l'));
// alternatively, when a shell wrapper is required
$processHelper->run($output, Process::fromShellCommandline('ls -l'));
```
2019-07-10 03:50:49 +01:00
Debug
-----
2019-08-08 08:36:09 +01:00
* Removed the `Debug` class, use the one from the `ErrorRenderer` component instead
* Removed the `FlattenException` class, use the one from the `ErrorRenderer` component instead
2019-09-24 14:52:36 +01:00
* Removed the component in favor of the `ErrorHandler` component
2019-07-10 03:50:49 +01:00
2018-03-22 11:53:13 +00:00
DependencyInjection
-------------------
* Removed the `TypedReference::canBeAutoregistered()` and `TypedReference::getRequiringClass()` methods.
2018-04-25 10:49:31 +01:00
* Removed support for auto-discovered extension configuration class which does not implement `ConfigurationInterface` .
2019-05-03 10:45:06 +01:00
* Removed support for non-string default env() parameters
Before:
```yaml
parameters:
env(NAME): 1.5
```
After:
```yaml
parameters:
env(NAME): '1.5'
```
2018-03-22 11:53:13 +00:00
2019-05-19 12:51:44 +01:00
* Removed support for short factories and short configurators in Yaml
Before:
```yaml
services:
my_service:
factory: factory_service:method
```
After:
```yaml
services:
my_service:
factory: ['@factory_service', method]
```
2019-04-29 22:59:34 +01:00
* Removed `tagged` in favor of `tagged_iterator`
Before:
```yaml
services:
App\Handler:
tags: ['app.handler']
App\HandlerCollection:
arguments: [!tagged app.handler]
```
After:
```yaml
services:
App\Handler:
tags: ['app.handler']
2019-06-28 14:18:47 +01:00
2019-04-29 22:59:34 +01:00
App\HandlerCollection:
arguments: [!tagged_iterator app.handler]
```
2019-05-19 12:51:44 +01:00
2018-07-03 15:44:43 +01:00
DoctrineBridge
--------------
2019-07-30 18:32:27 +01:00
* Removed the possibility to inject `ClassMetadataFactory` in `DoctrineExtractor` , an instance of `EntityManagerInterface` should be
2018-07-03 15:44:43 +01:00
injected instead
2019-04-07 11:04:56 +01:00
* Passing an `IdReader` to the `DoctrineChoiceLoader` when the query cannot be optimized with single id field will throw an exception, pass `null` instead
2019-06-05 23:09:42 +01:00
* Not passing an `IdReader` to the `DoctrineChoiceLoader` when the query can be optimized with single id field will not apply any optimization
2019-07-30 18:32:27 +01:00
* The `RegistryInterface` has been removed.
2019-09-24 14:52:36 +01:00
* Added a new `getMetadataDriverClass` method in `AbstractDoctrineExtension` to replace class parameters.
2019-04-07 11:04:56 +01:00
2018-08-29 10:05:16 +01:00
DomCrawler
----------
* The `Crawler::children()` method has a new `$selector` argument.
2019-04-10 21:28:30 +01:00
Dotenv
------
* First parameter `$usePutenv` of `Dotenv::__construct()` now default to `false` .
2017-10-01 21:31:12 +01:00
EventDispatcher
---------------
* The `TraceableEventDispatcherInterface` has been removed.
2018-10-18 21:44:28 +01:00
* The signature of the `EventDispatcherInterface::dispatch()` method has been updated to `dispatch($event, string $eventName = null)`
2019-03-29 18:41:30 +00:00
* The `Event` class has been removed, use `Symfony\Contracts\EventDispatcher\Event` instead
2017-10-01 21:31:12 +01:00
2018-12-21 10:04:03 +00:00
Filesystem
----------
2019-07-02 07:30:32 +01:00
* The `Filesystem::isAbsolutePath()` method no longer supports `null` in the `$file` argument.
2018-12-21 10:04:03 +00:00
* The `Filesystem::dumpFile()` method no longer supports arrays in the `$content` argument.
* The `Filesystem::appendToFile()` method no longer supports arrays in the `$content` argument.
2018-08-29 10:05:16 +01:00
Finder
------
* The `Finder::sortByName()` method has a new `$useNaturalSort` argument.
2018-09-23 20:17:20 +01:00
Form
----
2019-03-12 09:26:19 +00:00
2019-07-24 15:46:11 +01:00
* Removed support for using different values for the "model_timezone" and "view_timezone" options of the `TimeType`
without configuring a reference date.
2019-06-07 11:53:37 +01:00
* Removed support for using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` .
2018-10-04 12:05:56 +01:00
* Removed support for using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled.
2019-07-03 10:53:08 +01:00
* Using names for buttons that do not start with a lowercase letter, a digit, or an underscore leads to an exception.
2018-10-24 14:24:37 +01:00
* Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons leads to an
exception.
2018-10-04 11:32:57 +01:00
* Using the `date_format` , `date_widget` , and `time_widget` options of the `DateTimeType` when the `widget` option is
set to `single_text` is not supported anymore.
2017-10-12 09:26:52 +01:00
* The `getExtendedType()` method was removed from the `FormTypeExtensionInterface` . It is replaced by the the static
`getExtendedTypes()` method which must return an iterable of extended types.
Before:
```php
class FooTypeExtension extends AbstractTypeExtension
{
public function getExtendedType()
{
return FormType::class;
}
// ...
}
```
After:
```php
class FooTypeExtension extends AbstractTypeExtension
{
public static function getExtendedTypes(): iterable
{
return array(FormType::class);
}
// ...
}
```
2018-09-23 20:17:20 +01:00
* The `scale` option was removed from the `IntegerType` .
2018-09-24 09:22:53 +01:00
* The `$scale` argument of the `IntegerToLocalizedStringTransformer` was removed.
2018-10-15 09:13:09 +01:00
* Calling `FormRenderer::searchAndRenderBlock` for fields which were already rendered
throws an exception instead of returning empty strings:
Before:
```twig
{% for field in fieldsWithPotentialDuplicates %}
{{ form_widget(field) }}
{% endfor %}
```
After:
```twig
{% for field in fieldsWithPotentialDuplicates if not field.rendered %}
{{ form_widget(field) }}
{% endfor %}
```
2018-09-23 20:17:20 +01:00
2018-10-14 13:03:53 +01:00
* The `regions` option was removed from the `TimezoneType` .
2019-08-09 08:43:48 +01:00
* Added support for PHPUnit 8. A `void` return-type was added to the `FormIntegrationTestCase::setUp()` , `TypeTestCase::setUp()` and `TypeTestCase::tearDown()` methods.
2018-10-14 13:03:53 +01:00
2017-11-10 08:09:11 +00:00
FrameworkBundle
---------------
2019-07-13 17:25:19 +01:00
* Dropped support for booting the kernel before running `WebTestCase::createClient()` . `createClient()` will throw an
exception if the kernel was already booted before.
2019-07-22 12:03:51 +01:00
* Removed the `framework.templating` option, configure the Twig bundle instead.
2019-01-02 16:21:45 +00:00
* The project dir argument of the constructor of `AssetsInstallCommand` is required.
2018-11-14 13:05:48 +00:00
* Removed support for `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method`
2018-02-08 02:17:50 +00:00
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
```
After:
```yml
bundle_controller:
path: /
defaults:
_controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
2018-02-23 08:25:41 +00:00
```
2018-02-08 02:17:50 +00:00
2018-02-23 08:21:43 +00:00
* Removed `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser` .
* Warming up a router in `RouterCacheWarmer` that does not implement the `WarmableInterface` is not supported anymore.
2017-04-15 14:18:24 +01:00
* The `RequestDataCollector` class has been removed. Use the `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector` class instead.
2018-08-22 18:03:34 +01:00
* Removed `Symfony\Bundle\FrameworkBundle\Controller\Controller` . Use `Symfony\Bundle\FrameworkBundle\Controller\AbstractController` instead.
2018-08-08 21:20:43 +01:00
* Added support for the SameSite attribute for session cookies. It is highly recommended to set this setting (`framework.session.cookie_samesite`) to `lax` for increased security against CSRF attacks.
2018-09-09 18:07:56 +01:00
* The `ContainerAwareCommand` class has been removed, use `Symfony\Component\Console\Command\Command`
with dependency injection instead.
2018-10-01 12:27:53 +01:00
* The `Templating\Helper\TranslatorHelper::transChoice()` method has been removed, use the `trans()` one instead with a `%count%` parameter.
2018-10-26 22:24:06 +01:00
* Removed support for legacy translations directories `src/Resources/translations/` and `src/Resources/<BundleName>/translations/` , use `translations/` instead.
2018-10-16 09:12:00 +01:00
* Support for the legacy directory structure in `translation:update` and `debug:translation` commands has been removed.
2018-11-15 20:07:46 +00:00
* Removed the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead.
2019-06-03 15:56:39 +01:00
* Removed support for `templating` engine in `TemplateController` , use Twig instead
2019-08-01 10:12:41 +01:00
* Removed `ResolveControllerNameSubscriber` .
* Removed `routing.loader.service` .
2019-08-09 08:43:48 +01:00
* Added support for PHPUnit 8. A `void` return-type was added to the `KernelTestCase::tearDown()` and `WebTestCase::tearDown()` method.
2017-11-10 08:09:11 +00:00
2019-06-03 18:56:51 +01:00
HttpClient
----------
* Added method `cancel()` to `ResponseInterface`
2019-05-30 16:17:31 +01:00
* The `$parser` argument of `ControllerResolver::__construct()` and `DelegatingLoader::__construct()`
has been removed.
* The `ControllerResolver` and `DelegatingLoader` classes have been made `final` .
* The `controller_name_converter` and `resolve_controller_name_subscriber` services have been removed.
2019-06-03 18:56:51 +01:00
2017-12-12 19:03:06 +00:00
HttpFoundation
--------------
* The `$size` argument of the `UploadedFile` constructor has been removed.
* The `getClientSize()` method of the `UploadedFile` class has been removed.
2018-03-16 14:42:26 +00:00
* The `getSession()` method of the `Request` class throws an exception when session is null.
2018-09-11 17:15:43 +01:00
* The default value of the "$secure" and "$samesite" arguments of Cookie's constructor
changed respectively from "false" to "null" and from "null" to "lax".
2019-01-20 18:13:41 +00:00
* The `MimeTypeGuesserInterface` and `ExtensionGuesserInterface` interfaces have been removed,
use `Symfony\Component\Mime\MimeTypesInterface` instead.
* The `MimeType` and `MimeTypeExtensionGuesser` classes have been removed,
use `Symfony\Component\Mime\MimeTypes` instead.
* The `FileBinaryMimeTypeGuesser` class has been removed,
use `Symfony\Component\Mime\FileBinaryMimeTypeGuesser` instead.
* The `FileinfoMimeTypeGuesser` class has been removed,
use `Symfony\Component\Mime\FileinfoMimeTypeGuesser` instead.
2019-06-28 14:18:47 +01:00
* `ApacheRequest` has been removed, use the `Request` class instead.
2019-06-20 20:59:08 +01:00
* The third argument of the `HeaderBag::get()` method has been removed, use method `all()` instead.
2019-04-23 07:04:30 +01:00
* Getting the container from a non-booted kernel is not possible anymore.
2017-12-12 19:03:06 +00:00
2018-10-10 16:44:30 +01:00
HttpKernel
----------
2019-03-12 20:10:42 +00:00
* Removed `Client` , use `HttpKernelBrowser` instead
2018-10-10 16:44:30 +01:00
* The `Kernel::getRootDir()` and the `kernel.root_dir` parameter have been removed
* The `KernelInterface::getName()` and the `kernel.name` parameter have been removed
2018-10-21 09:31:42 +01:00
* Removed the first and second constructor argument of `ConfigDataCollector`
2019-02-08 08:29:15 +00:00
* Removed `ConfigDataCollector::getApplicationName()`
2018-10-21 09:31:42 +01:00
* Removed `ConfigDataCollector::getApplicationVersion()`
2018-10-18 21:44:28 +01:00
* Removed `FilterControllerArgumentsEvent` , use `ControllerArgumentsEvent` instead
* Removed `FilterControllerEvent` , use `ControllerEvent` instead
* Removed `FilterResponseEvent` , use `ResponseEvent` instead
* Removed `GetResponseEvent` , use `RequestEvent` instead
* Removed `GetResponseForControllerResultEvent` , use `ViewEvent` instead
* Removed `GetResponseForExceptionEvent` , use `ExceptionEvent` instead
* Removed `PostResponseEvent` , use `TerminateEvent` instead
2018-10-10 23:18:00 +01:00
* Removed `TranslatorListener` in favor of `LocaleAwareListener`
2019-05-30 12:47:57 +01:00
* The `DebugHandlersListener` class has been made `final`
2019-08-01 10:12:41 +01:00
* Removed `SaveSessionListener` in favor of `AbstractSessionListener`
2019-08-01 03:33:32 +01:00
* Added new Bundle directory convention consistent with standard skeletons:
```
└── MyBundle/
├── config/
├── public/
├── src/
│ └── MyBundle.php
├── templates/
└── translations/
```
To make this work properly, it is necessary to change the root path of the bundle:
```php
class MyBundle extends Bundle
{
public function getPath(): string
{
return \dirname(__DIR__);
}
}
```
2019-09-24 14:52:36 +01:00
As many bundles must be compatible with a range of Symfony versions, the current
2019-08-01 03:33:32 +01:00
directory convention is not deprecated yet, but it will be in the future.
2019-08-20 15:47:04 +01:00
* Removed the second and third argument of `KernelInterface::locateResource`
* Removed the second and third argument of `FileLocator::__construct`
* Removed loading resources from `%kernel.root_dir%/Resources` and `%kernel.root_dir%` as
fallback directories.
2018-10-10 16:44:30 +01:00
2018-10-12 20:48:56 +01:00
Intl
----
* Removed `ResourceBundle` namespace
* Removed `Intl::getLanguageBundle()` , use `Languages` or `Scripts` instead
* Removed `Intl::getCurrencyBundle()` , use `Currencies` instead
* Removed `Intl::getLocaleBundle()` , use `Locales` instead
2019-05-01 18:05:41 +01:00
* Removed `Intl::getRegionBundle()` , use `Countries` instead
2018-10-12 20:48:56 +01:00
2019-07-13 17:25:19 +01:00
Lock
----
* Removed `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
2019-07-11 04:40:49 +01:00
`Symfony\Component\Lock\PersistingStoreInterface` .
2019-07-12 08:14:40 +01:00
* Removed `Factory` , use `LockFactory` instead
2019-07-13 17:25:19 +01:00
2019-03-12 18:04:35 +00:00
Messenger
---------
* The `LoggingMiddleware` class has been removed, pass a logger to `SendMessageMiddleware` instead.
2019-06-01 13:56:25 +01:00
* Passing a `ContainerInterface` instance as first argument of the `ConsumeMessagesCommand` constructor now
throws as `\TypeError` , pass a `RoutableMessageBus` instance instead.
2019-03-12 18:04:35 +00:00
2018-08-29 10:05:16 +01:00
Monolog
-------
* The methods `DebugProcessor::getLogs()` , `DebugProcessor::countErrors()` , `Logger::getLogs()` and `Logger::countErrors()` have a new `$request` argument.
2019-05-29 18:05:37 +01:00
MonologBridge
--------------
* The `RouteProcessor` class is final.
2018-07-03 12:59:14 +01:00
Process
-------
2019-07-10 08:40:26 +01:00
* Removed the `Process::inheritEnvironmentVariables()` method: env variables are always inherited.
2018-07-03 12:59:14 +01:00
* Removed the `Process::setCommandline()` and the `PhpProcess::setPhpBinary()` methods.
* Commands must be defined as arrays when creating a `Process` instance.
Before:
```php
$process = new Process('ls -l');
```
After:
```php
$process = new Process(array('ls', '-l'));
// alternatively, when a shell wrapper is required
$process = Process::fromShellCommandline('ls -l');
```
2019-07-05 06:23:38 +01:00
PropertyAccess
--------------
* Removed support of passing `null` as 2nd argument of
`PropertyAccessor::createCache()` method (`$defaultLifetime`), pass `0`
instead.
2019-02-26 18:18:56 +00:00
Routing
-------
* The `generator_base_class` , `generator_cache_class` , `matcher_base_class` , and `matcher_cache_class` router
options have been removed.
2019-06-05 10:11:58 +01:00
* `Serializable` implementing methods for `Route` and `CompiledRoute` are final.
Instead of overwriting them, use `__serialize` and `__unserialize` as extension points which are forward compatible
with the new serialization methods in PHP 7.4.
2019-08-01 10:12:41 +01:00
* Removed `ServiceRouterLoader` and `ObjectRouteLoader` .
2019-07-18 07:35:24 +01:00
* Service route loaders must be tagged with `routing.route_loader` .
2019-02-26 18:18:56 +00:00
2017-11-23 10:49:18 +00:00
Security
--------
2019-09-25 09:01:37 +01:00
* Dropped support for passing more than one attribute to `AccessDecisionManager::decide()` and `AuthorizationChecker::isGranted()` (and indirectly the `is_granted()` Twig and ExpressionLanguage function):
**Before**
```php
if ($this->authorizationChecker->isGranted(['ROLE_USER', 'ROLE_ADMIN'])) {
// ...
}
```
**After**
```php
if ($this->authorizationChecker->isGranted(new Expression("has_role('ROLE_USER') or has_role('ROLE_ADMIN')"))) {}
// or:
if ($this->authorizationChecker->isGranted('ROLE_USER')
|| $this->authorizationChecker->isGranted('ROLE_ADMIN')
) {}
```
2019-07-31 03:17:21 +01:00
* The `LdapUserProvider` class has been removed, use `Symfony\Component\Ldap\Security\LdapUserProvider` instead.
2019-04-17 20:13:54 +01:00
* Implementations of `PasswordEncoderInterface` and `UserPasswordEncoderInterface` must have a new `needsRehash()` method
2017-03-06 17:12:20 +00:00
* The `Role` and `SwitchUserRole` classes have been removed.
2019-02-26 18:23:16 +00:00
* The `getReachableRoles()` method of the `RoleHierarchy` class has been removed. It has been replaced by the new
`getReachableRoleNames()` method.
2017-03-06 17:12:20 +00:00
* The `getRoles()` method has been removed from the `TokenInterface` . It has been replaced by the new
`getRoleNames()` method.
2017-11-23 10:49:18 +00:00
* The `ContextListener::setLogoutOnUserChange()` method has been removed.
2017-12-11 09:34:00 +00:00
* The `Symfony\Component\Security\Core\User\AdvancedUserInterface` has been removed.
2018-04-04 19:31:33 +01:00
* The `ExpressionVoter::addExpressionLanguageProvider()` method has been removed.
2018-05-17 17:15:49 +01:00
* The `FirewallMapInterface::getListeners()` method must return an array of 3 elements,
the 3rd one must be either a `LogoutListener` instance or `null` .
2018-04-19 11:35:58 +01:00
* The `AuthenticationTrustResolver` constructor arguments have been removed.
2018-07-13 15:38:15 +01:00
* A user object that is not an instance of `UserInterface` cannot be accessed from `Security::getUser()` anymore and returns `null` instead.
2018-10-02 20:27:18 +01:00
* `SimpleAuthenticatorInterface` , `SimpleFormAuthenticatorInterface` , `SimplePreAuthenticatorInterface` ,
`SimpleAuthenticationProvider` , `SimpleAuthenticationHandler` , `SimpleFormAuthenticationListener` and
`SimplePreAuthenticationListener` have been removed. Use Guard instead.
2018-10-18 21:44:28 +01:00
* The `ListenerInterface` has been removed, turn your listeners into callables instead.
* The `Firewall::handleRequest()` method has been removed, use `Firewall::callListeners()` instead.
2019-01-30 13:28:33 +00:00
* `\Serializable` interface has been removed from `AbstractToken` and `AuthenticationException` ,
thus `serialize()` and `unserialize()` aren't available.
2019-04-07 09:37:59 +01:00
Use `__serialize()` and `__unserialize()` instead.
2019-01-30 13:28:33 +00:00
Before:
```php
public function serialize()
{
return [$this->myLocalVar, parent::serialize()];
}
public function unserialize($serialized)
{
[$this->myLocalVar, $parentSerialized] = unserialize($serialized);
parent::unserialize($parentSerialized);
}
```
After:
```php
2019-04-07 09:37:59 +01:00
public function __serialize(): array
2019-01-30 13:28:33 +00:00
{
2019-04-07 09:37:59 +01:00
return [$this->myLocalVar, parent::__serialize()];
2019-01-30 13:28:33 +00:00
}
2019-04-07 09:37:59 +01:00
public function __unserialize(array $data): void
2019-01-30 13:28:33 +00:00
{
[$this->myLocalVar, $parentData] = $data;
2019-04-07 09:37:59 +01:00
parent::__unserialize($parentData);
2019-01-30 13:28:33 +00:00
}
```
2017-11-23 10:49:18 +00:00
2019-04-08 18:01:45 +01:00
* The `Argon2iPasswordEncoder` class has been removed, use `SodiumPasswordEncoder` instead.
2019-04-18 16:20:05 +01:00
* The `BCryptPasswordEncoder` class has been removed, use `NativePasswordEncoder` instead.
2019-04-08 13:17:08 +01:00
* Classes implementing the `TokenInterface` must implement the two new methods
`__serialize` and `__unserialize`
2019-08-23 16:57:29 +01:00
* Implementations of `Guard\AuthenticatorInterface::checkCredentials()` must return a boolean value now. Please explicitly return `false` to indicate invalid credentials.
2018-12-17 14:40:40 +00:00
2017-11-23 10:49:18 +00:00
SecurityBundle
--------------
* The `logout_on_user_change` firewall option has been removed.
2018-02-27 13:18:33 +00:00
* The `switch_user.stateless` firewall option has been removed.
2017-12-20 14:22:44 +00:00
* The `SecurityUserValueResolver` class has been removed.
2018-05-29 14:22:55 +01:00
* Passing a `FirewallConfig` instance as 3rd argument to the `FirewallContext` constructor
2018-05-17 17:15:49 +01:00
now throws a `\TypeError` , pass a `LogoutListener` instance instead.
2018-05-29 14:22:55 +01:00
* The `security.authentication.trust_resolver.anonymous_class` parameter has been removed.
* The `security.authentication.trust_resolver.rememberme_class` parameter has been removed.
2018-10-02 20:27:18 +01:00
* The `simple_form` and `simple_preauth` authentication listeners have been removed,
use Guard instead.
* The `SimpleFormFactory` and `SimplePreAuthenticationFactory` classes have been removed,
use Guard instead.
2019-02-08 08:29:15 +00:00
* The names of the cookies configured in the `logout.delete_cookies` option are
no longer normalized. If any of your cookie names has dashes they won't be
changed to underscores.
Before: `my-cookie` deleted the `my_cookie` cookie (with an underscore).
After: `my-cookie` deletes the `my-cookie` cookie (with a dash).
2019-04-18 16:20:05 +01:00
* Configuring encoders using `argon2i` or `bcrypt` as algorithm is not supported anymore, use `auto` instead.
2017-11-23 10:49:18 +00:00
2018-08-29 10:05:16 +01:00
Serializer
----------
2019-08-01 10:12:41 +01:00
* The default value of the `CsvEncoder` "as_collection" option was changed to `true` .
* Individual encoders & normalizers options as constructor arguments were removed.
Use the default context instead.
* The following method and properties:
- `AbstractNormalizer::$circularReferenceLimit`
- `AbstractNormalizer::$circularReferenceHandler`
- `AbstractNormalizer::$callbacks`
- `AbstractNormalizer::$ignoredAttributes`
- `AbstractNormalizer::$camelizedAttributes`
- `AbstractNormalizer::setCircularReferenceLimit()`
- `AbstractNormalizer::setCircularReferenceHandler()`
- `AbstractNormalizer::setCallbacks()`
- `AbstractNormalizer::setIgnoredAttributes()`
- `AbstractObjectNormalizer::$maxDepthHandler`
- `AbstractObjectNormalizer::setMaxDepthHandler()`
- `XmlEncoder::setRootNodeName()`
- `XmlEncoder::getRootNodeName()`
were removed, use the default context instead.
2018-08-29 10:05:16 +01:00
* The `AbstractNormalizer::handleCircularReference()` method has two new `$format` and `$context` arguments.
2019-08-01 10:12:41 +01:00
* Removed support for instantiating a `DataUriNormalizer` with a default MIME type guesser when the `symfony/mime` component isn't installed.
2019-10-02 10:02:25 +01:00
Serializer
----------
* Removed the `XmlEncoder::TYPE_CASE_ATTRIBUTES` constant. Use `XmlEncoder::TYPE_CAST_ATTRIBUTES` instead.
2019-08-01 10:12:41 +01:00
Stopwatch
---------
* Removed support for passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead.
2018-08-29 10:05:16 +01:00
2017-11-23 10:49:18 +00:00
Translation
-----------
2019-08-21 09:02:59 +01:00
* Support for using `null` as the locale in `Translator` has been removed.
2017-11-23 10:49:18 +00:00
* The `FileDumper::setBackup()` method has been removed.
* The `TranslationWriter::disableBackup()` method has been removed.
2018-08-16 14:45:57 +01:00
* The `TranslatorInterface` has been removed in favor of `Symfony\Contracts\Translation\TranslatorInterface`
* The `MessageSelector` , `Interval` and `PluralizationRules` classes have been removed, use `IdentityTranslator` instead
2018-09-27 21:46:18 +01:00
* The `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` method are now internal
2018-10-01 12:27:53 +01:00
* The `Translator::transChoice()` method has been removed in favor of using `Translator::trans()` with "%count%" as the parameter driving plurals
2019-09-06 23:34:50 +01:00
* Removed support for implicit STDIN usage in the `lint:xliff` command, use `lint:xliff -` (append a dash) instead to make it explicit.
2017-10-30 06:24:47 +00:00
2018-01-12 21:15:14 +00:00
TwigBundle
----------
* The default value (`false`) of the `twig.strict_variables` configuration option has been changed to `%kernel.debug%` .
2018-10-01 12:27:53 +01:00
* The `transchoice` tag and filter have been removed, use the `trans` ones instead with a `%count%` parameter.
2018-10-16 15:49:09 +01:00
* Removed support for legacy templates directories `src/Resources/views/` and `src/Resources/<BundleName>/views/` , use `templates/` and `templates/bundles/<BundleName>/` instead.
2019-08-21 07:21:47 +01:00
* The `twig.exception_controller` configuration option has been removed, use `framework.error_controller` instead.
* Removed `ExceptionController` , `PreviewErrorController` classes and all built-in error templates
2019-06-28 14:01:48 +01:00
2019-04-07 10:00:56 +01:00
TwigBridge
----------
2019-05-29 13:39:34 +01:00
* Removed argument `$rootDir` from the `DebugCommand::__construct()` method and the 5th argument must be an instance of `FileLinkFormatter`
2019-06-28 14:01:48 +01:00
* removed the `$requestStack` and `$requestContext` arguments of the
2019-04-07 10:00:56 +01:00
`HttpFoundationExtension` , pass a `Symfony\Component\HttpFoundation\UrlHelper`
instance as the only argument instead
2019-09-06 23:34:50 +01:00
* Removed support for implicit STDIN usage in the `lint:twig` command, use `lint:twig -` (append a dash) instead to make it explicit.
2018-01-12 21:15:14 +00:00
2017-10-05 16:50:07 +01:00
Validator
--------
2019-06-28 17:16:38 +01:00
* Removed support for non-string codes of a `ConstraintViolation` . A `string` type-hint was added to the constructor of
the `ConstraintViolation` class and to the `ConstraintViolationBuilder::setCode()` method.
2019-06-14 09:27:35 +01:00
* An `ExpressionLanguage` instance or null must be passed as the first argument of `ExpressionValidator::__construct()`
2018-10-15 10:01:19 +01:00
* The `checkMX` and `checkHost` options of the `Email` constraint were removed
2017-10-05 16:50:07 +01:00
* The `Email::__construct()` 'strict' property has been removed. Use 'mode'=>"strict" instead.
* Calling `EmailValidator::__construct()` method with a boolean parameter has been removed, use `EmailValidator("strict")` instead.
2017-12-15 13:47:48 +00:00
* Removed the `checkDNS` and `dnsMessage` options from the `Url` constraint.
2018-08-16 14:45:57 +01:00
* The component is now decoupled from `symfony/translation` and uses `Symfony\Contracts\Translation\TranslatorInterface` instead
2019-06-06 18:00:17 +01:00
* The `ValidatorBuilderInterface` has been removed
2017-11-18 12:47:08 +00:00
* Removed support for validating instances of `\DateTimeInterface` in `DateTimeValidator` , `DateValidator` and `TimeValidator` . Use `Type` instead or remove the constraint if the underlying model is type hinted to `\DateTimeInterface` already.
2018-09-30 09:41:37 +01:00
* The `symfony/intl` component is now required for using the `Bic` , `Country` , `Currency` , `Language` and `Locale` constraints
2018-11-05 08:55:46 +00:00
* The `egulias/email-validator` component is now required for using the `Email` constraint in strict mode
2018-09-30 09:41:37 +01:00
* The `symfony/expression-language` component is now required for using the `Expression` constraint
2019-08-01 10:12:41 +01:00
* Changed the default value of `Length::$allowEmptyString` to `false` and made it optional
2019-08-09 08:43:48 +01:00
* Added support for PHPUnit 8. A `void` return-type was added to the `ConstraintValidatorTestCase::setUp()` and `ConstraintValidatorTestCase::tearDown()` methods.
2019-09-04 18:50:18 +01:00
* The `Symfony\Component\Validator\Mapping\Cache\CacheInterface` and all its implementations have been removed.
* The `ValidatorBuilder::setMetadataCache` has been removed, use `ValidatorBuilder::setMappingCache` instead.
2017-10-05 16:50:07 +01:00
2019-07-09 16:22:11 +01:00
WebProfilerBundle
-----------------
* Removed the `ExceptionController::templateExists()` method
* Removed the `TemplateManager::templateExists()` method
2017-10-30 06:24:47 +00:00
Workflow
--------
2018-04-29 17:31:06 +01:00
* The `DefinitionBuilder::reset()` method has been removed, use the `clear()` one instead.
2017-10-30 06:24:47 +00:00
* `add` method has been removed use `addWorkflow` method in `Workflow\Registry` instead.
* `SupportStrategyInterface` has been removed, use `WorkflowSupportStrategyInterface` instead.
* `ClassInstanceSupportStrategy` has been removed, use `InstanceOfSupportStrategy` instead.
2019-10-03 17:07:59 +01:00
* `WorkflowInterface::apply()` has a third argument: `array $context = []` .
2019-03-12 09:26:19 +00:00
* `MarkingStoreInterface::setMarking()` has a third argument: `array $context = []` .
2019-03-06 20:59:33 +00:00
* Removed support of `initial_place` . Use `initial_places` instead.
2019-03-23 19:20:32 +00:00
* `MultipleStateMarkingStore` has been removed. Use `MethodMarkingStore` instead.
2019-06-28 14:01:48 +01:00
* `DefinitionBuilder::setInitialPlace()` has been removed, use `DefinitionBuilder::setInitialPlaces()` instead.
2019-03-23 19:20:32 +00:00
Before:
```yaml
framework:
workflows:
type: workflow
article:
marking_store:
type: multiple
arguments: states
```
After:
```yaml
framework:
workflows:
type: workflow
article:
marking_store:
property: states
```
* `SingleStateMarkingStore` has been removed. Use `MethodMarkingStore` instead.
Before:
```yaml
framework:
workflows:
article:
marking_store:
arguments: state
```
After:
```yaml
framework:
workflows:
article:
marking_store:
property: state
```
2018-07-08 15:43:43 +01:00
2019-04-06 14:32:53 +01:00
* Support for using a workflow with a single state marking is dropped. Use a state machine instead.
Before:
```yaml
framework:
workflows:
article:
type: workflow
marking_store:
type: single_state
```
After:
```yaml
framework:
workflows:
article:
type: state_machine
```
2018-07-08 15:43:43 +01:00
Yaml
----
2019-02-08 08:29:15 +00:00
* The parser is now stricter and will throw a `ParseException` when a
2018-07-08 15:43:43 +01:00
mapping is found inside a multi-line string.
2019-09-06 23:34:50 +01:00
* Removed support for implicit STDIN usage in the `lint:yaml` command, use `lint:yaml -` (append a dash) instead to make it explicit.
2019-07-13 17:25:19 +01:00
2019-07-24 00:59:27 +01:00
WebProfilerBundle
-----------------
* Removed the `ExceptionController` class, use `ExceptionErrorController` instead.
2019-07-13 17:25:19 +01:00
WebServerBundle
---------------
* The bundle has been removed.