plehatron / limoncello-bundle
Symfony integration bundle for neomerx/json-api
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5.9
- neomerx/limoncello: ~0.5
- symfony/framework-bundle: ~2.8.0|~3.0.0
Requires (Dev)
- mockery/mockery: ~0.9.4
- phpunit/phpunit: ~4.8|~5.2
- symfony/browser-kit: ~2.8.0|~3.0.0
- symfony/console: ~2.8.0|~3.0.0
This package is not auto-updated.
Last update: 2025-03-21 21:38:23 UTC
README
LimoncelloBundle is an integration bundle for neomerx/json-api and Symfony.
Install
- Download LimoncelloBundle using composer
$ composer require plehatron/limoncello-bundle "dev-master@dev"
- Enable the bundle
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Plehatron\LimoncelloBundle\PlehatronLimoncelloBundle(),
// ...
);
}
Create and register JSON API Schema classes
See CategorySchema file from integration tests for an example on how to write JSON API Schema classes.
Register a map of schema and corresponding entity classes:
# app/config.yml
# ...
plehatron_limoncello:
schemas:
ApiBundle\Entity\Category: ApiBundle\Schema\CategorySchema
Create and register JSON API Controllers
API controllers should extend abstract \Plehatron\LimoncelloBundle\Controller\JsonApiController
class which has full JSON API support provided by the
neomerx/limoncello package.
See CategoryController file for an example on how to write JSON API Controllers,
Versioning
This bundle is following Semantic Versioning scheme.
Testing
Run tests with:
$ vendor/bin/phpunit
Credits
This bundle is loosely based on elytus-limoncello-bundle.
License
Apache License (Version 2.0). Please see License File for more information.