- not using a namer is deprecated. You should always configure a namer.
- DownloadHandler doesn't convert names of files anymore. You should not relay on it for your files, but convert names at upload time (using a namer, see previous point).
- namer use symfony/string instead of behat/transliterator. This should not cause any visibile effect.
- support for templating component was removed. You should use Twig.
- Flysystem now is supported also via league/flysystem-bundle
- Propel support has been dropped. It was likely not working since a while. If you need to use this bundle with Propel, you need to use a previous bundle version.
- Default configuration directory changed from
Resources/config/vich_uploader
toconfig/vich_uploader
. Old path is still supported, but deprecated.
- minor BC-BREAK: methods
resolvePath
andresolveUri
inStorageInterface
now acceptsnull
in second argument. This will affect you only if you implementd a custom storage, without extending baseAbstractStorage
class.
- we enforced, via type-hinting, as many parameters and return values as we can. This is formally a BC break, but likely you don't need to change anything in your code. Anyway, if you implemented an interface or extended a bundle class with your custom class, you need to check to be consistent with such type hinting.
- the transliteration is now using
behat\transliterator
instead of a custom one. Some minor differences are that dash is not preserved anymore and names are lowercased. - the form option
download_link
now is deprecated, usedownload_uri
instead. - BC-BREAK in order to fixing #704 for xml and yaml
mapping you should prepend relative from bundle sub-namespace to each mapping file.
For example for
Entity\Product
mapping file would be renamed fromProduct.xml
toEntity.Product.xml
, forDocument\Article
:Article.yml
->Document.Article.yml
.
No BC breaks.
No BC breaks.
- the
resolvePath
andresolveUri
Storage methods now take a field name instead of a mapping name. The same goes for the UploaderExtension and UploaderHelperasset
method. This reverts the broken behavior introduced in v0.10.0. - the
mapping
option for form types is removed as the mapping to use is inferred from the field's name.
- the
storage
configuration paramater changed. It accepts the name of the storage engine to use (file_system, gaufrette or flysystem). - the
gaufrette
andflysystem
configuration parameters were deleted.
- Symfony versions prior to 2.3 are not supported anymore.
-
inject_on_load
config param defaults to false. Set it to true if you want to keep your old behavior. -
the
NamerInterface
andDirectoryNamerInterface
were modified. -
the
resolvePath
andresolveUri
Storage methods now take a mapping name instead of a field name. The same goes for the UploaderExtension and UploaderHelperasset
method.
-
getUriPrefix
default value is now /uploads -
delete_on_update
config param added. It defaults to true.
-
gaufrette and KnpGaufretteBundle are now soft dependencies
-
storage
configuration entry added. -
web_dir_name
configuration entry deprecated. -
mapping
:upload_dir
configuration entry renamed tomapping
:upload_destination
-
mapping
:uri_prefix
configuration entry added -
The old
vich_uploader.uploader
service has been split into two new services for a more modular, separation of concerns approach. The new services arevich_uploader.storage.gaufrette
andvich_uploader.file_injector
. The storage service is responsible for saving and removing files as well as resolving their path. The injector service is responsible for injectingFile
instances back into the object upon retrieval from the datastore.
-
Annotations have changed namespace from
Vich\UploaderBundle\Annotation
toVich\UploaderBundle\Mapping\Annotation
. You will need to update youruse
statement for the annotations used in your entity or document classes. -
The
mappings
configuration entry prototype has had a new option added to it. Theinject_on_load
config option specifies whether or not the uploadable fields should have an instnace ofSymfony\Component\HttpFoundation\File\File
created and injected into the property upon retrieval from the datastore. THis option has a default value oftrue
.