Releases: effectra/cors
Releases · effectra/cors
Release list
v2.0.0
Added
CorsServiceerror tracking withgetErrors(),hasErrors(),clearErrors()CorsService::setDebugMode()for detailed error loggingCorsServiceinput validation (validateOptions,validateNormalizedOptions)CorsServiceoptions normalization (case, duplicates, wildcard pattern conversion)CorsServiceVary header support withvaryHeader()- PSR-15
CorsMiddlewarepreflight handling toggle (handle_preflight) - PSR-15
CorsMiddlewareerror handling toggle (handle_errors) - PSR-15
CorsMiddlewareexcluded path filtering (excluded_paths) - PSR-15
CorsMiddlewareexception handling (graceful 500 responses) - PSR-15
CorsMiddlewarefluent setters (setPaths,setExcludedPaths,setHandlePreflight,setHandleErrors) - Laravel service provider with auto-discovery (
CorsServiceProvider) - Laravel facade (
CorsFacade) and baseFacadeclass with runtime-safe fallback - Laravel
CorsHelperstatic proxy - Laravel-native
CorsMiddlewarewith Symfony-to-PSR-7 conversion - Default config file
config/cors.php(wildcard origins, methods, 86400 max-age) - IDE helper stubs in
_ide_helper.phpfor static analysis - PHPStan configuration (
phpstan.neon) at level 6 - Pest test suite with 106 tests (153 assertions)
.gitignoreandphpunit.xmlconfiguration
Changed
CorsService::setOptions()now accepts snake_case and camelCase option keysCorsMiddlewareconstructor accepts$configarray instead of$pathsCorsMiddlewareuses typed properties throughoutcomposer.json: movedeffectra/http-messagetorequire(production dependency)composer.json: added dev dependencies for testing, static analysis, and Laravel integrationcomposer.json: addedextra.laravelfor package auto-discovery
Fixed
CorsMiddleware::process()now delegates toshouldHandle()instead ofshouldRun()CorsServiceproper origin format validation viaisValidOrigin()