From 6ed6ead3aee9351020073f0382062d6fc978df58 Mon Sep 17 00:00:00 2001 From: M Shahbaz Date: Fri, 4 Sep 2020 04:20:22 +0500 Subject: [PATCH 01/11] Slim 4 support Please update for slim 4 support and also respect version to 2 Thanks, --- src/Validation.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Validation.php b/src/Validation.php index 21fda11..c1899de 100644 --- a/src/Validation.php +++ b/src/Validation.php @@ -2,6 +2,7 @@ namespace DavidePastore\Slim\Validation; +use Psr\Http\Server\RequestHandlerInterface; use Respect\Validation\Exceptions\NestedValidationException; /** @@ -94,10 +95,10 @@ public function __construct($validators = null, $translator = null, $options = [ * * @return \Psr\Http\Message\ResponseInterface */ - public function __invoke($request, $response, $next) + public function __invoke($request, RequestHandlerInterface $handler) { $this->errors = []; - $params = $request->getParams(); + $params = $request->getParsedBody(); $params = array_merge((array) $request->getAttribute('routeInfo')[2], $params); $this->validate($params, $this->validators); @@ -106,7 +107,7 @@ public function __invoke($request, $response, $next) $request = $request->withAttribute($this->validators_name, $this->getValidators()); $request = $request->withAttribute($this->translator_name, $this->getTranslator()); - return $next($request, $response); + return $handler->handle($request); } /** From af94cfb29318b7c17df70a083324fe8dfc7fabed Mon Sep 17 00:00:00 2001 From: Shahbaz Date: Tue, 24 Nov 2020 17:02:21 +0500 Subject: [PATCH 02/11] Slim 4 support --- README.md | 2 +- composer.json | 11 +- composer.lock | 2051 +++++++++++++++++++++++++++++++------------- src/Validation.php | 22 +- 4 files changed, 1500 insertions(+), 586 deletions(-) diff --git a/README.md b/README.md index 2fd8289..0523594 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Via Composer $ composer require davidepastore/slim-validation ``` -Requires Slim 3.0.0 or newer. +Requires Slim 4.0.0 or newer. ## Usage diff --git a/composer.json b/composer.json index 922f641..f5fd9ae 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,12 @@ } ], "require": { - "php": ">=5.5.0", - "psr/http-message": "^1.0", - "respect/validation": "^1.1 >=1.1.23" + "php": ">=7.2.0", + "respect/validation": "^1.1 >=1.1.23 || ^2.0" }, "require-dev": { - "slim/slim": "~3.0", - "phpunit/phpunit": "^4.0", + "slim/slim": "~4.0", + "phpunit/phpunit": "^8.5", "scrutinizer/ocular": "~1.1" }, "autoload": { @@ -32,7 +31,7 @@ }, "config": { "platform": { - "php": "5.5" + "php": "7.2" } } } diff --git a/composer.lock b/composer.lock index e20218d..89ba842 100644 --- a/composer.lock +++ b/composer.lock @@ -1,38 +1,41 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d8e9540ba56f7f497e3eaf3bfafc1278", + "content-hash": "5b3d705ce1f1f3e1f22d4d8279d2e5c9", "packages": [ { - "name": "psr/http-message", - "version": "1.0.1", + "name": "respect/stringifier", + "version": "0.2.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/Respect/Stringifier.git", + "reference": "e55af3c8aeaeaa2abb5fa47a58a8e9688cc23b59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/Respect/Stringifier/zipball/e55af3c8aeaeaa2abb5fa47a58a8e9688cc23b59", + "reference": "e55af3c8aeaeaa2abb5fa47a58a8e9688cc23b59", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.8", + "malukenho/docheader": "^0.1.7", + "phpunit/phpunit": "^6.4" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" - } + "Respect\\Stringifier\\": "src/" + }, + "files": [ + "src/stringify.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -40,61 +43,60 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Respect/Stringifier Contributors", + "homepage": "https://github.com/Respect/Stringifier/graphs/contributors" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Converts any value to a string", + "homepage": "http://respect.github.io/Stringifier/", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "respect", + "stringifier", + "stringify" ], - "time": "2016-08-06T14:39:51+00:00" + "time": "2017-12-29T19:39:25+00:00" }, { "name": "respect/validation", - "version": "1.1.23", + "version": "2.0.17", "source": { "type": "git", "url": "https://github.com/Respect/Validation.git", - "reference": "add542ea48be874ca8ab82208367430488a01e77" + "reference": "314aa36e37dd3812b7d80c7bda3e83da5ee22d11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Respect/Validation/zipball/add542ea48be874ca8ab82208367430488a01e77", - "reference": "add542ea48be874ca8ab82208367430488a01e77", + "url": "https://api.github.com/repos/Respect/Validation/zipball/314aa36e37dd3812b7d80c7bda3e83da5ee22d11", + "reference": "314aa36e37dd3812b7d80c7bda3e83da5ee22d11", "shasum": "" }, "require": { - "php": ">=5.4", + "php": ">=7.2", + "respect/stringifier": "^0.2.0", "symfony/polyfill-mbstring": "^1.2" }, "require-dev": { - "egulias/email-validator": "~1.2", - "mikey179/vfsstream": "^1.5", - "phpunit/phpunit": "~4.0", - "symfony/validator": "~2.6.9", - "zendframework/zend-validator": "~2.3" + "egulias/email-validator": "^2.1", + "malukenho/docheader": "^0.1", + "mikey179/vfsstream": "^1.6", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.5", + "respect/coding-standard": "^2.1", + "squizlabs/php_codesniffer": "^3.5", + "symfony/validator": "^3.0||^4.0", + "zendframework/zend-validator": "^2.1" }, "suggest": { "egulias/email-validator": "Strict (RFC compliant) email validation", "ext-bcmath": "Arbitrary Precision Mathematics", + "ext-fileinfo": "File Information", "ext-mbstring": "Multibyte String Functions", - "friendsofphp/php-cs-fixer": "Fix PSR2 and other coding style issues", "symfony/validator": "Use Symfony validator through Respect\\Validation", "zendframework/zend-validator": "Use Zend Framework validator through Respect\\Validation" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { "Respect\\Validation\\": "library/" @@ -102,7 +104,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD Style" + "MIT" ], "authors": [ { @@ -117,24 +119,24 @@ "validation", "validator" ], - "time": "2018-08-18T13:10:37+00:00" + "time": "2020-08-23T00:24:43+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.9.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -142,7 +144,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -176,72 +182,44 @@ "portable", "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2020-10-23T14:02:19+00:00" } ], "packages-dev": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" - }, { "name": "doctrine/annotations", - "version": "v1.2.7", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } }, "notification-url": "https://packagist.org/downloads/", @@ -249,6 +227,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -257,10 +239,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -271,44 +249,41 @@ } ], "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", "keywords": [ "annotations", "docblock", "parser" ], - "time": "2015-08-31T12:32:49+00:00" + "time": "2020-10-26T10:28:16+00:00" }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1 || ^8.0" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^8.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -322,43 +297,48 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2020-11-10T18:47:58+00:00" }, { "name": "doctrine/lexer", - "version": "v1.0.1", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } }, "notification-url": "https://packagist.org/downloads/", @@ -366,50 +346,55 @@ "MIT" ], "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, { "name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com" }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" } ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", "keywords": [ + "annotations", + "docblock", "lexer", - "parser" + "parser", + "php" ], - "time": "2014-09-09T13:34:57+00:00" + "time": "2020-05-25T17:44:05+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { + "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" + "psr/log": "^1.1" }, "suggest": { "psr/log": "Required for using the Log middleware" @@ -417,16 +402,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "6.5-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\": "src/" - } + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -450,27 +435,27 @@ "rest", "web service" ], - "time": "2018-04-22T15:46:56+00:00" + "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "60d379c243457e073cff02bc323a2a86cb355631" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", + "reference": "60d379c243457e073cff02bc323a2a86cb355631", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { @@ -501,36 +486,41 @@ "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "time": "2020-09-30T07:37:28+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -560,26 +550,27 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2020-09-30T07:37:11+00:00" }, { "name": "jms/metadata", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/metadata.git", - "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab" + "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab", - "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/e5854ab1aa643623dc64adde718a8eec32b957a8", + "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8", "shasum": "" }, "require": { @@ -602,9 +593,13 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + }, { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" @@ -617,7 +612,7 @@ "xml", "yaml" ], - "time": "2016-12-05T10:18:33+00:00" + "time": "2018-10-26T12:40:10+00:00" }, { "name": "jms/parser-lib", @@ -656,16 +651,16 @@ }, { "name": "jms/serializer", - "version": "1.13.0", + "version": "1.14.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "00863e1d55b411cc33ad3e1de09a4c8d3aae793c" + "reference": "ba908d278fff27ec01fb4349f372634ffcd697c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/00863e1d55b411cc33ad3e1de09a4c8d3aae793c", - "reference": "00863e1d55b411cc33ad3e1de09a4c8d3aae793c", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/ba908d278fff27ec01fb4349f372634ffcd697c0", + "reference": "ba908d278fff27ec01fb4349f372634ffcd697c0", "shasum": "" }, "require": { @@ -705,7 +700,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.13-dev" + "dev-1.x": "1.14-dev" } }, "autoload": { @@ -718,13 +713,13 @@ "MIT" ], "authors": [ - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - }, { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" } ], "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", @@ -736,7 +731,55 @@ "serialization", "xml" ], - "time": "2018-07-25T13:58:54+00:00" + "time": "2020-02-22T20:59:37+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2020-11-13T09:40:50+00:00" }, { "name": "nikic/fast-route", @@ -784,6 +827,108 @@ ], "time": "2018-02-13T20:26:39+00:00" }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" + }, { "name": "phpcollection/phpcollection", "version": "0.5.0", @@ -834,35 +979,30 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -884,38 +1024,41 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.2.2", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157" + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157", - "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.3.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "mockery/mockery": "~1.3.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -926,44 +1069,45 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-08-08T06:39:58+00:00" + "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773" + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773", - "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -976,47 +1120,53 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-06-03T08:32:36+00:00" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpoption/phpoption", - "version": "1.5.0", + "version": "1.7.5", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "4.7.*" + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.7-dev" } }, "autoload": { - "psr-0": { - "PhpOption\\": "src/" + "psr-4": { + "PhpOption\\": "src/PhpOption/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache2" + "Apache-2.0" ], "authors": [ { "name": "Johannes M. Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" } ], "description": "Option Type for PHP", @@ -1026,42 +1176,42 @@ "php", "type" ], - "time": "2015-07-25T16:39:46+00:00" + "time": "2020-07-20T17:29:33+00:00" }, { "name": "phpspec/prophecy", - "version": "1.8.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0 <9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -1089,43 +1239,44 @@ "spy", "stub" ], - "time": "2018-08-05T17:53:17+00:00" + "time": "2020-09-29T09:10:42+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -1140,7 +1291,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1151,29 +1302,32 @@ "testing", "xunit" ], - "time": "2015-10-06T15:47:00+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "050bedf145a257b1ff02746c31894800e5122946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1188,7 +1342,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1198,7 +1352,7 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "time": "2018-09-13T20:33:42+00:00" }, { "name": "phpunit/php-text-template", @@ -1243,28 +1397,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1279,7 +1433,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1288,33 +1442,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2019-06-07T04:22:29+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.12", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1337,45 +1491,57 @@ "keywords": [ "tokenizer" ], - "time": "2017-12-04T08:55:13+00:00" + "abandoned": true, + "time": "2019-09-17T06:23:10+00:00" }, { "name": "phpunit/phpunit", - "version": "4.8.36", + "version": "8.5.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + "reference": "f5c8a5dd5e7e8d68d7562bfb48d47287d33937d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f5c8a5dd5e7e8d68d7562bfb48d47287d33937d6", + "reference": "f5c8a5dd5e7e8d68d7562bfb48d47287d33937d6", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.10", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -1383,7 +1549,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -1409,94 +1575,186 @@ "testing", "xunit" ], - "time": "2017-06-21T08:07:12+00:00" + "time": "2020-11-10T12:51:38+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "name": "psr/container", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": ">=5.3.0" }, - "require-dev": { - "phpunit/phpunit": "~4.4" + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } }, - "suggest": { - "ext-soap": "*" + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "mock", - "xunit" + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" ], - "time": "2015-10-02T06:51:40+00:00" + "time": "2019-04-30T12:38:16+00:00" }, { - "name": "pimple/pimple", - "version": "v3.2.3", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/container": "^1.0" + "php": ">=5.3.0" }, - "require-dev": { - "symfony/phpunit-bridge": "^3.2" + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/http-server-handler", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "Pimple": "src/" + "psr-4": { + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1505,34 +1763,42 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "http://pimple.sensiolabs.org", + "description": "Common interface for HTTP server-side request handler", "keywords": [ - "container", - "dependency injection" + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" ], - "time": "2018-01-21T07:42:36+00:00" + "time": "2018-10-30T16:46:14+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "psr/http-server-middleware", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.0", + "psr/http-message": "^1.0", + "psr/http-server-handler": "^1.0" }, "type": "library", "extra": { @@ -1542,7 +1808,7 @@ }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1555,29 +1821,31 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Common interface for HTTP server-side middleware", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2018-10-30T17:12:04+00:00" }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -1586,7 +1854,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -1611,33 +1879,73 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2020-03-23T09:12:05+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" }, { "name": "scrutinizer/ocular", - "version": "1.5.2", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/scrutinizer-ci/ocular.git", - "reference": "c9c72771ced2644338690554416bb59c86fff96c" + "reference": "65566d2e9c7c9e1f96502f5ffc49799b2a53ca29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrutinizer-ci/ocular/zipball/c9c72771ced2644338690554416bb59c86fff96c", - "reference": "c9c72771ced2644338690554416bb59c86fff96c", + "url": "https://api.github.com/repos/scrutinizer-ci/ocular/zipball/65566d2e9c7c9e1f96502f5ffc49799b2a53ca29", + "reference": "65566d2e9c7c9e1f96502f5ffc49799b2a53ca29", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "~6.0", + "guzzlehttp/guzzle": "~6.3", "jms/serializer": "^1.0.0", "phpoption/phpoption": "~1.0", - "symfony/console": "^2.0.5|~3.0|~4.0", - "symfony/process": "~2.3|~3.0|~4.0" + "symfony/console": "^2.1.0|~3.0|~4.0|~5.0", + "symfony/process": "~2.3|~3.0|~4.0|~5.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", "phpunit/phpunit": "^4.8.0", - "symfony/filesystem": "~2.0|~3.0|~4.0" + "symfony/filesystem": "~2.0|~3.0|~4.0|~5.0" }, "bin": [ "bin/ocular" @@ -1652,34 +1960,79 @@ "license": [ "Apache-2.0" ], - "time": "2018-04-24T20:18:55+00:00" + "time": "2019-11-25T10:14:15+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-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/", + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.4", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1710,38 +2063,39 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2018-07-12T15:12:46+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1766,34 +2120,40 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-05-22T07:24:03+00:00" + "time": "2019-02-04T06:01:07+00:00" }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1818,34 +2178,34 @@ "environment", "hhvm" ], - "time": "2016-08-18T05:49:44+00:00" + "time": "2019-11-20T08:46:58+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1858,6 +2218,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1866,17 +2230,13 @@ "name": "Volker Dusch", "email": "github@wallbash.com" }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, { "name": "Adam Harvey", "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], "description": "Provides the functionality to export PHP variables for visualization", @@ -1885,27 +2245,30 @@ "export", "exporter" ], - "time": "2016-06-17T09:04:28+00:00" + "time": "2019-09-14T09:02:43+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -1913,7 +2276,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1936,32 +2299,34 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { - "name": "sebastian/recursion-context", - "version": "1.0.5", + "name": "sebastian/object-enumerator", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1974,10 +2339,100 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" @@ -1989,23 +2444,119 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "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": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2018-10-04T04:07:39+00:00" + }, + { + "name": "sebastian/type", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-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", + "time": "2019-07-02T08:10:15+00:00" }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -2024,36 +2575,53 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "slim/slim", - "version": "3.10.0", + "version": "4.6.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748" + "reference": "9f6a54f70438655f8c4be63b2b442d34a0c8a142" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", - "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/9f6a54f70438655f8c4be63b2b442d34a0c8a142", + "reference": "9f6a54f70438655f8c4be63b2b442d34a0c8a142", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", - "nikic/fast-route": "^1.0", - "php": ">=5.5.0", - "pimple/pimple": "^3.0", + "ext-json": "*", + "nikic/fast-route": "^1.3", + "php": "^7.2", "psr/container": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "psr/http-server-handler": "^1.0", + "psr/http-server-middleware": "^1.0", + "psr/log": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.5" + "adriansuter/php-autoload-override": "^1.2", + "ext-simplexml": "*", + "guzzlehttp/psr7": "^1.7", + "http-interop/http-factory-guzzle": "^1.0", + "laminas/laminas-diactoros": "^2.4", + "nyholm/psr7": "^1.3", + "nyholm/psr7-server": "^1.0.0", + "phpspec/prophecy": "^1.12", + "phpstan/phpstan": "^0.12.54", + "phpunit/phpunit": "^8.5", + "slim/http": "^1.1", + "slim/psr7": "^1.2", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", + "ext-xml": "Needed to support XML format in BodyParsingMiddleware", + "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", + "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." }, "type": "library", "autoload": { @@ -2066,72 +2634,88 @@ "MIT" ], "authors": [ + { + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "https://joshlockhart.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" + }, { "name": "Rob Allen", "email": "rob@akrabat.com", "homepage": "http://akrabat.com" }, { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" + "name": "Pierre Berube", + "email": "pierre@lgse.com", + "homepage": "http://www.lgse.com" }, { "name": "Gabriel Manricks", "email": "gmanricks@me.com", "homepage": "http://gabrielmanricks.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" } ], "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://slimframework.com", + "homepage": "https://www.slimframework.com", "keywords": [ "api", "framework", "micro", "router" ], - "time": "2018-04-19T19:29:08+00:00" + "time": "2020-11-15T16:14:14+00:00" }, { "name": "symfony/console", - "version": "v2.8.44", + "version": "v4.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc" + "reference": "20f73dd143a5815d475e0838ff867bce1eebd9d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", - "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", + "url": "https://api.github.com/repos/symfony/console/zipball/20f73dd143a5815d475e0838ff867bce1eebd9d5", + "reference": "20f73dd143a5815d475e0838ff867bce1eebd9d5", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/debug": "^2.7.2|~3.0.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3|>=5", + "symfony/lock": "<4.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/event-dispatcher": "^4.3", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/var-dumper": "^4.3|^5.0" }, "suggest": { - "psr/log-implementation": "For using the console logger", + "psr/log": "For using the console logger", "symfony/event-dispatcher": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -2156,45 +2740,108 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:13:39+00:00" + "time": "2020-10-24T11:50:19+00:00" }, { - "name": "symfony/debug", - "version": "v2.8.44", + "name": "symfony/polyfill-ctype", + "version": "v1.20.0", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "d985c8546da49c4727e27dae82bcf783ee2c5af0" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/d985c8546da49c4727e27dae82bcf783ee2c5af0", - "reference": "d985c8546da49c4727e27dae82bcf783ee2c5af0", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" + "php": ">=7.1" }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "suggest": { + "ext-ctype": "For best performance" }, - "require-dev": { - "symfony/class-loader": "~2.2|~3.0.0", - "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117", + "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Debug\\": "" + "Symfony\\Polyfill\\Intl\\Idn\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2203,50 +2850,69 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", "homepage": "https://symfony.com", - "time": "2018-07-26T11:13:39+00:00" + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2020-10-23T14:02:19+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.9.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.20.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "727d1096295d807c309fb01a851577302394c897" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", + "reference": "727d1096295d807c309fb01a851577302394c897", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { - "ext-ctype": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "files": [ "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2254,54 +2920,122 @@ "MIT" ], "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", + "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "ctype", "polyfill", - "portable" + "portable", + "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { - "name": "symfony/process", - "version": "v2.8.44", + "name": "symfony/polyfill-php73", + "version": "v1.20.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "cc83afdb5ac99147806b3bb65a3ff1227664f596" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cc83afdb5ac99147806b3bb65a3ff1227664f596", - "reference": "cc83afdb5ac99147806b3bb65a3ff1227664f596", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", + "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Polyfill\\Php73\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2310,45 +3044,111 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", - "time": "2018-07-26T11:13:39+00:00" + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-10-23T14:02:19+00:00" }, { - "name": "symfony/yaml", - "version": "v2.8.44", + "name": "symfony/polyfill-php80", + "version": "v1.20.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "fbf876678e29dc634430dcf0096e216eb0004467" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/fbf876678e29dc634430dcf0096e216eb0004467", - "reference": "fbf876678e29dc634430dcf0096e216eb0004467", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", + "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/polyfill-ctype": "~1.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/process", + "version": "v4.4.16", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "2f4b049fb80ca5e9874615a2a85dc2a502090f05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/2f4b049fb80ca5e9874615a2a85dc2a502090f05", + "reference": "2f4b049fb80ca5e9874615a2a85dc2a502090f05", + "shasum": "" + }, + "require": { + "php": ">=7.1.3" }, + "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Component\\Process\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -2368,37 +3168,138 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-07-26T09:03:18+00:00" + "time": "2020-10-24T11:50:19+00:00" }, { - "name": "webmozart/assert", - "version": "1.3.0", + "name": "symfony/service-contracts", + "version": "v1.1.9", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b776d18b303a39f56c63747bcb977ad4b27aca26", + "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.1.3", + "psr/container": "^1.0" }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "suggest": { + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" } }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2020-07-06T13:19:58+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -2420,7 +3321,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2020-07-08T17:02:28+00:00" } ], "aliases": [], @@ -2429,10 +3330,10 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.0" + "php": ">=7.2.0" }, "platform-dev": [], "platform-overrides": { - "php": "5.5" + "php": "7.2" } } diff --git a/src/Validation.php b/src/Validation.php index c1899de..e5e48c0 100644 --- a/src/Validation.php +++ b/src/Validation.php @@ -2,8 +2,11 @@ namespace DavidePastore\Slim\Validation; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; use Respect\Validation\Exceptions\NestedValidationException; +use Slim\Routing\RouteContext; /** * Validation for Slim. @@ -23,10 +26,11 @@ class Validation * @var array */ protected $options = [ + 'useTemplate' => false, ]; /** - * The translator to use for the exception message. + * The translator to use fro the exception message. * * @var callable */ @@ -95,11 +99,17 @@ public function __construct($validators = null, $translator = null, $options = [ * * @return \Psr\Http\Message\ResponseInterface */ - public function __invoke($request, RequestHandlerInterface $handler) + public function __invoke(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $this->errors = []; $params = $request->getParsedBody(); - $params = array_merge((array) $request->getAttribute('routeInfo')[2], $params); + + $routeContext = RouteContext::fromRequest($request); + $route = $routeContext->getRoute(); + $arguments = $route->getArguments(); + + $params = array_merge((array) $arguments, (array)$params); + $this->validate($params, $this->validators); $request = $request->withAttribute($this->errors_name, $this->getErrors()); @@ -133,7 +143,11 @@ private function validate($params = [], $validators = [], $actualKeys = []) if ($this->translator) { $exception->setParam('translator', $this->translator); } - $this->errors[implode('.', $actualKeys)] = $exception->getMessages(); + if ($this->options['useTemplate']) { + $this->errors[implode('.', $actualKeys)] = [$exception->getMainMessage()]; + } else { + $this->errors[implode('.', $actualKeys)] = $exception->getMessages(); + } } } From e515daef98f8e569a693913158cf0a0c194b235a Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 03:21:41 +0500 Subject: [PATCH 03/11] Slim 4 support + Slim 4 unit tests --- composer.json | 7 +- composer.lock | 971 ++++++++++++++++++++++++++++----------- phpunit.xml.dist | 1 - src/Validation.php | 17 +- tests/TestCase.php | 86 ++++ tests/ValidationTest.php | 767 ++++--------------------------- 6 files changed, 900 insertions(+), 949 deletions(-) create mode 100644 tests/TestCase.php diff --git a/composer.json b/composer.json index f5fd9ae..1e1372e 100644 --- a/composer.json +++ b/composer.json @@ -11,11 +11,14 @@ ], "require": { "php": ">=7.2.0", - "respect/validation": "^1.1 >=1.1.23 || ^2.0" + "respect/validation": "^2.0" }, "require-dev": { "slim/slim": "~4.0", - "phpunit/phpunit": "^8.5", + "slim/psr7": "^1.3", + "slim/http": "^1.2", + "php-di/php-di": "^6.3", + "phpunit/phpunit": "^8.0 || ^9.0", "scrutinizer/ocular": "~1.1" }, "autoload": { diff --git a/composer.lock b/composer.lock index 89ba842..0c8544c 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": "5b3d705ce1f1f3e1f22d4d8279d2e5c9", + "content-hash": "6477313adc6e0444bcee4be2155b3b16", "packages": [ { "name": "respect/stringifier", @@ -123,16 +123,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", "shasum": "" }, "require": { @@ -144,7 +144,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -182,41 +182,38 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-22T09:19:47+00:00" } ], "packages-dev": [ { "name": "doctrine/annotations", - "version": "1.11.1", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad" + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ce77a7ba1770462cd705a91a151b6c3746f9c6ad", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", "shasum": "" }, "require": { "doctrine/lexer": "1.*", "ext-tokenizer": "*", - "php": "^7.1 || ^8.0" + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "1.*", + "doctrine/cache": "^1.11 || ^2.0", "doctrine/coding-standard": "^6.0 || ^8.1", "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^9.1.5" + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" @@ -255,7 +252,7 @@ "docblock", "parser" ], - "time": "2020-10-26T10:28:16+00:00" + "time": "2021-05-16T18:07:53+00:00" }, { "name": "doctrine/instantiator", @@ -370,6 +367,58 @@ ], "time": "2020-05-25T17:44:05+00:00" }, + { + "name": "fig/http-message-util", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message-util.git", + "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", + "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "suggest": { + "psr/http-message": "The package containing the PSR-7 interfaces" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Fig\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2020-11-24T22:02:12+00:00" + }, { "name": "guzzlehttp/guzzle", "version": "6.5.5", @@ -439,16 +488,16 @@ }, { "name": "guzzlehttp/promises", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "60d379c243457e073cff02bc323a2a86cb355631" + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", - "reference": "60d379c243457e073cff02bc323a2a86cb355631", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "shasum": "" }, "require": { @@ -486,20 +535,20 @@ "keywords": [ "promise" ], - "time": "2020-09-30T07:37:28+00:00" + "time": "2021-03-07T09:25:29+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.7.0", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + "reference": "dc960a912984efb74d0a90222870c72c87f10c91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91", "shasum": "" }, "require": { @@ -557,7 +606,7 @@ "uri", "url" ], - "time": "2020-09-30T07:37:11+00:00" + "time": "2021-04-26T09:17:50+00:00" }, { "name": "jms/metadata", @@ -827,30 +876,92 @@ ], "time": "2018-02-13T20:26:39+00:00" }, + { + "name": "opis/closure", + "version": "3.6.2", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/06e2ebd25f2869e54a306dda991f7db58066f7f6", + "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0 || ^8.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Opis\\Closure\\": "src/" + }, + "files": [ + "functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marius Sarca", + "email": "marius.sarca@gmail.com" + }, + { + "name": "Sorin Sarca", + "email": "sarca_sorin@hotmail.com" + } + ], + "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", + "homepage": "https://opis.io/closure", + "keywords": [ + "anonymous functions", + "closure", + "function", + "serializable", + "serialization", + "serialize" + ], + "time": "2021-04-09T13:42:10+00:00" + }, { "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": { @@ -880,24 +991,24 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "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": { @@ -927,7 +1038,150 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "php-di/invoker", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-DI/Invoker.git", + "reference": "540c27c86f663e20fe39a24cd72fa76cdb21d41a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/540c27c86f663e20fe39a24cd72fa76cdb21d41a", + "reference": "540c27c86f663e20fe39a24cd72fa76cdb21d41a", + "shasum": "" + }, + "require": { + "psr/container": "~1.0" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "phpunit/phpunit": "~4.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Invoker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Generic and extensible callable invoker", + "homepage": "https://github.com/PHP-DI/Invoker", + "keywords": [ + "callable", + "dependency", + "dependency-injection", + "injection", + "invoke", + "invoker" + ], + "time": "2017-03-20T19:28:22+00:00" + }, + { + "name": "php-di/php-di", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/PHP-DI/PHP-DI.git", + "reference": "da8e476cafc8011477e2ec9fd2e4706947758af2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/da8e476cafc8011477e2ec9fd2e4706947758af2", + "reference": "da8e476cafc8011477e2ec9fd2e4706947758af2", + "shasum": "" + }, + "require": { + "opis/closure": "^3.5.5", + "php": ">=7.2.0", + "php-di/invoker": "^2.0", + "php-di/phpdoc-reader": "^2.0.1", + "psr/container": "^1.0" + }, + "provide": { + "psr/container-implementation": "^1.0" + }, + "require-dev": { + "doctrine/annotations": "~1.2", + "friendsofphp/php-cs-fixer": "^2.4", + "mnapoli/phpunit-easymock": "^1.2", + "ocramius/proxy-manager": "^2.0.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.5|^9.0" + }, + "suggest": { + "doctrine/annotations": "Install it if you want to use annotations (version ~1.2)", + "ocramius/proxy-manager": "Install it if you want to use lazy injection (version ~2.0)" + }, + "type": "library", + "autoload": { + "psr-4": { + "DI\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The dependency injection container for humans", + "homepage": "https://php-di.org/", + "keywords": [ + "PSR-11", + "container", + "container-interop", + "dependency injection", + "di", + "ioc", + "psr11" + ], + "time": "2021-05-01T16:26:47+00:00" + }, + { + "name": "php-di/phpdoc-reader", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-DI/PhpDocReader.git", + "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/66daff34cbd2627740ffec9469ffbac9f8c8185c", + "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "mnapoli/hard-mode": "~0.3.0", + "phpunit/phpunit": "^8.5|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpDocReader\\": "src/PhpDocReader" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)", + "keywords": [ + "phpdoc", + "reflection" + ], + "time": "2020-10-12T12:39:22+00:00" }, { "name": "phpcollection/phpcollection", @@ -1180,16 +1434,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.12.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { @@ -1201,7 +1455,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -1239,29 +1493,29 @@ "spy", "stub" ], - "time": "2020-09-29T09:10:42+00:00" + "time": "2021-03-17T13:42:18+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.10", + "version": "7.0.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.2", + "php": ">=7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", + "phpunit/php-token-stream": "^3.1.1 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", @@ -1302,27 +1556,27 @@ "testing", "xunit" ], - "time": "2019-11-20T13:55:58+00:00" + "time": "2020-12-02T13:39:03+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1352,7 +1606,7 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "time": "2020-11-30T08:25:21+00:00" }, { "name": "phpunit/php-text-template", @@ -1397,23 +1651,23 @@ }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1442,25 +1696,25 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", - "version": "3.1.1", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.0" @@ -1492,20 +1746,20 @@ "tokenizer" ], "abandoned": true, - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-11-30T08:38:46+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.9", + "version": "8.5.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f5c8a5dd5e7e8d68d7562bfb48d47287d33937d6" + "reference": "038d4196d8e8cb405cd5e82cedfe413ad6eef9ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f5c8a5dd5e7e8d68d7562bfb48d47287d33937d6", - "reference": "f5c8a5dd5e7e8d68d7562bfb48d47287d33937d6", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/038d4196d8e8cb405cd5e82cedfe413ad6eef9ef", + "reference": "038d4196d8e8cb405cd5e82cedfe413ad6eef9ef", "shasum": "" }, "require": { @@ -1517,11 +1771,11 @@ "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.2", "phpspec/prophecy": "^1.10.3", - "phpunit/php-code-coverage": "^7.0.10", + "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", @@ -1575,20 +1829,20 @@ "testing", "xunit" ], - "time": "2020-11-10T12:51:38+00:00" + "time": "2021-03-17T07:27:54+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "psr/cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "shasum": "" }, "require": { @@ -1602,7 +1856,7 @@ }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1615,6 +1869,47 @@ "homepage": "http://www.php-fig.org/" } ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], "description": "Common Container Interface (PHP FIG PSR-11)", "homepage": "https://github.com/php-fig/container", "keywords": [ @@ -1624,7 +1919,7 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/http-factory", @@ -1836,16 +2131,16 @@ }, { "name": "psr/log", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -1869,7 +2164,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -1879,7 +2174,7 @@ "psr", "psr-3" ], - "time": "2020-03-23T09:12:05+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "ralouphie/getallheaders", @@ -1923,20 +2218,20 @@ }, { "name": "scrutinizer/ocular", - "version": "1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/scrutinizer-ci/ocular.git", - "reference": "65566d2e9c7c9e1f96502f5ffc49799b2a53ca29" + "reference": "801d176fbcee081f1f4f8c879a07a0ca5ff86eca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrutinizer-ci/ocular/zipball/65566d2e9c7c9e1f96502f5ffc49799b2a53ca29", - "reference": "65566d2e9c7c9e1f96502f5ffc49799b2a53ca29", + "url": "https://api.github.com/repos/scrutinizer-ci/ocular/zipball/801d176fbcee081f1f4f8c879a07a0ca5ff86eca", + "reference": "801d176fbcee081f1f4f8c879a07a0ca5ff86eca", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "~6.3", + "guzzlehttp/guzzle": "~6.3|^7.0", "jms/serializer": "^1.0.0", "phpoption/phpoption": "~1.0", "symfony/console": "^2.1.0|~3.0|~4.0|~5.0", @@ -1944,7 +2239,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", - "phpunit/phpunit": "^4.8.0", + "phpunit/phpunit": "^9.0.0", "symfony/filesystem": "~2.0|~3.0|~4.0|~5.0" }, "bin": [ @@ -1960,27 +2255,27 @@ "license": [ "Apache-2.0" ], - "time": "2019-11-25T10:14:15+00:00" + "time": "2021-02-25T15:54:10+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -2005,29 +2300,29 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", "shasum": "" }, "require": { - "php": "^7.1", + "php": ">=7.1", "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -2045,6 +2340,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -2056,10 +2355,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -2069,24 +2364,24 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "time": "2020-11-30T08:04:30+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5 || ^8.0", @@ -2108,13 +2403,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -2125,24 +2420,24 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5" @@ -2178,24 +2473,24 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { @@ -2245,24 +2540,24 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "time": "2020-11-30T07:47:53+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", "shasum": "" }, "require": { - "php": "^7.2", + "php": ">=7.2", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -2299,24 +2594,24 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "time": "2020-11-30T07:43:24+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -2346,24 +2641,24 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "time": "2020-11-30T07:40:27+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -2391,24 +2686,24 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -2429,14 +2724,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -2444,24 +2739,24 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "time": "2020-11-30T07:34:24+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "type": "library", "extra": { @@ -2486,24 +2781,24 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "time": "2020-11-30T07:30:19+00:00" }, { "name": "sebastian/type", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.2" }, "require-dev": { "phpunit/phpunit": "^8.2" @@ -2532,7 +2827,7 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "time": "2020-11-30T07:25:11+00:00" }, { "name": "sebastian/version", @@ -2577,25 +2872,175 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "slim/http", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim-Http.git", + "reference": "3bc9d61b5243cab0d75c89d778bd69464de07354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim-Http/zipball/3bc9d61b5243cab0d75c89d778bd69464de07354", + "reference": "3bc9d61b5243cab0d75c89d778bd69464de07354", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-simplexml": "*", + "php": "^7.2 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "adriansuter/php-autoload-override": "^1.2", + "laminas/laminas-diactoros": "^2.4", + "nyholm/psr7": "^1.3", + "php-http/psr7-integration-tests": "dev-master", + "phpstan/phpstan": "^0.12.52", + "phpunit/phpunit": "^8.5 || ^9.3", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Slim\\Http\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "http://joshlockhart.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" + }, + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + }, + { + "name": "Pierre Berube", + "email": "pierre@lgse.com", + "homepage": "http://www.lgse.com" + } + ], + "description": "Slim PSR-7 Object Decorators", + "homepage": "http://slimframework.com", + "keywords": [ + "http", + "psr-7", + "psr7" + ], + "time": "2020-11-20T06:43:10+00:00" + }, + { + "name": "slim/psr7", + "version": "1.4", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim-Psr7.git", + "reference": "0dca983ca32a26f4a91fb11173b7b9eaee29e9d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim-Psr7/zipball/0dca983ca32a26f4a91fb11173b7b9eaee29e9d6", + "reference": "0dca983ca32a26f4a91fb11173b7b9eaee29e9d6", + "shasum": "" + }, + "require": { + "fig/http-message-util": "^1.1.5", + "php": "^7.2 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3", + "symfony/polyfill-php80": "^1.22" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "adriansuter/php-autoload-override": "^1.2", + "ext-json": "*", + "http-interop/http-factory-tests": "^0.9.0", + "php-http/psr7-integration-tests": "dev-master", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.5 || ^9.5", + "squizlabs/php_codesniffer": "^3.6", + "weirdan/prophecy-shim": "^1.0 || ^2.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Slim\\Psr7\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "http://joshlockhart.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" + }, + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + }, + { + "name": "Pierre Berube", + "email": "pierre@lgse.com", + "homepage": "http://www.lgse.com" + } + ], + "description": "Strict PSR-7 implementation", + "homepage": "https://www.slimframework.com", + "keywords": [ + "http", + "psr-7", + "psr7" + ], + "time": "2021-05-08T18:22:56+00:00" + }, { "name": "slim/slim", - "version": "4.6.0", + "version": "4.8.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "9f6a54f70438655f8c4be63b2b442d34a0c8a142" + "reference": "c9bdc9e0d2f8613055632334ec6711b965d5fdf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/9f6a54f70438655f8c4be63b2b442d34a0c8a142", - "reference": "9f6a54f70438655f8c4be63b2b442d34a0c8a142", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/c9bdc9e0d2f8613055632334ec6711b965d5fdf3", + "reference": "c9bdc9e0d2f8613055632334ec6711b965d5fdf3", "shasum": "" }, "require": { "ext-json": "*", "nikic/fast-route": "^1.3", - "php": "^7.2", - "psr/container": "^1.0", + "php": "^7.2 || ^8.0", + "psr/container": "^1.0 || ^2.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0", "psr/http-server-handler": "^1.0", @@ -2605,17 +3050,18 @@ "require-dev": { "adriansuter/php-autoload-override": "^1.2", "ext-simplexml": "*", - "guzzlehttp/psr7": "^1.7", + "guzzlehttp/psr7": "^1.8", "http-interop/http-factory-guzzle": "^1.0", "laminas/laminas-diactoros": "^2.4", - "nyholm/psr7": "^1.3", - "nyholm/psr7-server": "^1.0.0", - "phpspec/prophecy": "^1.12", - "phpstan/phpstan": "^0.12.54", - "phpunit/phpunit": "^8.5", - "slim/http": "^1.1", - "slim/psr7": "^1.2", - "squizlabs/php_codesniffer": "^3.5" + "nyholm/psr7": "^1.4", + "nyholm/psr7-server": "^1.0.1", + "phpspec/prophecy": "^1.13", + "phpstan/phpstan": "^0.12.85", + "phpunit/phpunit": "^8.5.13 || ^9.3.8", + "slim/http": "^1.2", + "slim/psr7": "^1.3", + "squizlabs/php_codesniffer": "^3.6", + "weirdan/prophecy-shim": "^1.0 || ^2.0.2" }, "suggest": { "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", @@ -2668,20 +3114,20 @@ "micro", "router" ], - "time": "2020-11-15T16:14:14+00:00" + "time": "2021-04-29T03:43:44+00:00" }, { "name": "symfony/console", - "version": "v4.4.16", + "version": "v4.4.24", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "20f73dd143a5815d475e0838ff867bce1eebd9d5" + "reference": "1b15ca1b1bedda86f98064da9ff5d800560d4c6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/20f73dd143a5815d475e0838ff867bce1eebd9d5", - "reference": "20f73dd143a5815d475e0838ff867bce1eebd9d5", + "url": "https://api.github.com/repos/symfony/console/zipball/1b15ca1b1bedda86f98064da9ff5d800560d4c6d", + "reference": "1b15ca1b1bedda86f98064da9ff5d800560d4c6d", "shasum": "" }, "require": { @@ -2738,22 +3184,22 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "time": "2020-10-24T11:50:19+00:00" + "time": "2021-05-13T06:28:07+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -2765,7 +3211,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2802,20 +3248,20 @@ "polyfill", "portable" ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117" + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117", - "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", "shasum": "" }, "require": { @@ -2829,7 +3275,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2872,20 +3318,20 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "727d1096295d807c309fb01a851577302394c897" + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", - "reference": "727d1096295d807c309fb01a851577302394c897", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", "shasum": "" }, "require": { @@ -2897,7 +3343,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2939,20 +3385,20 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", "shasum": "" }, "require": { @@ -2961,7 +3407,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2998,20 +3444,20 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { @@ -3020,7 +3466,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3060,20 +3506,20 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { @@ -3082,7 +3528,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3126,20 +3572,20 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", - "version": "v4.4.16", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "2f4b049fb80ca5e9874615a2a85dc2a502090f05" + "reference": "f5481b22729d465acb1cea3455fc04ce84b0148b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/2f4b049fb80ca5e9874615a2a85dc2a502090f05", - "reference": "2f4b049fb80ca5e9874615a2a85dc2a502090f05", + "url": "https://api.github.com/repos/symfony/process/zipball/f5481b22729d465acb1cea3455fc04ce84b0148b", + "reference": "f5481b22729d465acb1cea3455fc04ce84b0148b", "shasum": "" }, "require": { @@ -3168,9 +3614,9 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "time": "2020-10-24T11:50:19+00:00" + "time": "2021-04-07T16:22:29+00:00" }, { "name": "symfony/service-contracts", @@ -3276,30 +3722,35 @@ }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -3321,7 +3772,7 @@ "check", "validate" ], - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8259dc4..f43c285 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="tests/bootstrap.php" > diff --git a/src/Validation.php b/src/Validation.php index e5e48c0..3eb6012 100644 --- a/src/Validation.php +++ b/src/Validation.php @@ -30,9 +30,9 @@ class Validation ]; /** - * The translator to use fro the exception message. + * The translator to use for the exception message. * - * @var callable + * @var array */ protected $translator = null; @@ -75,7 +75,7 @@ class Validation * Create new Validator service provider. * * @param null|array|ArrayAccess $validators - * @param null|callable $translator + * @param null|array $translator * @param []|array $options */ public function __construct($validators = null, $translator = null, $options = []) @@ -94,8 +94,7 @@ public function __construct($validators = null, $translator = null, $options = [ * Validation middleware invokable class. * * @param \Psr\Http\Message\ServerRequestInterface $request PSR7 request - * @param \Psr\Http\Message\ResponseInterface $response PSR7 response - * @param callable $next Next middleware + * @param \Psr\Http\Server\RequestHandlerInterface $response PSR7 response * * @return \Psr\Http\Message\ResponseInterface */ @@ -108,7 +107,9 @@ public function __invoke(ServerRequestInterface $request, RequestHandlerInterfac $route = $routeContext->getRoute(); $arguments = $route->getArguments(); - $params = array_merge((array) $arguments, (array)$params); + $queryParams = $request->getQueryParams(); + + $params = array_merge((array) $arguments, (array)$params, (array)$queryParams); $this->validate($params, $this->validators); @@ -141,10 +142,10 @@ private function validate($params = [], $validators = [], $actualKeys = []) $validator->assert($param); } catch (NestedValidationException $exception) { if ($this->translator) { - $exception->setParam('translator', $this->translator); + $this->translator = $exception->getMessages($this->translator); } if ($this->options['useTemplate']) { - $this->errors[implode('.', $actualKeys)] = [$exception->getMainMessage()]; + $this->errors[implode('.', $actualKeys)] = [$exception->getFullMessage()]; } else { $this->errors[implode('.', $actualKeys)] = $exception->getMessages(); } diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..f38b807 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,86 @@ +build(); + + // Instantiate the app + AppFactory::setContainer($container); + $app = AppFactory::create(); + + // Add Routing Middleware + $app->addRoutingMiddleware(); + + return $app; + } + + /** + * Create a server request. + * + * @param string $method The HTTP method + * @param string|UriInterface $uri The URI + * @param array $serverParams The server parameters + * + * @return ServerRequestInterface + */ + protected function createRequest( + string $method, + $uri, + array $serverParams = [] + ): ServerRequestInterface { + return (new ServerRequestFactory())->createServerRequest($method, $uri, $serverParams); + } + + + /** + * Create a JSON request. + * + * @param string $method The HTTP method + * @param string|UriInterface $uri The URI + * @param array|null $data The json data + * + * @return ServerRequestInterface + */ + protected function createJsonRequest( + string $method, + $uri, + array $data = null + ): ServerRequestInterface { + $request = $this->createRequest($method, $uri); + + if ($data !== null) { + $request = $request->withParsedBody($data); + } + + return $request->withHeader('Content-Type', 'application/json'); + } +} diff --git a/tests/ValidationTest.php b/tests/ValidationTest.php index cb3e7f3..8b2cc40 100644 --- a/tests/ValidationTest.php +++ b/tests/ValidationTest.php @@ -2,631 +2,103 @@ namespace DavidePastore\Slim\Validation\Tests; +use DavidePastore\Slim\Validation\Tests\TestCase; use ReflectionProperty; use Slim\Collection; use Slim\Http\Body; use Slim\Http\Environment; -use Slim\Http\Headers; + use Slim\Http\Request; use Slim\Http\RequestBody; use Slim\Http\Response; use Slim\Http\Uri; use DavidePastore\Slim\Validation\Validation; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; use Respect\Validation\Validator as v; +use Slim\Psr7\Environment as Psr7Environment; -class ValidationTest extends \PHPUnit_Framework_TestCase -{ - /** - * PSR7 request object. - * - * @var Psr\Http\Message\RequestInterface - */ - protected $request; - - /** - * PSR7 response object. - * - * @var Psr\Http\Message\ResponseInterface - */ - protected $response; - - /** - * Run before each test. - */ - public function setupGet() - { - $uri = Uri::createFromString('https://example.com:443/foo/bar?username=davidepastore&age=89&optional=value'); - $headers = new Headers(); - $cookies = []; - $env = Environment::mock(); - $serverParams = $env->all(); - $body = new Body(fopen('php://temp', 'r+')); - $this->request = new Request('GET', $uri, $headers, $cookies, $serverParams, $body); - $this->response = new Response(); - } - - /** - * Setup for the POST JSON requests. - * - * @param array $json The JSON to use to mock the body of the request. - */ - public function setupJson($json) - { - $uri = Uri::createFromString('https://example.com:443/foo'); - $headers = new Headers(); - $headers->set('Content-Type', 'application/json;charset=utf8'); - $cookies = []; - $env = Environment::mock([ - 'SCRIPT_NAME' => '/index.php', - 'REQUEST_URI' => '/foo', - 'REQUEST_METHOD' => 'POST', - ]); - $serverParams = $env->all(); - $body = new RequestBody(); - $body->write(json_encode($json)); - $this->request = new Request('POST', $uri, $headers, $cookies, $serverParams, $body); - $this->response = new Response(); - } - - /** - * Setup for the XML POST requests. - * - * @param string $xml The XML to use to mock the body of the request. - */ - public function setupXml($xml) - { - $uri = Uri::createFromString('https://example.com:443/foo'); - $headers = new Headers(); - $headers->set('Content-Type', 'application/xml;charset=utf8'); - $cookies = []; - $env = Environment::mock([ - 'SCRIPT_NAME' => '/index.php', - 'REQUEST_URI' => '/foo', - 'REQUEST_METHOD' => 'POST', - ]); - $serverParams = $env->all(); - $body = new RequestBody(); - $body->write($xml); - $this->request = new Request('POST', $uri, $headers, $cookies, $serverParams, $body); - $this->response = new Response(); - } - - /** - * Test for validation. - * - * @dataProvider validationProvider - */ - public function testValidation($expectedValidators, $expectedTranslator, $expectedHasErrors, $expectedErrors, $requestType = 'GET', $body = null, $options = []) - { - if ($requestType === 'GET') { - $this->setupGet(); - } elseif ($requestType === 'JSON') { - $this->setupJson($body); - } elseif ($requestType === 'XML') { - $this->setupXml($body); - } - - if (is_null($expectedValidators)) { - $mw = new Validation(); - $expectedValidators = array(); - } elseif (is_null($expectedTranslator)) { - $mw = new Validation($expectedValidators, null, $options); - } else { - $mw = new Validation($expectedValidators, $expectedTranslator, $options); - } +use function DI\value; - $errors = null; - $hasErrors = null; - $validators = null; - $translator = null; - $next = function ($req, $res) use (&$errors, &$hasErrors, &$validators, &$translator) { - $errors = $req->getAttribute('errors'); - $hasErrors = $req->getAttribute('has_errors'); - $validators = $req->getAttribute('validators'); - $translator = $req->getAttribute('translator'); - - return $res; - }; - - $response = $mw($this->request, $this->response, $next); - - $this->assertEquals($expectedHasErrors, $hasErrors); - $this->assertEquals($expectedErrors, $errors); - $this->assertEquals($expectedValidators, $validators); - $this->assertEquals($expectedTranslator, $translator); - } - - /** - * The validation provider. - */ - public function validationProvider() - { - return array( - //Validation without errors - array( - array( - 'username' => v::alnum()->noWhitespace()->length(1, 15), - ), - null, - false, - array(), - ), - //Validation with errors - array( - array( - 'username' => v::alnum()->noWhitespace()->length(1, 5), - ), - null, - true, - array( - 'username' => array( - '"davidepastore" must have a length between 1 and 5', - ), - ), - ), - //Validation not existing optional parameter - array( - array( - 'notExisting' => v::optional(v::alpha()), - ), - null, - false, - array(), - ), - //Validation not existing parameter - array( - array( - 'notExisting' => v::alpha(), - ), - null, - true, - array( - 'notExisting' => array( - 'null must contain only letters (a-z)', - ), - ), - ), - //Validation without validators - array( - null, - null, - false, - array(), - ), - //Multiple validation without errors - array( - array( - 'username' => v::alnum()->noWhitespace()->length(1, 20), - 'age' => v::numeric()->positive()->between(1, 100), - ), - null, - false, - array(), - ), - //Multiple validation with errors - array( - array( - 'username' => v::alnum()->noWhitespace()->length(1, 5), - 'age' => v::numeric()->positive()->between(1, 60), - ), - null, - true, - array( - 'username' => array( - '"davidepastore" must have a length between 1 and 5', - ), - 'age' => array( - '"89" must be less than or equal to 60', - ), - ), - ), - //Validation with callable translator - array( - array( - 'username' => v::alnum()->noWhitespace()->length(1, 5), - ), - function ($message) { - $messages = [ - 'These rules must pass for {{name}}' => 'Queste regole devono passare per {{name}}', - '{{name}} must be a string' => '{{name}} deve essere una stringa', - '{{name}} must have a length between {{minValue}} and {{maxValue}}' => '{{name}} deve avere una dimensione di caratteri compresa tra {{minValue}} e {{maxValue}}', - ]; - - return $messages[$message]; - }, - true, - array( - 'username' => array( - '"davidepastore" deve avere una dimensione di caratteri compresa tra 1 e 5', - ), - ), - ), - //JSON validation without errors - array( - array( - 'username' => v::alnum()->noWhitespace()->length(1, 15), - ), - null, - false, - array(), - 'JSON', - array( - 'username' => 'jsonusername', - ), - ), - //JSON validation with errors - array( - array( - 'username' => v::alnum()->noWhitespace()->length(1, 5), - ), - null, - true, - array( - 'username' => array( - '"jsonusername" must have a length between 1 and 5', - ), - ), - 'JSON', - array( - 'username' => 'jsonusername', - ), - ), - //Complex JSON validation without errors - array( - array( - 'type' => v::alnum()->noWhitespace()->length(3, 8), - 'email' => array( - 'id' => v::numeric()->positive()->between(1, 20), - 'name' => v::alnum()->noWhitespace()->length(1, 5), - ), - ), - null, - false, - array(), - 'JSON', - array( - 'type' => 'emails', - 'objectid' => '1', - 'email' => array( - 'id' => 1, - 'enable_mapping' => '1', - 'name' => 'rq3r', - 'created_at' => '2016-08-23 13:36:29', - 'updated_at' => '2016-08-23 14:36:47', - ), - ), - ), - //Complex JSON validation with errors - array( - array( - 'type' => v::alnum()->noWhitespace()->length(3, 5), - 'email' => array( - 'name' => v::alnum()->noWhitespace()->length(1, 2), - ), - ), - null, - true, - array( - 'type' => array( - '"emails" must have a length between 3 and 5', - ), - 'email.name' => array( - '"rq3r" must have a length between 1 and 2', - ), - ), - 'JSON', - array( - 'type' => 'emails', - 'objectid' => '1', - 'email' => array( - 'id' => 1, - 'enable_mapping' => '1', - 'name' => 'rq3r', - 'created_at' => '2016-08-23 13:36:29', - 'updated_at' => '2016-08-23 14:36:47', - ), - ), - ), - //More complex JSON validation without errors - array( - array( - 'email' => array( - 'sub' => array( - 'sub-sub' => array( - 'finally' => v::numeric()->positive()->between(1, 200), - ), - ), - ), - ), - null, - false, - array(), - 'JSON', - array( - 'finally' => 'notvalid', - 'email' => array( - 'finally' => 'notvalid', - 'sub' => array( - 'finally' => 'notvalid', - 'sub-sub' => array( - 'finally' => 123, - ), - ), - ), - ), - ), - //More complex JSON validation with errors - array( - array( - 'email' => array( - 'sub' => array( - 'sub-sub' => array( - 'finally' => v::numeric()->positive()->between(1, 200), - ), - ), - ), - ), - null, - true, - array( - 'email.sub.sub-sub.finally' => array( - '321 must be less than or equal to 200', - ), - ), - 'JSON', - array( - 'finally' => 22, - 'email' => array( - 'finally' => 33, - 'sub' => array( - 'finally' => 97, - 'sub-sub' => array( - 'finally' => 321, - ), - ), - ), - ), - ), - //Nested complex JSON validation with errors - array( - array( - 'message' => array( - 'notification' => array( - 'title' => v::stringType()->length(1, null)->setName("notificationTitle"), - 'body' => v::stringType()->length(1, null)->setName("notificationBody"), - 'actionName' => v::optional(v::stringType()->length(1, null))->setName("notificationAction") - ) - ), - ), - null, - true, - array( - 'message.notification.title' => array( - 'notificationTitle must be a string', - 'notificationTitle must have a length greater than 1', - ), - 'message.notification.body' => array( - 'notificationBody must be a string', - 'notificationBody must have a length greater than 1', - ), - ), - 'JSON', - array( - 'message' => array( - 'notification' => 1, - ), - ), - ), - - //XML validation without errors - array( - array( - 'name' => v::alnum()->noWhitespace()->length(1, 15), - ), - null, - false, - array(), - 'XML', - 'Josh', - ), - //XML validation with errors - array( - array( - 'name' => v::alnum()->noWhitespace()->length(1, 5), - ), - null, - true, - array( - 'name' => array( - '"xmlusername" must have a length between 1 and 5', - ), - ), - 'XML', - 'xmlusername', - ), - //Complex XML validation without errors - array( - array( - 'type' => v::alnum()->noWhitespace()->length(3, 8), - 'email' => array( - 'id' => v::numeric()->positive()->between(1, 20), - 'name' => v::alnum()->noWhitespace()->length(1, 5), - ), - ), - null, - false, - array(), - 'XML', - ' - emails - 1 - - 1 - 1 - rq3r - 2016-08-23 13:36:29 - 2016-08-23 14:36:47 - - ', - ), - //Complex XML validation with errors - array( - array( - 'type' => v::alnum()->noWhitespace()->length(3, 5), - 'email' => array( - 'name' => v::alnum()->noWhitespace()->length(1, 2), - ), - ), - null, - true, - array( - 'type' => array( - '"emails" must have a length between 3 and 5', - ), - 'email.name' => array( - '"rq3r" must have a length between 1 and 2', - ), - ), - 'XML', - ' - emails - 1 - - 1 - 1 - rq3r - 2016-08-23 13:36:29 - 2016-08-23 14:36:47 - - ', - ), - //More complex XML validation without errors - array( - array( - 'email' => array( - 'sub' => array( - 'sub-sub' => array( - 'finally' => v::numeric()->positive()->between(1, 200), - ), - ), - ), - ), - null, - false, - array(), - 'XML', - ' - notvalid - - notvalid - - notvalid - - 123 - - - - ', - ), - //More complex XML validation with errors - array( - array( - 'email' => array( - 'sub' => array( - 'sub-sub' => array( - 'finally' => v::numeric()->positive()->between(1, 200), - ), - ), - ), - ), - null, - true, - array( - 'email.sub.sub-sub.finally' => array( - '"321" must be less than or equal to 200', - ), - ), - 'XML', - ' - 22 - - 33 - - 97 - - 321 - - - - ', - ), - ); - } +class ValidationTest extends TestCase +{ public function testSetValidators() { - $this->setupGet(); $usernameValidator = v::alnum()->noWhitespace()->length(1, 20); - $ageValidator = v::numeric()->positive()->between(1, 100); + $ageValidator = v::numericVal()->positive()->between(1, 100); $expectedValidators = array( - 'username' => $usernameValidator, - 'age' => $ageValidator, + 'username' => $usernameValidator, + 'age' => $ageValidator, ); $mw = new Validation($expectedValidators); - $errors = null; - $hasErrors = null; - $validators = []; - $next = function ($req, $res) use (&$errors, &$hasErrors, &$validators) { - $errors = $req->getAttribute('errors'); - $hasErrors = $req->getAttribute('has_errors'); - $validators = $req->getAttribute('validators'); - - return $res; - }; - $newUsernameValidator = v::alnum()->noWhitespace()->length(1, 10); - $newAgeValidator = v::numeric()->positive()->between(1, 20); + $newAgeValidator = v::numericVal()->positive()->between(1, 20); $newValidators = array( - 'username' => $newUsernameValidator, - 'age' => $newAgeValidator, + 'username' => $newUsernameValidator, + 'age' => $newAgeValidator, ); $mw->setValidators($newValidators); - $response = $mw($this->request, $this->response, $next); - $expectedErrors = array( - 'username' => array( - '"davidepastore" must have a length between 1 and 10', - ), - 'age' => array( - '"89" must be less than or equal to 20', - ), + 'username' => array( + 'length' => '"davidepastore" must have a length between 1 and 10', + ), + 'age' => array( + 'between' => '"89" must be between 1 and 20', + ), ); - $this->assertTrue($hasErrors); - $this->assertEquals($expectedErrors, $errors); - $this->assertEquals($newValidators, $validators); + $app = $this->getAppInstance(); + + $app->get('/foo', function (ServerRequestInterface $request, ResponseInterface $response, $args) use ($expectedErrors, $newValidators) { + + $errors = $request->getAttribute('errors'); + $hasErrors = $request->getAttribute('has_errors'); + $validators = $request->getAttribute('validators'); + + + \PHPUnit\Framework\Assert::assertTrue($hasErrors); + \PHPUnit\Framework\Assert::assertEquals($expectedErrors, $errors); + \PHPUnit\Framework\Assert::assertEquals($newValidators, $validators); + + $response->getBody()->write('Hello world!'); + return $response; + })->add($mw); + + $params = [ + 'username' => 'davidepastore', + 'age' => 89 + ]; + + $url = sprintf('/foo?%s', http_build_query($params)); + + $request = $this->createRequest('GET', $url); + + $response = $app->handle($request); + + $result = (string) $response->getBody(); + + $this->assertEquals(200, $response->getStatusCode()); } + + public function testSetTranslator() { - $this->setupGet(); $usernameValidator = v::alnum()->noWhitespace()->length(1, 5); $expectedValidators = array( - 'username' => $usernameValidator, + 'username' => $usernameValidator, ); - $translator = function ($message) { - $messages = [ - 'These rules must pass for {{name}}' => 'Queste regole devono passare per {{name}}', - '{{name}} must be a string' => '{{name}} deve essere una stringa', - '{{name}} must have a length between {{minValue}} and {{maxValue}}' => '{{name}} deve avere una dimensione di caratteri compresa tra {{minValue}} e {{maxValue}}', - ]; - - return $messages[$message]; - }; + $translator = [ + 'alnum' => 'Queste regole devono passare per {{name}}', //'These rules must pass for {{name}}' + 'noWhitespace' => '{{name}} deve essere una stringa', //'{{name}} must be a string' + 'length' => '{{name}} deve avere una dimensione di caratteri compresa tra {{minValue}} e {{maxValue}}', //'{{name}} must have a length between {{minValue}} and {{maxValue}}' + ]; $mw = new Validation($expectedValidators, $translator); @@ -643,108 +115,47 @@ public function testSetTranslator() return $res; }; - $newTranslator = function ($message) { - $messages = [ - 'These rules must pass for {{name}}' => 'Queste regole devono passare per {{name}} (nuovo)', - '{{name}} must be a string' => '{{name}} deve essere una stringa (nuovo)', - '{{name}} must have a length between {{minValue}} and {{maxValue}}' => '{{name}} deve avere una dimensione di caratteri compresa tra {{minValue}} e {{maxValue}} (nuovo)', - ]; - - return $messages[$message]; - }; + $newTranslator = [ + 'length' => '"davidepastore" deve avere una dimensione di caratteri compresa tra 1 e 5 (nuovo)', //'{{name}} must have a length between {{minValue}} and {{maxValue}}' + ]; $mw->setTranslator($newTranslator); - $response = $mw($this->request, $this->response, $next); - - $this->assertTrue($hasErrors); $expectedErrors = array( - 'username' => array( - '"davidepastore" deve avere una dimensione di caratteri compresa tra 1 e 5 (nuovo)', - ), + 'username' => array( + 'length' => '"davidepastore" deve avere una dimensione di caratteri compresa tra 1 e 5 (nuovo)', + ), ); - $this->assertEquals($expectedErrors, $errors); - $this->assertEquals($expectedValidators, $validators); - $this->assertEquals($newTranslator, $translator); - } + + $app = $this->getAppInstance(); - public function requestFactory($envData = []) - { - $env = Environment::mock($envData); - $uri = Uri::createFromString('https://example.com:443/foo/bar?abc=123'); - $headers = Headers::createFromEnvironment($env); - $cookies = []; - $serverParams = $env->all(); - $body = new RequestBody(); - $request = new Request('GET', $uri, $headers, $cookies, $serverParams, $body); - - return $request; - } + $app->post('/translator', function (ServerRequestInterface $request, ResponseInterface $response, $args) use ($expectedErrors, $expectedValidators, $newTranslator) { - /** - * Test for validation. - * - * @dataProvider routeParamValidationProvider - */ - public function testRouteParamValidation($expectedValidators, $expectedHasErrors, $expectedErrors, $attributes) - { - $this->setupGet(); - $attrProp = new ReflectionProperty($this->request, 'attributes'); - $attrProp->setAccessible(true); - $attrProp->setValue($this->request, new Collection(array('routeInfo' => array( - 0, - 1, - $attributes, - )))); + $errors = $request->getAttribute('errors'); + $hasErrors = $request->getAttribute('has_errors'); + $validators = $request->getAttribute('validators'); + $translator = $request->getAttribute('translator'); - $mw = new Validation($expectedValidators); + \PHPUnit\Framework\Assert::assertTrue($hasErrors); + \PHPUnit\Framework\Assert::assertEquals($expectedErrors, $errors); + \PHPUnit\Framework\Assert::assertEquals($expectedValidators, $validators); + \PHPUnit\Framework\Assert::assertEquals($newTranslator, $translator); - $errors = null; - $hasErrors = null; - $validators = []; - $next = function ($req, $res) use (&$errors, &$hasErrors, &$validators) { - $errors = $req->getAttribute('errors'); - $hasErrors = $req->getAttribute('has_errors'); - $validators = $req->getAttribute('validators'); + $response->getBody()->write('Hello world!'); + return $response; + })->add($mw); - return $res; - }; + $data = [ + 'username' => 'davidepastore' + ]; - $response = $mw($this->request, $this->response, $next); + $request = $this->createJsonRequest('POST', '/translator', $data); - $this->assertEquals($expectedValidators, $validators); - $this->assertEquals($expectedHasErrors, $hasErrors); - $this->assertEquals($expectedErrors, $errors); - } + $response = $app->handle($request); - /** - * The validation provider for the route parameters. - */ - public function routeParamValidationProvider() - { - return array( - //Validation without errors - array( - array( - 'routeParam' => v::alnum()->noWhitespace()->length(1, 5), - ), - false, - [], - ['routeParam' => 'test'], - ), - //Validation with errors - array( - array( - 'routeParam' => v::alnum()->noWhitespace()->length(1, 5), - ), - true, - array( - 'routeParam' => array( - '"davidepastore" must have a length between 1 and 5', - ), - ), - ['routeParam' => 'davidepastore'], - ), - ); + $result = (string) $response->getBody(); + + $this->assertEquals(200, $response->getStatusCode()); } + } From c0a9fbc666cff5185e0ea6d9efe6196f9eb3078f Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 03:26:38 +0500 Subject: [PATCH 04/11] Update travis for min php 7.2 --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f509d69..c7efed5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,6 @@ language: php dist: trusty php: - - 5.6 - - 7.0 - - 7.1 - 7.2 - 7.3 - 7.4 From b4ce9d7fe3c39a7099dc710a7536e9e6489d703c Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 03:35:11 +0500 Subject: [PATCH 05/11] Update styleci.yml --- .styleci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.styleci.yml b/.styleci.yml index ba68364..7daa573 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,3 +1,13 @@ -preset: psr2 - risky: false +version: 7 +preset: recommended +finder: + exclude: + - "modules" + - "node_modules" + - "storage" + - "vendor" + name: "*.php" + not-name: + - "*.blade.php" + - "_ide_helper.php" \ No newline at end of file From 14bf1bc67c566d19d47f317ed55d123ff90eabb4 Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 03:37:35 +0500 Subject: [PATCH 06/11] cleaning --- tests/TestCase.php | 5 ----- tests/ValidationTest.php | 13 ------------- 2 files changed, 18 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index f38b807..892eccd 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -7,15 +7,10 @@ use DI\ContainerBuilder; use Exception; use PHPUnit\Framework\TestCase as PHPUnit_TestCase; -use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Http\Message\ServerRequestInterface; use Slim\App; use Slim\Factory\AppFactory; use Slim\Psr7\Factory\ServerRequestFactory; -use Slim\Psr7\Factory\StreamFactory; -use Slim\Psr7\Headers; -use Slim\Psr7\Request as SlimRequest; -use Slim\Psr7\Uri; class TestCase extends PHPUnit_TestCase { diff --git a/tests/ValidationTest.php b/tests/ValidationTest.php index 8b2cc40..ba5bb73 100644 --- a/tests/ValidationTest.php +++ b/tests/ValidationTest.php @@ -3,23 +3,10 @@ namespace DavidePastore\Slim\Validation\Tests; use DavidePastore\Slim\Validation\Tests\TestCase; -use ReflectionProperty; -use Slim\Collection; -use Slim\Http\Body; -use Slim\Http\Environment; - -use Slim\Http\Request; -use Slim\Http\RequestBody; -use Slim\Http\Response; -use Slim\Http\Uri; use DavidePastore\Slim\Validation\Validation; -use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Respect\Validation\Validator as v; -use Slim\Psr7\Environment as Psr7Environment; - -use function DI\value; class ValidationTest extends TestCase { From 5942a74c92edc81745926333216ef19199deaa62 Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 03:50:13 +0500 Subject: [PATCH 07/11] Update --- src/Validation.php | 8 +++--- tests/TestCase.php | 15 ++++++----- tests/ValidationTest.php | 58 +++++++++++++++------------------------- 3 files changed, 34 insertions(+), 47 deletions(-) diff --git a/src/Validation.php b/src/Validation.php index 3eb6012..adfecef 100644 --- a/src/Validation.php +++ b/src/Validation.php @@ -75,7 +75,7 @@ class Validation * Create new Validator service provider. * * @param null|array|ArrayAccess $validators - * @param null|array $translator + * @param null|array $translator * @param []|array $options */ public function __construct($validators = null, $translator = null, $options = []) @@ -94,7 +94,7 @@ public function __construct($validators = null, $translator = null, $options = [ * Validation middleware invokable class. * * @param \Psr\Http\Message\ServerRequestInterface $request PSR7 request - * @param \Psr\Http\Server\RequestHandlerInterface $response PSR7 response + * @param \Psr\Http\Server\RequestHandlerInterface $response PSR7 response * * @return \Psr\Http\Message\ResponseInterface */ @@ -109,7 +109,7 @@ public function __invoke(ServerRequestInterface $request, RequestHandlerInterfac $queryParams = $request->getQueryParams(); - $params = array_merge((array) $arguments, (array)$params, (array)$queryParams); + $params = array_merge((array) $arguments, (array) $params, (array) $queryParams); $this->validate($params, $this->validators); @@ -187,7 +187,7 @@ private function getNestedParam($params = [], $keys = []) * * @param array $params The variable to check. * - * @return boolean Returns true if the given $params parameter is array like. + * @return bool Returns true if the given $params parameter is array like. */ private function isArrayLike($params) { diff --git a/tests/TestCase.php b/tests/TestCase.php index 892eccd..be92be7 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -15,8 +15,9 @@ class TestCase extends PHPUnit_TestCase { /** - * @return App * @throws Exception + * + * @return App */ protected function getAppInstance(): App { @@ -41,9 +42,9 @@ protected function getAppInstance(): App /** * Create a server request. * - * @param string $method The HTTP method - * @param string|UriInterface $uri The URI - * @param array $serverParams The server parameters + * @param string $method The HTTP method + * @param string|UriInterface $uri The URI + * @param array $serverParams The server parameters * * @return ServerRequestInterface */ @@ -59,9 +60,9 @@ protected function createRequest( /** * Create a JSON request. * - * @param string $method The HTTP method - * @param string|UriInterface $uri The URI - * @param array|null $data The json data + * @param string $method The HTTP method + * @param string|UriInterface $uri The URI + * @param array|null $data The json data * * @return ServerRequestInterface */ diff --git a/tests/ValidationTest.php b/tests/ValidationTest.php index ba5bb73..393936c 100644 --- a/tests/ValidationTest.php +++ b/tests/ValidationTest.php @@ -2,7 +2,6 @@ namespace DavidePastore\Slim\Validation\Tests; -use DavidePastore\Slim\Validation\Tests\TestCase; use DavidePastore\Slim\Validation\Validation; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -15,29 +14,29 @@ public function testSetValidators() { $usernameValidator = v::alnum()->noWhitespace()->length(1, 20); $ageValidator = v::numericVal()->positive()->between(1, 100); - $expectedValidators = array( + $expectedValidators = [ 'username' => $usernameValidator, - 'age' => $ageValidator, - ); + 'age' => $ageValidator, + ]; $mw = new Validation($expectedValidators); $newUsernameValidator = v::alnum()->noWhitespace()->length(1, 10); $newAgeValidator = v::numericVal()->positive()->between(1, 20); - $newValidators = array( + $newValidators = [ 'username' => $newUsernameValidator, - 'age' => $newAgeValidator, - ); + 'age' => $newAgeValidator, + ]; $mw->setValidators($newValidators); - $expectedErrors = array( - 'username' => array( + $expectedErrors = [ + 'username' => [ 'length' => '"davidepastore" must have a length between 1 and 10', - ), - 'age' => array( + ], + 'age' => [ 'between' => '"89" must be between 1 and 20', - ), - ); + ], + ]; $app = $this->getAppInstance(); @@ -58,7 +57,7 @@ public function testSetValidators() $params = [ 'username' => 'davidepastore', - 'age' => 89 + 'age' => 89, ]; $url = sprintf('/foo?%s', http_build_query($params)); @@ -77,42 +76,29 @@ public function testSetValidators() public function testSetTranslator() { $usernameValidator = v::alnum()->noWhitespace()->length(1, 5); - $expectedValidators = array( + $expectedValidators = [ 'username' => $usernameValidator, - ); + ]; $translator = [ - 'alnum' => 'Queste regole devono passare per {{name}}', //'These rules must pass for {{name}}' + 'alnum' => 'Queste regole devono passare per {{name}}', //'These rules must pass for {{name}}' 'noWhitespace' => '{{name}} deve essere una stringa', //'{{name}} must be a string' - 'length' => '{{name}} deve avere una dimensione di caratteri compresa tra {{minValue}} e {{maxValue}}', //'{{name}} must have a length between {{minValue}} and {{maxValue}}' + 'length' => '{{name}} deve avere una dimensione di caratteri compresa tra {{minValue}} e {{maxValue}}', //'{{name}} must have a length between {{minValue}} and {{maxValue}}' ]; $mw = new Validation($expectedValidators, $translator); - $errors = null; - $hasErrors = null; - $translator = null; - $validators = []; - $next = function ($req, $res) use (&$errors, &$hasErrors, &$translator, &$validators) { - $errors = $req->getAttribute('errors'); - $hasErrors = $req->getAttribute('has_errors'); - $validators = $req->getAttribute('validators'); - $translator = $req->getAttribute('translator'); - - return $res; - }; - $newTranslator = [ 'length' => '"davidepastore" deve avere una dimensione di caratteri compresa tra 1 e 5 (nuovo)', //'{{name}} must have a length between {{minValue}} and {{maxValue}}' ]; $mw->setTranslator($newTranslator); - $expectedErrors = array( - 'username' => array( + $expectedErrors = [ + 'username' => [ 'length' => '"davidepastore" deve avere una dimensione di caratteri compresa tra 1 e 5 (nuovo)', - ), - ); + ], + ]; $app = $this->getAppInstance(); @@ -133,7 +119,7 @@ public function testSetTranslator() })->add($mw); $data = [ - 'username' => 'davidepastore' + 'username' => 'davidepastore', ]; $request = $this->createJsonRequest('POST', '/translator', $data); From b3e3c84377ba84b845583d914086abc87c060a73 Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 03:54:33 +0500 Subject: [PATCH 08/11] update --- .styleci.yml | 14 ++------------ tests/TestCase.php | 3 +-- tests/ValidationTest.php | 10 +++------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.styleci.yml b/.styleci.yml index 7daa573..ba68364 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,13 +1,3 @@ +preset: psr2 + risky: false -version: 7 -preset: recommended -finder: - exclude: - - "modules" - - "node_modules" - - "storage" - - "vendor" - name: "*.php" - not-name: - - "*.blade.php" - - "_ide_helper.php" \ No newline at end of file diff --git a/tests/TestCase.php b/tests/TestCase.php index be92be7..d62738e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -16,7 +16,7 @@ class TestCase extends PHPUnit_TestCase { /** * @throws Exception - * + * * @return App */ protected function getAppInstance(): App @@ -38,7 +38,6 @@ protected function getAppInstance(): App return $app; } - /** * Create a server request. * diff --git a/tests/ValidationTest.php b/tests/ValidationTest.php index 393936c..ef4bea9 100644 --- a/tests/ValidationTest.php +++ b/tests/ValidationTest.php @@ -9,7 +9,6 @@ class ValidationTest extends TestCase { - public function testSetValidators() { $usernameValidator = v::alnum()->noWhitespace()->length(1, 20); @@ -41,17 +40,16 @@ public function testSetValidators() $app = $this->getAppInstance(); $app->get('/foo', function (ServerRequestInterface $request, ResponseInterface $response, $args) use ($expectedErrors, $newValidators) { - $errors = $request->getAttribute('errors'); $hasErrors = $request->getAttribute('has_errors'); $validators = $request->getAttribute('validators'); - \PHPUnit\Framework\Assert::assertTrue($hasErrors); \PHPUnit\Framework\Assert::assertEquals($expectedErrors, $errors); \PHPUnit\Framework\Assert::assertEquals($newValidators, $validators); $response->getBody()->write('Hello world!'); + return $response; })->add($mw); @@ -71,8 +69,6 @@ public function testSetValidators() $this->assertEquals(200, $response->getStatusCode()); } - - public function testSetTranslator() { $usernameValidator = v::alnum()->noWhitespace()->length(1, 5); @@ -99,11 +95,10 @@ public function testSetTranslator() 'length' => '"davidepastore" deve avere una dimensione di caratteri compresa tra 1 e 5 (nuovo)', ], ]; - + $app = $this->getAppInstance(); $app->post('/translator', function (ServerRequestInterface $request, ResponseInterface $response, $args) use ($expectedErrors, $expectedValidators, $newTranslator) { - $errors = $request->getAttribute('errors'); $hasErrors = $request->getAttribute('has_errors'); $validators = $request->getAttribute('validators'); @@ -115,6 +110,7 @@ public function testSetTranslator() \PHPUnit\Framework\Assert::assertEquals($newTranslator, $translator); $response->getBody()->write('Hello world!'); + return $response; })->add($mw); From 5e052944201a29e58689666bb648a9eacab2aae7 Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 03:55:27 +0500 Subject: [PATCH 09/11] Update --- tests/ValidationTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/ValidationTest.php b/tests/ValidationTest.php index ef4bea9..04ab305 100644 --- a/tests/ValidationTest.php +++ b/tests/ValidationTest.php @@ -126,5 +126,4 @@ public function testSetTranslator() $this->assertEquals(200, $response->getStatusCode()); } - } From 973db377a5182b22a8458a90ae39c11a8594906d Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Wed, 26 May 2021 04:15:00 +0500 Subject: [PATCH 10/11] update scrutinizer --- .scrutinizer.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 5250931..1bcd075 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,6 +1,5 @@ filter: - excluded_paths: - - tests/* + excluded_paths: [vendor/*, tests/*] checks: php: true From 21f09c8ce7934875882e06b0f46010dd5db40c7f Mon Sep 17 00:00:00 2001 From: M-Shahbaz Date: Thu, 3 Jun 2021 16:38:17 +0500 Subject: [PATCH 11/11] remove useTemplate --- src/Validation.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Validation.php b/src/Validation.php index adfecef..4716c5f 100644 --- a/src/Validation.php +++ b/src/Validation.php @@ -25,9 +25,7 @@ class Validation * * @var array */ - protected $options = [ - 'useTemplate' => false, - ]; + protected $options = []; /** * The translator to use for the exception message. @@ -144,11 +142,7 @@ private function validate($params = [], $validators = [], $actualKeys = []) if ($this->translator) { $this->translator = $exception->getMessages($this->translator); } - if ($this->options['useTemplate']) { - $this->errors[implode('.', $actualKeys)] = [$exception->getFullMessage()]; - } else { - $this->errors[implode('.', $actualKeys)] = $exception->getMessages(); - } + $this->errors[implode('.', $actualKeys)] = $exception->getMessages(); } }