softartisan/laravel-vanguard
Laravel Vanguard gives your Laravel application a security-first foundation, bundling opinionated defaults and helpers for authentication, authorization, and safer request handling so you can ship robust features faster.
Architecture fit: Vanguard v2.7.0 remains a strong fit for Laravel applications that need package-managed backup/restore across landlord and tenant boundaries. The release is deliberately opt-in: default backups, .tar archives, checksums, health payloads, and dashboard behavior remain identical to 2.6.1. That makes the release low-risk for existing adopters and suitable for teams that want incremental adoption of tenancy, encryption, storage, and PostgreSQL safeguards without a config republish.
Integration feasibility: Most new capabilities are environment-driven and do not require application code changes. Feasible additions include dedicated backup/restore database connections, single-database tenancy mode, age-encrypted archives, PostgreSQL pg_dump/server major checks, Cloudflare R2 as a remote destination, and installer drift reporting. Feasibility depends on operational prerequisites: correct database roles and drivers, an age binary and recipient/private-key custody, league/flysystem-aws-s3-v3 for R2, and a deliberate restore model for encrypted archives.
Technical risk:
vanguard:restore --identity or --identity-stdin; endpoint and job restores are refused with 400.single mode, landlord backups cover the shared database once, tenant backups cover files only, and restoring a single tenant’s rows is explicitly out of scope.off; warn is low-risk, while strict can block backups before the dump starts.BackupManager::createRecord() gains an optional fourth parameter, and subclasses that redefine it must update their signature. Subclasses that write backups outside the standard methods should call assertEncryptionReady() to honor encryption opt-in.tenancy.database_mode, dump.pgsql_version_check, binaries.age) must be copied into an already-published config before their environment variables are read; the new database, encryption, and r2 sections do not need copying.Key questions:
pg_dump and PostgreSQL server versions, and should the version check start as warn or strict?BackupManager::createRecord() or bypass backupLandlord() / backupTenant() / backupFilesystem()?Vanguard::auth()?Stack fit: Vanguard fits Laravel applications already using scheduled jobs, queues, and environment-based configuration. The release aligns well with teams standardizing on S3-compatible storage via R2, PostgreSQL backup hygiene, and stricter tenant isolation. It also supports applications that cannot move to per-tenant databases by offering a files-only tenant backup mode for single-database tenancy.
Migration path: Treat v2.7.0 as a default-safe upgrade first. Update the package, run the existing test suite, and verify that default backups, restores, health output, and dashboard behavior match 2.6.1. Do not republish config unless required. Run vanguard:install to surface drift, using the new “New optional settings” report to distinguish disabled-by-default keys from genuinely missing behavior-changing keys. For older published configs, copy nested opt-in keys into their existing sections before setting the corresponding environment variables.
Compatibility: Applications using Vanguard directly have little to do. Internal extensions need review for createRecord() signature compatibility and for custom backup-writing paths that must call assertEncryptionReady(). Existing .tar archives and checksum behavior remain unchanged unless encryption is enabled. R2 requires the S3 Flysystem adapter and should not disturb an existing s three or application-declared vanguard-r2 disk.
Sequencing:
VANGUARD_PG_VERSION_CHECK=warn to surface PostgreSQL binary/server mismatch without blocking backups.Maintenance: Default maintenance load is low because behavior is unchanged and the installer reports new optional settings separately. Maintenance increases with each opt-in: encryption adds key and binary lifecycle management; R2 adds storage dependency and credential management; dedicated connections add database-role configuration; PostgreSQL strict checks add upgrade coordination. The package’s loud-failure behavior is operationally preferable to silent fallback, but it requires runbooks.
Support: Support teams need clear guidance that encrypted archives are restored through the console, not the dashboard endpoint or restore job. The dashboard marks encrypted backups, and the 400 responses name the console command, which helps triage. Dashboard authentication remains application-owned beyond a logged-in user, so multi-tenant deployments should configure Vanguard::auth() and platform-operator access deliberately. Installer drift messaging reduces support ambiguity around missing versus optional settings.
Scaling: R2 offloads remote archive storage and is suitable for distributed environments. Dedicated backup connections improve correctness under PostgreSQL RLS by avoiding application-role visibility limits. Single-database tenancy reduces tenant database reads and backup fan-out for tenant data, but shifts recovery scope: tenant restores are files-only. Encryption adds CPU and key-handling overhead to archive creation, and pg_dump version checks help avoid subtle dump compatibility issues at scale.
Failure modes: Missing age binary or recipients fail backups before the dump, with no plaintext fallback. Encrypted restores through the endpoint or job are refused. Undeclared or mismatched dedicated connections fail loudly. A single-database tenant restore without restore_storage is refused by console, endpoint, and job. Missing Flysystem S3 adapter is surfaced by health and install checks. Strict PostgreSQL version checks block backups before dump when versions mismatch. Older published configs can silently miss nested opt-in keys until copied into the existing section. Subclass signature mismatches can cause PHP fatal errors.
Ramp-up: Ramp-up is low for teams staying on defaults: upgrade, verify, and use installer drift reporting. It is medium for R2 and PostgreSQL warning mode, and high for encryption and single-database tenancy because both change recovery procedures. Before broad rollout, require restore drills for encrypted archives, documented key custody, a clear statement that single-database tenant restores are files-only, and a reviewed authorization model for the dashboard.
How can I help you explore Laravel packages today?