Skip to content

Commit 687000c

Browse files
committed
feat(upgrade): add an upgrade guide
1 parent 19d01b6 commit 687000c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

UPGRADE-2.0.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# UPGRADE FROM `1.2` TO `2.0`
2+
3+
**Replace form type option name**
4+
5+
If you use one of the following options with Media Manager form type (`AudioType`, `FaviconType`, `ImageType`, `PdfType` or `VideoType`),
6+
you had to rename it as follows:
7+
8+
* `["file-type" => "TYPE"]` became `["file_type" => "TYPE"]`
9+
* `["filter-width" => INT]` became `["filter_width" => INT]]`
10+
11+
**Use new services**
12+
13+
`FileHelper` service has been split into dedicated services:
14+
* `FileRepositoryInterface` to list file from a folder or get one file by it path
15+
* `DirectoryOperatorInterface` where all directory operations takes place
16+
* `FileMetadataResolverInterface` for file types resolution
17+
* `FilePathResolverInterface` for absolute and relative path resolution
18+
* `FileValidatorInterface` for file validation
19+
20+
If you use `FileHelper` service, you need to inject one of the service above instead.

0 commit comments

Comments
 (0)