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

Db Snapshot Sync Laravel Laravel Package

phattarachai/db-snapshot-sync-laravel

A Laravel package for capturing database snapshots and syncing them across environments. It simplifies backing up, transferring, and restoring database state during development, testing, and deployment, with Artisan commands and configurable connections.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. phattarachai/db-snapshot-sync-laravel is a Laravel console-command package that synchronizes database snapshots between environments, gated by a sync config block. v1.4.0 changes the default gating model from opt-in to opt-out: snapshot:sync now runs in every environment except those listed in sync.denied_environments (default: production, overridable via DB_SNAPSHOT_SYNC_DENIED_ENVIRONMENTS), while a non-empty sync.allowed_environments continues to take precedence. This is a configuration-surface package rather than a framework extension, so it should slot into a standard Laravel app without architectural surgery. Fit is best where teams already treat environment config as code and have a clear non-production topology.

Integration feasibility. Low-to-moderate. Installation is standard Composer + config publishing, and the behavior is controlled entirely through config/env vars, so no application code changes are implied by the release. The main feasibility question is organizational, not technical: whether teams can reliably keep published config in sync with package defaults across many services and environments.

Technical risk. The v1.4.0 change is a meaningful safety-posture change, not a cosmetic default. Previously, an environment not in allowed_environments was implicitly excluded; now an environment not in denied_environments is implicitly included. The upgrade note partially mitigates this: configs published by 1.3 or earlier hard-code 'allowed_environments' => ['local', 'development'], which still wins, so existing installs are not silently flipped. The risk concentrates in new installs, republished configs, and teams that replace the sync block without consciously choosing an allow/deny posture. Secondary risks: PII movement from production-adjacent environments into lower environments, credential scope for source/target databases, and destructive or long-running operations during sync.

Key questions.

  • Which Laravel and PHP versions are supported, and is there a supported-version matrix in CI?
  • What exactly is a “snapshot” (SQL dump, file copy, storage disk artifact), and where is it written?
  • Does sync truncate/replace target tables, and is it transactional or idempotent on failure?
  • Are there dry-run, confirmation, or force flags for non-interactive CI use?
  • Is there PII scrubbing/anonymization, or is raw production data copied?
  • How are source and target credentials scoped, and can the package be run against production at all if explicitly allowed?
  • What is the maintainer/community bus factor, and is there a security disclosure process?

Integration Approach

Stack fit. Fits standard Laravel apps with environment-separated databases and an existing config-publishing workflow. It is a better fit for teams with ephemeral preview/staging environments than for teams with a single shared staging database, where sync frequency and locking need more care.

Migration path. Treat v1.4.0 as a config review release, not a drop-in bump:

  1. Inventory every service using the package and whether its published config/db-snapshot-sync.php predates 1.3, is from 1.3, or is newly published.
  2. For existing installs, confirm the hard-coded allowed_environments is still present and intentional; document whether the team wants allow-list or deny-list semantics.
  3. For new installs or republished configs, explicitly set either allowed_environments or denied_environments per environment tier — do not rely on the new default silently.
  4. Diff the package’s current sync block against the app’s published block and adopt it deliberately, preserving any intentional local overrides.
  5. Add CI/deploy guardrails that fail if DB_SNAPSHOT_SYNC_DENIED_ENVIRONMENTS does not include production for production-context jobs.

Compatibility. The env var names and precedence rule are the compatibility contract: non-empty allowed_environments wins alone; otherwise denied_environments applies. Any wrapper scripts, CI jobs, or internal docs that assume “not in allowed list = skipped” must be updated to reflect the new default-include behavior. The upgrade note is accurate but easy to miss; surface it in the PR description and release checklist.

Sequencing. (1) Config audit and posture decision; (2) update published configs with explicit allow/deny lists; (3) add pipeline guards and logging; (4) pilot in local/development/preview environments; (5) verify production denial with a negative test; (6) roll to remaining services. Do not combine this bump with unrelated infrastructure changes.

Operational Impact

Maintenance. Low ongoing code maintenance; the real maintenance burden is config drift. Because defaults changed, teams that republish configs or scaffold new services will inherit different behavior than older services unless the posture is made explicit. Recommend a shared internal config stub and a lint rule/check in CI.

Support. Single-maintainer package with a small changelog and issue-driven development signals a modest support surface. Internal support should own the runbook: who can run snapshot:sync, against which environments, with which credentials, and how to abort/restore.

Scaling. Scaling limits are database-size and IO-bound rather than package-bound: dump/restore duration, target lock windows, disk/tmp space for snapshots, and network transfer between environments. Large databases will need scheduling windows, streaming/compression checks, and possibly per-service opt-out. Parallel syncs across many preview environments can saturate shared database hosts.

Failure modes.

  • Silent over-inclusion: new or republished config omits denied_environments, causing sync in an unintended environment. Highest-impact failure introduced by v1.4.0.
  • Config drift: some services on allow-list semantics, others on deny-list, making behavior inconsistent and hard to reason about during incidents.
  • Partial sync: dump succeeds, restore fails, target left in an inconsistent state.
  • Resource exhaustion: disk full during dump, timeout during restore, lock contention on target.
  • Data exposure: production-adjacent data with PII copied to lower environments without scrubbing.
  • Credential leakage: over-scoped DB users configured for cross-environment sync.

Ramp-up. Low for a Laravel developer: one command, one config file. The TPM-level ramp-up is mostly about policy — environment taxonomy, data classification, and who is authorized to run sync — rather than package mechanics. Budget a short team briefing on the allow/deny precedence change and the upgrade note, and require an explicit posture decision in each service’s config review.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core