fantoine/csrf-route-bundle
A Symfony bundle that adds CSRF protection to your routes, helping guard state-changing requests against cross-site forgery with minimal configuration and easy integration into existing controllers.
Verdict first: this is not a Laravel package, and it is not a candidate for adoption. fantoine/csrf-route-bundle is a Symfony2 bundle — Symfony2 reached end-of-life in November 2019, and the bundle itself shows no meaningful traction (2 stars, 0 dependents, a 0.13 health score). Treat this assessment as a decision to close the evaluation, not as a vendor shortlist entry.
With that framed, here's what the underlying problem space can still inform:
VerifyCsrfToken middleware and the @csrf Blade directive out of the box, applied to all POST/PUT/PATCH/DELETE routes automatically. There is no capability gap this package fills that Laravel's default does not already cover, and Laravel's default is strictly safer (deny-by-default vs. opt-in).spatie/laravel-route-attributes for declarative route configuration), not with a Symfony2-era bundle.Adoption criteria for any CSRF-adjacent package — apply these as a gate, and note that this package fails the majority:
Look elsewhere — specifically, look nowhere. For CSRF in Laravel, the correct answer is the built-in VerifyCsrfToken middleware plus @csrf in forms and X-XSRF-TOKEN for SPA/API clients. For SPA architectures, use Sanctum. Exclusions: do not use this bundle, and do not invest in a Symfony2 compatibility layer to make it work.
If the actual need is Symfony: the maintained equivalents are Symfony's native csrf_protection form configuration and the _token mechanism in the Security component — again, no third-party bundle required. If your team is genuinely on Symfony and evaluating migration, scope that as a platform decision, not a package decision.
To executives: We evaluated a candidate library for cross-site request forgery protection and are recommending against it. It is built for an obsolete version of the underlying framework (Symfony2, unsupported since 2019), has negligible community adoption, and no maintenance path — meaning any future security flaw would go unpatched in a security-critical code path. Our framework already provides this protection natively and is maintained by the core team. Recommendation: no adoption, no spend, no roadmap change. Cost of this decision: zero. Cost of the alternative: an unpatched security dependency.
To engineering: This is a Symfony2 bundle, not a Laravel package — it does not fit our stack, and Symfony2 is EOL. Laravel's VerifyCsrfToken middleware is deny-by-default and already active on all state-changing routes; adding a third-party layer would reduce coverage by making enforcement opt-in per route. No spike required. If the appeal was declarative route-level configuration, that pattern is worth exploring via route groups, custom middleware, or a maintained attributes package — file it as a separate, low-priority exploration, not a dependency decision.
The one-line version: Wrong framework, no maintenance, duplicates a native control, fails the security-dependency bar — close the ticket.
How can I help you explore Laravel packages today?