Download the PHP package rebolon/api-json-param-converter without Composer

On this page you can find all versions of the php package rebolon/api-json-param-converter. 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?
rebolon/api-json-param-converter
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package api-json-param-converter

API Json ParamConverter for Symfony4

[![Build Status](https://travis-ci.org/Rebolon/ApiJsonParamConverterComponent.svg?branch=master)](https://travis-ci.org/Rebolon/php-sf-flex-webpack-encore-vuejs) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FRebolon%2FApiJsonParamConverterComponent.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FRebolon%2FApiJsonParamConverterComponent?ref=badge_shield) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Rebolon/ApiJsonParamConverterComponent/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Rebolon/ApiJsonParamConverterComponent/badges/quality-score.png?b=master) [![Code Coverage](https://scrutinizer-ci.com/g/Rebolon/ApiJsonParamConverterComponent/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Rebolon/ApiJsonParamConverterComponent/?branch=master) [![Code Intelligence Status](https://scrutinizer-ci.com/g/Rebolon/ApiJsonParamConverterComponent/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FRebolon%2FApiJsonParamConverterComponent.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FRebolon%2FApiJsonParamConverterComponent?ref=badge_shield)

requirements

You need PHP (7.x), composer, and Symfony 4

To get code coverage, don't forget that you need xDebug when you run PHPUnit or you will get this message: Error: No code coverage driver is available If xDebug is not in the php configuration registered as your default php, you can run it manually:

explanation

Working with ApiPlatform, i wanted to use custom POST route where i could send complex json data which represents nested entities. To realize this i choose to use the ParamConverters. So with little convention (json props must be the same as php entity props) and few ParamConverters (one per entity) extending the Rebolon/Request/ItemAbstractConverter (for one entity) or ListAbstractConverter (for collection of entities), it works !

Here are some samples of json sent to the custom routes:

The AbstractConverter is able to deduplicate entity (if there is more than one the same entity in the json). It's also able to retreive information from database if:

You can have a look at the tests to get more informations about how to use this component. I have wrote those test with sample Entities and Converter to make it more understandable.

configuration

Add all your ParamConverters in the config/services.yaml file, like this:

License

FOSSA Status


All versions of api-json-param-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
api-platform/core Version ^2.5
doctrine/orm Version ^2.7
sensio/framework-extra-bundle Version ^5.5
squizlabs/php_codesniffer Version ^3.5
symfony/http-foundation Version ^5.0
symfony/property-access Version ^5.0
symfony/serializer Version ^5.0
symfony/validator Version ^5.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 rebolon/api-json-param-converter contains the following files

Loading the files please wait ....