diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 0000000..89ee608 --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,5 @@ +{ + "ignore_php_platform_requirements": { + "8.2": true + } +} \ No newline at end of file diff --git a/composer.json b/composer.json index 5db4ba4..403b04b 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "config": { "sort-packages": true, "platform": { - "php": "7.4.99" + "php": "8.0.99" }, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true @@ -38,7 +38,7 @@ } }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "ext-dom": "*", "ext-json": "*", "psr/container": "^1.1.2 || ^2.0.2", diff --git a/composer.lock b/composer.lock index e4a3afa..f20da24 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": "dfe236221b9de5739bb9cbfa73db4b2b", + "content-hash": "8cb5848c314a5d0394b4052fb260a345", "packages": [ { "name": "psr/container", @@ -169,20 +169,20 @@ }, { "name": "psr/link", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/link.git", - "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562" + "reference": "846c25f58a1f02b93a00f2404e3626b6bf9b7807" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/link/zipball/eea8e8662d5cd3ae4517c9b864493f59fca95562", - "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562", + "url": "https://api.github.com/repos/php-fig/link/zipball/846c25f58a1f02b93a00f2404e3626b6bf9b7807", + "reference": "846c25f58a1f02b93a00f2404e3626b6bf9b7807", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { @@ -206,6 +206,7 @@ } ], "description": "Common interfaces for HTTP links", + "homepage": "https://github.com/php-fig/link", "keywords": [ "http", "http-link", @@ -215,9 +216,9 @@ "rest" ], "support": { - "source": "https://github.com/php-fig/link/tree/master" + "source": "https://github.com/php-fig/link/tree/1.1.1" }, - "time": "2016-10-28T16:06:13+00:00" + "time": "2021-03-11T22:59:13+00:00" }, { "name": "webmozart/assert", @@ -2056,21 +2057,21 @@ }, { "name": "laminas/laminas-hydrator", - "version": "4.5.0", + "version": "4.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-hydrator.git", - "reference": "bc849d46fb44e96dd93f7479e21266185ad3def3" + "reference": "eae638f4912769b7336daf32fccb03c89e243ed6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/bc849d46fb44e96dd93f7479e21266185ad3def3", - "reference": "bc849d46fb44e96dd93f7479e21266185ad3def3", + "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/eae638f4912769b7336daf32fccb03c89e243ed6", + "reference": "eae638f4912769b7336daf32fccb03c89e243ed6", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.3", - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "webmozart/assert": "^1.10" }, "conflict": { @@ -2078,16 +2079,15 @@ "zendframework/zend-hydrator": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-eventmanager": "^3.5.0", - "laminas/laminas-modulemanager": "^2.11.0", + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-eventmanager": "^3.6", + "laminas/laminas-modulemanager": "^2.12", "laminas/laminas-serializer": "^2.13.0", - "laminas/laminas-servicemanager": "^3.14.0", - "phpbench/phpbench": "^1.2.5", - "phpunit/phpunit": "~9.5.21", + "laminas/laminas-servicemanager": "^3.19", + "phpbench/phpbench": "^1.2.6", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "psr/cache": "1.0.1", - "vimeo/psalm": "^4.24.0" + "vimeo/psalm": "^4.29" }, "suggest": { "laminas/laminas-eventmanager": "^3.2, to support aggregate hydrator usage", @@ -2130,41 +2130,41 @@ "type": "community_bridge" } ], - "time": "2022-07-13T13:58:31+00:00" + "time": "2022-10-24T15:56:12+00:00" }, { "name": "laminas/laminas-paginator", - "version": "2.13.0", + "version": "2.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-paginator.git", - "reference": "2d6a9d21f5d67963347d497cd53873e3e693b0b5" + "reference": "83c3ff8d5d35afd2b1287d5a80ece9eb9164f639" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-paginator/zipball/2d6a9d21f5d67963347d497cd53873e3e693b0b5", - "reference": "2d6a9d21f5d67963347d497cd53873e3e693b0b5", + "url": "https://api.github.com/repos/laminas/laminas-paginator/zipball/83c3ff8d5d35afd2b1287d5a80ece9eb9164f639", + "reference": "83c3ff8d5d35afd2b1287d5a80ece9eb9164f639", "shasum": "" }, "require": { "ext-json": "*", "laminas/laminas-stdlib": "^3.10.1", - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-paginator": "*" }, "require-dev": { - "laminas/laminas-cache": "^3.1.2", - "laminas/laminas-cache-storage-adapter-memory": "^2.0.0", - "laminas/laminas-coding-standard": "^2.3.0", - "laminas/laminas-config": "^3.7.0", - "laminas/laminas-filter": "^2.13.0", - "laminas/laminas-servicemanager": "^3.14.0", - "laminas/laminas-view": "^2.15.0", - "phpunit/phpunit": "^9.5.21", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.24.0" + "laminas/laminas-cache": "^3.6.0", + "laminas/laminas-cache-storage-adapter-memory": "^2.1.0", + "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-config": "^3.8.0", + "laminas/laminas-filter": "^2.23.0", + "laminas/laminas-servicemanager": "^3.19.0", + "laminas/laminas-view": "^2.24.0", + "phpunit/phpunit": "^9.5.25", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.29.0" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component to support cache features", @@ -2209,35 +2209,34 @@ "type": "community_bridge" } ], - "time": "2022-07-12T11:56:05+00:00" + "time": "2022-10-24T07:50:43+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.13.0", + "version": "3.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76" + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/66a6d03c381f6c9f1dd988bf8244f9afb9380d76", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27", + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27", "shasum": "" }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-coding-standard": "^2.4.0", "phpbench/phpbench": "^1.2.6", - "phpstan/phpdoc-parser": "^0.5.4", - "phpunit/phpunit": "^9.5.23", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.26" + "vimeo/psalm": "^4.28" }, "type": "library", "autoload": { @@ -2269,25 +2268,25 @@ "type": "community_bridge" } ], - "time": "2022-08-24T13:56:50+00:00" + "time": "2022-10-10T19:10:24+00:00" }, { "name": "mezzio/mezzio-helpers", - "version": "5.9.0", + "version": "5.11.0", "source": { "type": "git", "url": "https://github.com/mezzio/mezzio-helpers.git", - "reference": "b460d1d9ded9af5b9e257005afe2da1c4323ea13" + "reference": "ac47b19c92e050e53fe9172d3ccf7ab7cf9e9945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mezzio/mezzio-helpers/zipball/b460d1d9ded9af5b9e257005afe2da1c4323ea13", - "reference": "b460d1d9ded9af5b9e257005afe2da1c4323ea13", + "url": "https://api.github.com/repos/mezzio/mezzio-helpers/zipball/ac47b19c92e050e53fe9172d3ccf7ab7cf9e9945", + "reference": "ac47b19c92e050e53fe9172d3ccf7ab7cf9e9945", "shasum": "" }, "require": { "mezzio/mezzio-router": "^3.0", - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0 || ^2.0", "psr/http-message": "^1.0.1", "psr/http-server-middleware": "^1.0" @@ -2298,12 +2297,10 @@ "require-dev": { "ext-json": "*", "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-diactoros": "^2.11.1", - "mockery/mockery": "^1.4.2", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.11", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.17" + "laminas/laminas-diactoros": "^2.19", + "phpunit/phpunit": "^9.5.25", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.29" }, "suggest": { "ext-json": "If you wish to use the JsonStrategy with BodyParamsMiddleware" @@ -2347,25 +2344,25 @@ "type": "community_bridge" } ], - "time": "2022-09-14T07:33:03+00:00" + "time": "2022-10-12T21:00:46+00:00" }, { "name": "mezzio/mezzio-router", - "version": "3.8.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/mezzio/mezzio-router.git", - "reference": "27075d3e9b407791abf7ba5e62954a59be4b18df" + "reference": "5b03ab8ef9ae8323a9093d5b9d79a69a3733968f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mezzio/mezzio-router/zipball/27075d3e9b407791abf7ba5e62954a59be4b18df", - "reference": "27075d3e9b407791abf7ba5e62954a59be4b18df", + "url": "https://api.github.com/repos/mezzio/mezzio-router/zipball/5b03ab8ef9ae8323a9093d5b9d79a69a3733968f", + "reference": "5b03ab8ef9ae8323a9093d5b9d79a69a3733968f", "shasum": "" }, "require": { "fig/http-message-util": "^1.1.2", - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0 || ^2.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0.1", @@ -2377,14 +2374,12 @@ "zendframework/zend-expressive-router": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-diactoros": "^2.6", - "laminas/laminas-stratigility": "^3.4", - "phpspec/prophecy": "^1.9", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.11", - "psalm/plugin-phpunit": "^0.15.0", - "vimeo/psalm": "^4.17" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-diactoros": "^2.18", + "laminas/laminas-stratigility": "^3.8", + "phpunit/phpunit": "^9.5.25", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.28" }, "suggest": { "mezzio/mezzio-aurarouter": "^3.0 to use the Aura.Router routing adapter", @@ -2430,7 +2425,7 @@ "type": "community_bridge" } ], - "time": "2022-01-06T16:27:49+00:00" + "time": "2022-10-10T19:40:00+00:00" }, { "name": "myclabs/deep-copy", @@ -3572,20 +3567,20 @@ }, { "name": "psr/cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { @@ -3605,7 +3600,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for caching libraries", @@ -3615,9 +3610,9 @@ "psr-6" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { "name": "psr/http-server-handler", @@ -3735,30 +3730,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3779,9 +3774,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "sebastian/cli-parser", @@ -4866,46 +4861,42 @@ }, { "name": "symfony/console", - "version": "v5.4.15", + "version": "v6.0.15", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669" + "reference": "b0b910724a0a0326b4481e4f8a30abb2dd442efb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ea59bb0edfaf9f28d18d8791410ee0355f317669", - "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669", + "url": "https://api.github.com/repos/symfony/console/zipball/b0b910724a0a0326b4481e4f8a30abb2dd442efb", + "reference": "b0b910724a0a0326b4481e4f8a30abb2dd442efb", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -4945,74 +4936,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.15" - }, - "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-10-26T21:41:52+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/console/tree/v6.0.15" }, "funding": [ { @@ -5028,7 +4952,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-10-26T21:42:20+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5436,85 +5360,6 @@ ], "time": "2022-11-03T14:55:06+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "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\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/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/polyfill-php80", "version": "v1.27.0", @@ -5600,29 +5445,36 @@ }, { "name": "symfony/service-contracts", - "version": "v1.1.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", - "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=8.0.2", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { - "psr/container": "", "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "3.0-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -5655,40 +5507,53 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" }, - "time": "2019-05-28T07:50:59+00:00" + "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-05-30T19:17:58+00:00" }, { "name": "symfony/string", - "version": "v5.4.15", + "version": "v6.0.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" + "reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "url": "https://api.github.com/repos/symfony/string/zipball/51ac0fa0ccf132a00519b87c97e8f775fa14e771", + "reference": "51ac0fa0ccf132a00519b87c97e8f775fa14e771", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -5727,7 +5592,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.15" + "source": "https://github.com/symfony/string/tree/v6.0.15" }, "funding": [ { @@ -5743,7 +5608,7 @@ "type": "tidelift" } ], - "time": "2022-10-05T15:16:54+00:00" + "time": "2022-10-10T09:34:08+00:00" }, { "name": "theseer/tokenizer", @@ -6016,13 +5881,13 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "ext-dom": "*", "ext-json": "*" }, "platform-dev": [], "platform-overrides": { - "php": "7.4.99" + "php": "8.0.99" }, "plugin-api-version": "2.3.0" } diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 9c77978..a6aa989 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + is_object($resource) @@ -11,21 +11,19 @@ $name $rel $resource - $resource $value function ($item) { function (array $byRelation, LinkInterface $link) { - + $links $links $name $name $relations $resource - $resource $value $value $value @@ -101,15 +99,8 @@ - - ! is_string($attribute) - ! is_string($href) - ! is_string($rel) - ! is_string($rel) - is_object($rel) - - $rel + is_object($rel) ? $rel::class : gettype($rel) $value @@ -121,17 +112,19 @@ $this->validateRelation($relation) - - (string) $href - - + + gettype($rel) + is_object($href) is_string($uri) - - gettype($rel) - - + + ! is_string($attribute) + ! is_string($rel) + ! is_string($rel) (string) $uri + gettype($href) + is_object($href) + is_object($rel) @@ -270,6 +263,7 @@ + $item $item @@ -290,7 +284,6 @@ $perPage $perPage - count @@ -311,6 +304,9 @@ [] + + protected function generateSelfLink( + $metadata->getQueryStringArguments() ?? [] $metadata->getRoute() @@ -332,9 +328,6 @@ $request->getQueryParams() - - protected function generateSelfLink( - getQueryStringArguments getQueryStringArguments @@ -353,6 +346,9 @@ $page + + protected function generateSelfLink( + $url @@ -365,9 +361,6 @@ $queryStringArgs !== null - - protected function generateSelfLink( - getUrl getUrl @@ -468,8 +461,6 @@ CustomUrlHelper CustomUrlHelper CustomUrlHelper - CustomUrlHelper - CustomUrlHelper @@ -489,6 +480,9 @@ + + $uri + $name $name @@ -498,12 +492,6 @@ $value $value - - $uri - - - $uri - new Link() diff --git a/src/Exception/InvalidResourceValueException.php b/src/Exception/InvalidResourceValueException.php index ffcf2c6..7ed7c64 100644 --- a/src/Exception/InvalidResourceValueException.php +++ b/src/Exception/InvalidResourceValueException.php @@ -7,7 +7,6 @@ use Mezzio\Hal\HalResource; use RuntimeException; -use function get_class; use function gettype; use function is_object; use function sprintf; @@ -21,7 +20,7 @@ public static function fromValue($value): self { return new self(sprintf( 'Encountered non-primitive type "%s" when serializing %s instance; unable to serialize', - is_object($value) ? get_class($value) : gettype($value), + is_object($value) ? $value::class : gettype($value), HalResource::class )); } @@ -33,7 +32,7 @@ public static function fromObject($object): self { return new self(sprintf( 'Encountered object of type "%s" when serializing %s instance; unable to serialize', - get_class($object), + $object::class, HalResource::class )); } diff --git a/src/Exception/InvalidStrategyException.php b/src/Exception/InvalidStrategyException.php index d73d8dc..8cb8a0b 100644 --- a/src/Exception/InvalidStrategyException.php +++ b/src/Exception/InvalidStrategyException.php @@ -7,7 +7,6 @@ use InvalidArgumentException; use Mezzio\Hal\ResourceGenerator\StrategyInterface; -use function get_class; use function gettype; use function is_object; use function sprintf; @@ -30,7 +29,7 @@ public static function forInstance($strategy): self { return new self(sprintf( 'Invalid strategy of type "%s"; does not implement %s', - is_object($strategy) ? get_class($strategy) : gettype($strategy), + is_object($strategy) ? $strategy::class : gettype($strategy), StrategyInterface::class )); } diff --git a/src/Exception/UnknownMetadataTypeException.php b/src/Exception/UnknownMetadataTypeException.php index 984b7d0..9b12db8 100644 --- a/src/Exception/UnknownMetadataTypeException.php +++ b/src/Exception/UnknownMetadataTypeException.php @@ -7,7 +7,6 @@ use Mezzio\Hal\Metadata\AbstractMetadata; use RuntimeException; -use function get_class; use function sprintf; class UnknownMetadataTypeException extends RuntimeException implements ExceptionInterface @@ -16,7 +15,7 @@ public static function forMetadata(AbstractMetadata $metadata): self { return new self(sprintf( 'Encountered unknown metadata type %s; no strategy available for creating resource from this metadata', - get_class($metadata) + $metadata::class )); } diff --git a/src/HalResource.php b/src/HalResource.php index 03dd8c8..929a41e 100644 --- a/src/HalResource.php +++ b/src/HalResource.php @@ -19,7 +19,6 @@ use function array_shift; use function array_walk; use function count; -use function get_class; use function gettype; use function in_array; use function is_array; @@ -214,7 +213,7 @@ public function embed(string $name, $resource, bool $forceCollection = false): H __METHOD__, self::class, self::class, - is_object($resource) ? get_class($resource) : gettype($resource) + is_object($resource) ? $resource::class : gettype($resource) )); } $new = clone $this; diff --git a/src/Link.php b/src/Link.php index 8db4f42..5bd49d4 100644 --- a/src/Link.php +++ b/src/Link.php @@ -9,7 +9,6 @@ use function array_filter; use function array_reduce; -use function get_class; use function gettype; use function in_array; use function is_array; @@ -97,7 +96,7 @@ public function withHref($href) throw new InvalidArgumentException(sprintf( '%s expects a string URI or an object implementing __toString; received %s', __METHOD__, - is_object($href) ? get_class($href) : gettype($href) + is_object($href) ? $href::class : gettype($href) )); } $new = clone $this; @@ -116,7 +115,7 @@ public function withRel($rel) throw new InvalidArgumentException(sprintf( '%s expects a non-empty string relation type; received %s', __METHOD__, - is_object($rel) ? get_class($rel) : gettype($rel) + is_object($rel) ? $rel::class : gettype($rel) )); } @@ -195,7 +194,7 @@ private function validateAttributeName($name, string $context): void throw new InvalidArgumentException(sprintf( '%s expects the $name argument to be a non-empty string; received %s', $context, - is_object($name) ? get_class($name) : gettype($name) + is_object($name) ? $name::class : gettype($name) )); } } @@ -212,7 +211,7 @@ private function validateAttributeValue($value, string $context): void throw new InvalidArgumentException(sprintf( '%s expects the $value to be a PHP primitive or array of strings; received %s', $context, - is_object($value) ? get_class($value) : gettype($value) + is_object($value) ? $value::class : gettype($value) )); } @@ -248,7 +247,7 @@ private function validateRelation($relation) if (! is_array($relation) && (! is_string($relation) || empty($relation))) { throw new InvalidArgumentException(sprintf( '$relation argument must be a string or array of strings; received %s', - is_object($relation) ? get_class($relation) : gettype($relation) + is_object($relation) ? $relation::class : gettype($relation) )); } diff --git a/src/Metadata/Exception/InvalidConfigException.php b/src/Metadata/Exception/InvalidConfigException.php index bf2e7c4..1265962 100644 --- a/src/Metadata/Exception/InvalidConfigException.php +++ b/src/Metadata/Exception/InvalidConfigException.php @@ -10,7 +10,6 @@ use Mezzio\Hal\Metadata\MetadataMapFactory; use RuntimeException; -use function get_class; use function gettype; use function implode; use function is_object; @@ -27,7 +26,7 @@ public static function dueToNonArray($config): self return new self(sprintf( 'Invalid %s configuration; expected an array, but received %s', MetadataMap::class, - is_object($config) ? get_class($config) : gettype($config) + is_object($config) ? $config::class : gettype($config) )); } @@ -39,7 +38,7 @@ public static function dueToNonArrayMetadata($metadata): self return new self(sprintf( 'Invalid %s metadata item configuration; expected an array, but received %s', MetadataMap::class, - is_object($metadata) ? get_class($metadata) : gettype($metadata) + is_object($metadata) ? $metadata::class : gettype($metadata) )); } @@ -55,7 +54,7 @@ public static function dueToInvalidMetadataClass($class): self { $className = $class; if (! is_string($className)) { - $className = is_object($class) ? get_class($class) : gettype($class); + $className = is_object($class) ? $class::class : gettype($class); } return new self(sprintf( 'Invalid metadata class provided: %s is not a class name', diff --git a/src/ResourceGenerator.php b/src/ResourceGenerator.php index 852f83d..f2ef9d0 100644 --- a/src/ResourceGenerator.php +++ b/src/ResourceGenerator.php @@ -11,7 +11,6 @@ use function class_exists; use function class_implements; use function class_parents; -use function get_class; use function in_array; use function is_object; use function is_string; @@ -120,7 +119,7 @@ public function fromObject(object $instance, ServerRequestInterface $request, in } $metadata = $this->getClassMetadata($instance); - $metadataType = get_class($metadata); + $metadataType = $metadata::class; if (! isset($this->strategies[$metadataType])) { throw Exception\UnknownMetadataTypeException::forMetadata($metadata); @@ -138,7 +137,7 @@ public function fromObject(object $instance, ServerRequestInterface $request, in private function getClassMetadata(object $instance): AbstractMetadata { - $class = get_class($instance); + $class = $instance::class; if (! $this->metadataMap->has($class)) { foreach (class_parents($instance) as $parent) { if ($this->metadataMap->has($parent)) { diff --git a/src/ResourceGenerator/Exception/InvalidCollectionException.php b/src/ResourceGenerator/Exception/InvalidCollectionException.php index 2c5634a..8d64eb3 100644 --- a/src/ResourceGenerator/Exception/InvalidCollectionException.php +++ b/src/ResourceGenerator/Exception/InvalidCollectionException.php @@ -6,7 +6,6 @@ use RuntimeException; -use function get_class; use function gettype; use function is_object; use function sprintf; @@ -21,7 +20,7 @@ public static function fromInstance($instance, string $class): self return new self(sprintf( '%s is unable to create a resource for collection of type "%s"; not a Traversable', $class, - is_object($instance) ? get_class($instance) : gettype($instance) + is_object($instance) ? $instance::class : gettype($instance) )); } } diff --git a/src/ResourceGenerator/Exception/InvalidConfigException.php b/src/ResourceGenerator/Exception/InvalidConfigException.php index ce8a9ab..badd45b 100644 --- a/src/ResourceGenerator/Exception/InvalidConfigException.php +++ b/src/ResourceGenerator/Exception/InvalidConfigException.php @@ -7,7 +7,6 @@ use Mezzio\Hal\ResourceGenerator; use RuntimeException; -use function get_class; use function gettype; use function is_object; use function sprintf; @@ -22,7 +21,7 @@ public static function dueToNonArray($config): self return new self(sprintf( 'Invalid %s configuration; expected an array or ArrayAccess instance, but received %s', ResourceGenerator::class, - is_object($config) ? get_class($config) : gettype($config) + is_object($config) ? $config::class : gettype($config) )); } @@ -34,7 +33,7 @@ public static function dueToInvalidStrategies($strategies): self return new self(sprintf( 'Invalid mezzio-hal.resource-generator.strategies configuration; ' . 'expected an array or Traversable instance, but received %s', - is_object($strategies) ? get_class($strategies) : gettype($strategies) + is_object($strategies) ? $strategies::class : gettype($strategies) )); } } diff --git a/src/ResourceGenerator/Exception/InvalidExtractorException.php b/src/ResourceGenerator/Exception/InvalidExtractorException.php index a62ae21..6005a57 100644 --- a/src/ResourceGenerator/Exception/InvalidExtractorException.php +++ b/src/ResourceGenerator/Exception/InvalidExtractorException.php @@ -7,7 +7,6 @@ use Laminas\Hydrator\ExtractionInterface; use RuntimeException; -use function get_class; use function gettype; use function is_object; use function sprintf; @@ -21,7 +20,7 @@ public static function fromInstance($extractor): self { return new self(sprintf( 'Invalid extractor "%s" provided in metadata; does not implement %s', - is_object($extractor) ? get_class($extractor) : gettype($extractor), + is_object($extractor) ? $extractor::class : gettype($extractor), ExtractionInterface::class )); } diff --git a/src/ResourceGenerator/Exception/UnexpectedMetadataTypeException.php b/src/ResourceGenerator/Exception/UnexpectedMetadataTypeException.php index b00f7ca..6880066 100644 --- a/src/ResourceGenerator/Exception/UnexpectedMetadataTypeException.php +++ b/src/ResourceGenerator/Exception/UnexpectedMetadataTypeException.php @@ -8,7 +8,6 @@ use Mezzio\Hal\Metadata\AbstractMetadata; use RuntimeException; -use function get_class; use function sprintf; class UnexpectedMetadataTypeException extends RuntimeException implements ExceptionInterface @@ -17,7 +16,7 @@ public static function forMetadata(AbstractMetadata $metadata, string $strategy, { return new self(sprintf( 'Unexpected metadata of type %s was mapped to %s (expects %s)', - get_class($metadata), + $metadata::class, $strategy, $expected )); @@ -29,7 +28,7 @@ public static function forCollection(AbstractMetadata $metadata, string $strateg 'Error extracting collection via strategy %s; expected %s instance, but received %s', $strategyClass, AbstractCollectionMetadata::class, - get_class($metadata) + $metadata::class )); } } diff --git a/src/ResourceGenerator/ExtractInstanceTrait.php b/src/ResourceGenerator/ExtractInstanceTrait.php index 90d8ffc..8283db6 100644 --- a/src/ResourceGenerator/ExtractInstanceTrait.php +++ b/src/ResourceGenerator/ExtractInstanceTrait.php @@ -11,7 +11,6 @@ use Psr\Container\ContainerExceptionInterface; use Psr\Http\Message\ServerRequestInterface; -use function get_class; use function is_object; trait ExtractInstanceTrait @@ -45,7 +44,7 @@ private function extractInstance( continue; } - $childClass = get_class($value); + $childClass = $value::class; if (! $metadataMap->has($childClass)) { continue; } diff --git a/test/Assertions.php b/test/Assertions.php index 7a363a0..dbaca5c 100644 --- a/test/Assertions.php +++ b/test/Assertions.php @@ -12,7 +12,6 @@ use function array_shift; use function class_exists; use function count; -use function get_class; use function gettype; use function in_array; use function is_object; @@ -51,7 +50,7 @@ public static function assertLink(string $expectedRel, string $expectedHref, $ac { self::assertThat($actual instanceof Link, self::isTrue(), sprintf( 'Invalid link encountered of type %s', - is_object($actual) ? get_class($actual) : gettype($actual) + is_object($actual) ? $actual::class : gettype($actual) )); self::assertThat(in_array($expectedRel, $actual->getRels(), true), self::isTrue(), sprintf(