nti/auto-delete-bundle
Automatically removes expired or stale records from your application, letting you schedule deletions and keep database tables clean without manual cleanup jobs.
Architecture fit — primary flag: the package is a Symfony bundle (NTIAutoDeleteBundle), not a Laravel package. Symfony bundles integrate through Bundle registration, DependencyInjection\Extension classes, tagged services, and (historically) annotation/attribute-driven metadata readers — none of which exist in Laravel's service-provider/container model. Laravel reuses individual Symfony components but not the bundle lifecycle. If the target application is Laravel, budget for an adapter or a re-implementation, not an install-and-go.
What it almost certainly does (verify before committing): provides declarative, attribute/annotation- or config-driven retention rules over Doctrine entities plus a console command intended to be driven by cron or a scheduler. That is a well-understood shape, which is good: even if the package itself is unusable, the pattern is cheap to replicate.
Integration feasibility:
laravel-doctrine bridge, which adds its own risk surface.Technical risk — high, concentrated in three places:
Key questions to answer before any code:
SELECT + per-row deletes (N+1, lock escalation)? Is it chunked and transaction-safe?composer.json constraints (PHP, Symfony, doctrine/orm, doctrine/dbal)? Last commit date? Tests present?Verdict on fit: acceptable only for a Symfony/Doctrine estate that already has a retention requirement and a review process capable of auditing a deletion engine. For a Laravel estate, treat it as a reference implementation to port under MIT, not a dependency.
Stack fit matrix:
| Consumer stack | Fit | Path |
|---|---|---|
| Symfony 6/7 + Doctrine ORM | Native | Composer + bundle registration |
| Symfony + Eloquent (rare) | Poor | Port deletion command only |
| Laravel + Eloquent | None (indirect) | Vendor the algorithm; do not install |
| Laravel + laravel-doctrine | Partial | Bundle internals still won't register |
| Non-PHP / polyglot | None | Reimplement from spec |
Recommended path for a Laravel target — vendor, don't depend. MIT license permits forking the deletion algorithm into an internal Artisan command (retention:purge) with chunked delete() calls, a --dry-run default, and structured audit output. Benefits: no Symfony container shim, no version-maze, and you retain full control of the destructive path. Cost: roughly one to three engineer-days for a competent Laravel dev, versus an open-ended adapter effort.
Recommended path for a Symfony target — install with guardrails. Register the bundle, pin versions strictly, and wrap its command in your own thin command that enforces dry-run, batching limits, and audit logging before delegating.
Compatibility work up front:
composer why-not against the current lockfile to surface constraint conflicts before design work.doctrine/annotations, which is deprecated and being removed in ORM 3.Migration sequencing (each gate can stop the project):
Abstraction recommendation: define an internal RetentionPolicy interface and keep the vendor behind it. Swapping in a first-party implementation later — or a better-maintained alternative — should be a one-class change, not a re-architecture.
Maintenance — you will own the fork. With zero stars and zero dependents there is no upstream momentum to ride, and no realistic expectation of timely CVE or compatibility fixes. Plan to vendor under your own namespace with a named internal owner. Realistically this is a fork with a "re-sync quarterly and diff" policy, and you should expect to eventually diverge permanently.
Support. No community, no issue-tracker signal, no Stack Overflow corpus. Your first responder is the engineer who read the source. Estimate 2–4 hours per Symfony major upgrade for compatibility verification, plus the initial ~1–3 days of review and testing.
Scaling. Deletion is I/O-bound and deceptively expensive:
LIMIT-driven deletes) and inter-batch pauses; single-statement mass deletes hold locks and can stall the primary.Failure modes to design against:
| Mode | Impact | Mitigation |
|---|---|---|
| Misconfigured TTL / clock skew / timezone drift | Mass premature deletion, unrecoverable | Dry-run diff, hard floor on retention period, allowlist of tables |
| Silent no-op (wrong attribute, entity unmapped, command erroring) | Data retained past policy — false compliance | Post-run row-count assertions + alerting on zero-deleted or error exit |
| Partial batch failure mid-run | Inconsistent state, ambiguous audit story | Per-batch transactions + resumable, idempotent cursor |
| Cascade into FK'd rows | Unintended breadth of deletion | Schema review; explicit cascade allowlist |
| Lock contention / replica lag during run | Customer-facing latency | Throttling, off-peak window, replica-lag circuit breaker |
| No audit trail | Cannot answer a regulator's "what was deleted when" | Ship the audit sink before enabling |
Ramp-up. Low technical ramp-up, high governance ramp-up. Any engineer familiar with Symfony console commands and Doctrine will read the source in under a day. The expensive part is organizational: agreeing retention policies per entity, defining the audit record schema, getting DPO/legal sign-off, and rehearsing a bad-deletion incident. Budget one engineer-week end-to-end for a first production entity, most of it process rather than code.
Bottom line for planning: treat nti/auto-delete-bundle as a specification, not a supplier. Its MIT license and narrow, understandable function make it useful as a design reference; its maturity profile (0 stars, 0 dependents, unvalidated, destructive domain) makes it unsuitable as a direct dependency in a Laravel estate and only conditionally suitable in a Symfony one, behind an abstraction, an audit layer, and a kill switch.
How can I help you explore Laravel packages today?