Download the PHP package bluepsyduck/jms-serializer-factory without Composer

On this page you can find all versions of the php package bluepsyduck/jms-serializer-factory. 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 jms-serializer-factory

JMS Serializer Factory

GitHub release build Codecov

This library provides a Laminas-compatible factory to create JMS serializer instances from the config without the need to write an actual factory.

Usage

Install the package through composer with:

composer require bluepsyduck/jms-serializer-factory

The first step is to add the settings to your Laminas config. Use the ConfigKey interface to get the names of the config options. A full list of options can be found below.

The JMS Serializer Factory will request any dependencies from the container, so make sure to register all of them. If they do not have any dependencies themselves, use the InvokableFactory to register them.

With this configuration, you now can get your serializer instance from the container:

Alternatively, if the Laminas AutoWire Factory is set up, the Attribute UseJmsSerializer can be used to resolve a parameter of the constructor to the configuration of the serializer:

All config options

The following table shows the full list of config values supported by the factory. Constant refers to the name of the constant in the ConfigKey interface, and the SerializerBuilder method column refers to the method of the builder used for that config value. For further details, please check the method signatures and doc-blocks of the builder.

Constant Expected value SerializerBuilder method
ACCESSOR_STRATEGY container alias ->setAccessorStrategy()
EXPRESSION_EVALUATOR container alias ->setExpressionEvaluator()
TYPE_PARSER container alias ->setTypeParser()
ANNOTATION_READER container alias ->setAnnotationReader()
DEBUG bool ->setDebug()
CACHE_DIR string ->setCacheDir()
ADD_DEFAULT_HANDLERS true ->addDefaultHandlers()
HANDLERS array\<container alias> ->configureHandlers()
ADD_DEFAULT_LISTENERS true ->addDefaultListeners()
LISTENERS array\<container alias> ->configureListeners()
OBJECT_CONSTRUCTOR container alias ->setObjectConstructor()
PROPERTY_NAMING_STRATEGY container alias ->setPropertyNamingStrategy()
SERIALIZATION_VISITORS array\<string, container alias> ->setSerializationVisitor()
DESERIALIZATION_VISITORS array\<string, container alias> ->setDeserializationVisitor()
ADD_DEFAULT_SERIALIZATION_VISITORS true ->addDefaultSerializationVisitors()
ADD_DEFAULT_DESERIALIZATION_VISITORS true ->addDefaultDeserializationVisitors()
INCLUDE_INTERFACE_METADATA bool ->includeInterfaceMetadata()
METADATA_DIRS array\<string, string> ->setMetadataDirs()
METADATA_DRIVER_FACTORY container alias ->setMetadataDriverFactory()
SERIALIZATION_CONTEXT_FACTORY container alias ->setSerializationContextFactory()
DESERIALIZATION_CONTEXT_FACTORY container alias ->setDeserializationContextFactory()
METADATA_CACHE container alias ->setMetadataCache()
DOC_BLOCK_TYPE_RESOLVER bool ->setDocBlockTypeResolver()
Notes:

All versions of jms-serializer-factory with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
bluepsyduck/laminas-autowire-factory Version ^2.0
jms/serializer Version ^3.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 bluepsyduck/jms-serializer-factory contains the following files

Loading the files please wait ....