diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index bc71b62..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1,2 +0,0 @@ -coverage_clover: clover.xml -json_path: coveralls-upload.json diff --git a/.gitattributes b/.gitattributes index 83be0ab..403508a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,11 @@ -/.coveralls.yml export-ignore -/.docheader export-ignore /.gitattributes export-ignore /.gitignore export-ignore -/.travis.yml export-ignore /composer.lock export-ignore /docs/ export-ignore /phpcs.xml export-ignore /phpunit.xml.dist export-ignore /test/ export-ignore +/psalm.xml export-ignore +/renovate.json export-ignore +/.laminas-ci.json export-ignore +/mkdocs.yml export-ignore diff --git a/.laminas-ci.json b/.laminas-ci.json index 6d7c4b7..6f96f6d 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -1,5 +1,5 @@ { "ignore_php_platform_requirements": { - "8.2": true + "8.2": false } } diff --git a/composer.json b/composer.json index f333ffc..cb012f7 100644 --- a/composer.json +++ b/composer.json @@ -22,9 +22,9 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.0.0" + "phpunit/phpunit": "^9.5.28", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.6" }, "config": { "preferred-install": "dist", diff --git a/composer.lock b/composer.lock index 1aa4503..6b403ea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a74a68b7638d2fa58d4aa7fd2f3ef87a", + "content-hash": "1fcfdf1fa4d0680c9241de0baa5e9e3a", "packages": [ { "name": "fig/http-message-util", @@ -64,16 +64,16 @@ }, { "name": "mezzio/mezzio-router", - "version": "3.11.0", + "version": "3.13.0", "source": { "type": "git", "url": "https://github.com/mezzio/mezzio-router.git", - "reference": "a80fb92d25deae21e76452f541129c09aa52a886" + "reference": "cb9e2476844074587e1ed849f53ef466a7e8d893" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mezzio/mezzio-router/zipball/a80fb92d25deae21e76452f541129c09aa52a886", - "reference": "a80fb92d25deae21e76452f541129c09aa52a886", + "url": "https://api.github.com/repos/mezzio/mezzio-router/zipball/cb9e2476844074587e1ed849f53ef466a7e8d893", + "reference": "cb9e2476844074587e1ed849f53ef466a7e8d893", "shasum": "" }, "require": { @@ -91,11 +91,11 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-diactoros": "^2.20.0", + "laminas/laminas-diactoros": "^2.24", "laminas/laminas-stratigility": "^3.9.0", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.0.0" + "phpunit/phpunit": "^9.5.27", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.4" }, "suggest": { "mezzio/mezzio-aurarouter": "^3.0 to use the Aura.Router routing adapter", @@ -141,7 +141,7 @@ "type": "community_bridge" } ], - "time": "2023-01-11T00:54:57+00:00" + "time": "2023-01-15T08:25:11+00:00" }, { "name": "psr/container", @@ -1447,16 +1447,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.2", + "version": "v4.15.3", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", "shasum": "" }, "require": { @@ -1497,9 +1497,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" }, - "time": "2022-11-12T15:38:23+00:00" + "time": "2023-01-16T22:05:37+00:00" }, { "name": "phar-io/manifest", @@ -1823,16 +1823,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "9.2.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", "shasum": "" }, "require": { @@ -1888,7 +1888,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" }, "funding": [ { @@ -1896,7 +1896,7 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2023-01-26T08:26:55+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2141,20 +2141,20 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.27", + "version": "9.5.28", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" + "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e", + "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -2223,7 +2223,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28" }, "funding": [ { @@ -2239,7 +2239,7 @@ "type": "tidelift" } ], - "time": "2022-12-09T07:31:23+00:00" + "time": "2023-01-14T12:32:24+00:00" }, { "name": "psalm/plugin-phpunit", @@ -3498,16 +3498,16 @@ }, { "name": "symfony/console", - "version": "v6.0.17", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2ab307342a7233b9a260edd5ef94087aaca57d18" + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2ab307342a7233b9a260edd5ef94087aaca57d18", - "reference": "2ab307342a7233b9a260edd5ef94087aaca57d18", + "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", "shasum": "" }, "require": { @@ -3573,7 +3573,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.17" + "source": "https://github.com/symfony/console/tree/v6.0.19" }, "funding": [ { @@ -3589,20 +3589,20 @@ "type": "tidelift" } ], - "time": "2022-12-28T14:21:34+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.13", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3adca49133bd055ebe6011ed1e012be3c908af79" + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3adca49133bd055ebe6011ed1e012be3c908af79", - "reference": "3adca49133bd055ebe6011ed1e012be3c908af79", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", "shasum": "" }, "require": { @@ -3636,7 +3636,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.13" + "source": "https://github.com/symfony/filesystem/tree/v6.0.19" }, "funding": [ { @@ -3652,7 +3652,7 @@ "type": "tidelift" } ], - "time": "2022-09-21T20:25:27+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3984,89 +3984,6 @@ ], "time": "2022-11-03T14:55:06+00:00" }, - { - "name": "symfony/polyfill-php80", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, { "name": "symfony/service-contracts", "version": "v3.0.2", @@ -4151,16 +4068,16 @@ }, { "name": "symfony/string", - "version": "v6.0.17", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "3f57003dd8a67ed76870cc03092f8501db7788d9" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/3f57003dd8a67ed76870cc03092f8501db7788d9", - "reference": "3f57003dd8a67ed76870cc03092f8501db7788d9", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { @@ -4216,7 +4133,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.17" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -4232,7 +4149,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T15:52:41+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "theseer/tokenizer", @@ -4286,16 +4203,16 @@ }, { "name": "vimeo/psalm", - "version": "5.4.0", + "version": "5.6.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "62db5d4f6a7ae0a20f7cc5a4952d730272fc0863" + "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/62db5d4f6a7ae0a20f7cc5a4952d730272fc0863", - "reference": "62db5d4f6a7ae0a20f7cc5a4952d730272fc0863", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/e784128902dfe01d489c4123d69918a9f3c1eac5", + "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5", "shasum": "" }, "require": { @@ -4318,11 +4235,10 @@ "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.13", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", - "sebastian/diff": "^4.0", + "sebastian/diff": "^4.0 || ^5.0", "spatie/array-to-xml": "^2.17.0", "symfony/console": "^4.1.6 || ^5.0 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/polyfill-php80": "^1.25" + "symfony/filesystem": "^5.4 || ^6.0" }, "provide": { "psalm/psalm": "self.version" @@ -4385,9 +4301,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.4.0" + "source": "https://github.com/vimeo/psalm/tree/5.6.0" }, - "time": "2022-12-19T21:31:12+00:00" + "time": "2023-01-23T20:32:47+00:00" }, { "name": "webimpress/coding-standard", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a26a2d3..02cb73f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,7 @@ diff --git a/src/Service/ConfigurationLocator.php b/src/Service/ConfigurationLocator.php index e96a2f0..57d0622 100644 --- a/src/Service/ConfigurationLocator.php +++ b/src/Service/ConfigurationLocator.php @@ -15,7 +15,6 @@ use function array_diff; use function array_merge; -use function array_values; final class ConfigurationLocator implements ConfigurationLocatorInterface { @@ -83,7 +82,7 @@ private function configurationFromRoute(RouteResult $result): RouteConfiguration $allowedMethods = $result->getAllowedMethods(); $allowedMethods = $allowedMethods === Route::HTTP_METHOD_ANY ? CorsMetadata::ALLOWED_REQUEST_METHODS - : array_values($allowedMethods); + : $allowedMethods; $explicit = $this->explicit($allowedMethods); $routeConfigurationFactory = $this->routeConfigurationFactory;