From e32bb7f67f59129884fcd96600e8f88b8df328f9 Mon Sep 17 00:00:00 2001 From: Mohammed Elhaouari <9967336+mohammed-elhaouari@users.noreply.github.com> Date: Thu, 5 Aug 2021 14:27:46 +0100 Subject: [PATCH] add discount to amount breakdown (#12) * add discount to amount breakdown (#11) * added money and currency value objects * fix money contract * fix failed tests Co-authored-by: abdelwahid elmeghit --- composer.json | 2 +- composer.lock | 2980 ++++++---------------- src/Concerns/HasCollection.php | 10 +- src/Concerns/HasJson.php | 2 +- src/Contracts/HttpClient.php | 2 +- src/Contracts/Jsonable.php | 2 +- src/Contracts/Money.php | 23 + src/Environment/PayPalEnvironment.php | 2 +- src/Http/AccessToken.php | 2 +- src/Http/AccessTokenRequest.php | 2 +- src/Http/OrderCreateRequest.php | 2 +- src/Http/PayPalClient.php | 14 +- src/Orders/Amount.php | 46 +- src/Orders/AmountBreakdown.php | 74 +- src/Orders/ApplicationContext.php | 12 +- src/Orders/Currency.php | 63 + src/Orders/Money.php | 69 + src/Orders/Order.php | 4 +- src/Orders/PurchaseUnit.php | 26 +- tests/Http/AccessTokenRequestTest.php | 6 +- tests/Http/OrderAuthorizeRequestTest.php | 2 +- tests/Http/OrderCaptureRequestTest.php | 2 +- tests/Http/OrderCreateRequestTest.php | 4 +- tests/Http/OrderShowRequestTest.php | 2 +- tests/Http/PayPalClientTest.php | 4 +- tests/Orders/AmountBreakdownTest.php | 69 +- tests/Orders/CurrencyTest.php | 28 + tests/Orders/MoneyTest.php | 31 + tests/Orders/OrderTest.php | 149 +- 29 files changed, 1326 insertions(+), 2308 deletions(-) create mode 100644 src/Contracts/Money.php create mode 100644 src/Orders/Currency.php create mode 100644 src/Orders/Money.php create mode 100644 tests/Orders/CurrencyTest.php create mode 100644 tests/Orders/MoneyTest.php diff --git a/composer.json b/composer.json index c202177..5b694b3 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "require-dev": { "phpunit/phpunit": "^9.0", "squizlabs/php_codesniffer": "^3.4", - "phpstan/phpstan": "^0.11.5" + "phpstan/phpstan": "^0.12" }, "scripts": { "test": "phpunit", diff --git a/composer.lock b/composer.lock index a865a25..d97cf7d 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": "29b8ea6ac1346be450002d93daad82bb", + "content-hash": "e6f8c23c567ecf4c34230415d01b170e", "packages": [ { "name": "guzzlehttp/guzzle", @@ -390,143 +390,6 @@ } ], "packages-dev": [ - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.2", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/c6522afe5540d5fc46675043d3ed5a45a740b27c", - "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-05-24T07:46:03+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "1.4.6", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-03-25T17:01:18+00:00" - }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -596,61 +459,6 @@ ], "time": "2020-11-10T18:47:58+00:00" }, - { - "name": "jean85/pretty-package-versions", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0|^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0|^8.5|^9.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jean85\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alessandro Lai", - "email": "alessandro.lai85@gmail.com" - } - ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", - "keywords": [ - "composer", - "package", - "release", - "versions" - ], - "support": { - "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" - }, - "time": "2021-02-04T16:20:16+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.10.2", @@ -710,121 +518,86 @@ "time": "2020-11-13T09:40:50+00:00" }, { - "name": "nette/bootstrap", - "version": "v3.1.1", + "name": "nikic/php-parser", + "version": "v4.12.0", "source": { "type": "git", - "url": "https://github.com/nette/bootstrap.git", - "reference": "efe6c30fc009451f59fe56f3b309eb85c48b2baf" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/bootstrap/zipball/efe6c30fc009451f59fe56f3b309eb85c48b2baf", - "reference": "efe6c30fc009451f59fe56f3b309eb85c48b2baf", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143", "shasum": "" }, "require": { - "nette/di": "^3.0.5", - "nette/utils": "^3.2.1", - "php": ">=7.2 <8.1" - }, - "conflict": { - "tracy/tracy": "<2.6" + "ext-tokenizer": "*", + "php": ">=7.0" }, "require-dev": { - "latte/latte": "^2.2", - "nette/application": "^3.1", - "nette/caching": "^3.0", - "nette/database": "^3.0", - "nette/forms": "^3.0", - "nette/http": "^3.0", - "nette/mail": "^3.0", - "nette/robot-loader": "^3.0", - "nette/safe-stream": "^2.2", - "nette/security": "^3.0", - "nette/tester": "^2.0", - "phpstan/phpstan-nette": "^0.12", - "tracy/tracy": "^2.6" - }, - "suggest": { - "nette/robot-loader": "to use Configurator::createRobotLoader()", - "tracy/tracy": "to use Configurator::enableTracy()" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.9-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "BSD-3-Clause" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "Nikita Popov" } ], - "description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.", - "homepage": "https://nette.org", + "description": "A PHP parser written in PHP", "keywords": [ - "bootstrapping", - "configurator", - "nette" + "parser", + "php" ], "support": { - "issues": "https://github.com/nette/bootstrap/issues", - "source": "https://github.com/nette/bootstrap/tree/v3.1.1" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" }, - "time": "2021-01-25T00:31:21+00:00" + "time": "2021-07-21T10:44:31+00:00" }, { - "name": "nette/di", - "version": "v3.0.8", + "name": "phar-io/manifest", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/nette/di.git", - "reference": "1a3210f0f1f971db8a6e970c716c1cebd28b7ab0" + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/di/zipball/1a3210f0f1f971db8a6e970c716c1cebd28b7ab0", - "reference": "1a3210f0f1f971db8a6e970c716c1cebd28b7ab0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "nette/neon": "^3.0", - "nette/php-generator": "^3.3.3", - "nette/robot-loader": "^3.2", - "nette/schema": "^1.1", - "nette/utils": "^3.2", - "php": ">=7.1 <8.1" - }, - "conflict": { - "nette/bootstrap": "<3.0" - }, - "require-dev": { - "nette/tester": "^2.2", - "phpstan/phpstan": "^0.12", - "tracy/tracy": "^2.3" + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -834,69 +607,50 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "BSD-3-Clause" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" }, { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP features.", - "homepage": "https://nette.org", - "keywords": [ - "compiled", - "di", - "dic", - "factory", - "ioc", - "nette", - "static" - ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "issues": "https://github.com/nette/di/issues", - "source": "https://github.com/nette/di/tree/v3.0.8" + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2021-03-02T03:47:09+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { - "name": "nette/finder", - "version": "v2.5.2", + "name": "phar-io/version", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/nette/finder.git", - "reference": "4ad2c298eb8c687dd0e74ae84206a4186eeaed50" + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/finder/zipball/4ad2c298eb8c687dd0e74ae84206a4186eeaed50", - "reference": "4ad2c298eb8c687dd0e74ae84206a4186eeaed50", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "nette/utils": "^2.4 || ^3.0", - "php": ">=7.1" - }, - "conflict": { - "nette/nette": "<2.2" - }, - "require-dev": { - "nette/tester": "^2.0", - "phpstan/phpstan": "^0.12", - "tracy/tracy": "^2.3" + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, "autoload": { "classmap": [ "src/" @@ -904,1449 +658,410 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0", - "GPL-3.0" + "BSD-3-Clause" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" }, { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "🔍 Nette Finder: find files and directories with an intuitive API.", - "homepage": "https://nette.org", - "keywords": [ - "filesystem", - "glob", - "iterator", - "nette" - ], + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/nette/finder/issues", - "source": "https://github.com/nette/finder/tree/v2.5.2" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" }, - "time": "2020-01-03T20:35:40+00:00" + "time": "2021-02-23T14:00:09+00:00" }, { - "name": "nette/neon", - "version": "v3.2.2", + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", "source": { "type": "git", - "url": "https://github.com/nette/neon.git", - "reference": "e4ca6f4669121ca6876b1d048c612480e39a28d5" + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/neon/zipball/e4ca6f4669121ca6876b1d048c612480e39a28d5", - "reference": "e4ca6f4669121ca6876b1d048c612480e39a28d5", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "ext-json": "*", - "php": ">=7.1" - }, - "require-dev": { - "nette/tester": "^2.0", - "phpstan/phpstan": "^0.12", - "tracy/tracy": "^2.3" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "MIT" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" } ], - "description": "🍸 Nette NEON: encodes and decodes NEON file format.", - "homepage": "https://ne-on.org", + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", "keywords": [ - "export", - "import", - "neon", - "nette", - "yaml" + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" ], "support": { - "issues": "https://github.com/nette/neon/issues", - "source": "https://github.com/nette/neon/tree/v3.2.2" + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" }, - "time": "2021-02-28T12:30:32+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { - "name": "nette/php-generator", - "version": "v3.5.3", + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", "source": { "type": "git", - "url": "https://github.com/nette/php-generator.git", - "reference": "119f01a7bd590469cb01b538f20a125a28853626" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/119f01a7bd590469cb01b538f20a125a28853626", - "reference": "119f01a7bd590469cb01b538f20a125a28853626", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { - "nette/utils": "^3.1.2", - "php": ">=7.1" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "nette/tester": "^2.0", - "nikic/php-parser": "^4.4", - "phpstan/phpstan": "^0.12", - "tracy/tracy": "^2.3" - }, - "suggest": { - "nikic/php-parser": "to use ClassType::withBodiesFrom() & GlobalFunction::withBodyFrom()" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.5-dev" + "dev-master": "5.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "MIT" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" }, { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], - "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.4 features.", - "homepage": "https://nette.org", - "keywords": [ - "code", - "nette", - "php", - "scaffolding" - ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { - "issues": "https://github.com/nette/php-generator/issues", - "source": "https://github.com/nette/php-generator/tree/v3.5.3" + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" }, - "time": "2021-02-24T18:40:21+00:00" + "time": "2020-09-03T19:13:55+00:00" }, { - "name": "nette/robot-loader", - "version": "v3.4.0", + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/nette/robot-loader.git", - "reference": "3973cf3970d1de7b30888fd10b92dac9e0c2fd82" + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/robot-loader/zipball/3973cf3970d1de7b30888fd10b92dac9e0c2fd82", - "reference": "3973cf3970d1de7b30888fd10b92dac9e0c2fd82", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "nette/finder": "^2.5 || ^3.0", - "nette/utils": "^3.0", - "php": ">=7.1" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "nette/tester": "^2.0", - "phpstan/phpstan": "^0.12", - "tracy/tracy": "^2.3" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "MIT" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" } ], - "description": "🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.", - "homepage": "https://nette.org", - "keywords": [ - "autoload", - "class", - "interface", - "nette", - "trait" - ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { - "issues": "https://github.com/nette/robot-loader/issues", - "source": "https://github.com/nette/robot-loader/tree/v3.4.0" + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" }, - "time": "2021-03-07T15:12:01+00:00" + "time": "2020-09-17T18:55:26+00:00" }, { - "name": "nette/schema", - "version": "v1.2.1", + "name": "phpspec/prophecy", + "version": "1.13.0", "source": { "type": "git", - "url": "https://github.com/nette/schema.git", - "reference": "f5ed39fc96358f922cedfd1e516f0dadf5d2be0d" + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/f5ed39fc96358f922cedfd1e516f0dadf5d2be0d", - "reference": "f5ed39fc96358f922cedfd1e516f0dadf5d2be0d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { - "nette/utils": "^3.1.4 || ^4.0", - "php": ">=7.1 <8.1" + "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": { - "nette/tester": "^2.3 || ^2.4", - "phpstan/phpstan-nette": "^0.12", - "tracy/tracy": "^2.7" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Prophecy\\": "src/Prophecy" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "MIT" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" }, { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], - "description": "📐 Nette Schema: validating data structures against a given Schema.", - "homepage": "https://nette.org", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", "keywords": [ - "config", - "nette" + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" ], "support": { - "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.1" + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" }, - "time": "2021-03-04T17:51:11+00:00" + "time": "2021-03-17T13:42:18+00:00" }, { - "name": "nette/utils", - "version": "v3.2.2", + "name": "phpstan/phpstan", + "version": "0.12.94", "source": { "type": "git", - "url": "https://github.com/nette/utils.git", - "reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c" + "url": "https://github.com/phpstan/phpstan.git", + "reference": "3d0ba4c198a24e3c3fc489f3ec6ac9612c4be5d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c", - "reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3d0ba4c198a24e3c3fc489f3ec6ac9612c4be5d6", + "reference": "3d0ba4c198a24e3c3fc489f3ec6ac9612c4be5d6", "shasum": "" }, "require": { - "php": ">=7.2 <8.1" + "php": "^7.1|^8.0" }, "conflict": { - "nette/di": "<3.0.6" - }, - "require-dev": { - "nette/tester": "~2.0", - "phpstan/phpstan": "^0.12", - "tracy/tracy": "^2.3" - }, - "suggest": { - "ext-gd": "to use Image", - "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", - "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", - "ext-json": "to use Nette\\Utils\\Json", - "ext-mbstring": "to use Strings::lower() etc...", - "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", - "ext-xml": "to use Strings::length() etc. when mbstring is not available" + "phpstan/phpstan-shim": "*" }, + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "0.12-dev" } }, "autoload": { - "classmap": [ - "src/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "MIT" ], - "authors": [ + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.94" + }, + "funding": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" + "url": "https://github.com/ondrejmirtes", + "type": "github" }, { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" - } - ], - "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", - "homepage": "https://nette.org", - "keywords": [ - "array", - "core", - "datetime", - "images", - "json", - "nette", - "paginator", - "password", - "slugify", - "string", - "unicode", - "utf-8", - "utility", - "validation" - ], - "support": { - "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v3.2.2" - }, - "time": "2021-03-03T22:53:25+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.10.5", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "url": "https://github.com/phpstan", + "type": "github" + }, { - "name": "Nikita Popov" + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" } ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" - }, - "time": "2021-05-03T19:11:20+00:00" + "time": "2021-07-30T09:05:27+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.1", + "name": "phpunit/php-code-coverage", + "version": "9.2.6", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f6293e1b30a2354e8428e004689671b83871edde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", "shasum": "" }, "require": { "ext-dom": "*", - "ext-phar": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.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" + "dev-master": "9.2-dev" } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" }, - "time": "2020-06-27T14:33:11+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "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" - }, - { - "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", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "shasum": "" - }, - "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" - }, - "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "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.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.1.0" - }, - "time": "2020-02-22T12:28:44+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, - "time": "2020-09-17T18:55:26+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.11.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2", - "phpdocumentor/reflection-docblock": "^5.0", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/master" - }, - "time": "2020-07-08T12:44:21+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "0.3.5", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "8c4ef2aefd9788238897b678a985e1d5c8df6db4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/8c4ef2aefd9788238897b678a985e1d5c8df6db4", - "reference": "8c4ef2aefd9788238897b678a985e1d5c8df6db4", - "shasum": "" - }, - "require": { - "php": "~7.1" - }, - "require-dev": { - "consistence/coding-standard": "^3.5", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", - "phpstan/phpstan": "^0.10", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^4.7.2", - "squizlabs/php_codesniffer": "^3.3.2", - "symfony/process": "^3.4 || ^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/master" - }, - "time": "2019-06-07T19:13:52+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "0.11.20", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "938dcc03a005280e1a9587ec7684345bff06ebfc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/938dcc03a005280e1a9587ec7684345bff06ebfc", - "reference": "938dcc03a005280e1a9587ec7684345bff06ebfc", - "shasum": "" - }, - "require": { - "composer/xdebug-handler": "^1.3.0", - "jean85/pretty-package-versions": "^1.0.3", - "nette/bootstrap": "^2.4 || ^3.0", - "nette/di": "^2.4.7 || ^3.0", - "nette/neon": "^2.4.3 || ^3.0", - "nette/robot-loader": "^3.0.1", - "nette/schema": "^1.0", - "nette/utils": "^2.4.5 || ^3.0", - "nikic/php-parser": "^4.2.3", - "php": "~7.1", - "phpstan/phpdoc-parser": "^0.3.5", - "symfony/console": "~3.2 || ~4.0", - "symfony/finder": "~3.2 || ~4.0" - }, - "conflict": { - "symfony/console": "3.4.16 || 4.1.5" - }, - "require-dev": { - "brianium/paratest": "^2.0 || ^3.0", - "consistence/coding-standard": "^3.5", - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", - "ext-intl": "*", - "ext-mysqli": "*", - "ext-simplexml": "*", - "ext-soap": "*", - "ext-zip": "*", - "jakub-onderka/php-parallel-lint": "^1.0", - "localheinz/composer-normalize": "^1.1.0", - "phing/phing": "^2.16.0", - "phpstan/phpstan-deprecation-rules": "^0.11", - "phpstan/phpstan-php-parser": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^7.5.14 || ^8.0", - "slevomat/coding-standard": "^4.7.2", - "squizlabs/php_codesniffer": "^3.3.2" - }, - "bin": [ - "bin/phpstan" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.11-dev" - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.11.20" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2020-10-12T14:33:05+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-03-28T07:26:59+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:57:25+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ef533467a7974c4b6c354f3eff42a115910bd4e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ef533467a7974c4b6c354f3eff42a115910bd4e5", - "reference": "ef533467a7974c4b6c354f3eff42a115910bd4e5", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.1", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.11.1", - "phpunit/php-code-coverage": "^9.2", - "phpunit/php-file-iterator": "^3.0.4", - "phpunit/php-invoker": "^3.1", - "phpunit/php-text-template": "^2.0.2", - "phpunit/php-timer": "^5.0.1", - "sebastian/cli-parser": "^1.0", - "sebastian/code-unit": "^1.0.5", - "sebastian/comparator": "^4.0.3", - "sebastian/diff": "^4.0.2", - "sebastian/environment": "^5.1.2", - "sebastian/exporter": "^4.0.2", - "sebastian/global-state": "^5.0", - "sebastian/object-enumerator": "^4.0.2", - "sebastian/resource-operations": "^3.0.2", - "sebastian/type": "^2.2.1", - "sebastian/version": "^3.0.1" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.4.0" - }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-02T03:54:37+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": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } + "autoload": { + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ - "log", - "psr", - "psr-3" + "coverage", + "testing", + "xunit" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" }, - "time": "2021-05-03T11:20:27+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" }, { - "name": "sebastian/cli-parser", - "version": "1.0.1", + "name": "phpunit/php-file-iterator", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { @@ -2358,7 +1073,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2377,11 +1092,15 @@ "role": "lead" } ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" }, "funding": [ { @@ -2389,32 +1108,36 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "sebastian/code-unit", - "version": "1.0.8", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { + "ext-pcntl": "*", "phpunit/phpunit": "^9.3" }, + "suggest": { + "ext-pcntl": "*" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2433,11 +1156,14 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, "funding": [ { @@ -2445,20 +1171,20 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { @@ -2485,14 +1211,18 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { @@ -2500,26 +1230,24 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "sebastian/comparator", - "version": "4.0.6", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "php": ">=7.3" }, "require-dev": { "phpunit/phpunit": "^9.3" @@ -2527,7 +1255,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2542,31 +1270,18 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "comparator", - "compare", - "equality" + "timer" ], "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -2574,38 +1289,75 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { - "name": "sebastian/complexity", - "version": "2.0.2", + "name": "phpunit/phpunit", + "version": "9.5.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/191768ccd5c85513b4068bdbe99bb6390c7d54fb", + "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" }, + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2619,45 +1371,53 @@ "role": "lead" } ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.8" }, "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2021-07-31T15:17:34+00:00" }, { - "name": "sebastian/diff", - "version": "4.0.4", + "name": "sebastian/cli-parser", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -2672,24 +1432,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" }, "funding": [ { @@ -2697,20 +1448,20 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2020-09-28T06:08:49+00:00" }, { - "name": "sebastian/environment", - "version": "5.1.3", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { @@ -2719,13 +1470,10 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, - "suggest": { - "ext-posix": "*" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -2740,19 +1488,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, "funding": [ { @@ -2760,34 +1504,32 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2020-10-26T13:08:54+00:00" }, { - "name": "sebastian/exporter", - "version": "4.0.3", + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "php": ">=7.3" }, "require-dev": { - "ext-mbstring": "*", "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2803,33 +1545,13 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -2837,38 +1559,34 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { - "name": "sebastian/global-state", - "version": "5.0.3", + "name": "sebastian/comparator", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "ext-dom": "*", "phpunit/phpunit": "^9.3" }, - "suggest": { - "ext-uopz": "*" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2884,16 +1602,30 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ - "global state" + "comparator", + "compare", + "equality" ], "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" }, "funding": [ { @@ -2901,24 +1633,24 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2020-10-26T15:49:45+00:00" }, { - "name": "sebastian/lines-of-code", - "version": "1.0.3", + "name": "sebastian/complexity", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.7", "php": ">=7.3" }, "require-dev": { @@ -2927,7 +1659,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2946,11 +1678,11 @@ "role": "lead" } ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" }, "funding": [ { @@ -2958,29 +1690,28 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2020-10-26T15:52:27+00:00" }, { - "name": "sebastian/object-enumerator", + "name": "sebastian/diff", "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { @@ -3001,13 +1732,23 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" }, "funding": [ { @@ -3015,20 +1756,20 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2020-10-26T13:10:38+00:00" }, { - "name": "sebastian/object-reflector", - "version": "2.0.4", + "name": "sebastian/environment", + "version": "5.1.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { @@ -3037,10 +1778,13 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "suggest": { + "ext-posix": "*" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3058,11 +1802,16 @@ "email": "sebastian@phpunit.de" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" }, "funding": [ { @@ -3070,26 +1819,28 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2020-09-28T05:52:38+00:00" }, { - "name": "sebastian/recursion-context", - "version": "4.0.4", + "name": "sebastian/exporter", + "version": "4.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "^9.3" }, "type": "library", @@ -3116,16 +1867,28 @@ "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" }, "funding": [ { @@ -3133,32 +1896,38 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2020-09-28T05:24:23+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.3", + "name": "sebastian/global-state", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3176,11 +1945,14 @@ "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", + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" }, "funding": [ { @@ -3188,23 +1960,24 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { - "name": "sebastian/type", - "version": "2.3.4", + "name": "sebastian/lines-of-code", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { + "nikic/php-parser": "^4.6", "php": ">=7.3" }, "require-dev": { @@ -3213,7 +1986,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -3232,11 +2005,11 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" }, "funding": [ { @@ -3244,29 +2017,34 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2020-11-28T06:42:11+00:00" }, { - "name": "sebastian/version", - "version": "3.0.2", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3281,15 +2059,14 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -3297,570 +2074,383 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "3.6.0", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^9.3" }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" + "dev-master": "2.0-dev" } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-04-09T00:54:41+00:00" - }, - { - "name": "symfony/console", - "version": "v4.4.25", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a62acecdf5b50e314a4f305cd01b5282126f3095", - "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095", - "shasum": "" - }, - "require": { - "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/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": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.25" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-05-26T11:20:16+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "symfony/finder", - "version": "v4.4.25", + "name": "sebastian/recursion-context", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "ed33314396d968a8936c95f5bd1b88bd3b3e94a3" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ed33314396d968a8936c95f5bd1b88bd3b3e94a3", - "reference": "ed33314396d968a8936c95f5bd1b88bd3b3e94a3", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { - "source": "https://github.com/symfony/finder/tree/v4.4.25" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-05-26T11:20:16+00:00" + "time": "2020-10-26T13:17:30+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "name": "sebastian/resource-operations", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2020-09-28T06:45:17+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.23.0", + "name": "sebastian/type", + "version": "2.3.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", - "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, - "suggest": { - "ext-mbstring": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "2.3-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-05-27T09:27:20+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "files": [ - "bootstrap.php" - ], "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.23.0", + "name": "squizlabs/php_codesniffer", + "version": "3.6.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", - "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { - "php": ">=7.1" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.x-dev" } }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Greg Sherwood", + "role": "lead" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "phpcs", + "standards" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0" + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-04-09T00:54:41+00:00" }, { - "name": "symfony/service-contracts", - "version": "v2.4.0", + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1" + "php": ">=7.1" }, "suggest": { - "symfony/service-implementation": "" + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "1.23-dev" }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3868,26 +2458,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to writing services", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "compatibility", + "ctype", + "polyfill", + "portable" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" }, "funding": [ { @@ -3903,20 +2491,20 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -3945,7 +2533,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, "funding": [ { @@ -3953,33 +2541,39 @@ "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", - "version": "1.8.0", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.9.1" + "phpstan/phpstan": "<0.12.20", + "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/" @@ -4003,9 +2597,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.8.0" + "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, - "time": "2020-04-18T12:12:48+00:00" + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], @@ -4018,5 +2612,5 @@ "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/src/Concerns/HasCollection.php b/src/Concerns/HasCollection.php index 4f10647..95fe3c9 100644 --- a/src/Concerns/HasCollection.php +++ b/src/Concerns/HasCollection.php @@ -7,7 +7,7 @@ trait HasCollection /** * Determine if an attribute or relation exists on the model. * - * @param string $key + * @param string $key * * @return bool */ @@ -19,7 +19,7 @@ public function __isset(string $key) /** * Determine if a key exists on the items. * - * @param string $offset + * @param string $offset * @return bool */ public function offsetExists(string $offset): bool @@ -30,7 +30,7 @@ public function offsetExists(string $offset): bool /** * Unset an attribute on the model. * - * @param string $key + * @param string $key * * @return void */ @@ -42,7 +42,7 @@ public function __unset(string $key) /** * Unset an attribute on the model. * - * @param string $offset + * @param string $offset * @return void */ public function offsetUnset(string $offset) @@ -60,7 +60,7 @@ public function offsetSet($offset, $value) } /** - * @param string $offset + * @param string $offset * */ public function offsetGet(string $offset) diff --git a/src/Concerns/HasJson.php b/src/Concerns/HasJson.php index 29aa9df..2382b79 100644 --- a/src/Concerns/HasJson.php +++ b/src/Concerns/HasJson.php @@ -19,7 +19,7 @@ public function __toString() /** * Convert the model instance to JSON. * - * @param int $options + * @param int $options * * @return string * diff --git a/src/Contracts/HttpClient.php b/src/Contracts/HttpClient.php index 62b1116..46c139d 100644 --- a/src/Contracts/HttpClient.php +++ b/src/Contracts/HttpClient.php @@ -10,7 +10,7 @@ interface HttpClient /** * Send the http request. * - * @param Request $request + * @param Request $request * @return Response */ public function send(Request $request): Response; diff --git a/src/Contracts/Jsonable.php b/src/Contracts/Jsonable.php index b6edaa1..5b5c9bf 100644 --- a/src/Contracts/Jsonable.php +++ b/src/Contracts/Jsonable.php @@ -7,7 +7,7 @@ interface Jsonable /** * Convert the object to its JSON representation. * - * @param int $options + * @param int $options * * @return string */ diff --git a/src/Contracts/Money.php b/src/Contracts/Money.php new file mode 100644 index 0000000..60cb231 --- /dev/null +++ b/src/Contracts/Money.php @@ -0,0 +1,23 @@ +clientId . ':' . $this->clientSecret); + return base64_encode($this->clientId.':'.$this->clientSecret); } } diff --git a/src/Http/AccessToken.php b/src/Http/AccessToken.php index 7fe0d2f..b72fe85 100644 --- a/src/Http/AccessToken.php +++ b/src/Http/AccessToken.php @@ -61,7 +61,7 @@ public function getTokenType(): ?string */ public function authorizationString(): ?string { - return $this->token_type . ' ' . $this->token; + return $this->token_type.' '.$this->token; } /** diff --git a/src/Http/AccessTokenRequest.php b/src/Http/AccessTokenRequest.php index 0ead0ed..43bb79a 100644 --- a/src/Http/AccessTokenRequest.php +++ b/src/Http/AccessTokenRequest.php @@ -9,7 +9,7 @@ class AccessTokenRequest extends PaypalRequest public function __construct(Environment $environment, $refresh_token = null) { $headers = [ - 'Authorization' => 'Basic ' . $environment->basicAuthorizationString(), + 'Authorization' => 'Basic '.$environment->basicAuthorizationString(), 'Accept' => 'application/json', 'Content-Type' => 'application/x-www-form-urlencoded', ]; diff --git a/src/Http/OrderCreateRequest.php b/src/Http/OrderCreateRequest.php index 792c091..65a8217 100644 --- a/src/Http/OrderCreateRequest.php +++ b/src/Http/OrderCreateRequest.php @@ -14,7 +14,7 @@ public function __construct(Order $order = null) 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; - $body = Utils::streamFor((string)$order); + $body = Utils::streamFor((string) $order); parent::__construct('POST', '/v2/checkout/orders', $headers, $body); } } diff --git a/src/Http/PayPalClient.php b/src/Http/PayPalClient.php index 883431f..f6fefc5 100644 --- a/src/Http/PayPalClient.php +++ b/src/Http/PayPalClient.php @@ -49,7 +49,7 @@ public function __construct(Environment $environment) /** * Send http request. * - * @param Request $request + * @param Request $request * @return Response * @throws GuzzleException */ @@ -81,7 +81,7 @@ public function send(Request $request): Response /** * Check if headers contain an auth header. * - * @param Request $request + * @param Request $request * @return bool */ public function hasAuthHeader(Request $request): bool @@ -108,7 +108,7 @@ public function hasInvalidToken(): bool public function fetchAccessToken(): AccessToken { $response = $this->client->send(new AccessTokenRequest($this->environment)); - $result = Utils::jsonDecode((string)$response->getBody()); + $result = Utils::jsonDecode((string) $response->getBody()); $this->access_token = new AccessToken($result->access_token, $result->token_type, $result->expires_in); return $this->access_token; @@ -117,7 +117,7 @@ public function fetchAccessToken(): AccessToken /** * Injects default user-agent into the request. * - * @param Request $request + * @param Request $request * @return Request */ public function injectUserAgentHeaders(Request $request): Request @@ -128,7 +128,7 @@ public function injectUserAgentHeaders(Request $request): Request /** * Inject paypal sdk headers into request. * - * @param Request $request + * @param Request $request * @return Request */ public function injectSdkHeaders(Request $request): Request @@ -142,7 +142,7 @@ public function injectSdkHeaders(Request $request): Request * @see https://github.com/phpjuice/paypal-checkout-sdk/issues/6 */ if ('production' == $this->environment->name()) { - $r = $r->withHeader('sdk_tech_stack', 'PHP ' . PHP_VERSION); + $r = $r->withHeader('sdk_tech_stack', 'PHP '.PHP_VERSION); } return $r; @@ -151,7 +151,7 @@ public function injectSdkHeaders(Request $request): Request /** * Inject gzip headers into the request. * - * @param Request $request + * @param Request $request * @return Request */ public function injectGzipHeaders(Request $request): Request diff --git a/src/Orders/Amount.php b/src/Orders/Amount.php index b28bb28..97acdbe 100644 --- a/src/Orders/Amount.php +++ b/src/Orders/Amount.php @@ -16,28 +16,16 @@ class Amount implements Arrayable, Jsonable /** * The three-character ISO-4217 currency code that identifies the currency. * - * @var string + * @var Money */ - protected $currency_code; - - /** - * The value, which might be: - * - An integer for currencies like JPY that are not typically fractional. - * - A decimal fraction for currencies like TND that are subdivided into thousandths. - * - * @pattern ^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$ - * - * @var float - */ - protected $value; + protected $money; /** * create a new amount instance. */ public function __construct(string $currency_code, float $value) { - $this->currency_code = $currency_code; - $this->value = $value; + $this->money = new Money($value, $currency_code); } /** @@ -52,38 +40,18 @@ public function toArray(): array } /** - * return amount's currency code. + * @return string */ public function getCurrencyCode(): string { - return $this->currency_code; + return $this->money->getCurrencyCode(); } /** - * sets amount's currency code. - */ - public function setCurrencyCode(string $currency_code): self - { - $this->currency_code = $currency_code; - - return $this; - } - - /** - * gets amount value. + * @return float */ public function getValue(): float { - return $this->value; - } - - /** - * sets amount value. - */ - public function setValue(float $value): self - { - $this->value = $value; - - return $this; + return $this->money->getAmount(); } } diff --git a/src/Orders/AmountBreakdown.php b/src/Orders/AmountBreakdown.php index 313995b..5c4cb79 100644 --- a/src/Orders/AmountBreakdown.php +++ b/src/Orders/AmountBreakdown.php @@ -7,20 +7,88 @@ */ class AmountBreakdown extends Amount { + /** + * The subtotal for all items. Required if the request includes purchase_units[].items[].unit_amount. + * Must equal the sum of (items[].unit_amount * items[].quantity) for all items. + * item_total.value can not be a negative number. + * @var Money + */ + protected $item_total; + + /** + * The discount for all items within a given purchase_unit. discount.value can not be a negative number. + * @var Money + */ + protected $discount; + + /** + * create a new AmountBreakdown instance. + */ + public function __construct(string $currency_code, float $value) + { + parent::__construct($currency_code, $value); + $this->item_total = new Money($value, $currency_code); + } + /** * Get the instance as an array. */ public function toArray(): array { - return [ + $data = [ 'currency_code' => $this->getCurrencyCode(), 'value' => $this->getValue(), 'breakdown' => [ 'item_total' => [ - 'currency_code' => $this->getCurrencyCode(), - 'value' => $this->getValue(), + 'currency_code' => $this->item_total->getCurrencyCode(), + 'value' => $this->item_total->getAmount(), ], ], ]; + + if ($this->hasDiscount()) { + $data['breakdown']['discount'] = [ + 'currency_code' => $this->discount->getCurrencyCode(), + 'value' => $this->discount->getAmount(), + ]; + } + + return $data; + } + + /** + * @return bool + */ + public function hasDiscount(): bool + { + return (bool) $this->discount; + } + + /** + * return's discount. + * @return Money + */ + public function getDiscount(): Money + { + return $this->discount; + } + + public function setDiscount(Money $discount) + { + $this->discount = $discount; + } + + /** + * return's item_total. + * @return Money + */ + public function getItemTotal(): Money + { + return $this->item_total; + } + + public function setItemTotal(Money $item_total) + { + $this->item_total = $item_total; } } diff --git a/src/Orders/ApplicationContext.php b/src/Orders/ApplicationContext.php index 618ce39..e58d07e 100644 --- a/src/Orders/ApplicationContext.php +++ b/src/Orders/ApplicationContext.php @@ -108,12 +108,12 @@ class ApplicationContext implements Arrayable, Jsonable /** * Create a new collection. * - * @param string|null $brand_name - * @param string $locale - * @param string $landing_page - * @param string $shipping_preference - * @param string|null $return_url - * @param string|null $cancel_url + * @param string|null $brand_name + * @param string $locale + * @param string $landing_page + * @param string $shipping_preference + * @param string|null $return_url + * @param string|null $cancel_url * */ public function __construct( diff --git a/src/Orders/Currency.php b/src/Orders/Currency.php new file mode 100644 index 0000000..81b0c92 --- /dev/null +++ b/src/Orders/Currency.php @@ -0,0 +1,63 @@ +code = strtoupper($code); + } + + /** + * @param string $string + * @return Currency + */ + public static function from(string $string): Currency + { + return new self($string); + } + + /** + * Returns the currency code. + * + */ + public function getCode(): string + { + return $this->code; + } + + /** + * Checks whether this currency is the same as another. + */ + public function equals(Currency $other): bool + { + return $this->code === $other->code; + } + + public function __toString(): string + { + return $this->code; + } + + public function jsonSerialize() + { + return $this->code; + } +} diff --git a/src/Orders/Money.php b/src/Orders/Money.php new file mode 100644 index 0000000..46f8104 --- /dev/null +++ b/src/Orders/Money.php @@ -0,0 +1,69 @@ +currency = $currency; + $this->amount = $amount; + } + + /** + * return amount's currency code. + */ + public function getCurrencyCode(): string + { + return $this->currency->getCode(); + } + + + /** + * return amount's currency code. + */ + public function getCurrency(): Currency + { + return $this->currency; + } + + /** + * gets amount value. + */ + public function getAmount(): float + { + return $this->amount; + } +} diff --git a/src/Orders/Order.php b/src/Orders/Order.php index c22400c..9cc3fd1 100644 --- a/src/Orders/Order.php +++ b/src/Orders/Order.php @@ -208,7 +208,7 @@ public function offsetUnset($offset) } /** - * @param mixed $offset + * @param mixed $offset * @return PurchaseUnit|null */ public function offsetGet($offset): ?PurchaseUnit @@ -219,7 +219,7 @@ public function offsetGet($offset): ?PurchaseUnit /** * Determine if a key exists on the purchase_units. * - * @param mixed $offset + * @param mixed $offset * @return bool */ public function offsetExists($offset): bool diff --git a/src/Orders/PurchaseUnit.php b/src/Orders/PurchaseUnit.php index 7fb22ba..52f2ea2 100644 --- a/src/Orders/PurchaseUnit.php +++ b/src/Orders/PurchaseUnit.php @@ -71,26 +71,6 @@ public function getAmount(): AmountBreakdown return $this->amount; } - /** - * sets the amount currency code. - */ - public function setCurrencyCode(string $currency_code): self - { - $this->amount->setCurrencyCode($currency_code); - - return $this; - } - - /** - * set's the amount value. - */ - public function setValue(float $value): self - { - $this->amount->setValue($value); - - return $this; - } - /** * convert a purchase unit instance to array. */ @@ -120,7 +100,7 @@ function (Item $item) { */ public function getCalculatedAmount(): float { - return (float)array_reduce( + $itemsTotal = (float) array_reduce( $this->items, function ($totalAmount, Item $item) { $amount = $item->getAmount(); @@ -131,5 +111,9 @@ function ($totalAmount, Item $item) { }, 0 ); + + $discount = $this->amount->hasDiscount() ? $this->amount->getDiscount()->getAmount() : 0; + + return $itemsTotal - $discount; } } diff --git a/tests/Http/AccessTokenRequestTest.php b/tests/Http/AccessTokenRequestTest.php index 146fdff..e9dbddb 100644 --- a/tests/Http/AccessTokenRequestTest.php +++ b/tests/Http/AccessTokenRequestTest.php @@ -52,7 +52,7 @@ public function testHasCorrectHeaders() public function testHasBasicAuthHeaders() { $request = new AccessTokenRequest($this->environment); - $expected = 'Basic ' . $this->environment->basicAuthorizationString(); + $expected = 'Basic '.$this->environment->basicAuthorizationString(); $this->assertEquals($expected, $request->getHeaderLine('Authorization')); } @@ -63,7 +63,7 @@ public function testHasCorrectDataWithGetBody() { $request = new AccessTokenRequest($this->environment); $expected = http_build_query(['grant_type' => 'client_credentials']); - $this->assertEquals($expected, (string)$request->getBody()); + $this->assertEquals($expected, (string) $request->getBody()); } /** @@ -88,7 +88,7 @@ public function testExecuteRequest() $this->assertEquals(200, $response->getStatusCode()); - $body = Utils::jsonDecode((string)$response->getBody()); + $body = Utils::jsonDecode((string) $response->getBody()); $this->assertEquals('A21AAFSO5otrlVigoJUQ1p', $body->access_token); $this->assertEquals('Bearer', $body->token_type); $this->assertEquals(32400, $body->expires_in); diff --git a/tests/Http/OrderAuthorizeRequestTest.php b/tests/Http/OrderAuthorizeRequestTest.php index 5404f1a..a1cb52d 100644 --- a/tests/Http/OrderAuthorizeRequestTest.php +++ b/tests/Http/OrderAuthorizeRequestTest.php @@ -60,7 +60,7 @@ public function testExecuteRequest() $this->assertEquals(200, $response->getStatusCode()); - $result = Utils::jsonDecode((string)$response->getBody()); + $result = Utils::jsonDecode((string) $response->getBody()); $this->assertEquals('1KC5501443316171H', $result->id); } } diff --git a/tests/Http/OrderCaptureRequestTest.php b/tests/Http/OrderCaptureRequestTest.php index f672983..53e2af9 100644 --- a/tests/Http/OrderCaptureRequestTest.php +++ b/tests/Http/OrderCaptureRequestTest.php @@ -60,7 +60,7 @@ public function testExecuteRequest() $this->assertEquals(200, $response->getStatusCode()); - $result = Utils::jsonDecode((string)$response->getBody()); + $result = Utils::jsonDecode((string) $response->getBody()); $this->assertEquals('1KC5501443316171H', $result->id); } } diff --git a/tests/Http/OrderCreateRequestTest.php b/tests/Http/OrderCreateRequestTest.php index 7e670b4..8a0cc94 100644 --- a/tests/Http/OrderCreateRequestTest.php +++ b/tests/Http/OrderCreateRequestTest.php @@ -61,7 +61,7 @@ public function testHasCorrectDataWithGetBody() $order->setApplicationContext($application_context); $request = new OrderCreateRequest($order); - $this->assertEquals((string)$order, (string)$request->getBody()); + $this->assertEquals((string) $order, (string) $request->getBody()); $this->assertEquals($order->toArray(), Utils::jsonDecode($request->getBody(), true)); } @@ -90,7 +90,7 @@ public function testExecuteRequest() $this->assertEquals(200, $response->getStatusCode()); - $result = Utils::jsonDecode((string)$response->getBody()); + $result = Utils::jsonDecode((string) $response->getBody()); $this->assertEquals('1KC5501443316171H', $result->id); $this->assertEquals('CAPTURE', $result->intent); $this->assertEquals('CREATED', $result->status); diff --git a/tests/Http/OrderShowRequestTest.php b/tests/Http/OrderShowRequestTest.php index 53ca4a0..ba399aa 100644 --- a/tests/Http/OrderShowRequestTest.php +++ b/tests/Http/OrderShowRequestTest.php @@ -62,7 +62,7 @@ public function testExecuteRequest() $this->assertEquals(200, $response->getStatusCode()); - $result = Utils::jsonDecode((string)$response->getBody()); + $result = Utils::jsonDecode((string) $response->getBody()); $this->assertEquals('1KC5501443316171H', $result->id); $this->assertEquals('CAPTURE', $result->intent); $this->assertEquals('CREATED', $result->status); diff --git a/tests/Http/PayPalClientTest.php b/tests/Http/PayPalClientTest.php index 43f33c2..bd553d9 100644 --- a/tests/Http/PayPalClientTest.php +++ b/tests/Http/PayPalClientTest.php @@ -83,7 +83,7 @@ public function testHasAllSdkHeadersOnProduction() '1.0.0', ], 'sdk_tech_stack' => [ - 'PHP ' . PHP_VERSION, + 'PHP '.PHP_VERSION, ], ], $request->getHeaders()); } @@ -149,7 +149,7 @@ public function testSendRequest() $response = $paypalClient->send($request); - $result = Utils::jsonDecode((string)$response->getBody()); + $result = Utils::jsonDecode((string) $response->getBody()); $this->assertEquals('1KC5501443316171H', $result->id); } diff --git a/tests/Orders/AmountBreakdownTest.php b/tests/Orders/AmountBreakdownTest.php index a21fb17..7711f29 100644 --- a/tests/Orders/AmountBreakdownTest.php +++ b/tests/Orders/AmountBreakdownTest.php @@ -3,12 +3,16 @@ namespace Tests\Orders; use PayPal\Checkout\Orders\AmountBreakdown; +use PayPal\Checkout\Orders\Currency; +use PayPal\Checkout\Orders\Money; use PHPUnit\Framework\TestCase; class AmountBreakdownTest extends TestCase { public function testToArray() { + $currency = Currency::from('USD'); + $expected = [ 'currency_code' => 'USD', 'value' => 100.00, @@ -19,23 +23,64 @@ public function testToArray() ], ], ]; - $amount = new AmountBreakdown('USD', 100.00); + $amount = new AmountBreakdown($currency->getCode(), 100.00); + $this->assertEquals($expected, $amount->toArray()); + + $expected = [ + 'currency_code' => $currency->getCode(), + 'value' => 100.00, + 'breakdown' => [ + 'item_total' => [ + 'currency_code' => $currency->getCode(), + 'value' => 150.00, + ], + 'discount' => [ + 'currency_code' => $currency->getCode(), + 'value' => 50.00, + ], + ], + ]; + $amount = new AmountBreakdown($currency->getCode(), 100.00); + $amount->setItemTotal(new Money(150, $currency)); + $amount->setDiscount(new Money(50, $currency)); $this->assertEquals($expected, $amount->toArray()); } public function testToJson() { - $expectedJson = ' { - "currency_code": "USD", - "value": 100.00, - "breakdown":{ - "item_total" : { - "currency_code": "USD", - "value": 100.00 - } - } - }'; + $currency = Currency::from('USD'); + + $expectedJson = [ + "currency_code" => "USD", + "value" => 100.00, + "breakdown" => [ + "item_total" => [ + "currency_code" => "USD", + "value" => 100.00 + ] + ] + ]; $amount = new AmountBreakdown('USD', 100.00); - $this->assertJsonStringEqualsJsonString($expectedJson, $amount->toJson()); + $this->assertJsonStringEqualsJsonString(json_encode($expectedJson), $amount->toJson()); + + + $expectedJson = [ + "currency_code" => "USD", + "value" => 100.00, + "breakdown" => [ + "item_total" => [ + "currency_code" => "USD", + "value" => 150.00 + ], + "discount" => [ + "currency_code" => "USD", + "value" => 50.00 + ] + ] + ]; + $amount = new AmountBreakdown($currency->getCode(), 100.00); + $amount->setItemTotal(new Money(150, $currency)); + $amount->setDiscount(new Money(50, $currency)); + $this->assertEquals(json_encode($expectedJson), $amount->toJson()); } } diff --git a/tests/Orders/CurrencyTest.php b/tests/Orders/CurrencyTest.php new file mode 100644 index 0000000..4064c6e --- /dev/null +++ b/tests/Orders/CurrencyTest.php @@ -0,0 +1,28 @@ +assertEquals('USD', $currency->getCode()); + } + + public function testCurrencyCodeIsAlwaysUpperCase() + { + $currency = new Currency('usd'); + $this->assertEquals('USD', $currency->getCode()); + } + + public function testItCanCreateCurrencyInstanceFromString() + { + $currency = Currency::from('USD'); + $this->assertInstanceOf(Currency::class, $currency); + $this->assertEquals('USD', $currency->getCode()); + } +} diff --git a/tests/Orders/MoneyTest.php b/tests/Orders/MoneyTest.php new file mode 100644 index 0000000..dfefcbc --- /dev/null +++ b/tests/Orders/MoneyTest.php @@ -0,0 +1,31 @@ +assertEquals(100.00, $money->getAmount()); + } + + public function testReturnsTheRightCurrency() + { + $currency = new Currency('USD'); + $money = new Money(100.00, $currency); + $this->assertEquals($currency, $money->getCurrency()); + $this->assertEquals('USD', $money->getCurrencyCode()); + } + + public function testItAcceptCurrencyCodeAsParam() + { + $money = new Money(100.00, 'USD'); + $this->assertInstanceOf(Currency::class, $money->getCurrency()); + $this->assertEquals('USD', $money->getCurrencyCode()); + } +} diff --git a/tests/Orders/OrderTest.php b/tests/Orders/OrderTest.php index 2729f1c..e2b62c6 100644 --- a/tests/Orders/OrderTest.php +++ b/tests/Orders/OrderTest.php @@ -5,7 +5,9 @@ use PayPal\Checkout\Exceptions\InvalidOrderIntentException; use PayPal\Checkout\Exceptions\OrderPurchaseUnitException; use PayPal\Checkout\Orders\ApplicationContext; +use PayPal\Checkout\Orders\Currency; use PayPal\Checkout\Orders\Item; +use PayPal\Checkout\Orders\Money; use PayPal\Checkout\Orders\Order; use PayPal\Checkout\Orders\PurchaseUnit; use PHPUnit\Framework\TestCase; @@ -15,7 +17,10 @@ class OrderTest extends TestCase public function testCreateOrderWithInvalidIntent() { $this->expectException(InvalidOrderIntentException::class); - $this->expectExceptionMessage('Order intent provided is not supported. Please refer to https://developer.paypal.com/docs/api/orders/v2/#orders_create.'); + $this->expectExceptionMessage(<<<'MESSAGE' +Order intent provided is not supported. Please refer to https://developer.paypal.com/docs/api/orders/v2/#orders_create. +MESSAGE + ); new Order('invalid intent'); } @@ -23,7 +28,10 @@ public function testCreateOrderWithInvalidIntent() public function testSetInvalidOrderIntent() { $this->expectException(InvalidOrderIntentException::class); - $this->expectExceptionMessage('Order intent provided is not supported. Please refer to https://developer.paypal.com/docs/api/orders/v2/#orders_create.'); + $this->expectExceptionMessage(<<<'MESSAGE' +Order intent provided is not supported. Please refer to https://developer.paypal.com/docs/api/orders/v2/#orders_create. +MESSAGE + ); $order = new Order(); $order->setIntent('invalid intent'); @@ -136,7 +144,144 @@ public function testCreateAFullOrder() $this->assertEquals($expected, $actual); } + public function testCreateAFullOrderWithDiscount() + { + $currency = Currency::from('USD'); + $purchase_unit = new PurchaseUnit('USD', 250.00); + $purchase_unit->addItem(new Item('Item 1', 'USD', 100.00, 1)); + $purchase_unit->addItem(new Item('Item 2', 'USD', 100.00, 2)); + + $amountBreakdown = $purchase_unit->getAmount(); + $amountBreakdown->setItemTotal(new Money(300.00, $currency)); + $amountBreakdown->setDiscount(new Money(50.00, $currency)); + + $order = new Order('CAPTURE'); + $order->addPurchaseUnit($purchase_unit); + $application_context = new ApplicationContext('Paypal Inc', 'en'); + $application_context->setUserAction('PAY_NOW'); + $application_context->setReturnUrl('https://site.com/payment/return'); + $application_context->setCancelUrl('https://site.com/payment/cancel'); + $order->setApplicationContext($application_context); + $actual = $order->toArray(); + $expected = [ + 'intent' => 'CAPTURE', + 'purchase_units' => [ + [ + 'amount' => [ + 'currency_code' => 'USD', + 'value' => 250.00, + 'breakdown' => [ + 'item_total' => [ + 'currency_code' => 'USD', + 'value' => 300.00, + ], + 'discount' => [ + 'currency_code' => 'USD', + 'value' => 50.00, + ], + ], + ], + 'items' => [ + [ + 'name' => 'Item 1', + 'unit_amount' => [ + 'currency_code' => 'USD', + 'value' => 100.00, + ], + 'quantity' => 1, + 'description' => '', + 'category' => 'DIGITAL_GOODS', + ], + [ + 'name' => 'Item 2', + 'unit_amount' => [ + 'currency_code' => 'USD', + 'value' => 100.00, + ], + 'quantity' => 2, + 'description' => '', + 'category' => 'DIGITAL_GOODS', + ], + ], + ], + ], + 'application_context' => [ + 'brand_name' => 'Paypal Inc', + 'locale' => 'en', + 'shipping_preference' => 'NO_SHIPPING', + 'landing_page' => 'NO_PREFERENCE', + 'user_action' => 'PAY_NOW', + 'return_url' => 'https://site.com/payment/return', + 'cancel_url' => 'https://site.com/payment/cancel', + ], + ]; + $this->assertEquals($expected, $actual); + } + public function testConvertOrderToJson() + { + $currency = Currency::from('USD'); + $purchase_unit = new PurchaseUnit($currency->getCode(), 70.00); + $purchase_unit->addItem(new Item('Item 1', 'USD', 100.00, 1)); + $amountBreakdown = $purchase_unit->getAmount(); + $amountBreakdown->setItemTotal(new Money(100.00, $currency)); + $amountBreakdown->setDiscount(new Money(30.00, $currency)); + + + $order = new Order('CAPTURE'); + $order->addPurchaseUnit($purchase_unit); + $application_context = new ApplicationContext('Paypal Inc', 'en-US'); + $application_context->setUserAction('PAY_NOW'); + $application_context->setReturnUrl('https://site.com/payment/return'); + $application_context->setCancelUrl('https://site.com/payment/cancel'); + $order->setApplicationContext($application_context); + $expected = '{ + "intent": "CAPTURE", + "purchase_units": [ + { + "amount": { + "currency_code": "USD", + "value": 70.00, + "breakdown": { + "item_total": { + "currency_code": "USD", + "value": 100.00 + }, + "discount": { + "currency_code": "USD", + "value": 30.00 + } + } + }, + "items": [ + { + "name": "Item 1", + "unit_amount": { + "currency_code": "USD", + "value": 100.00 + }, + "quantity": 1, + "description": "", + "category": "DIGITAL_GOODS" + } + ] + } + ], + "application_context": { + "brand_name" : "Paypal Inc", + "locale" : "en-US", + "shipping_preference" : "NO_SHIPPING", + "landing_page" : "NO_PREFERENCE", + "user_action" : "PAY_NOW", + "return_url" : "https://site.com/payment/return", + "cancel_url" : "https://site.com/payment/cancel" + } + }'; + $actual = $order->toJson(); + $this->assertJsonStringEqualsJsonString($expected, $actual); + } + + public function testConvertOrderToJsonWithDiscount() { $purchase_unit = new PurchaseUnit('USD', 100.00); $purchase_unit->addItem(new Item('Item 1', 'USD', 100.00, 1));