Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Deployer Laravel Package

lorisleiva/laravel-deployer

Laravel Deployer offers preconfigured Deployer recipes and Artisan commands for zero-downtime Laravel deployments. It streamlines atomic releases, rollbacks, shared files, migrations, and server setup so you can ship changes safely and repeatably.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Package posture: This is a pre-1.0 (0.3.x) Laravel/PHP package whose surface area is narrow and opinionated: it wraps migration execution semantics (specifically once() behavior) so migrations are coordinated rather than blindly re-run. That narrowness is a strength for evaluation — the blast radius is confined to the migration/deploy path rather than request handling — but it also means the package sits directly on the critical path of every deployment.

Architecture fit: Fits the standard Laravel model cleanly: a service provider, an Artisan-facing entry point, and reliance on the framework's existing migration repository and event lifecycle. It does not appear to require a custom migration runner or schema abstraction, which keeps it composable with existing php artisan migrate workflows and CI pipelines. Fit is best in multi-node/autoscaling deployments where concurrent migration attempts are a real hazard; in single-host or single-container environments the value proposition is largely redundant.

Integration feasibility: Low-to-moderate effort. Adoption is configuration plus a command swap in deploy scripts, not an application-code refactor. The main integration work is not technical but procedural — updating deploy runbooks, container entrypoints, and any CI job that invokes migrate directly.

Technical risk — the material item in v0.3.5: Release #208 changes the default so once() migrates on multiple hosts rather than a single host. This is a default-behavior change, not an additive feature. Consequences:

  • Environments that previously relied on single-host execution semantics will silently adopt multi-host execution after upgrade. Any deploy pipeline, lock assumption, or operational habit built around "one host runs migrations" is now invalid without a code change.
  • Multi-host execution raises the importance of the package's coordination primitive (lock, advisory lock, or equivalent). If that primitive is backend-dependent — cache store, database driver, Redis availability — correctness now depends on infrastructure that single-host mode never exercised.
  • Shipped in a patch version (0.3.5). Pre-1.0 semver permits this, but the change is behaviorally closer to a minor/major. Treat version numbers here as advisory and diff behavior, not version strings.
  • Residual risk is concentrated in concurrency and idempotency: partially applied migrations, duplicated execution windows, and lock contention under simultaneous pod rollout.

Key questions to resolve before adoption:

  1. What is the exact coordination mechanism for multi-host once() (DB advisory lock, cache lock, atomic insert), and what happens when the lock backend is unavailable — fail-closed or fail-open?
  2. Is there a documented, supported way to opt back into single-host behavior? Is that flag stable across 0.x?
  3. What is the failure mode if two hosts begin simultaneously and the lock TTL expires mid-migration (long-running index build, large backfill)?
  4. Is multi-host once() safe against non-transactional DDL (MySQL implicit commits), or is it only guaranteeing "one runner," not "resumable"?
  5. What is the maintainer's stated path to 1.0, and how large is the contributor/release cadence? A single-maintainer 0.x package on the deploy critical path is a supply-chain consideration.
  6. Does the package declare support for the Laravel and PHP versions we run, and is that matrix tested in CI?

Integration Approach

Stack fit: Compatible with a conventional Laravel stack (Artisan console kernel, service provider auto-discovery, standard migrations table). No framework-forking or vendor patches required. Works alongside existing tooling — it does not replace the migrator, it constrains when it runs.

Migration path:

  • Pin explicitly. Do not float on ^0.3. Pin 0.3.5 in composer.json and lock it, precisely because default-behavior changes are arriving in patch releases.
  • Read the #208 diff before upgrading, not just the changelog line. Confirm the previous default and the new default, and identify the configuration key or argument that controls it.
  • Adopt the new default deliberately. If our environments are genuinely multi-host, take the new default and validate the lock backend. If any environment is single-host or has shared-state constraints (e.g., a staging box without Redis), explicitly set the old behavior rather than inheriting the default implicitly.
  • No data migration required. The change affects execution coordination, not schema or the migrations table contents. Rollback is a config/version revert, though note that a rollback after a multi-host run leaves no cleanup work beyond the already-applied migrations.

