From 40d516f161ce6e85051f63d7c6bd068d735410c5 Mon Sep 17 00:00:00 2001 From: Alex Pindyurin Date: Fri, 30 Apr 2021 16:38:49 +0300 Subject: [PATCH 1/4] PHP 8.0 support Signed-off-by: Alex Pindyurin --- .gitignore | 2 + composer.json | 35 +- composer.lock | 1327 ++++++++++++++----- config/module.config.php | 4 +- phpcs.xml | 17 +- phpunit.xml.dist | 25 +- src/Factory/OptionsListenerFactory.php | 2 - src/Factory/RpcControllerFactory.php | 47 +- src/Module.php | 4 +- src/OptionsListener.php | 20 +- src/ParameterMatcher.php | 54 +- src/RpcController.php | 38 +- test/Factory/OptionsListenerFactoryTest.php | 29 +- test/Factory/RpcControllerFactoryTest.php | 105 +- 14 files changed, 1238 insertions(+), 471 deletions(-) diff --git a/.gitignore b/.gitignore index d822fd3..52aa153 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /coveralls-upload.json /phpunit.xml /vendor/ +/.phpunit.result.cache +/.phpcs-cache diff --git a/composer.json b/composer.json index d9ab0c2..c9877aa 100644 --- a/composer.json +++ b/composer.json @@ -25,21 +25,32 @@ "module": "Laminas\\ApiTools\\Rpc" } }, + "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" + } + ], "require": { - "php": "^7.3", - "laminas-api-tools/api-tools-api-problem": "^1.2.1", - "laminas-api-tools/api-tools-content-negotiation": "^1.2.1", - "laminas/laminas-eventmanager": "^2.6.3 || ^3.0.1", - "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-stdlib": "^2.7.7 || ^3.0.1", - "laminas/laminas-view": "^2.8.1", - "laminas/laminas-zendframework-bridge": "^1.0" + "php": "^7.3 || ~8.0.0", + "laminas-api-tools/api-tools-api-problem": "^1.3", + "laminas-api-tools/api-tools-content-negotiation": "^1.5", + "laminas/laminas-eventmanager": "^3.3", + "laminas/laminas-http": "^2.14", + "laminas/laminas-mvc": "^3.2", + "laminas/laminas-servicemanager": "^3.6", + "laminas/laminas-stdlib": "^3.3", + "laminas/laminas-view": "^2.12", + "laminas/laminas-zendframework-bridge": "^1.2" }, "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" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 7daf0ef..7aa1bbd 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": "fc6cb1fe27f319ab65514c63e2b38e34", + "content-hash": "751d82e2e439df2036491e79c08b91a5", "packages": [ { "name": "brick/varexporter", @@ -87,16 +87,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": { @@ -107,21 +107,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" } @@ -131,7 +128,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" ], @@ -145,31 +164,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", @@ -180,26 +199,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" } @@ -209,7 +225,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" ], @@ -222,14 +260,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/laminas-config", @@ -434,16 +472,16 @@ }, { "name": "laminas/laminas-filter", - "version": "2.11.0", + "version": "2.11.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-filter.git", - "reference": "dd295a15f5c13d0c13d69ca0107190b1f2083d91" + "reference": "671724e163aa75c210e94d12b77a0f3f8240d4b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/dd295a15f5c13d0c13d69ca0107190b1f2083d91", - "reference": "dd295a15f5c13d0c13d69ca0107190b1f2083d91", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/671724e163aa75c210e94d12b77a0f3f8240d4b2", + "reference": "671724e163aa75c210e94d12b77a0f3f8240d4b2", "shasum": "" }, "require": { @@ -512,7 +550,7 @@ "type": "community_bridge" } ], - "time": "2021-03-16T14:37:02+00:00" + "time": "2021-05-24T18:29:02+00:00" }, { "name": "laminas/laminas-http", @@ -1553,6 +1591,76 @@ } ], "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -1624,31 +1732,36 @@ }, { "name": "laminas/laminas-coding-standard", - "version": "1.0.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539" + "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/08880ce2fbfe62d471cd3cb766a91da630b32539", - "reference": "08880ce2fbfe62d471cd3cb766a91da630b32539", + "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/bcf6e07fe4690240be7beb6d884d0b0fafa6a251", + "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "squizlabs/php_codesniffer": "^2.7" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "php": "^7.3 || ^8.0", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.6", + "webimpress/coding-standard": "^1.2" }, - "replace": { - "zendframework/zend-coding-standard": "self.version" + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "LaminasCodingStandard\\": "src/LaminasCodingStandard/" + } }, - "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Laminas coding standard", + "description": "Laminas Coding Standard", "homepage": "https://laminas.dev", "keywords": [ "Coding Standard", @@ -1662,7 +1775,13 @@ "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", "source": "https://github.com/laminas/laminas-coding-standard" }, - "time": "2019-12-31T16:28:26+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-05-29T15:53:59+00:00" }, { "name": "myclabs/deep-copy", @@ -1724,28 +1843,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": { @@ -1779,24 +1899,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": { @@ -1828,9 +1948,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", @@ -2057,42 +2177,148 @@ }, "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", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "e352d065af1ae9b41c12d1dfd309e90f7b1f55c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/e352d065af1ae9b41c12d1dfd309e90f7b1f55c9", + "reference": "e352d065af1ae9b41c12d1dfd309e90f7b1f55c9", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phing/phing": "^2.16.3", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.60", + "phpstan/phpstan-strict-rules": "^0.12.5", + "phpunit/phpunit": "^7.5.20", + "symfony/process": "^5.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/0.5.4" + }, + "time": "2021-04-03T14:46:19+00:00" + }, { "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": { @@ -2120,34 +2346,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": { @@ -2174,7 +2406,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": [ { @@ -2182,26 +2414,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/" @@ -2218,41 +2462,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": { @@ -2271,14 +2521,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": [ { @@ -2286,33 +2536,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": { @@ -2327,17 +2576,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": [ { @@ -2345,58 +2595,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.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", "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", + "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" @@ -2404,12 +2655,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/", @@ -2432,34 +2686,44 @@ ], "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.4" }, - "time": "2020-01-08T08:45:45+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-23T07:16:29+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "name": "sebastian/cli-parser", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "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/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "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": "1.0-dev" } }, "autoload": { @@ -2474,14 +2738,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" }, "funding": [ { @@ -2489,34 +2754,32 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2020-09-28T06:08:49+00:00" }, { - "name": "sebastian/comparator", - "version": "3.0.3", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -2531,13 +2794,126 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { + "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" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "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" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "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/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { "name": "Volker Dusch", "email": "github@wallbash.com" }, @@ -2555,7 +2931,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": [ { @@ -2563,33 +2996,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": { @@ -2621,7 +3054,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": [ { @@ -2629,27 +3062,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": "*" @@ -2657,7 +3090,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2684,7 +3117,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": [ { @@ -2692,34 +3125,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": { @@ -2761,7 +3194,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": [ { @@ -2769,27 +3202,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.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" }, "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/a90ccbddffa067b51f574dea6eb25d5680839455", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", "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": "*" @@ -2797,7 +3233,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2822,36 +3258,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.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:55:19+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": { @@ -2873,7 +3372,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": [ { @@ -2881,32 +3380,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": { @@ -2928,7 +3427,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": [ { @@ -2936,32 +3435,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": { @@ -2991,7 +3490,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": [ { @@ -2999,29 +3498,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": { @@ -3043,7 +3545,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": [ { @@ -3051,29 +3553,85 @@ "type": "github" } ], - "time": "2020-11-30T07:30:19+00:00" + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "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.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:18:59+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": { @@ -3096,70 +3654,110 @@ "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" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "slevomat/coding-standard", + "version": "7.0.8", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/48141737f9e5ed701ef8bcea2027e701b50bd932", + "reference": "48141737f9e5ed701ef8bcea2027e701b50bd932", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.1 || ^8.0", + "phpstan/phpdoc-parser": "0.5.1 - 0.5.4", + "squizlabs/php_codesniffer": "^3.6.0" }, - "time": "2016-10-03T07:35:21+00:00" + "require-dev": { + "phing/phing": "2.16.4", + "php-parallel-lint/php-parallel-lint": "1.3.0", + "phpstan/phpstan": "0.12.86", + "phpstan/phpstan-deprecation-rules": "0.12.6", + "phpstan/phpstan-phpunit": "0.12.18", + "phpstan/phpstan-strict-rules": "0.12.9", + "phpunit/phpunit": "7.5.20|8.5.5|9.5.4" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "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" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2021-05-10T08:51:20+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.2", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcs", + "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -3171,7 +3769,7 @@ } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" @@ -3181,20 +3779,20 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2018-11-07T22:31:41+00:00" + "time": "2021-04-09T00:54:41+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -3206,7 +3804,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3244,7 +3842,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -3260,7 +3858,7 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "theseer/tokenizer", @@ -3312,6 +3910,61 @@ ], "time": "2020-07-12T23:59:07+00:00" }, + { + "name": "webimpress/coding-standard", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/webimpress/coding-standard.git", + "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/8f4a220de33f471a8101836f7ec72b852c3f9f03", + "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0", + "squizlabs/php_codesniffer": "^3.6" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.4" + }, + "type": "phpcodesniffer-standard", + "extra": { + "dev-master": "1.2.x-dev", + "dev-develop": "1.3.x-dev" + }, + "autoload": { + "psr-4": { + "WebimpressCodingStandard\\": "src/WebimpressCodingStandard/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "Webimpress Coding Standard", + "keywords": [ + "Coding Standard", + "PSR-2", + "phpcs", + "psr-12", + "webimpress" + ], + "support": { + "issues": "https://github.com/webimpress/coding-standard/issues", + "source": "https://github.com/webimpress/coding-standard/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/michalbundyra", + "type": "github" + } + ], + "time": "2021-04-12T12:51:27+00:00" + }, { "name": "webmozart/assert", "version": "1.10.0", @@ -3377,7 +4030,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 d397dad..a889ada 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -9,7 +9,7 @@ namespace Laminas\ApiTools\Rpc; return [ - 'api-tools-rpc' => [ + 'api-tools-rpc' => [ // Array of Controller service name / configuration // // Configuration should include: @@ -29,7 +29,7 @@ // 'callable' => 'Api\Controller\Login::process', // ], ], - 'controllers' => [ + 'controllers' => [ 'abstract_factories' => [ Factory\RpcControllerFactory::class, ], diff --git a/phpcs.xml b/phpcs.xml index 6dd35d2..7b999d2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,9 +1,22 @@ - - + + + + + + + + + + config src test + + + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 71fd3c2..cb3ce83 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,16 @@ - - - - ./test - - - - - ./src - - + + + + ./src + + + + + ./test + + diff --git a/src/Factory/OptionsListenerFactory.php b/src/Factory/OptionsListenerFactory.php index 0755b5a..bc95cb5 100644 --- a/src/Factory/OptionsListenerFactory.php +++ b/src/Factory/OptionsListenerFactory.php @@ -14,7 +14,6 @@ class OptionsListenerFactory { /** - * @param ContainerInterface $container * @return OptionsListener */ public function __invoke(ContainerInterface $container) @@ -25,7 +24,6 @@ public function __invoke(ContainerInterface $container) /** * Attempt to marshal configuration from the "config" service. * - * @param ContainerInterface $container * @return array */ private function getConfig(ContainerInterface $container) diff --git a/src/Factory/RpcControllerFactory.php b/src/Factory/RpcControllerFactory.php index e607a8d..49cf83c 100644 --- a/src/Factory/RpcControllerFactory.php +++ b/src/Factory/RpcControllerFactory.php @@ -8,12 +8,20 @@ namespace Laminas\ApiTools\Rpc\Factory; +use Exception; use Interop\Container\ContainerInterface; use Laminas\ApiTools\Rpc\RpcController; use Laminas\ServiceManager\AbstractFactoryInterface; use Laminas\ServiceManager\Exception\ServiceNotCreatedException; use Laminas\ServiceManager\ServiceLocatorInterface; +use function class_exists; +use function explode; +use function is_callable; +use function is_string; +use function sprintf; +use function strpos; + class RpcControllerFactory implements AbstractFactoryInterface { /** @@ -21,6 +29,7 @@ class RpcControllerFactory implements AbstractFactoryInterface * loop. * * @see https://github.com/zfcampus/zf-rpc/issues/18 + * * @var null|string */ private $lastRequestedControllerService; @@ -28,8 +37,7 @@ class RpcControllerFactory implements AbstractFactoryInterface /** * Determine if we can create a service with name * - * @param ContainerInterface $container - * @param $requestedName + * @param string $requestedName * @return bool */ public function canCreate(ContainerInterface $container, $requestedName) @@ -62,9 +70,8 @@ public function canCreate(ContainerInterface $container, $requestedName) * * Provided for backwards compatibility; proxies to canCreate(). * - * @param ServiceLocatorInterface $controllerManager - * @param $name - * @param $requestedName + * @param string $name + * @param string $requestedName * @return bool */ public function canCreateServiceWithName(ServiceLocatorInterface $controllerManager, $name, $requestedName) @@ -76,14 +83,13 @@ public function canCreateServiceWithName(ServiceLocatorInterface $controllerMana /** * Create and return an RpcController instance. * - * @param ContainerInterface $container * @param string $requestedName * @param null|array $options * @return RpcController - * @throws ServiceNotCreatedException if the callable configuration value + * @throws ServiceNotCreatedException If the callable configuration value * associated with the controller is not callable. */ - public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { $config = $container->get('config'); $callable = $config['api-tools-rpc'][$requestedName]['callable']; @@ -94,7 +100,8 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o ); } - if (is_string($callable) + if ( + is_string($callable) && strpos($callable, '::') !== false ) { $callable = $this->marshalCallable($callable, $container); @@ -110,11 +117,10 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o * * Provided for backwards compatibility; proxies to __invoke(). * - * @param ServiceLocatorInterface $controllerManager - * @param $name - * @param $requestedName + * @param string $name + * @param string $requestedName * @return RpcController - * @throws \Exception + * @throws Exception */ public function createServiceWithName(ServiceLocatorInterface $controllerManager, $name, $requestedName) { @@ -126,19 +132,23 @@ public function createServiceWithName(ServiceLocatorInterface $controllerManager * Marshal an instance method callback from a given string. * * @param mixed $string String of the form class::method - * @param ContainerInterface $container * @return callable */ private function marshalCallable($string, ContainerInterface $container) { - $callable = false; - list($class, $method) = explode('::', $string, 2); + $callable = false; + [$class, $method] = explode('::', $string, 2); - if ($container->has('ControllerManager') + if ( + $container->has('ControllerManager') && $this->lastRequestedControllerService !== $class ) { $this->lastRequestedControllerService = $class; - $callable = $this->marshalCallableFromContainer($class, $method, $container->get('ControllerManager')); + $callable = $this->marshalCallableFromContainer( + $class, + $method, + $container->get('ControllerManager') + ); } $this->lastRequestedControllerService = null; @@ -167,7 +177,6 @@ private function marshalCallable($string, ContainerInterface $container) * * @param string $class * @param string $method - * @param ContainerInterface $container * @return false|callable */ private function marshalCallableFromContainer($class, $method, ContainerInterface $container) diff --git a/src/Module.php b/src/Module.php index 5654c87..7d8e844 100644 --- a/src/Module.php +++ b/src/Module.php @@ -8,6 +8,8 @@ namespace Laminas\ApiTools\Rpc; +use Laminas\Mvc\MvcEvent; + class Module { /** @@ -25,7 +27,7 @@ public function getConfig() * * Attaches the OptionsListener and the JSON view strategy. * - * @param \Laminas\Mvc\MvcEvent $e + * @param MvcEvent $e * @return void */ public function onBootstrap($e) diff --git a/src/OptionsListener.php b/src/OptionsListener.php index c35f48e..e3b1b6a 100644 --- a/src/OptionsListener.php +++ b/src/OptionsListener.php @@ -15,13 +15,18 @@ use Laminas\Http\Response; use Laminas\Mvc\MvcEvent; +use function array_key_exists; +use function array_walk; +use function implode; +use function in_array; +use function is_string; +use function strtoupper; + class OptionsListener implements ListenerAggregateInterface { use ListenerAggregateTrait; - /** - * @var array - */ + /** @var array */ protected $config; /** @@ -41,8 +46,7 @@ public function attach(EventManagerInterface $events, $priority = 1) } /** - * @param MvcEvent $event - * @return void|\Laminas\Http\Response + * @return void|Response */ public function onRoute(MvcEvent $event) { @@ -65,7 +69,8 @@ public function onRoute(MvcEvent $event) $config = $this->config[$controller]; - if (! array_key_exists('http_methods', $config) + if ( + ! array_key_exists('http_methods', $config) || empty($config['http_methods']) ) { // No HTTP methods set for controller, nothing to do @@ -121,7 +126,6 @@ protected function normalizeMethods($methods) * Create the Allow header * * @param array $options - * @param Response $response */ protected function createAllowHeader(array $options, Response $response) { @@ -134,7 +138,6 @@ protected function createAllowHeader(array $options, Response $response) * * Creates an empty response with an Allow header. * - * @param MvcEvent $event * @param array $options * @return Response */ @@ -148,7 +151,6 @@ protected function getOptionsResponse(MvcEvent $event, array $options) /** * Prepare a 405 response * - * @param MvcEvent $event * @param array $options * @return Response */ diff --git a/src/ParameterMatcher.php b/src/ParameterMatcher.php index 79257f6..a4a5796 100644 --- a/src/ParameterMatcher.php +++ b/src/ParameterMatcher.php @@ -19,27 +19,43 @@ use Laminas\Mvc\MvcEvent; use Laminas\Stdlib\RequestInterface; use Laminas\Stdlib\ResponseInterface; +use ReflectionException; use ReflectionFunction; use ReflectionObject; +use function count; +use function is_array; +use function is_string; +use function is_subclass_of; +use function sprintf; +use function str_replace; +use function strtolower; + class ParameterMatcher { - protected $mvcEvent = null; + /** @var MvcEvent */ + protected $mvcEvent; public function __construct(MvcEvent $mvcEvent) { $this->mvcEvent = $mvcEvent; } - public function getMatchedParameters($callable, $parameters) + /** + * @param callable $callable + * @param array $parameters + * @return array + * @throws ReflectionException + */ + public function getMatchedParameters($callable, $parameters): array { if (is_string($callable) || $callable instanceof Closure) { - $reflection = new ReflectionFunction($callable); + $reflection = new ReflectionFunction($callable); $reflMethodParams = $reflection->getParameters(); - } elseif (is_array($callable) && count($callable) == 2) { - $object = $callable[0]; - $method = $callable[1]; - $reflection = new ReflectionObject($object); + } elseif (is_array($callable) && count($callable) === 2) { + $object = $callable[0]; + $method = $callable[1]; + $reflection = new ReflectionObject($object); $reflMethodParams = $reflection->getMethod($method)->getParameters(); } else { throw new Exception('Unknown callable'); @@ -54,38 +70,42 @@ public function getMatchedParameters($callable, $parameters) } foreach ($reflMethodParams as $reflMethodParam) { - $paramName = $reflMethodParam->getName(); + $paramName = $reflMethodParam->getName(); $normalMethodParamName = str_replace(['-', '_'], '', strtolower($paramName)); if ($reflectionTypehint = $reflMethodParam->getClass()) { $typehint = $reflectionTypehint->getName(); - if ($typehint == PhpEnvironmentRequest::class - || $typehint == Request::class - || $typehint == RequestInterface::class + if ( + $typehint === PhpEnvironmentRequest::class + || $typehint === Request::class + || $typehint === RequestInterface::class || is_subclass_of($typehint, RequestInterface::class) ) { $dispatchParams[] = $this->mvcEvent->getRequest(); continue; } - if ($typehint == PhpEnvironmentResponse::class - || $typehint == Response::class - || $typehint == ResponseInterface::class + if ( + $typehint === PhpEnvironmentResponse::class + || $typehint === Response::class + || $typehint === ResponseInterface::class || is_subclass_of($typehint, ResponseInterface::class) ) { $dispatchParams[] = $this->mvcEvent->getResponse(); continue; } - if ($typehint == ApplicationInterface::class - || $typehint == Application::class + if ( + $typehint === ApplicationInterface::class + || $typehint === Application::class || is_subclass_of($typehint, ApplicationInterface::class) ) { $dispatchParams[] = $this->mvcEvent->getApplication(); continue; } - if ($typehint == MvcEvent::class + if ( + $typehint === MvcEvent::class || is_subclass_of($typehint, MvcEvent::class) ) { $dispatchParams[] = $this->mvcEvent; diff --git a/src/RpcController.php b/src/RpcController.php index 4c037e5..8462b06 100644 --- a/src/RpcController.php +++ b/src/RpcController.php @@ -9,14 +9,28 @@ namespace Laminas\ApiTools\Rpc; use Closure; +use Exception; use Laminas\Mvc\Controller\AbstractActionController as BaseAbstractActionController; use Laminas\Mvc\MvcEvent; -use Laminas\View\Model; +use Laminas\View\Model\JsonModel; + +use function call_user_func_array; +use function is_array; +use function is_callable; +use function is_object; +use function lcfirst; +use function method_exists; +use function str_replace; +use function ucwords; class RpcController extends BaseAbstractActionController { + /** @var callable */ protected $wrappedCallable; + /** + * @param callable $wrappedCallable + */ public function setWrappedCallable($wrappedCallable) { $this->wrappedCallable = $wrappedCallable; @@ -40,10 +54,10 @@ public function onDispatch(MvcEvent $e) $callable = $this->wrappedCallable; } elseif (is_array($this->wrappedCallable) && is_callable($this->wrappedCallable)) { $callable = $this->wrappedCallable; - } elseif (is_object($this->wrappedCallable) || is_null($this->wrappedCallable)) { - $action = $routeMatch->getParam('action', 'not-found'); - $method = static::getMethodFromAction($action); - $callable = (is_null($this->wrappedCallable) && get_class($this) !== __CLASS__) + } elseif (is_object($this->wrappedCallable) || null === $this->wrappedCallable) { + $action = $routeMatch->getParam('action', 'not-found'); + $method = static::getMethodFromAction($action); + $callable = null === $this->wrappedCallable && static::class !== self::class ? $this : $this->wrappedCallable; if (! method_exists($callable, $method)) { @@ -51,13 +65,13 @@ public function onDispatch(MvcEvent $e) } $callable = [$callable, $method]; } else { - throw new \Exception('RPC Controller Not Understood'); + throw new Exception('RPC Controller Not Understood'); } $dispatchParameters = $parameterMatcher->getMatchedParameters($callable, $routeParameters ?: []); - $result = call_user_func_array($callable, $dispatchParameters); + $result = call_user_func_array($callable, $dispatchParameters); - $e->setParam('LaminasContentNegotiationFallback', ['Laminas\View\Model\JsonModel' => ['application/json']]); + $e->setParam('LaminasContentNegotiationFallback', [JsonModel::class => ['application/json']]); $e->setResult($result); } @@ -69,10 +83,10 @@ public function onDispatch(MvcEvent $e) */ public static function getMethodFromAction($action) { - $method = str_replace(['.', '-', '_'], ' ', $action); - $method = ucwords($method); - $method = str_replace(' ', '', $method); - $method = lcfirst($method); + $method = str_replace(['.', '-', '_'], ' ', $action); + $method = ucwords($method); + $method = str_replace(' ', '', $method); + $method = lcfirst($method); return $method; } diff --git a/test/Factory/OptionsListenerFactoryTest.php b/test/Factory/OptionsListenerFactoryTest.php index 4b8595f..9886414 100644 --- a/test/Factory/OptionsListenerFactoryTest.php +++ b/test/Factory/OptionsListenerFactoryTest.php @@ -12,16 +12,18 @@ use Laminas\ApiTools\Rpc\Factory\OptionsListenerFactory; use Laminas\ApiTools\Rpc\OptionsListener; use PHPUnit\Framework\TestCase; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ProphecyInterface; +use ReflectionClass; class OptionsListenerFactoryTest extends TestCase { - /** - * @var ContainerInterface|ProphecyInterface - */ + use ProphecyTrait; + + /** @var ContainerInterface|ProphecyInterface */ private $container; - public function setUp() + public function setUp(): void { $this->container = $this->prophesize(ContainerInterface::class); } @@ -33,7 +35,7 @@ public function testWillCreateOptionsListenerWithEmptyConfigWhenConfigServiceIsN $listener = $factory($this->container->reveal()); $this->assertInstanceOf(OptionsListener::class, $listener); - $this->assertAttributeEquals([], 'config', $listener); + self::assertListenerConfig([], $listener); } public function testWillCreateOptionsListenerWithEmptyConfigWhenNoRpcConfigPresent() @@ -44,7 +46,7 @@ public function testWillCreateOptionsListenerWithEmptyConfigWhenNoRpcConfigPrese $listener = $factory($this->container->reveal()); $this->assertInstanceOf(OptionsListener::class, $listener); - $this->assertAttributeEquals([], 'config', $listener); + self::assertListenerConfig([], $listener); } public function testWillCreateOptionsListenerWithRpcConfigWhenPresent() @@ -59,6 +61,19 @@ public function testWillCreateOptionsListenerWithRpcConfigWhenPresent() $listener = $factory($this->container->reveal()); $this->assertInstanceOf(OptionsListener::class, $listener); - $this->assertAttributeEquals(['foo' => 'bar'], 'config', $listener); + self::assertListenerConfig(['foo' => 'bar'], $listener); + } + + /** + * @param array $expected + */ + private static function assertListenerConfig(array $expected, OptionsListener $listener): void + { + $reflectionClass = new ReflectionClass($listener); + $reflectionProperty = $reflectionClass->getProperty('config'); + $reflectionProperty->setAccessible(true); + $actual = $reflectionProperty->getValue($listener); + + self::assertEquals($expected, $actual); } } diff --git a/test/Factory/RpcControllerFactoryTest.php b/test/Factory/RpcControllerFactoryTest.php index fe3dccf..f8efc87 100644 --- a/test/Factory/RpcControllerFactoryTest.php +++ b/test/Factory/RpcControllerFactoryTest.php @@ -21,27 +21,27 @@ use Laminas\ServiceManager\ServiceLocatorInterface; use PHPUnit\Framework\TestCase; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ProphecyInterface; +use ReflectionClass; use ReflectionProperty; +use function class_exists; + class RpcControllerFactoryTest extends TestCase { - /** - * @var ServiceLocatorInterface|ProphecyInterface - */ + use ProphecyTrait; + + /** @var ServiceLocatorInterface|ProphecyInterface */ private $services; - /** - * @var ControllerManager|ProphecyInterface - */ + /** @var ControllerManager|ProphecyInterface */ private $controllers; - /** - * @var RpcControllerFactory - */ + /** @var RpcControllerFactory */ private $factory; - public function setUp() + public function setUp(): void { $this->services = $services = $this->prophesize(ServiceLocatorInterface::class); $services->willImplement(ContainerInterface::class); @@ -88,7 +88,7 @@ public function testWillPullNonCallableStaticCallableFromControllerManagerIfServ ); $this->assertInstanceOf(RpcController::class, $controller); - $this->assertAttributeSame([$foo->reveal(), 'bar'], 'wrappedCallable', $controller); + self::assertControllerWrappedCallable([$foo->reveal(), 'bar'], $controller); } /** @@ -126,7 +126,7 @@ public function testWillPullNonCallableStaticCallableFromServiceManagerIfService ); $this->assertInstanceOf(RpcController::class, $controller); - $this->assertAttributeSame([$foo->reveal(), 'bar'], 'wrappedCallable', $controller); + self::assertControllerWrappedCallable([$foo->reveal(), 'bar'], $controller); } /** @@ -146,10 +146,10 @@ public function testWillInstantiateCallableClassIfClassExists() $this->controllers->has(TestAsset\Foo::class)->willReturn(false); - $this->controllers->has(\ZFTest\Rpc\Factory\TestAsset\Foo::class)->willReturn(false); + $this->controllers->has(Foo::class)->willReturn(false); $this->services->has(TestAsset\Foo::class)->willReturn(false); - $this->services->has(\ZFTest\Rpc\Factory\TestAsset\Foo::class)->willReturn(false); + $this->services->has(Foo::class)->willReturn(false); $controllers = $this->controllers->reveal(); @@ -169,7 +169,7 @@ public function testWillInstantiateCallableClassIfClassExists() $r = new ReflectionProperty($controller, 'wrappedCallable'); $r->setAccessible(true); $callable = $r->getValue($controller); - $this->assertInternalType('array', $callable); + self::assertIsArray($callable); $this->assertInstanceOf(TestAsset\Foo::class, $callable[0]); $this->assertEquals('bar', $callable[1]); } @@ -209,9 +209,11 @@ public function testReportsCannotCreateServiceIfRpcConfigDoesNotContainServiceNa public function testReportsCannotCreateServiceIfRpcConfigForControllerIsNotArray() { $this->services->has('config')->willReturn(true); - $this->services->get('config')->willReturn(['api-tools-rpc' => [ - 'Controller\Foo' => true, - ]]); + $this->services->get('config')->willReturn([ + 'api-tools-rpc' => [ + 'Controller\Foo' => true, + ], + ]); $this->assertFalse($this->factory->canCreateServiceWithName( $this->controllers->reveal(), 'Controller\Foo', @@ -222,9 +224,11 @@ public function testReportsCannotCreateServiceIfRpcConfigForControllerIsNotArray public function testReportsCannotCreateServiceIfRpcConfigForControllerDoesNotContainCallableKey() { $this->services->has('config')->willReturn(true); - $this->services->get('config')->willReturn(['api-tools-rpc' => [ - 'Controller\Foo' => [], - ]]); + $this->services->get('config')->willReturn([ + 'api-tools-rpc' => [ + 'Controller\Foo' => [], + ], + ]); $this->assertFalse($this->factory->canCreateServiceWithName( $this->controllers->reveal(), 'Controller\Foo', @@ -232,7 +236,7 @@ public function testReportsCannotCreateServiceIfRpcConfigForControllerDoesNotCon )); } - public function invalidCallables() + public function invalidCallables(): array { return [ 'null' => [null], @@ -247,16 +251,17 @@ public function invalidCallables() /** * @dataProvider invalidCallables - * * @param mixed $callable */ public function testServiceCreationFailsForInvalidCallable($callable) { - $this->services->get('config')->willReturn(['api-tools-rpc' => [ - 'Controller\Foo' => [ - 'callable' => $callable, + $this->services->get('config')->willReturn([ + 'api-tools-rpc' => [ + 'Controller\Foo' => [ + 'callable' => $callable, + ], ], - ]]); + ]); $this->expectException(ServiceNotCreatedException::class); $this->expectExceptionMessage('Unable to create'); $this->factory->createServiceWithName( @@ -266,12 +271,14 @@ public function testServiceCreationFailsForInvalidCallable($callable) ); } - public function validCallbacks() + public function validCallbacks(): array { return [ 'function' => ['is_array'], - 'closure' => [function () { - }], + 'closure' => [ + function () { + }, + ], 'invokable' => [new TestAsset\Invokable()], 'instance-method' => [[new TestAsset\Foo(), 'bar']], 'static-method' => [[TestAsset\Foo::class, 'baz']], @@ -280,16 +287,17 @@ public function validCallbacks() /** * @dataProvider validCallbacks - * * @param callable $callable */ public function testServiceCreationReturnsRpcControllerWrappingCallableForValidCallbacks($callable) { - $this->services->get('config')->willReturn(['api-tools-rpc' => [ - 'Controller\Foo' => [ - 'callable' => $callable, + $this->services->get('config')->willReturn([ + 'api-tools-rpc' => [ + 'Controller\Foo' => [ + 'callable' => $callable, + ], ], - ]]); + ]); $controller = $this->factory->createServiceWithName( $this->controllers->reveal(), 'Controller\Foo', @@ -297,17 +305,18 @@ public function testServiceCreationReturnsRpcControllerWrappingCallableForValidC ); $this->assertInstanceOf(RpcController::class, $controller); - $this->assertAttributeSame($callable, 'wrappedCallable', $controller); + self::assertControllerWrappedCallable($callable, $controller); } /** - * @group 7 * @see https://github.com/zfcampus/zf-rpc/issues/18 + * + * @group 7 */ public function testFactoryDoesNotEnterACircularDependencyLookupCondition() { $config = [ - 'controllers' => [ + 'controllers' => [ 'abstract_factories' => [ RpcControllerFactory::class, ], @@ -339,13 +348,13 @@ public function testFactoryDoesNotEnterACircularDependencyLookupCondition() $controller = $controllerManager->get(TestAsset\Foo::class); $this->assertInstanceOf(RpcController::class, $controller); - $wrappedCallable = $this->readAttribute($controller, 'wrappedCallable'); + $wrappedCallable = self::getControllerWrappedCallable($controller); $this->assertInstanceOf(TestAsset\Foo::class, $wrappedCallable[0]); $this->assertEquals('bar', $wrappedCallable[1]); // The lines below verify that the callable is correctly called when decorated in an RpcController - $event = $this->prophesize(MvcEvent::class); + $event = $this->prophesize(MvcEvent::class); $routeMatch = $this->prophesize($this->getRouteMatchClass()); $event->getParam('LaminasContentNegotiationParameterData')->shouldBeCalled()->willReturn(false); $event->getRouteMatch()->shouldBeCalled()->willReturn($routeMatch->reveal()); @@ -372,4 +381,20 @@ private function getRouteMatchClass() } return LegacyRouteMatch::class; } + + private static function getControllerWrappedCallable(RpcController $controller): callable + { + $reflectionClass = new ReflectionClass($controller); + $reflectionProperty = $reflectionClass->getProperty('wrappedCallable'); + $reflectionProperty->setAccessible(true); + + return $reflectionProperty->getValue($controller); + } + + private static function assertControllerWrappedCallable(callable $expected, RpcController $controller): void + { + $actual = self::getControllerWrappedCallable($controller); + + self::assertSame($expected, $actual); + } } From 639338700afbce98a043a3d6a06ab0d31ca3449f Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 2 Jun 2021 09:57:38 -0500 Subject: [PATCH 2/4] qa: pin semantically to laminas-coding-standard - Use `~` instead of `^` to prevent bringing in new rules during updates. Signed-off-by: Matthew Weier O'Phinney --- composer.json | 2 +- composer.lock | 2 +- phpcs.xml => phpcs.xml.dist | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename phpcs.xml => phpcs.xml.dist (100%) diff --git a/composer.json b/composer.json index c9877aa..15b6ef3 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "laminas/laminas-zendframework-bridge": "^1.2" }, "require-dev": { - "laminas/laminas-coding-standard": "^2.1", + "laminas/laminas-coding-standard": "~2.3.0", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.3" }, diff --git a/composer.lock b/composer.lock index 7aa1bbd..5797bdd 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": "751d82e2e439df2036491e79c08b91a5", + "content-hash": "296863c09c74caa02b0e376845476111", "packages": [ { "name": "brick/varexporter", diff --git a/phpcs.xml b/phpcs.xml.dist similarity index 100% rename from phpcs.xml rename to phpcs.xml.dist From 916e5d89b6742e845ffbab21de66a6a409636ef9 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 2 Jun 2021 09:59:42 -0500 Subject: [PATCH 3/4] qa: apply new CS rules - Applies automated fixes, primarily removing file-level docblocks Signed-off-by: Matthew Weier O'Phinney --- config/module.config.php | 6 +----- src/Factory/OptionsListenerFactory.php | 6 +----- src/Factory/RpcControllerFactory.php | 6 +----- src/Module.php | 6 +----- src/OptionsListener.php | 6 +----- src/ParameterMatcher.php | 6 +----- src/RpcController.php | 6 +----- test/Factory/OptionsListenerFactoryTest.php | 6 +----- test/Factory/RpcControllerFactoryTest.php | 6 +----- test/Factory/TestAsset/Foo.php | 6 +----- test/Factory/TestAsset/Invokable.php | 6 +----- 11 files changed, 11 insertions(+), 55 deletions(-) diff --git a/config/module.config.php b/config/module.config.php index a889ada..935df6c 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -1,10 +1,6 @@ Date: Wed, 2 Jun 2021 11:50:10 -0500 Subject: [PATCH 4/4] qa: use github token to avoid rate limits 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..ce89be0 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -29,5 +29,7 @@ jobs: steps: - name: ${{ matrix.name }} uses: laminas/laminas-continuous-integration-action@v1 + env: + "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} with: - job: ${{ matrix.job }} \ No newline at end of file + job: ${{ matrix.job }}