Download the PHP package qcodr/restate-sdk-laravel without Composer

On this page you can find all versions of the php package qcodr/restate-sdk-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package restate-sdk-laravel

Restate SDK for Laravel

CI codecov Mutation testing badge Latest Stable Version Total Downloads PHP Version

Laravel integration for the Restate PHP SDK — durable execution (workflows, virtual objects, sagas, durable timers, exactly-once side effects) wired into Laravel's container, routing, and Artisan.

Write Restate services as ordinary Laravel classes (with constructor DI), list them in config, and serve them either from inside your app (a request/response route) or over true bidirectional HTTP/2 (php artisan restate:serve).

Why

Restate adds guarantees Laravel's native tools don't give you for multi-step, long-running, or per-entity-stateful work:

Laravel area What Restate adds
Jobs / multi-step processes Durable sagas — order → payment → inventory → shipping with automatic retries and compensation, exactly-once
Per-entity state (counters, balances, inventory, rate limits) Virtual Objects — single-writer state per key, no lockForUpdate / row-lock races
Long-running / human-in-the-loop (approvals, email verify, reminders) Durable promises + timers — wait days for an external event, surviving restarts/deploys
Webhooks / side effects Exactly-once processing + the outbox pattern via ctx->run()
Scheduler Self-rescheduling durable timers that survive restarts (vs stateless cron)
API orchestration / fan-out Durable combinators (select/awaitAll) with retries

Requirements

Installation

The service provider is auto-discovered.

Quick start

Define a service as a normal Laravel class — constructor dependencies are injected from the container:

Register it in config/restate.php:

Point a running Restate runtime at your app and invoke through the ingress:

One rule for handlers: they must be deterministic and stateless. Keep every DB / HTTP / mail / random call inside ctx->run() (a durable side effect); per-invocation data lives in local variables or Restate state, never in instance properties.

Serving

In-app route (default). The provider mounts a catch-all route at the configured prefix (restate by default), served request/response by your normal Laravel stack (FPM, Octane). Register the deployment at <app-url>/restate. Zero extra infrastructure.

Bidirectional streaming. For cancellation, signals, and fewer re-invokes on suspension-heavy handlers, run the amphp host instead:

Set config path to null to disable the in-app route when serving this way.

Calling Restate from Laravel

The two sections above expose your handlers to the runtime. The reverse direction — starting a Restate invocation from ordinary Laravel code (a controller, job, or listener) — goes through the Restate ingress with the RestateClient:

Configure the ingress in config/restate.php (ingress.url, RESTATE_INGRESS_URL; optional ingress.token, RESTATE_INGRESS_TOKEN → Authorization: Bearer). Full recipe — controllers, jobs, listeners, idempotency, delayed send, error handling — in docs/usecases/dispatch.md.

Configuration

config/restate.php:

Key Description
services Service / virtual-object / workflow class names exposed by the deployment
path Route prefix the runtime calls (null disables the in-app route)
middleware Middleware group for the route (default ['api'])
identity_key publickeyv1_... to verify request signatures (needs ext-sodium)
ingress.{url,token} Restate ingress base URL + optional Bearer token for the RestateClient (the caller side)
server.{host,port,workers} restate:serve bind settings (workers: 0 = one per CPU)
server.limits amphp connection / concurrency / idle ceilings for restate:serve; each key left unset keeps the SDK default, which assumes the runtime is the only peer — tighten them if the endpoint is reachable more widely

Artisan

Use cases

Worked, tested examples live under tests/Examples/ (proven offline against the SDK — discovery, business logic, and the durable flow over a fake context) with copy-pasteable recipes:

Several surface a real SDK boundary: JsonSerde hands handlers the decoded array, not a hydrated object, so a handler's input parameter is array/scalar and the value object is built (and validated — see the Validation trait) inside the handler.

Code quality

Mirrors the SDK's strict gate, all offline:

License

Apache-2.0


All versions of restate-sdk-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/queue Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
qcodr/restate-sdk-php Version ^0.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package qcodr/restate-sdk-laravel contains the following files

Loading the files please wait ...