Compatibility: Validate against our specific Laravel major and PHP version, plus our cache/session/queue drivers, since the coordination primitive is the compatibility-sensitive piece. Verify behavior with whichever lock store production actually uses — not with the array/file driver used in local dev, which will make concurrency bugs invisible.

Sequencing:

  1. Upgrade in a non-production environment with the production cache/lock driver configured.
  2. Exercise the concurrent path deliberately: deploy two app instances with a pending migration simultaneously and confirm exactly one executes it and the other waits or exits cleanly.
  3. Test the degraded path: kill the lock backend mid-deploy and observe whether migrations fail closed (safe) or proceed uncoordinated (unsafe).
  4. Promote to staging, then to a single production cell/canary, then fleet-wide.
  5. Update deploy runbooks, container entrypoints, and CI scripts in the same change window as the version bump — do not let documentation lag the rollout.

Operational Impact

Maintenance: Low day-to-day surface, but non-zero upgrade cost. Pre-1.0 with behavior changes landing in patch releases means every bump deserves a changelog read and a diff review. Budget for this rather than treating it as a silent dependency update; automated dependency bots will happily open the PR that flips our migration semantics.

Support: External support is community/maintainer-driven, likely small. Internal ownership must be assigned — realistically the platform/infra team that owns deploy pipelines, not individual product teams. Document the chosen configuration and the reasoning, because the default is now non-obvious to a future reader.

Scaling: This is where the release matters most and where it helps. Multi-host-by-default is a genuine improvement for horizontally scaled deployments: it removes the need for a bespoke "run migrations on exactly one designated pod" convention (a job name, a leader-election hack, a if [ "$HOSTNAME" = ... ] guard in an entrypoint). Consolidating that logic into the package replaces ad-hoc, per-team coordination with one tested path. The corollary is that the lock backend becomes a scaling dependency: under high pod-churn or aggressive rollout concurrency, lock contention and retry behavior become capacity considerations, especially for long-running migrations.

Failure modes to plan for:

  • Lock unavailable → depends on fail-open/fail-closed semantics; this is the highest-severity unknown and should gate adoption. Fail-open under concurrent rollout risks duplicate DDL and corrupted migration state.
  • Lock TTL expiry on long migrations → a second host may begin executing while the first is still running. Mitigation: keep migrations short, split large backfills out of schema migrations, and confirm whether the lock is renewed.
  • Silent behavior change on upgrade → the most likely real-world incident. Teams that previously ran single-host will now run multi-host with no config change and no error. Mitigate with explicit configuration rather than inherited defaults, and with an integration test that asserts the intended mode.
  • Deploy-pipeline drift → if some services pin an older version and others upgrade, the fleet runs mixed semantics during the transition. Upgrade atomically per application, and check for shared databases across services.
  • Abandonment risk → a 0.x single-maintainer package on the deploy critical path. Mitigation is low: the integration is thin and reversible, so the exit cost (revert to plain migrate plus a leader-election guard in the entrypoint) is measured in hours, not weeks.

Ramp-up: Minimal for engineers familiar with Laravel deploys. The learning cost is concentrated in the on-call/deploy-owner role: understanding the coordination primitive, what the logs look like when a host waits versus executes, and how to respond when a migration appears stuck behind a lock. Allocate roughly half a day of enablement for the platform team and write the runbook entry before production rollout.

Recommendation: Adopt, but pin the version and configure the execution mode explicitly rather than relying on the new default. The v0.3.5 change is a net positive for scaled environments, yet it is a silent semantic shift delivered in a patch release — which is exactly the profile of change that causes deployment incidents when consumed automatically. Gate production rollout on a successful concurrent-deploy test against the real lock backend and on a written answer to the fail-open/fail-closed question.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle