This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/UPGRADE-5.2.md

77 lines
1.8 KiB
Markdown
Raw Normal View History

UPGRADE FROM 5.1 to 5.2
=======================
DependencyInjection
-------------------
* Deprecated `Definition::setPrivate()` and `Alias::setPrivate()`, use `setPublic()` instead
FrameworkBundle
---------------
* Deprecated the public `form.factory`, `form.type.file`, `translator`, `security.csrf.token_manager`, `serializer`,
`cache_clearer`, `filesystem` and `validator` services to private.
2020-06-09 16:20:00 +01:00
Mime
----
* Deprecated `Address::fromString()`, use `Address::create()` instead
PropertyAccess
--------------
* Deprecated passing a boolean as the first argument of `PropertyAccessor::__construct()`.
Pass a combination of bitwise flags instead.
PropertyInfo
------------
* Deprecated the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()` in favor of `enable_magic_methods_extraction`.
TwigBundle
----------
* Deprecated the public `twig` service to private.
TwigBridge
----------
* Changed 2nd argument type of `TranslationExtension::__construct()` to `TranslationNodeVisitor`
Validator
---------
* Deprecated the `allowEmptyString` option of 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)
* })
*/
```
Security
--------
* [BC break] In the experimental authenticator-based system, * `TokenInterface::getUser()`
returns `null` in case of unauthenticated session.
2020-08-15 10:28:43 +01:00
* [BC break] `AccessListener::PUBLIC_ACCESS` has been removed in favor of
`AuthenticatedVoter::PUBLIC_ACCESS`.