setono/bot-detection-bundle
A Symfony bundle for detecting bots and crawlers from request data, helping you filter automated traffic in analytics, block unwanted scrapers, and serve tailored responses to human visitors.
Architecture fit. This is a Symfony bundle, not a framework-agnostic library. Its value is delivered through Symfony's DependencyInjection extension, configuration tree, and service container wiring — none of which exist in Laravel. The bundle is almost certainly a thin wrapper around a standalone user-agent parsing library (the Matomo DeviceDetector or CrawlerDetect family), which means the capability fits a Laravel/PHP stack well while the package does not. Treat the bundle as a reference implementation of how to wire the underlying detector, not as a dependency to install.
Integration feasibility. Installing via Composer will succeed; bootstrapping will not happen. Laravel has no bundle auto-registration, so the detector service is never registered and no config is loaded. Two viable paths exist:
require its extension class in a Laravel provider. This drags symfony/framework-bundle, http-kernel, and dependency-injection into the app for a single feature and couples us to bundle internals that carry no stability guarantee.Technical risk. High relative to value. Eight stars and zero dependents means effectively no production validation, no community review, and a very small bus factor. The release metadata (dated 2026-09-21) should be verified against the actual commit history before any decision — anomalous release dates often indicate a single squashed push rather than sustained maintenance. Detection is also user-agent-string based, which is trivially spoofed; it is an analytics-hygiene and cost-control tool, not a security control, and must not be positioned as one.
Key questions for the maintainer spike.
Stack fit. Poor at the package layer, moderate at the capability layer. A Laravel 10/11 app on PHP 8.2+ gets no benefit from the bundle's Symfony plumbing and inherits a meaningful transitive dependency footprint. The right abstraction is an application-level BotDetector interface with a single implementation backed by the underlying library, resolved through a Laravel service provider with a published config file.
Migration path. Do not install the bundle in the Laravel application. Extract the dependency it wraps, then:
composer.json.App\Support\Detection\BotDetector interface with isBot(string $userAgent): bool.BotDetectionServiceProvider with config in config/bot-detection.php (allowlist, denylist, cache TTL, enforcement mode).ClassifyUserAgent middleware that attaches the verdict to the request and logs it; enforcement (block, throttle, serve alternate content) is a separate downstream concern.Compatibility. This is the primary integration hazard. The bundle's Symfony version constraints may conflict with the Symfony components Laravel already pins (symfony/http-foundation, symfony/http-kernel, symfony/console). Resolve this in a throwaway branch first and inspect the lock diff; a failed resolution is a cheap, early kill signal. Requiring the underlying library instead almost always eliminates the conflict surface entirely.
Sequencing. Run a one-day spike in parallel with library selection:
Maintenance. Low code surface, but the ownership shifts entirely to us — we are not downstream of a maintained integration. Pin the underlying library to a narrow range, commit the lock file, and record the decision in an ADR so a future maintainer understands why a 8-star Symfony bundle's dependency lives in a Laravel app. With zero dependents there is no community backpressure driving fixes, so subscribe to GitHub security advisories on the repository and the underlying library manually.
Support. Assume no support. There are no Laravel integration docs, issues may go unanswered, and there is no evidence of a triage process. This is acceptable only because the adapter surface is small enough to replace in an afternoon — the abstraction boundary is the mitigation, not the vendor.
Scaling. Negligible. UA classification is pure in-process regex/string matching measured in microseconds with no network calls. Add a per-process or Redis cache if verdicts are computed on every request, and precompute at the edge if traffic is very high. Avoid supplementing with IP-to-ASN lookups unless spoofing is an active problem — that introduces a network hop and a second failure domain.
Failure modes to instrument.
Ramp-up. Engineering effort is measured in days, not weeks, and requires one engineer comfortable with Composer constraint resolution and Laravel middleware. The real cost is organizational: someone must own the backtest corpus, the allowlist, and the quarterly review. Budget for that owner explicitly, or the capability decays into an unreviewed blocklist that quietly denies legitimate traffic.
How can I help you explore Laravel packages today?