Download the PHP package ellinaut/ellirpc-bundle without Composer
On this page you can find all versions of the php package ellinaut/ellirpc-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ellinaut/ellirpc-bundle
More information about ellinaut/ellirpc-bundle
Files in ellinaut/ellirpc-bundle
Package ellirpc-bundle
Short Description Symfony integration for ellinaut/ellirpc
License MIT
Informations about the package ellirpc-bundle
elliRPC-Bundle
Symfony bundle to integrate the elliRPC library into a symfony 5 project.
- Requirements
- How to install?
- How to configure?
- Routing
- File Storage
- API-Definition
- How to provide implementations?
- Procedure Validator
- Procedure Processor
- Transaction Listener
- Error Factory
- Error Translator
Requirements
The bundle requires PHP in version 8.1 or higher and symfony/framework-bundle
in version 5. or 6..
The elliRPC-library requires implementations of psr/http-message
and psr/http-factory
.
We suggest to use nyholm/psr7
as implementation for psr/http-message
and psr/http-factory
.
If you don't want to provide your own implementations of Ellinaut\ElliRPC\File\ContentTypeGuesserInterface
and
Ellinaut\ElliRPC\File\FilesystemInterface
we suggest to use symfony/mime
and symfony/filesystem
.
How to install?
The bundle should be installed via composer: ellinaut/ellirpc-bundle
.
Execute this command to install the bundle with all suggested implementations:
or execute this command to only install the bundle and use your own implementations matching the requirements:
How to enable endpoints?
To make all API endpoints available add this snippet to config/routes.yaml
:
How to configure?
If you want to configure the bundle you should add the file config/packages/elli_rpc.yaml
.
File Storage
If you use the default file storage implementation via local file system, the default file storage will
be %kernel.project_dir%/assets/elliRPC
.
You can change it via configuration:
API-Definition
To configure the concrete definition of your API please configure it as follows:
How to provide implementations?
Your custom implementations can be added via tagging your services in the symfony dependency injection container.
If your container uses autoconfiguration most of your services will be tagged automatically because the symfony container will identify them by their implemented interfaces.
Procedure Validator
Your procedure validator, which have to implement Ellinaut\ElliRPC\Procedure\Validator\ProcedureValidatorInterface
,
have to be tagged with elli_rpc.procedure_validator
to be found and used by this bundle.
If your container uses autoconfiguration your service will be tagged and used automatically without the need of manual tagging.
Procedure Processor
Your procedure processors could be configured in two different ways.
First (and suggested) variant will be implementing Ellinaut\ElliRPCBundle\Autoconfigure\DetectableProcedureProcessor
or extending Ellinaut\ElliRPCBundle\Autoconfigure\AbstractDetectableProcedureProcessor
.
These services should be tagged with elli_rpc.procedure_processor.detected
.
If your container uses autoconfiguration your services will be tagged and used automatically without the need of manual tagging in this case.
The second variant will be implementing only Ellinaut\ElliRPC\Procedure\Processor\ProcedureProcessorInterface
and
configure package
and procedure
manually via service definition:
These variant is not autoconfigured but provides the possibility of register a single processor for multiple procedures.
Transaction Listener
Your transaction listener, which have to implement Ellinaut\ElliRPC\Procedure\Transaction\TransactionListenerInterface
, have to be tagged with elli_rpc.transaction_listener
to be found and used by this bundle.
If your container uses autoconfiguration your service will be tagged and used automatically without the need of manual tagging.
Error Factory
Your error factory, which have to implement Ellinaut\ElliRPC\Error\Factory\ErrorFactoryInterface
, have to be
tagged with elli_rpc.error_factory
to be found and used by this bundle.
If your container uses autoconfiguration your service will be tagged and used automatically without the need of manual tagging.
Error Translator
Your error translator, which have to implement Ellinaut\ElliRPC\Error\Translator\ErrorTranslatorInterface
, have to be
tagged with elli_rpc.error_translator
to be found and used by this bundle.
If your container uses autoconfiguration your service will be tagged and used automatically without the need of manual tagging.
All versions of ellirpc-bundle with dependencies
symfony/framework-bundle Version ^5.0|^6.0
ellinaut/ellirpc Version ^1.0
symfony/psr-http-message-bridge Version ^2.0