PHPackages                             sroze/api-platform-messenger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sroze/api-platform-messenger

ActiveSymfony-bundle[API Development](/categories/api)

sroze/api-platform-messenger
============================

311032[1 PRs](https://github.com/sroze/api-platform-messenger/pulls)PHP

Since Aug 28Pushed 7y ago4 watchersCompare

[ Source](https://github.com/sroze/api-platform-messenger)[ Packagist](https://packagist.org/packages/sroze/api-platform-messenger)[ RSS](/packages/sroze-api-platform-messenger/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Symfony Messenger &amp; API Platform integration
================================================

[](#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
-----

[](#usage)

1. Get an API Platform application. Easiest is to use Symfony's `api` pack:

    ```
    composer create-project symfony/skeleton api-platform-and-messenger && \
    cd api-platform-and-messenger && \
    composer req api
    ```
2. Install this bridge

    ```
    composer req sroze/api-platform-messenger:dev-master
    ```
3. Configure your message(s) to be handled by API Platform like in the following example:

    ```
