michalkvasnicak/oauth2-server-bundle
Symfony bundle that integrates the michalkvasnicak/oauth2-server library, adding dependency injection configuration to set up an OAuth2 authorization server in your Symfony application.
Architecture fit — poor. Despite the "PHP package" framing, this is a Symfony bundle, not a Laravel package. It ships a Bundle subclass, DI extension, compiler passes, and YAML service definitions that assume Symfony's full-stack kernel and Security component. Laravel consumes a handful of Symfony components (HttpFoundation, Console, Finder) but has no concept of bundles, compiler passes, or a Symfony ContainerBuilder at runtime. There is no service provider, no facade, no publishable config — the two architectures do not meet.
Dependency risk is the headline, not the framework mismatch. The bundle wraps bshaffer/oauth2-server-php, which is itself end-of-life and archived upstream. Adopting this package means inheriting an abandoned OAuth 2.0 core inside the most security-sensitive surface of the product (token issuance, client authentication, grant handling). A 4-star, 0-dependent package with a composite score of 0.02 is a signal that essentially no one has validated this path in production.
Integration feasibility — low. Two viable shapes, both bad:
Composer resolution is likely to fail outright: the bundle targets Symfony 2.x/3.x and PHP 5.5–7.x constraints, while Laravel 10/11/12 pins Symfony 6/7 components. Forcing resolution means pinning an unsupported framework version underneath the app.
Technical risk — high / disqualifying. No security advisory coverage, no maintenance cadence, no PKCE or OIDC support (both now table stakes for public clients and modern SSO), and no path to patch a vulnerability without owning the fork.
Key questions to put to the requester:
Stack fit — none. Treat this as reject-and-substitute, not integrate. The evaluation should conclude with a recommendation rather than a build plan.
Recommended substitution, in priority order:
laravel/passport — full OAuth 2.0 server built on league/oauth2-server, which is actively maintained. Covers authorization code + PKCE, client credentials, password, refresh tokens, scopes. Direct conceptual replacement for this bundle's purpose.laravel/sanctum — if the real need is first-party SPA/mobile tokens and third-party OAuth was never actually required. Cheaper, fewer moving parts, and eliminates the token-server surface entirely.Compatibility check to run before anything else: composer why-not michalkvasnicak/oauth2-server-bundle against the target Laravel version, plus a read of its composer.json require block for symfony/symfony and php constraints. Expect a hard conflict. Document it — this is the artifact that closes the question.
Migration path (if a legacy Symfony service already uses this bundle): do not extend it. Freeze the existing service as-is behind its current interface, stand up Passport (or the IdP) for new clients, and dual-run with a token-translation shim at the gateway until the legacy clients are drained. Set an explicit sunset date for the legacy issuer.
Sequencing:
Maintenance — you would own it. Zero upstream commits, zero dependents, and no realistic prospect of a maintainer response. Every future PHP or Laravel upgrade becomes a fork-maintenance task, and the fork sits on a deprecated OAuth core. This is a permanent tax on a small team for a solved problem.
Support — effectively none. Four stars and zero dependents means no Stack Overflow corpus, no blog posts, no third-party integration guides. Incident debugging becomes first-principles reading of Symfony compiler passes and a decade-old OAuth library.
Scaling — the wrong axis of concern. Token storage (Doctrine/Redis) would scale fine; the operational cost is the extra Symfony runtime, separate deploy, separate observability, and user-store reconciliation. That is infrastructure complexity purchased for negative functionality gain.
Failure modes to anticipate:
Ramp-up — steep and non-transferable. Engineers must learn Symfony bundle conventions (compiler passes, tagged services, extension load() semantics) to change anything. None of that knowledge transfers to the rest of a Laravel codebase. Compare against Passport, where the team's existing Laravel and Eloquent knowledge applies directly.
Recommendation: reject. Score 0.02 with 0 dependents and an EOL transitive dependency is not a candidate for evaluation, let alone adoption, in an authentication path. Spend the spike budget confirming the Composer conflict and move the requirement to Passport, Sanctum, or an external IdP.
How can I help you explore Laravel packages today?