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

36 lines
578 B
Markdown
Raw Normal View History

UPGRADE FROM 5.1 to 5.2
=======================
2020-06-09 16:20:00 +01:00
Mime
----
* Deprecated `Address::fromString()`, use `Address::create()` instead
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)
* })
*/
```