pushinbr / pam-laravel
Production tooling, lifecycle safety, observability and deployment for Laravel applications running on PAM.
Requires
- php: ^8.4
- laravel/framework: ^12.0 || ^13.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-24 16:07:00 UTC
README
Laravel on PAM
Keep Laravel. Replace the disposable runtime underneath it.
Production lifecycle, isolation, observability, queues, and deployment tooling for long-lived Laravel applications running on PAM.
Documentation · Why this exists · What you can build · Quick start · Issues
Why this exists
Production lifecycle, isolation, observability, queues, and deployment tooling for long-lived Laravel applications running on PAM.
| Role | Framework integration |
| Execution path | Laravel · Persistent PHP · PAM Runtime |
| This repository owns | Laravel boot, request isolation, cleanup, diagnostics, and production commands |
| Boundary | Laravel conventions and its package ecosystem remain Laravel |
What you can build
- High-throughput Laravel APIs
- Long-lived workers with explicit state hygiene
- Laravel deployments supervised by the PAM runtime
Quick start
pam composer require pushinbr/pam-laravel pam laravel:doctor
The PAM documentation covers prerequisites, production setup, and the complete workflow. PAM projects keep normal manifests and lockfiles; product features stay in the package that owns them.
Production tooling for Laravel 12 and 13 applications running on the PAM runtime.
Production lifecycle
PAM Laravel adds a request state guard to the web and api middleware
groups. It rolls back leaked transactions, forgets authenticated users,
restores the process locale and clears resolved facades after every request.
Use strict mode in CI to turn detected state leakage into a failed request:
PAM_LARAVEL_STATE_GUARD=true PAM_LARAVEL_STATE_GUARD_STRICT=true
Application-specific cleanup can implement Pam\Laravel\Contracts\LifecycleHook
and register it with LifecycleManager.
Operations
pam artisan pam:health pam artisan pam:leaks pam artisan pam:capacity --memory-mb=1024 --worker-mb=96 pam artisan pam:process up pam artisan pam:process status pam artisan pam:process restart queue pam artisan pam:deploy /srv/app/releases/20260725-120000 pam artisan pam:deploy --local --rollback pam remote status production pam nightwatch pam autoscale queue --cpu=80 --p95=400 pam mcp
The default endpoints are:
GET /__pam/healthfor readiness and liveness;GET /__pam/metricsfor bounded process telemetry.
Set PAM_LARAVEL_OBSERVABILITY_TOKEN to require a bearer token on metrics.
The registry retains bounded route, query and state-violation data, preventing
the observability layer itself from becoming a memory leak.
Zero-downtime releases
Prepare an immutable release inside PAM_DEPLOY_ROOT, run migrations and
framework cache generation in the release, then activate it with
pam:deploy. Activation uses an atomic symlink replacement and records the
previous target for rollback. Destructive schema changes should follow
expand/migrate/contract deployment discipline.
Process manifest
pam.processes.json represents commands as arrays, not shell strings. This
keeps arguments unambiguous and avoids manifest command injection:
{
"processes": {
"http": {
"command": ["pam", "start", "pam.php", "--workers", "2"],
"instances": 1
}
}
}
PAM's Laravel runtime remains conservative about request concurrency because Laravel applications and third-party packages can hold mutable process-global state. Scale with multiple isolated workers; certify lifecycle hooks under load before opting into more aggressive concurrency.
Support policy
The compatibility matrix tests PHP 8.4 with the maintained Laravel 12 release and the current Laravel 13 release. The public compatibility registry lives in the main PAM repository.
See the full production platform guide for OTLP traces, Nightwatch, PAM Cloud and Forge operations, autoscaling, MCP, package certification and reproducible benchmarks.