Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sroze/api-platform-messenger
Uses API Platform to exposes Commands & Queries dispatched to your Symfony Messenger bus
https://github.com/sroze/api-platform-messenger
api-platform symfony symfony-bundle symfony-messenger
Last synced: about 2 months ago
JSON representation
Uses API Platform to exposes Commands & Queries dispatched to your Symfony Messenger bus
- Host: GitHub
- URL: https://github.com/sroze/api-platform-messenger
- Owner: sroze
- Created: 2018-08-02T15:52:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T09:55:43.000Z (over 6 years ago)
- Last Synced: 2024-10-31T23:42:19.537Z (about 2 months ago)
- Topics: api-platform, symfony, symfony-bundle, symfony-messenger
- Language: PHP
- Size: 10.7 KB
- Stars: 31
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Symfony Messenger & API Platform integration
Using a message bus like [Symfony Messenger](https://symfony.com/doc/current/messenger.html) is a wonderful way of structuring
your application around commands or queries (which will _just_ be PHP classes). [API Platform](https://api-platform.com/) is
a great framework to expose APIs.The point of this bridge is to enable you to build business actions-centric APIs instead of CRUD APIs. [Check this very simple example](https://github.com/sroze/api-platform-messenger-example).
**Note:** This is still an experimentation. You will likely have to contribute to make it fit your needs. Looking forward to review your pull-requests!
## Usage
1. Get an API Platform application. Easiest is to use Symfony's `api` pack:
```bash
composer create-project symfony/skeleton api-platform-and-messenger && \
cd api-platform-and-messenger && \
composer req api
```2. Install this bridge
```bash
composer req sroze/api-platform-messenger:dev-master
```3. Configure your message(s) to be handled by API Platform like in the following example:
```php