Download the PHP package alazziaz/laravel-dapr without Composer
On this page you can find all versions of the php package alazziaz/laravel-dapr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-dapr
Laravel Dapr Events
Laravel-friendly tooling for publishing and consuming framework events over Dapr Pub/Sub, mirroring the developer ergonomics of while swapping RabbitMQ, kafka transport for the Dapr sidecar.
Packages
alazziaz/laravel-dapr– metapackage that installs all components in one go.alazziaz/laravel-dapr-foundation– shared contracts, service provider, config, and documentation. Publishes the/dapr/subscribeendpoint and bridges local Laravel events to Dapr.alazziaz/laravel-dapr-publisher– Dapr-backed publisher with middleware pipeline, CloudEvent wrapping, and testing fakes.alazziaz/laravel-dapr-listener– Subscription discovery, HTTP ingress controller, listener middleware, and artisan tooling to scaffold listeners.alazziaz/laravel-dapr-invoker– Registers invocation routes for Dapr service invocation and ships a helper to call other services viainvokeMethod.
Install the metapackage for the full experience:
- if you face any issues with php version, only add --ignore-platform-reqs flag to the above command this issue related to dapr-php-sdk package.
Highlights
- Automatically expose Laravel events to Dapr via
GET /dapr/subscribe. - Publish events with
event(new OrderPlaced(...))or the explicit publisher service. - Middleware pipelines on both publisher and listener sides for correlation IDs, tenancy, timestamps, and retries.
- Optional signature verification for ingress requests.
- Tests powered by Pest + Orchestra Testbench with a
DaprEventFakefor publisher assertions. - Service invocation support: expose Laravel actions to Dapr and call other services via the
dapr_invoke()helper. - Example Laravel application under
examples/laravel-appto demonstrate end-to-end usage.
Refer to docs/quickstart.md for setup guidance, Dapr component examples, and workflow details.
Example applications
Looking for a full end-to-end demo? Check out the companion repo: mohammedazman/laravel-dapr-events-example. It contains a pair of Laravel services wired up with these packages and ready to run against a Dapr sidecar.
Service invocation
Laravel’s Dapr Invoker allows you to expose invokable endpoints that can be called through Dapr’s service invocation API.
Important: If you are invoking your Laravel service through Dapr (e.g.,
/dapr/invoke/{method}), you must disable CSRF protection for this prefix. Add the following to your global middleware configuration:Dapr requests are stateless and do not include CSRF tokens, so CSRF must be excluded.
You can invoke any laravel route/method via Dapr service invocation. To do this, create an invokable handler:
Register invokable handlers in your Laravel routes:
Call other services via Dapr:
Set invocation.auto_register to true in config/dapr-invocation.php if you want the default /dapr/invoke/{method} route to be registered automatically when the service provider boots.
See `laravel-invoker' for more details.
PHP compatibility with dapr/php-sdk
The official Dapr PHP SDK only ships development builds right now and its dev-main branch targets PHP 8.4. Until upstream tags a stable release, you have two practical options when installing these packages:
-
Allow dev dependencies for the SDK in your consuming application:
or require the SDK explicitly with a dev constraint:
or add to your
composer.json: - Pin to a released SDK version (for example
^1.2) if you can work with the APIs available there.
This requirement exists because the upstream Dapr SDK has not yet published a stable release that supports PHP 8.2/8.3.
All versions of laravel-dapr with dependencies
ext-json Version *
dapr/php-sdk Version dev-main
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/events Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/container Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0