From a36eb36fd91db608be65a5a8726c0f8570972f68 Mon Sep 17 00:00:00 2001 From: Eugene Kosogin Date: Wed, 5 May 2021 11:29:37 +0300 Subject: [PATCH 1/3] PHP 8.0 support Signed-off-by: Eugene Kosogin --- .gitignore | 2 + composer.json | 31 +- composer.lock | 1100 +++++++++++++----- config/module.config.php | 3 + phpunit.xml.dist | 22 +- src/Listener/OptionsListener.php | 7 +- test/AbstractResourceListenerTest.php | 13 +- test/ChildResourcesIntegrationTest.php | 8 +- test/CollectionIntegrationTest.php | 24 +- test/Factory/OptionsListenerFactoryTest.php | 3 +- test/Factory/RestControllerFactoryTest.php | 9 +- test/Listener/OptionsListenerTest.php | 14 + test/Listener/RestParametersListenerTest.php | 13 +- test/ResourceEventTest.php | 2 +- test/ResourceTest.php | 2 +- test/RestControllerTest.php | 14 +- 16 files changed, 891 insertions(+), 376 deletions(-) diff --git a/.gitignore b/.gitignore index f3ff6df..5c1a4fb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /coveralls-upload.json /phpunit.xml /vendor/ +/.phpunit.result.cache +/.phpcs-cache \ No newline at end of file diff --git a/composer.json b/composer.json index 4b55602..c932160 100644 --- a/composer.json +++ b/composer.json @@ -26,13 +26,31 @@ "module": "Laminas\\ApiTools\\Rest" } }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/eimkua1/api-tools-api-problem.git" + }, + { + "type": "vcs", + "url": "https://github.com/eimkua1/api-tools-content-negotiation.git" + }, + { + "type": "vcs", + "url": "https://github.com/eimkua1/api-tools-mvc-auth.git" + }, + { + "type": "vcs", + "url": "https://github.com/eimkua1/api-tools-oauth2.git" + } + ], "require": { - "php": "^7.3", - "laminas-api-tools/api-tools-api-problem": "^1.2.2", - "laminas-api-tools/api-tools-content-negotiation": "^1.2.1", + "php": "^7.3 || ~8.0.0", + "laminas-api-tools/api-tools-api-problem": "^1.4.0", + "laminas-api-tools/api-tools-content-negotiation": "^1.5.0", "laminas-api-tools/api-tools-hal": "^1.4", - "laminas-api-tools/api-tools-mvc-auth": "^1.4", - "laminas/laminas-eventmanager": "^3.3", + "laminas-api-tools/api-tools-mvc-auth": "^1.6", + "laminas/laminas-eventmanager": "^2.6.3 || ^3.0.1", "laminas/laminas-mvc": "^2.7.14 || ^3.0.2", "laminas/laminas-paginator": "^2.7", "laminas/laminas-stdlib": "^2.7.8 || ^3.3", @@ -47,7 +65,8 @@ "laminas/laminas-uri": "^2.5.2", "laminas/laminas-validator": "^2.8.1", "laminas/laminas-view": "^2.11.3", - "phpunit/phpunit": "^7.5.15" + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.3" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 8f080ee..7ff3075 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": "b1791ba328aaffafc6a5951f4333204b", + "content-hash": "631519187fce422f72fc59ed558b5eb0", "packages": [ { "name": "brick/varexporter", @@ -149,16 +149,16 @@ }, { "name": "laminas-api-tools/api-tools-api-problem", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/laminas-api-tools/api-tools-api-problem.git", - "reference": "4379abd1ecc967e4545732654b3cb578895918bf" + "url": "https://github.com/eimkua1/api-tools-api-problem.git", + "reference": "c9f33ca6e90abb913cc4595135c88a715ed910ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas-api-tools/api-tools-api-problem/zipball/4379abd1ecc967e4545732654b3cb578895918bf", - "reference": "4379abd1ecc967e4545732654b3cb578895918bf", + "url": "https://api.github.com/repos/eimkua1/api-tools-api-problem/zipball/c9f33ca6e90abb913cc4595135c88a715ed910ad", + "reference": "c9f33ca6e90abb913cc4595135c88a715ed910ad", "shasum": "" }, "require": { @@ -169,21 +169,18 @@ "laminas/laminas-mvc": "^2.7.15 || ^3.0.4", "laminas/laminas-view": "^2.8.1", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" + "php": "^7.3 || ~8.0.0" }, "replace": { - "zfcampus/zf-api-problem": "self.version" + "zfcampus/zf-api-problem": "^1.3.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5" + "laminas/laminas-coding-standard": "^2.1", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev", - "dev-develop": "1.4.x-dev" - }, "laminas": { "module": "Laminas\\ApiTools\\ApiProblem" } @@ -193,7 +190,29 @@ "Laminas\\ApiTools\\ApiProblem\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "LaminasTest\\ApiTools\\ApiProblem\\": "test/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": [ + "phpcs" + ], + "cs-fix": [ + "phpcbf" + ], + "test": [ + "phpunit --colors=always" + ], + "test-coverage": [ + "phpunit --colors=always --coverage-clover clover.xml" + ] + }, "license": [ "BSD-3-Clause" ], @@ -207,31 +226,31 @@ "rest" ], "support": { - "chat": "https://laminas.dev/chat", "docs": "https://api-tools.getlaminas.org/documentation", - "forum": "https://discourse.laminas.dev", "issues": "https://github.com/laminas-api-tools/api-tools-api-problem/issues", + "source": "https://github.com/laminas-api-tools/api-tools-api-problem", "rss": "https://github.com/laminas-api-tools/api-tools-api-problem/releases.atom", - "source": "https://github.com/laminas-api-tools/api-tools-api-problem" + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" }, - "time": "2019-12-31T15:55:36+00:00" + "time": "2021-04-06T09:20:19+00:00" }, { "name": "laminas-api-tools/api-tools-content-negotiation", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/laminas-api-tools/api-tools-content-negotiation.git", - "reference": "cc8caab95502c7e54b470a08b4f6f3a425e87ae9" + "url": "https://github.com/eimkua1/api-tools-content-negotiation.git", + "reference": "f73ad26f0d3c6daaed64d2dae14e732adeedd7ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas-api-tools/api-tools-content-negotiation/zipball/cc8caab95502c7e54b470a08b4f6f3a425e87ae9", - "reference": "cc8caab95502c7e54b470a08b4f6f3a425e87ae9", + "url": "https://api.github.com/repos/eimkua1/api-tools-content-negotiation/zipball/f73ad26f0d3c6daaed64d2dae14e732adeedd7ba", + "reference": "f73ad26f0d3c6daaed64d2dae14e732adeedd7ba", "shasum": "" }, "require": { - "laminas-api-tools/api-tools-api-problem": "^1.2.1", + "laminas-api-tools/api-tools-api-problem": "^1.4.0", "laminas/laminas-eventmanager": "^2.6.3 || ^3.0.1", "laminas/laminas-filter": "^2.7.1", "laminas/laminas-http": "^2.5.4", @@ -242,26 +261,23 @@ "laminas/laminas-validator": "^2.8.1", "laminas/laminas-view": "^2.8.1", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" + "php": "^7.3 || ~8.0.0" }, "replace": { - "zfcampus/zf-content-negotiation": "self.version" + "zfcampus/zf-content-negotiation": "^1.4.0" }, "require-dev": { "laminas-api-tools/api-tools-hal": "^1.4", - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-console": "^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5" + "laminas/laminas-coding-standard": "^2.1", + "laminas/laminas-console": "^2.9", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.3" }, "suggest": { "laminas/laminas-console": "^2.0, if you intend to use the console request of RequestFactory" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev", - "dev-develop": "1.5.x-dev" - }, "laminas": { "module": "Laminas\\ApiTools\\ContentNegotiation" } @@ -271,7 +287,29 @@ "Laminas\\ApiTools\\ContentNegotiation\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "LaminasTest\\ApiTools\\ContentNegotiation\\": "test/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": [ + "phpcs" + ], + "cs-fix": [ + "phpcbf" + ], + "test": [ + "phpunit --colors=always" + ], + "test-coverage": [ + "phpunit --colors=always --coverage-clover clover.xml" + ] + }, "license": [ "BSD-3-Clause" ], @@ -284,14 +322,14 @@ "module" ], "support": { - "chat": "https://laminas.dev/chat", "docs": "https://api-tools.getlaminas.org/documentation", - "forum": "https://discourse.laminas.dev", "issues": "https://github.com/laminas-api-tools/api-tools-content-negotiation/issues", + "source": "https://github.com/laminas-api-tools/api-tools-content-negotiation", "rss": "https://github.com/laminas-api-tools/api-tools-content-negotiation/releases.atom", - "source": "https://github.com/laminas-api-tools/api-tools-content-negotiation" + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" }, - "time": "2019-12-31T15:56:18+00:00" + "time": "2021-04-26T11:30:33+00:00" }, { "name": "laminas-api-tools/api-tools-hal", @@ -378,22 +416,22 @@ }, { "name": "laminas-api-tools/api-tools-mvc-auth", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/laminas-api-tools/api-tools-mvc-auth.git", - "reference": "eab5443f88d2f86637a8682bf0460a810139f180" + "url": "https://github.com/eimkua1/api-tools-mvc-auth.git", + "reference": "6759dc0543c1cf260f16ffa544a4d0da25378f78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas-api-tools/api-tools-mvc-auth/zipball/eab5443f88d2f86637a8682bf0460a810139f180", - "reference": "eab5443f88d2f86637a8682bf0460a810139f180", + "url": "https://api.github.com/repos/eimkua1/api-tools-mvc-auth/zipball/6759dc0543c1cf260f16ffa544a4d0da25378f78", + "reference": "6759dc0543c1cf260f16ffa544a4d0da25378f78", "shasum": "" }, "require": { - "laminas-api-tools/api-tools-api-problem": "^1.2.1", - "laminas-api-tools/api-tools-content-negotiation": "^1.2.1", - "laminas-api-tools/api-tools-oauth2": "^1.4", + "laminas-api-tools/api-tools-api-problem": "^1.4.0", + "laminas-api-tools/api-tools-content-negotiation": "^1.5.0", + "laminas-api-tools/api-tools-oauth2": "^1.7", "laminas/laminas-authentication": "^2.5.3", "laminas/laminas-eventmanager": "^2.6.3 || ^3.0.1", "laminas/laminas-http": "^2.5.4", @@ -403,22 +441,19 @@ "laminas/laminas-servicemanager": "^2.7.6 || ^3.1", "laminas/laminas-stdlib": "^2.7.7 || ^3.0.1", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" + "php": "^7.3 || ~8.0.0" }, "replace": { - "zfcampus/zf-mvc-auth": "self.version" + "zfcampus/zf-mvc-auth": "^1.5.1" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "^2.1", "laminas/laminas-session": "^2.8.5", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5" + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5.x-dev", - "dev-develop": "1.6.x-dev" - }, "laminas": { "module": "Laminas\\ApiTools\\MvcAuth" } @@ -428,7 +463,29 @@ "Laminas\\ApiTools\\MvcAuth\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "LaminasTest\\ApiTools\\MvcAuth\\": "test/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": [ + "phpcs" + ], + "cs-fix": [ + "phpcbf" + ], + "test": [ + "phpunit --colors=always" + ], + "test-coverage": [ + "phpunit --colors=always --coverage-clover clover.xml" + ] + }, "license": [ "BSD-3-Clause" ], @@ -440,54 +497,55 @@ "module" ], "support": { - "chat": "https://laminas.dev/chat", "docs": "https://api-tools.getlaminas.org/documentation", - "forum": "https://discourse.laminas.dev", "issues": "https://github.com/laminas-api-tools/api-tools-mvc-auth/issues", + "source": "https://github.com/laminas-api-tools/api-tools-mvc-auth", "rss": "https://github.com/laminas-api-tools/api-tools-mvc-auth/releases.atom", - "source": "https://github.com/laminas-api-tools/api-tools-mvc-auth" + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" }, - "time": "2019-12-31T16:00:38+00:00" + "time": "2021-04-30T13:15:17+00:00" }, { "name": "laminas-api-tools/api-tools-oauth2", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", - "url": "https://github.com/laminas-api-tools/api-tools-oauth2.git", - "reference": "bc01503799e578bc3e92d10077cf55d49c46383f" + "url": "https://github.com/eimkua1/api-tools-oauth2.git", + "reference": "7912c0f04f8e66daac946518a61300b3b092e02b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas-api-tools/api-tools-oauth2/zipball/bc01503799e578bc3e92d10077cf55d49c46383f", - "reference": "bc01503799e578bc3e92d10077cf55d49c46383f", + "url": "https://api.github.com/repos/eimkua1/api-tools-oauth2/zipball/7912c0f04f8e66daac946518a61300b3b092e02b", + "reference": "7912c0f04f8e66daac946518a61300b3b092e02b", "shasum": "" }, "require": { "bshaffer/oauth2-server-php": "^1.10", - "laminas-api-tools/api-tools-api-problem": "^1.2.1", - "laminas-api-tools/api-tools-content-negotiation": "^1.2.1", + "laminas-api-tools/api-tools-api-problem": "^1.4.0", + "laminas-api-tools/api-tools-content-negotiation": "^1.5.0", "laminas/laminas-crypt": "^3.3", "laminas/laminas-http": "^2.5.4", "laminas/laminas-mvc": "^2.7.15 || ^3.0.2", "laminas/laminas-servicemanager": "^2.7.6 || ^3.1", "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" + "php": "^7.3 || ~8.0.0" }, "replace": { "zfcampus/zf-oauth2": "^1.5.0" }, "require-dev": { "laminas/laminas-authentication": "^2.5.3", - "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-coding-standard": "^2.1", "laminas/laminas-db": "^2.8.1", - "laminas/laminas-i18n": "^2.7.3", + "laminas/laminas-i18n": "^2.11.1", "laminas/laminas-log": "^2.9", "laminas/laminas-modulemanager": "^2.7.2", "laminas/laminas-serializer": "^2.8", - "laminas/laminas-test": "^2.6.1 || ^3.0.1", + "laminas/laminas-test": "dev-php8", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5" + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.3" }, "suggest": { "alcaeus/mongo-php-adapter": "^1.0.5, if you are using ext/mongodb and wish to use the MongoAdapter for OAuth2 credential storage." @@ -501,7 +559,29 @@ "Laminas\\ApiTools\\OAuth2\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "LaminasTest\\ApiTools\\OAuth2\\": "test/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": [ + "phpcs" + ], + "cs-fix": [ + "phpcbf" + ], + "test": [ + "phpunit --colors=always" + ], + "test-coverage": [ + "phpunit --colors=always --coverage-clover clover.xml" + ] + }, "license": [ "BSD-3-Clause" ], @@ -515,20 +595,14 @@ "oauth2" ], "support": { - "chat": "https://laminas.dev/chat", "docs": "https://api-tools.getlaminas.org/documentation", - "forum": "https://discourse.laminas.dev", "issues": "https://github.com/laminas-api-tools/api-tools-oauth2/issues", + "source": "https://github.com/laminas-api-tools/api-tools-oauth2", "rss": "https://github.com/laminas-api-tools/api-tools-oauth2/releases.atom", - "source": "https://github.com/laminas-api-tools/api-tools-oauth2" + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2020-09-10T19:00:02+00:00" + "time": "2021-04-30T09:50:15+00:00" }, { "name": "laminas/laminas-authentication", @@ -2718,28 +2792,29 @@ }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2773,24 +2848,24 @@ "issues": "https://github.com/phar-io/manifest/issues", "source": "https://github.com/phar-io/manifest/tree/master" }, - "time": "2018-07-08T19:23:20+00:00" + "time": "2020-06-27T14:33:11+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -2822,9 +2897,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/master" + "source": "https://github.com/phar-io/version/tree/3.1.0" }, - "time": "2018-07-08T19:19:57+00:00" + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -3051,6 +3126,58 @@ }, "time": "2021-03-17T13:42:18+00:00" }, + { + "name": "phpspec/prophecy-phpunit", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy-phpunit.git", + "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/2d7a9df55f257d2cba9b1d0c0963a54960657177", + "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8", + "phpspec/prophecy": "^1.3", + "phpunit/phpunit": "^9.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\PhpUnit\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Integrating the Prophecy mocking library in PHPUnit test cases", + "homepage": "http://phpspec.net", + "keywords": [ + "phpunit", + "prophecy" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy-phpunit/issues", + "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.1" + }, + "time": "2020-07-09T08:33:42+00:00" + }, { "name": "phpstan/phpdoc-parser", "version": "0.5.4", @@ -3103,40 +3230,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "9.2.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "f6293e1b30a2354e8428e004689671b83871edde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -3164,34 +3295,40 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" }, - "time": "2018-10-31T16:06:48+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -3218,7 +3355,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" }, "funding": [ { @@ -3226,26 +3363,38 @@ "type": "github" } ], - "time": "2020-11-30T08:25:21+00:00" + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -3262,41 +3411,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.3", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -3315,14 +3470,14 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { @@ -3330,33 +3485,32 @@ "type": "github" } ], - "time": "2020-11-30T08:20:02+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.1.2", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3371,17 +3525,18 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -3389,58 +3544,59 @@ "type": "github" } ], - "abandoned": true, - "time": "2020-11-30T08:38:46+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "9.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276", + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.2", + "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -3448,12 +3604,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3476,34 +3635,156 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-05T04:49:07+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, - "time": "2020-01-08T08:45:45+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -3525,7 +3806,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -3533,34 +3814,34 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3599,7 +3880,64 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" }, "funding": [ { @@ -3607,33 +3945,33 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "3.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3665,7 +4003,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" }, "funding": [ { @@ -3673,27 +4011,27 @@ "type": "github" } ], - "time": "2020-11-30T07:59:04+00:00" + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "4.2.4", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -3701,7 +4039,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3728,7 +4066,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" }, "funding": [ { @@ -3736,34 +4074,34 @@ "type": "github" } ], - "time": "2020-11-30T07:53:42+00:00" + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.3", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3805,7 +4143,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" }, "funding": [ { @@ -3813,27 +4151,30 @@ "type": "github" } ], - "time": "2020-11-30T07:47:53+00:00" + "time": "2020-09-28T05:24:23+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -3841,7 +4182,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3866,36 +4207,99 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" }, - "time": "2017-04-27T15:39:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3917,7 +4321,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -3925,32 +4329,32 @@ "type": "github" } ], - "time": "2020-11-30T07:40:27+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -3972,7 +4376,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -3980,32 +4384,32 @@ "type": "github" } ], - "time": "2020-11-30T07:37:18+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.1", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -4035,7 +4439,7 @@ "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" }, "funding": [ { @@ -4043,29 +4447,32 @@ "type": "github" } ], - "time": "2020-11-30T07:34:24+00:00" + "time": "2020-10-26T13:17:30+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4087,7 +4494,7 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" }, "funding": [ { @@ -4095,29 +4502,86 @@ "type": "github" } ], - "time": "2020-11-30T07:30:19+00:00" + "abandoned": true, + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4140,22 +4604,28 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "slevomat/coding-standard", - "version": "7.0.8", + "version": "7.0.9", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932" + "reference": "d59652e000bcde019459dcba677de030867d0232" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/48141737f9e5ed701ef8bcea2027e701b50bd932", - "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/d59652e000bcde019459dcba677de030867d0232", + "reference": "d59652e000bcde019459dcba677de030867d0232", "shasum": "" }, "require": { @@ -4167,16 +4637,16 @@ "require-dev": { "phing/phing": "2.16.4", "php-parallel-lint/php-parallel-lint": "1.3.0", - "phpstan/phpstan": "0.12.86", + "phpstan/phpstan": "0.12.88", "phpstan/phpstan-deprecation-rules": "0.12.6", - "phpstan/phpstan-phpunit": "0.12.18", + "phpstan/phpstan-phpunit": "0.12.19", "phpstan/phpstan-strict-rules": "0.12.9", - "phpunit/phpunit": "7.5.20|8.5.5|9.5.4" + "phpunit/phpunit": "7.5.20|8.5.5|9.5.5" }, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -4191,7 +4661,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.0.8" + "source": "https://github.com/slevomat/coding-standard/tree/7.0.9" }, "funding": [ { @@ -4203,7 +4673,7 @@ "type": "tidelift" } ], - "time": "2021-05-10T08:51:20+00:00" + "time": "2021-06-07T10:08:42+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -4510,7 +4980,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.3" + "php": "^7.3 || ~8.0.0" }, "platform-dev": [], "plugin-api-version": "2.0.0" diff --git a/config/module.config.php b/config/module.config.php index 5b87dbd..a6faa87 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -2,6 +2,9 @@ declare(strict_types=1); +use Laminas\ApiTools\Rest\Factory\OptionsListenerFactory; +use Laminas\ApiTools\Rest\Factory\RestControllerFactory; +use Laminas\ApiTools\Rest\Listener\RestParametersListener; use Laminas\ApiTools\Rest\Factory\OptionsListenerFactory; use Laminas\ApiTools\Rest\Factory\RestControllerFactory; use Laminas\ApiTools\Rest\Listener\RestParametersListener; diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 69ab462..1d0374a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,13 @@ - - - - ./test - - - - - ./src - - + + + + ./src + + + + + ./test + + diff --git a/src/Listener/OptionsListener.php b/src/Listener/OptionsListener.php index bcd08c7..f0b9ef7 100644 --- a/src/Listener/OptionsListener.php +++ b/src/Listener/OptionsListener.php @@ -36,8 +36,11 @@ public function __construct(array $config) $this->config = $config; } - /** @param int $priority */ - public function attach(EventManagerInterface $events, $priority = 1): void + /** + * @param int $priority + * @return void + */ + public function attach(EventManagerInterface $events, $priority = 1) { $this->listeners[] = $events->attach(MvcEvent::EVENT_ROUTE, [$this, 'onRoute'], -100); } diff --git a/test/AbstractResourceListenerTest.php b/test/AbstractResourceListenerTest.php index 6f573b6..0416372 100644 --- a/test/AbstractResourceListenerTest.php +++ b/test/AbstractResourceListenerTest.php @@ -25,25 +25,28 @@ class AbstractResourceListenerTest extends TestCase /** @var Resource */ private $resource; - /** @var EventManager */ - private $events; - /** @var TestAsset\TestResourceListener */ private $listener; - public function setUp() + public function setUp(): void { $this->methodInvokedInListener = null; $this->paramsPassedToListener = null; $this->resource = new Resource(); - $this->events = $events = new EventManager(); + $events = new EventManager(); $this->resource->setEventManager($events); $this->listener = new TestAsset\TestResourceListener($this); $this->listener->attach($events); } + /** + * @psalm-return array + * }> + */ public function events(): array { // Casting arrays to objects when the associated Resource method will diff --git a/test/ChildResourcesIntegrationTest.php b/test/ChildResourcesIntegrationTest.php index ebb45b1..b9de4c8 100644 --- a/test/ChildResourcesIntegrationTest.php +++ b/test/ChildResourcesIntegrationTest.php @@ -27,6 +27,7 @@ use Laminas\View\Helper\Url as UrlHelper; use Laminas\View\HelperPluginManager; use PHPUnit\Framework\TestCase; +use Prophecy\PhpUnit\ProphecyTrait; use ReflectionObject; use stdClass; @@ -36,6 +37,7 @@ class ChildResourcesIntegrationTest extends TestCase { + use ProphecyTrait; use RouteMatchFactoryTrait; use TreeRouteStackFactoryTrait; @@ -60,7 +62,7 @@ class ChildResourcesIntegrationTest extends TestCase /** @var ControllerPluginManager */ private $plugins; - public function setUp() + public function setUp(): void { $this->setupRouter(); $this->setupHelpers(); @@ -329,13 +331,13 @@ public function testChildResourceObjectIdentifierMappingInCollectionsViaControll $this->assertObjectHasAttribute('_embedded', $test); $this->assertObjectHasAttribute('children', $test->_embedded); - $this->assertInternalType('array', $test->_embedded->children); + $this->assertIsArray($test->_embedded->children); foreach ($test->_embedded->children as $child) { $this->assertObjectHasAttribute('_links', $child); $this->assertObjectHasAttribute('self', $child->_links); $this->assertObjectHasAttribute('href', $child->_links->self); - $this->assertRegExp( + $this->assertMatchesRegularExpression( '#^http://localhost.localdomain/api/parent/anakin/child/[^/]+$#', $child->_links->self->href ); diff --git a/test/CollectionIntegrationTest.php b/test/CollectionIntegrationTest.php index 3a21c03..4314f2a 100644 --- a/test/CollectionIntegrationTest.php +++ b/test/CollectionIntegrationTest.php @@ -40,6 +40,7 @@ use Laminas\View\Helper\Url as UrlHelper; use Laminas\View\HelperPluginManager; use PHPUnit\Framework\TestCase; +use Prophecy\PhpUnit\ProphecyTrait; use function json_decode; use function method_exists; @@ -47,6 +48,7 @@ class CollectionIntegrationTest extends TestCase { + use ProphecyTrait; use TreeRouteStackFactoryTrait; /** @var HalHelper */ @@ -76,7 +78,7 @@ class CollectionIntegrationTest extends TestCase /** @var RestController */ private $controller; - public function setUp() + public function setUp(): void { $this->setUpRenderer(); $this->setUpController(); @@ -168,7 +170,7 @@ public function setUpCollection(): Paginator return $collection; } - public function setUpListeners() + public function setUpListeners(): void { if ($this->listeners) { return; @@ -178,7 +180,7 @@ public function setUpListeners() $this->listeners->setCollection($this->setUpCollection()); } - public function setUpController() + public function setUpController(): void { $this->setUpRouter(); $this->setUpListeners(); @@ -196,7 +198,7 @@ public function setUpController() $this->setUpContentNegotiation($controller); } - public function setUpContentNegotiation(AbstractController $controller) + public function setUpContentNegotiation(AbstractController $controller): void { $plugins = new ControllerPluginManager($this->prophesize(ContainerInterface::class)->reveal()); $plugins->setService('hal', $this->linksHelper); @@ -219,7 +221,7 @@ public function setUpContentNegotiation(AbstractController $controller) $controller->getEventManager()->attach(MvcEvent::EVENT_DISPATCH, $acceptListener, -10); } - public function setUpRequest() + public function setUpRequest(): void { if ($this->request) { return; @@ -239,7 +241,7 @@ public function setUpRequest() $headers->addHeaderLine('Content-Type', 'application/json'); } - public function setUpResponse() + public function setUpResponse(): void { if ($this->response) { return; @@ -285,13 +287,13 @@ public function testCollectionLinksIncludeFullQueryString() foreach ($links as $name => $link) { $this->assertArrayHasKey('href', $link); if ('first' !== $name) { - $this->assertContains( + $this->assertStringContainsString( 'page=', $link['href'], "Link $name ('{$link['href']}') is missing page query param" ); } - $this->assertContains( + $this->assertStringContainsString( 'query=foo', $link['href'], "Link $name ('{$link['href']}') is missing query query param" @@ -385,18 +387,18 @@ public function testFactoryEnabledListenerCreatesQueryStringWhitelist() foreach ($links as $name => $link) { $this->assertArrayHasKey('href', $link); if ('first' !== $name) { - $this->assertContains( + $this->assertStringContainsString( 'page=', $link['href'], "Link $name ('{$link['href']}') is missing page query param" ); } - $this->assertContains( + $this->assertStringContainsString( 'query=foo', $link['href'], "Link $name ('{$link['href']}') is missing query query param" ); - $this->assertNotContains( + $this->assertStringNotContainsString( 'bar=baz', $link['href'], "Link $name ('{$link['href']}') includes query param that should have been omitted" diff --git a/test/Factory/OptionsListenerFactoryTest.php b/test/Factory/OptionsListenerFactoryTest.php index cd20464..560167a 100644 --- a/test/Factory/OptionsListenerFactoryTest.php +++ b/test/Factory/OptionsListenerFactoryTest.php @@ -18,12 +18,13 @@ class OptionsListenerFactoryTest extends TestCase /** @var OptionsListenerFactory */ private $factory; - public function setUp() + public function setUp(): void { $this->services = new ServiceManager(); $this->factory = new OptionsListenerFactory(); } + /** @psalm-return array>> */ public function seedConfigService(): array { return [ diff --git a/test/Factory/RestControllerFactoryTest.php b/test/Factory/RestControllerFactoryTest.php index 0e25ec8..fd0d001 100644 --- a/test/Factory/RestControllerFactoryTest.php +++ b/test/Factory/RestControllerFactoryTest.php @@ -26,14 +26,12 @@ class RestControllerFactoryTest extends TestCase /** @var ControllerManager */ private $controllers; - /** @var RestControllerFactory */ - private $factory; - - public function setUp() + public function setUp(): void { $this->services = $services = new ServiceManager(); $this->controllers = $controllers = new ControllerManager($this->services); - $this->factory = $factory = new RestControllerFactory(); + + $factory = new RestControllerFactory(); $controllers->addAbstractFactory($factory); @@ -46,6 +44,7 @@ public function setUp() $services->setShared('EventManager', false); } + /** @psalm-return array>> */ public function getConfig(): array { return [ diff --git a/test/Listener/OptionsListenerTest.php b/test/Listener/OptionsListenerTest.php index 9cca9c6..5ff3452 100644 --- a/test/Listener/OptionsListenerTest.php +++ b/test/Listener/OptionsListenerTest.php @@ -38,6 +38,7 @@ public function testListenerRegistersAtExpectedPriority() ); } + /** @psalm-return array */ public function seedListenerConfig(): array { return [ @@ -82,6 +83,12 @@ public function seedListenerConfig(): array ]; } + /** + * @psalm-return array + * }> + */ public function validMethodsProvider(): array { return [ @@ -166,6 +173,13 @@ public function validMethodsProvider(): array ]; } + /** + * @psalm-return array + * 2: string[] + * }> + */ public function invalidMethodsProvider(): array { return [ diff --git a/test/Listener/RestParametersListenerTest.php b/test/Listener/RestParametersListenerTest.php index a8ba2bd..843bcdc 100644 --- a/test/Listener/RestParametersListenerTest.php +++ b/test/Listener/RestParametersListenerTest.php @@ -26,28 +26,23 @@ class RestParametersListenerTest extends TestCase /** @var Resource */ private $resource; - /** @var RestController */ - private $controller; - /** @var RouteMatch|V2RouteMatch */ private $matches; /** @var Parameters */ private $query; - /** @var Request */ - private $request; - /** @var MvcEvent */ private $event; /** @var RestParametersListener */ private $listener; - public function setUp() + public function setUp(): void { - $this->resource = $resource = new Resource(); - $this->controller = $controller = new RestController(); + $this->resource = $resource = new Resource(); + + $controller = new RestController(); $controller->setResource($resource); $this->matches = $matches = $this->createRouteMatch([]); diff --git a/test/ResourceEventTest.php b/test/ResourceEventTest.php index f7d1b04..e658565 100644 --- a/test/ResourceEventTest.php +++ b/test/ResourceEventTest.php @@ -26,7 +26,7 @@ class ResourceEventTest extends TestCase /** @var ResourceEvent */ private $event; - public function setUp() + public function setUp(): void { $this->matches = $this->createRouteMatch([ 'foo' => 'bar', diff --git a/test/ResourceTest.php b/test/ResourceTest.php index 2df2e97..d3d3253 100644 --- a/test/ResourceTest.php +++ b/test/ResourceTest.php @@ -30,7 +30,7 @@ class ResourceTest extends TestCase /** @var Resource */ private $resource; - public function setUp() + public function setUp(): void { $this->events = new EventManager(); $this->resource = new Resource(); diff --git a/test/RestControllerTest.php b/test/RestControllerTest.php index 67064a1..b3a0c9c 100644 --- a/test/RestControllerTest.php +++ b/test/RestControllerTest.php @@ -44,6 +44,7 @@ use Laminas\View\Helper\Url as UrlHelper; use Laminas\View\Model\ModelInterface; use PHPUnit\Framework\TestCase; +use Prophecy\PhpUnit\ProphecyTrait; use ReflectionMethod; use ReflectionObject; use stdClass; @@ -59,6 +60,7 @@ class RestControllerTest extends TestCase { + use ProphecyTrait; use RouteMatchFactoryTrait; use SegmentRouteFactoryTrait; use SimpleRouteStackFactoryTrait; @@ -75,7 +77,7 @@ class RestControllerTest extends TestCase /** @var Resource */ private $resource; - public function setUp() + public function setUp(): void { $this->controller = $controller = new RestController(); @@ -215,7 +217,7 @@ public function assertProblemApiResult(int $expectedStatus, string $expectedDeta $this->assertInstanceOf(ApiProblem::class, $result); $problem = $result->toArray(); $this->assertEquals($expectedStatus, $problem['status']); - $this->assertContains($expectedDetail, $problem['detail']); + $this->assertStringContainsString($expectedDetail, $problem['detail']); } public function testCreateReturnsProblemResultOnCreationException() @@ -1863,8 +1865,8 @@ public function testLocationHeaderGeneratedDuringCreateContainsOnlyLinkHref(): H $this->assertTrue($headers->has('Location')); $location = $headers->get('Location')->getFieldValue(); - $this->assertContains('http://localhost.localdomain/resource/foo', $location); - $this->assertNotContains('true', $location); + $this->assertStringContainsString('http://localhost.localdomain/resource/foo', $location); + $this->assertStringNotContainsString('true', $location); return $headers; } @@ -1879,8 +1881,8 @@ public function testContentLocationHeaderIsGeneratedOnlyFromLinkHref(Headers $he $this->assertTrue($headers->has('Content-Location')); $location = $headers->get('Content-Location')->getFieldValue(); - $this->assertContains('http://localhost.localdomain/resource/foo', $location); - $this->assertNotContains('true', $location); + $this->assertStringContainsString('http://localhost.localdomain/resource/foo', $location); + $this->assertStringNotContainsString('true', $location); } /** From bd74b6330732424d93748a8b50c07fae868438d7 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 21 Jun 2021 11:21:57 -0500 Subject: [PATCH 2/3] qa: set COMPOSER_AUTH in workflow Attempt to circumvent rate limiting Signed-off-by: Matthew Weier O'Phinney --- .github/workflows/continuous-integration.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index fe5f1b4..6ca0de2 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -30,4 +30,6 @@ jobs: - name: ${{ matrix.name }} uses: laminas/laminas-continuous-integration-action@v1 with: - job: ${{ matrix.job }} \ No newline at end of file + job: ${{ matrix.job }} + env: + COMPOSER_AUTH: "{\"github-oauth\":{\"github.com\":\"${{ secrets.GITHUB_TOKEN }}\"}}" From 5134aa79a18c7bd45daf4ec936045507d5508165 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 21 Jun 2021 11:33:54 -0500 Subject: [PATCH 3/3] qa: update to laminas-eventmanger 3.2 as minimum Required for PHPUnit 9.3 support. Signed-off-by: Matthew Weier O'Phinney --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c932160..245269e 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "laminas-api-tools/api-tools-content-negotiation": "^1.5.0", "laminas-api-tools/api-tools-hal": "^1.4", "laminas-api-tools/api-tools-mvc-auth": "^1.6", - "laminas/laminas-eventmanager": "^2.6.3 || ^3.0.1", + "laminas/laminas-eventmanager": "^3.2", "laminas/laminas-mvc": "^2.7.14 || ^3.0.2", "laminas/laminas-paginator": "^2.7", "laminas/laminas-stdlib": "^2.7.8 || ^3.3", diff --git a/composer.lock b/composer.lock index 7ff3075..41a8882 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": "631519187fce422f72fc59ed558b5eb0", + "content-hash": "244b15fd58d73834e6bdc1986242cbab", "packages": [ { "name": "brick/varexporter",