korotovsky/gedmo-twig-softdeleteable-bundle
Symfony bundle that brings Gedmo SoftDeleteable into Twig, adding template helpers to detect and filter soft-deleted Doctrine entities. Keeps views clean by handling deleted records directly in templates without extra controller logic.
Architecture fit — poor. Despite the "PHP package" framing, this is a Symfony bundle, not a Composer library that drops into Laravel. It ships a Bundle class, a DI extension, and depends on Symfony's Twig bundle wiring plus Doctrine's Gedmo SoftDeleteable filter. Laravel's persistence layer is Eloquent, where soft deletes are a trait (SoftDeletes) resolved through query scopes (withTrashed(), onlyTrashed()), not a global Doctrine filter that can be toggled at runtime. The package's entire value proposition — flipping the SoftDeleteable filter on and off from inside a Twig template — has no direct analog in the Laravel stack.
The narrow case where it is technically relevant: a Laravel app using laravel-doctrine/orm for entities and twigbridge for templating, with Gedmo extensions installed. That is a rare combination, and even then the Symfony bundle packaging works against you — you would be bootstrapping Symfony bundle infrastructure inside an Laravel service container.
Integration feasibility — low, and the cost/benefit is inverted. The functional core is roughly 20–30 lines: fetch the Doctrine FilterCollection, disable softdeleteable, render the block, re-enable. A TPM should treat "vendor the logic" as the realistic integration path rather than "install the dependency." There is no Laravel service provider, no config publishing, no facade, no published compatibility matrix.
Technical risk — high.
2.x/3.x) and Gedmo releases; compatibility with modern PHP 8.2+ and current Gedmo is unverified.Key questions for the team:
try/finally and is state reset guaranteed at request/worker boundary?Stack fit — none for a standard Laravel app. Laravel 10/11 + Eloquent + Blade: no fit, no partial fit. Laravel + Doctrine via laravel-doctrine/orm + Twig via twigbridge: the behavior is relevant but the artifact is not — you would be hand-registering a Symfony bundle in a Laravel kernel.
Migration path — don't migrate; reimplement. Recommended sequence:
EntityManager → getFilters() → disable softdeleteable → render block → re-enable in a finally. Register via twigbridge's extension registration, not a bundle.findWithTrashed($id)) and pass the result into the template. This keeps filter state constant and puts the "show deleted" decision in the domain layer where it can be authorized.Compatibility. Unverified against PHP 8.x, current Gedmo (gedmo/doctrine-extensions), Symfony 5/6/7, and Twig 3. Treat any adoption as "vendor the source and own it." Do not add it as a floating Composer constraint — pin to a commit and review on upgrade of Doctrine or Twig.
Sequencing dependencies. Confirm the ORM question first; everything downstream is wasted effort under Eloquent. Then confirm whether any soft-deleted rendering requirement exists at all — if the answer is "audit screens only," this package is solving a problem a query scope already solves.
Verdict: score of 0 with 0 stars and 0 dependents is consistent with the package's actual position — a small, single-purpose Symfony helper with no adoption. Recommend reject as a dependency, adopt as a pattern, and budget the 1–2 day spike rather than a dependency-review cycle.
Maintenance. No upstream maintenance signal. No release cadence, no dependents to surface regressions, no security disclosure path. Any use implies fork ownership: your team becomes the maintainer of a component it did not write, for roughly 30 lines of behavior. The carrying cost is disproportionate to the value.
Support. Documentation appears limited to a README describing tag syntax. No issue triage, no LTS, no commercial backing. Internal onboarding documentation must be written from scratch.
Scaling. The toggle itself is cheap — it is a flag on a filter collection, not a query rewrite. The risk is scoping, not throughput: in Octane, Swoole, queue workers, or any resident process, request-scoped filter state can survive the request that set it. Under concurrency this becomes nondeterministic visibility of deleted rows rather than a crash. Horizontal scaling amplifies the blast radius because more requests share longer-lived workers.
Failure modes, ranked:
Ramp-up. Mechanically trivial — one tag, one behavior. But it presumes Doctrine filter internals and Twig extension registration knowledge that a typical Laravel/Blade team does not carry. Effective ramp-up is a half-day for a Laravel engineer if the Doctrine bridge is already in place, and a multi-day investigation if it is not.
Recommendation. Do not adopt. If the underlying requirement (displaying soft-deleted records in a template) is real, implement it as an authorized, explicit query path in the domain layer and pass the data to the view. Keep filter state immutable during rendering.
How can I help you explore Laravel packages today?