maize-tech/laravel-prunable-fields
Laravel Prunable Fields lets you mark model attributes as prunable and automatically clear or remove them after a configurable period, with minimal setup. A simple, flexible way to implement data retention policies and GDPR compliance in your Laravel apps.
Baseline note: No prior assessment existed; this is the initial assessment, anchored on release 1.3.0 and the package's stated scope (model-level pruning/clearing of designated fields — commonly used for retention/anonymisation of stale column data). Evidence base is thin: a single-line changelog entry and no source review, so treat findings as provisional pending a code read.
Architecture fit. The package sits in the Eloquent model layer as a trait plus supporting config, which is a natural seam for Laravel applications. It introduces no new infrastructure (no broker, no external service, no schema of its own beyond what the host app defines), so it composes with existing domain models rather than competing with them. For teams already using Laravel's native Prunable/MassPrunable pattern, this is a narrow, complementary capability scoped to fields rather than whole records — useful where the business requirement is "keep the row, destroy the sensitive value."
Integration feasibility. Low. Expect a composer require, a published config file, and a trait declaration on each affected model. The 1.3.0 change — Laravel 11 compatibility contributed by @enricodelazzari — removes the main adoption blocker for teams on current Laravel and signals the maintainer is tracking framework releases rather than letting the package rot.
Technical risk. The dominant risk is not technical but consequential: this is a destructive capability. Pruning field values is typically irreversible, and failures are silent in both directions — under-pruning creates compliance exposure, over-pruning destroys data with no recovery path. Secondary risks: the package appears small and single-maintainer-driven (a community contribution to a niche package under the maize-tech org), so bus factor and release cadence are weak signals; and Laravel 11's restructured scheduling (no ConsoleKernel, scheduling moved to routes/console.php/bootstrap) means "framework compatible" does not automatically guarantee "scheduler wired correctly in a fresh 11 skeleton."
Key questions.
created_at, updated_at, or a configurable per-field timestamp — and is it timezone-safe?UPDATE the full result set in one statement? What is the behaviour on a 50M-row table?Stack fit. Targets Laravel 9/10/11 on PHP 8.x per the compatibility trajectory. Best fit is a monolith or modular monolith with a conventional Eloquent domain layer and an existing scheduler. It is a poor fit for event-sourced or append-only architectures where mutating stored fields violates the model, and for multi-tenant databases where a misconfigured retention rule could span tenants.
Migration path. 1.3.0 is a minor bump with a single additive compatibility change and no deprecations or breaking changes flagged — semver-compliant, low-risk to adopt on the existing line. Teams already on Laravel 11 should pin to ^1.3; teams on 9/10 can upgrade in place. There is no prior-version migration to sequence against.
Compatibility. Primary watch item is Laravel 11's scheduling and bootstrap changes rather than the package's own API. Verify in a throwaway Laravel 11 skeleton that the command registers, the schedule entry is discoverable, and config publishing lands in the expected path before assuming parity with 10.x behaviour. Also confirm the PHP floor against the app's runtime — a package floor above the app's PHP version silently blocks the upgrade.
Sequencing.
Maintenance. Small dependency surface means low ongoing effort, but also low vendor resilience: a single active contributor and infrequent releases. Pin the version, avoid floating constraints, and budget for the possibility that the team must fork or vendor the code if Laravel 12+ support lags. Track upstream releases as a recurring (quarterly) review item rather than relying on passive discovery.
Support. Community open source with no SLA. Assign an internal named owner — a backend engineer who has read the source — so that questions have a destination. For a capability that deletes production data, "we'll ask in the issue tracker" is not a support model.
Scaling. Pruning is a periodic write-heavy batch job, and its cost scales with table size, not with application traffic. Expect row-lock contention and replication lag on large tables; insist on chunked deletes/updates, an index on whatever timestamp drives the retention window, an off-peak schedule window, and a hard kill-switch. If the package does not chunk, that is a blocking finding for any table above low millions of rows and a candidate for an internal wrapper.
Failure modes.
Ramp-up. For a competent Laravel developer, half a day to a day to install, configure, and validate against seeded data; negligible learning curve, since the concept mirrors native Eloquent pruning. The real ramp-up is organisational: data owners must decide retention windows per model, and legal/compliance must confirm the mechanism satisfies the applicable regime. Budget one to two weeks of calendar time for those approvals, not engineering effort.
How can I help you explore Laravel packages today?