Download the PHP package simplethings/form-serializer-bundle without Composer

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

FormSerializerBundle

Bundle that helps solving the Serializer/Form component API missmatch. This missmatch leads to non-reusable code in controllers, bloating every application by reimplementing everything over and over again. Currently its nearly impossible to re-use REST-API calls and HTML/Form-based submits in the same controller action. Additionally all the current serializer components share a common flaw: They cannot deserialize (update) into existing object graphs. Updating object graphs is a problem the Form component already solves (perfectly!).

This bundle solves these issues by hooking into the Form Framework. It allows to implement serializers for objects, using form types. For deserializing it uses the exact same API as "usual" form requests.

The Form component is a very good serialization library, but up to now it only had one implementation: HTML Forms. This bundle adds support for hooking the Serializer Encoders into this process, XML and JSON supported by default.

New Form Options

Using this bundle you gain new form type options. The "form" field is overwritten to have the following additional configuration keys:

Usage

This bundle defines a new service to serialize forms inside the Symfony DIC:

The API for the FormListener is documented on the FormSerializerInterface it implements:

The bundle also registers a Listener inside the form framework that binds XML and JSON requests onto a form. Just call $form->bind($request) as shown in the example below.

If you want to convert JMS Serializer based configuration to FormTypes you can use the command that is included:

Since JMS Serializer automatically builds metadata for every class, you can use this command to generate form types for any existing class for you.

Configuration

Default DIC (config.yml) configuration:

Dependency Injection tag named simple_things_form_serializer.encoder to add more encoders.

Example

Take a usual form, extended with some details about serialization:

Using the serializer:

Produces:

Or if you use JSON:

Deserializing will look familiar:

This looks almost like a out of the book form request. The only thing different is that we have to use the "renderFormView" and "formRedirect" methods to generate response objects.


All versions of form-serializer-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/form Version 2.1.*
symfony/http-foundation Version 2.1.*
symfony/serializer Version 2.1.*
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 simplethings/form-serializer-bundle contains the following files

Loading the files please wait ....