Download the PHP package fresh/vich-uploader-serialization-bundle without Composer

On this page you can find all versions of the php package fresh/vich-uploader-serialization-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vich-uploader-serialization-bundle

VichUploaderSerializationBundle

:package: Provides integration between VichUploaderBundle and JMSSerializerBundle. Allows to generate full or relative URIs to entity fields mapped with @Vich and @JMS annotations during the serialization.

Scrutinizer Quality Score Build Status CodeCov License Latest Stable Version Total Downloads StyleCI Gitter

Requirements 🧐

Installation 🌱

Usage 🧑‍🎓

Add the next class to the use section of your entity class.

Bundle provides two annotations which allow the serialization of @Vich\UploadableField fields in your entities. At first you have to add @Fresh\VichSerializableClass to the entity class which has uploadable fields. Then you have to add @Fresh\VichSerializableField annotation to the uploadable field you want to serialize.

Annotation @Fresh\VichSerializableClass does not have any option.
Annotation @Fresh\VichSerializableField has one required option value (or field) which value should link to the field with @Vich\UploadableField annotation. It can be set like this @Fresh\VichSerializableField("photoFile") or @Fresh\VichSerializableField(field="photoFile"). Also there is another option includeHost, it is not required and by default is set to true. But if you need, you can exclude the host from the generated URI, just use the next variant of the annotation @Fresh\VichSerializableField("photoFile", includeHost=false).

And also don't forget that to serialize Vich uploadable fields they also should be marked with @JMS annotations to be serialized.

The generated URI by default:

The generated URI with includeHost set to false:

Example of entity with serialized uploadable fields

Don't make a mistake!

Additional example of a wrong usage of provided annotations to attract your attention. Use @Fresh\VichSerializableField only with the field which is mapped with @ORM\Column, because this field is mapped to a database and keeps the name of the stored file. Don't use the @Fresh\VichSerializableField with a field which also mapped with @Vich\UploadableField, this is a wrong use case and will throw an exception!

So the next example is the incorrect usage of provided annotations! Don't do so!


Contributing 🤝

See CONTRIBUTING file.


All versions of vich-uploader-serialization-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
doctrine/cache Version ^1.11
doctrine/common Version ^2.11|^3.0
doctrine/persistence Version ^1.3|^2.0
jms/serializer-bundle Version ^3.7|v4.0
monolog/monolog Version ^2.0
symfony/config Version ^5.0|^6.0
symfony/dependency-injection Version ^5.0|^6.0
symfony/property-access Version ^5.0|^6.0
symfony/routing Version ^5.0|^6.0
vich/uploader-bundle Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fresh/vich-uploader-serialization-bundle contains the following files

Loading the files please wait ....