Version 3.0.0
This version comes with a lot of refactoring, removals and new features:
CHANGELOG.
- Split file into 2 interfaces: File and MutableFile.
- Added
Entity\MutableFile
. It contains additional fieldmodifiedAt
. - Removal of
ManagerInterface::refresh(File)
- Removal of
RefreshDatabaseCommand
- Added 2 new methods
write(MutableFile $file, string $contents)
andwriteStream(MutableFile $file, resource $resource)
- Renamed
md5Hash
to justhash
. This will allows usage of any hashing algotithm. (Sha1, sha256, etc.) - Make hash unique.
- Renamed
fileSize
to justsize
. - Added support for Embeddable files. Added model for it: Entity\EmbeddableFile.
- Added events. (PostUpload, PreMove, PostMove, PreRemove, PreUpdate, PostUpdate).
- Added new naming strategies.
- Added utility which eases serving files from Controller.
- Added Preview sub-system.
- Added LiipImagine built-in support.
- Added
Model\DecoratedFile
which eases decorating file. - Added numerous different Naming Strategies (DateStrategy, UUID V4, UUID V5, PersistentPath, NullDirectory)
- Created
ModelFactory
which is responsible for instantiating File objects when uploading new file. - Added numerous different Path Resolvers (AzureBlobStorage, AzureBlobStorageSAS).
UPGRADE:
- Rename usages of
getMd5Hash
togetHash
. Rename queries from propertymd5Hash
tohash
- Rename usages of
getFileSize
togetSize
. Rename queries from propertyfileSize
tosize
. - Constructor of
Manager
now accepts arguments in different order. If you are not using named arguments - please take a look and update them. - Constructor of Manager now accepts
Psr\EventDispatcher\EventDispatcherInterface
- please pass it in order to use Events. (If using Symfony Autowire, nothing to do).