Download the PHP package anzusystems/serializer-bundle without Composer

On this page you can find all versions of the php package anzusystems/serializer-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 serializer-bundle

AnzuSerializer


A fast & light serializer bundle for symfony.


Install

Usage

Simply inject AnzuSystems\SerializerBundle\Serializer via constructor, and then:

Default format for DateTimeInterface objects (de)serialization can be changed:

Attributes

To be able to (de)serialize objects, the property (or method) of that object must have AnzuSystems\SerializerBundle\Attributes\Serialize attribute.

Built-in handlers

To force a specific handler (override the auto-resolved handler), just specify the handler in the AnzuSerialize attribute.

Custom handler.

To create a custom handler, simply extend the AnzuSystems\SerializerBundle\Handler\Handlers\AbstractHandler.

For instance in the following example a Geolocation class is converted to/from array:

Then just force the handler to be used for the property via attribute:

In case you want always automatically all properties of the before-mentioned type Geolocation to be handled by the GeolocationHandler without forcing it via attribute, add following methods to the handler:

In case you want multiple automatic handlers that can both support the same thing, you can set priority with which the handler will be chosen. In that case, add the following method (higher priority will be chosen first):

By default, all handlers have priority 0. Except: BasicHandler has highest priority (10) - this handles simple scalar values, so generally you want it to be first. ObjectHandler has lowest priority (-1) - this handles nested iterables/objects that no other handler supports.

Automatically generated API documentation via NelmioApiDocBundle

Model describer will be automatically registered if NelmioApiDocBundle is present. Symfony annotations are also supported/reflected in documentation. DocBlock titles are also added automatically as description for properties and methods.

In case you create a custom handler, you can override the generated description by adding the following method to the handler:

Check out Property attribute for a list of supported description configuration options.
On top of that, you may want to add the NESTED_CLASS key to replace the description with a whole another classes' description:

In case you want to define an array of particular objects, then:

It's best to have a look at the AnzuSystems\SerializerBundle\Handler\Handlers namespace for inspiration on how other handlers work.

Caveats/requirements/features


All versions of serializer-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-json Version *
doctrine/common Version ^3.3
symfony/property-info Version ^6.3|^7.0
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 anzusystems/serializer-bundle contains the following files

Loading the files please wait ....