php-rpc / cruds
Symfony CRUD bundle
Installs: 221
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 2
Type:symfony-bundle
Requires
- php: ~7.0
- doctrine/common: ^2.4.1
- doctrine/doctrine-bundle: ^1.3
- symfony/config: ~2.7 | ~3.0 | ~4.0
- symfony/dependency-injection: ~2.8 | ~3.0 | ~4.0
- symfony/http-kernel: ~2.7 | ~3.0 | ~4.0
- symfony/property-access: ~2.7 | ~3.0 | ~4.0
- symfony/yaml: ~2.3 | ~3.0 | ~4.0
Requires (Dev)
- doctrine/data-fixtures: ~1.2
- doctrine/orm: ^2.5
- jms/serializer-bundle: ~2.2
- liip/functional-test-bundle: ~1.8
- phpunit/phpunit: ^6.4
- symfony/browser-kit: ~2.7 | ~3.0 | ~4.0
- symfony/doctrine-bridge: ~2.7 | ~3.0 | ~4.0
- symfony/form: ~2.7 | ~3.0 | ~4.0
- symfony/property-info: ~2.8 | ~3.0 | ~4.0
- symfony/routing: ~2.7 | ~3.0 | ~4.0
- symfony/security: ~2.7 | ~3.0 | ~4.0
- symfony/serializer: ^2.7.7 | ~3.0 | ~4.0
- symfony/validator: ~2.7 | ~3.0 | ~4.0
Suggests
- doctrine/orm: Use Doctrine ORM as the source of the entities
- jms/serializer-bundle: Use JMS Serializer for serializing your entities into views
This package is not auto-updated.
Last update: 2024-10-07 05:59:12 UTC
README
Features
The main purpose of this library it to create easy configurable and extensible API for entities:
- Read controller with flexible entity querying and filtering
- Create and update controllers with easy entity lifecycle control
- Basic access checks
Installation
- Require package from packagist:
composer require php-rpc/cruds:~1.0
- Include bundle into your application kernel
Doctrine bundle is mandatory to include too as it provides the common "@doctrine" service.
class AppKernel extends Kernel { public function registerBundles() { return [ //... new Doctrine\Bundle\DoctrineBundle\DoctrineBundle, new ScayTrase\Api\Cruds\CrudsBundle(), //... ]; } }
That's all, you are ready to go!
Configuration
Usage
See usage manual
Hooking (Event system)
See usage manual
Dependencies
Currently the main dependency is doctrine/common
library which provides the
Criteria
and the Selectable
interface as powerful tool to configure fetch the entities.
Second important dependency is doctrine/doctrine-bundle
providing the doctrine registry.
You can implement and override it though.
Integrations
Current limitations
Property mapper
Currently only application-wide API property mapper is supported. This happens because you can use the relations during the criteria configuration and the mapper used for the one entity should handle all of them.
This means that you cannot use both jms/serializer
and symfony/serializer
as
api metadata provider at the same time, you have to choose and convert mappings.