asm89/stack-cors
Stack CORS is a middleware for StackPHP and Symfony HttpKernel apps that adds Cross-Origin Resource Sharing headers, handles preflight OPTIONS requests, and offers configurable origins, methods, headers, and credentials. Widely used and easy to integrate.
OPTIONS preflight before auth/routing logic. Composer constraints against PHP, Symfony HttpFoundation, and Laravel versions must be verified. v2.4.0 only relaxes the Symfony upper bound to admit Symfony 8; it does not raise the PHP floor, add features, or change the public API, so the integration build is unchanged. The practical benefit is that the package will not block a future Laravel upgrade that moves to Symfony 8 components.composer update may pull Symfony 8 components into a project that was previously pinned to 7.x, so lockfile discipline matters. Remaining risks are unchanged: duplicate CORS layers, wildcard-plus-credentials errors, stale preflight caching, proxy/CDN header stripping, middleware ordering, and wrapper maintenance burden. Provenance confidence improves slightly — an active, attributable maintainer contributing a maintenance release is a positive signal — but "Repository unknown" in the supplied data still means upstream ownership and long-term stewardship need independent verification.fruitcake/php-cors already present? Do we have legacy StackPHP requirements? Do we actually need Symfony 8 support now, or is this just future-proofing? Who owns the CORS policy? What exact origins, methods, headers, credentials, exposed headers, and max-age are required? Is CORS also enforced at the gateway/CDN? Can we verify upstream source, maintainers, and composer audit status? What is the rollback path if browser behavior regresses?asm89/stack-cors only where its behavior or legacy StackPHP compatibility is specifically needed. Implement a Laravel middleware adapter around the CORS service rather than exposing Stack middleware directly in the Laravel pipeline. v2.4.0 does not alter the fit decision; it simply removes a future Symfony 8 blocker for teams that have already chosen this package.composer.lock did not silently advance Symfony components to 8.x as a side effect of the widened constraint, and re-run the CORS test matrix if it did.composer audit; pin versions; keep CORS configuration in version control. "Repository unknown" still means upstream health and maintainer responsiveness — release cadence and bus factor, not just this one PR — need verification before production reliance.OPTIONS; proxies can strip Origin; stale max-age can prolong bad policy; package incompatibility can appear after framework upgrades. The only failure mode introduced by this release is indirect and dependency-related: an unpinned composer update resolving Symfony 8 components earlier than intended, producing an unrelated runtime regression that gets misattributed to the CORS change.How can I help you explore Laravel packages today?