From 445f216949fb5bff73c224035a3ad7660e5f066f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Pel=C3=AD=C5=A1ek?= Date: Fri, 10 Nov 2023 15:45:00 +0100 Subject: [PATCH] Updated dependencies, improved parsing of type references --- composer.json | 13 +- composer.lock | 865 ++++++++------------ phpunit.xml | 12 +- src/Directive/Directive.php | 2 - src/Exception/DuplicateArgument.php | 4 +- src/Exception/ExpectedError.php | 6 +- src/Exception/ParserError.php | 6 +- src/Field/Field.php | 2 - src/Fragment/Fragment.php | 2 - src/FragmentSpread/InlineFragmentSpread.php | 2 - src/FragmentSpread/NamedFragmentSpread.php | 2 - src/Operation/Operation.php | 2 - src/ParsedRequest.php | 2 - src/Parser.php | 51 +- src/TokenContainer.php | 16 +- src/TypeRef/ListTypeRef.php | 2 - src/TypeRef/NamedTypeRef.php | 2 - src/TypeRef/NotNullRef.php | 2 - src/Value/ArgumentValue.php | 2 - src/Value/EnumLiteral.php | 2 - src/Value/ListVal.php | 2 - src/Value/Literal.php | 2 - src/Value/ObjectVal.php | 2 - src/Value/VariableRef.php | 2 - src/Variable/Variable.php | 2 - tests/Unit/ParserTest.php | 26 +- tests/Unit/Value/NamedValueTest.php | 2 +- 27 files changed, 399 insertions(+), 636 deletions(-) diff --git a/composer.json b/composer.json index 11f5762..c00985b 100644 --- a/composer.json +++ b/composer.json @@ -13,15 +13,14 @@ ], "require": { "php": ">=8.0", - "infinityloop-dev/graphpinator-tokenizer": "^1.1.1", - "infinityloop-dev/graphpinator-common": "^1.1", - "infinityloop-dev/utils": "^2.0", - "nette/utils": "^3.0" + "infinityloop-dev/graphpinator-tokenizer": "^1.2", + "infinityloop-dev/graphpinator-common": "^2.0", + "infinityloop-dev/utils": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "infection/infection": "^0.26", - "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^10.4", + "infection/infection": "^0.27", + "phpstan/phpstan": "^1.10", "infinityloop-dev/coding-standard": "^0.2" }, "scripts": { diff --git a/composer.lock b/composer.lock index b6785d4..3b670b6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,32 +4,31 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b56bbb80963f2db8236bee60ebdc2ccf", + "content-hash": "121457ccc2289cb59de0a1a3b6131d79", "packages": [ { "name": "infinityloop-dev/graphpinator-common", - "version": "v1.2", + "version": "v2.0", "source": { "type": "git", - "url": "https://github.com/infinityloop-dev/graphpinator-common.git", - "reference": "74f82575cc86a2028810df6e6ead5b0281c3e49d" + "url": "https://github.com/graphpql/graphpinator-common.git", + "reference": "fbe087fb00cdd023b3c584cd6bf403c77d0fd5be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infinityloop-dev/graphpinator-common/zipball/74f82575cc86a2028810df6e6ead5b0281c3e49d", - "reference": "74f82575cc86a2028810df6e6ead5b0281c3e49d", + "url": "https://api.github.com/repos/graphpql/graphpinator-common/zipball/fbe087fb00cdd023b3c584cd6bf403c77d0fd5be", + "reference": "fbe087fb00cdd023b3c584cd6bf403c77d0fd5be", "shasum": "" }, "require": { - "infinityloop-dev/utils": "^2.0", - "nette/utils": "^3.0", + "infinityloop-dev/utils": "^2.3", "php": ">=8.0" }, "require-dev": { - "infection/infection": "^0.20 || ^0.21", - "infinityloop-dev/coding-standard": "^0.1", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9.3" + "infection/infection": "^0.27", + "infinityloop-dev/coding-standard": "^0.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" }, "type": "library", "autoload": { @@ -51,36 +50,34 @@ "description": "Common structures for GraPHPinator: GraphQL server implementation for PHP.", "homepage": "https://www.infinityloop.dev/", "support": { - "issues": "https://github.com/infinityloop-dev/graphpinator-common/issues", - "source": "https://github.com/infinityloop-dev/graphpinator-common/tree/v1.2" + "issues": "https://github.com/graphpql/graphpinator-common/issues", + "source": "https://github.com/graphpql/graphpinator-common/tree/v2.0" }, - "time": "2021-03-22T10:41:35+00:00" + "time": "2023-11-10T12:38:41+00:00" }, { "name": "infinityloop-dev/graphpinator-source", - "version": "v1.0", + "version": "v1.1", "source": { "type": "git", - "url": "https://github.com/infinityloop-dev/graphpinator-source.git", - "reference": "1b6891a93883dff8c1dfd0947422d30db2a432f3" + "url": "https://github.com/graphpql/graphpinator-source.git", + "reference": "d0a2429560f3e110d03e2ff0c123373a1b779be2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infinityloop-dev/graphpinator-source/zipball/1b6891a93883dff8c1dfd0947422d30db2a432f3", - "reference": "1b6891a93883dff8c1dfd0947422d30db2a432f3", + "url": "https://api.github.com/repos/graphpql/graphpinator-source/zipball/d0a2429560f3e110d03e2ff0c123373a1b779be2", + "reference": "d0a2429560f3e110d03e2ff0c123373a1b779be2", "shasum": "" }, "require": { - "infinityloop-dev/graphpinator-common": "^1.0", - "infinityloop-dev/utils": "^2.0", - "nette/utils": "^3.0", - "php": ">=8.0" + "infinityloop-dev/graphpinator-common": "^2.0", + "php": ">=8.1" }, "require-dev": { - "infection/infection": "^0.23", + "infection/infection": "^0.27", "infinityloop-dev/coding-standard": "^0.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9.3" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.2" }, "type": "library", "autoload": { @@ -102,37 +99,35 @@ "description": "Source subproject for GraPHPinator: GraphQL server implementation for PHP.", "homepage": "https://www.infinityloop.dev/", "support": { - "issues": "https://github.com/infinityloop-dev/graphpinator-source/issues", - "source": "https://github.com/infinityloop-dev/graphpinator-source/tree/v1.0" + "issues": "https://github.com/graphpql/graphpinator-source/issues", + "source": "https://github.com/graphpql/graphpinator-source/tree/v1.1" }, - "time": "2021-06-01T18:07:02+00:00" + "time": "2023-11-10T13:14:05+00:00" }, { "name": "infinityloop-dev/graphpinator-tokenizer", - "version": "v1.1.1", + "version": "v1.2", "source": { "type": "git", - "url": "https://github.com/infinityloop-dev/graphpinator-tokenizer.git", - "reference": "6ad6c7cc61139d19eaa473f56e2f5b1e2351ba92" + "url": "https://github.com/graphpql/graphpinator-tokenizer.git", + "reference": "20af497ce3fd89b43bfbe993107c4b481576cb3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infinityloop-dev/graphpinator-tokenizer/zipball/6ad6c7cc61139d19eaa473f56e2f5b1e2351ba92", - "reference": "6ad6c7cc61139d19eaa473f56e2f5b1e2351ba92", + "url": "https://api.github.com/repos/graphpql/graphpinator-tokenizer/zipball/20af497ce3fd89b43bfbe993107c4b481576cb3d", + "reference": "20af497ce3fd89b43bfbe993107c4b481576cb3d", "shasum": "" }, "require": { - "infinityloop-dev/graphpinator-common": "^1.0", + "infinityloop-dev/graphpinator-common": "^2.0", "infinityloop-dev/graphpinator-source": "^1.0", - "infinityloop-dev/utils": "^2.0", - "nette/utils": "^3.0", - "php": ">=8.0" + "php": ">=8.1" }, "require-dev": { - "infection/infection": "^0.23", + "infection/infection": "^0.27", "infinityloop-dev/coding-standard": "^0.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9.3" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" }, "type": "library", "autoload": { @@ -154,35 +149,34 @@ "description": "Tokenizer subproject for GraPHPinator: GraphQL server implementation for PHP.", "homepage": "https://www.infinityloop.dev/", "support": { - "issues": "https://github.com/infinityloop-dev/graphpinator-tokenizer/issues", - "source": "https://github.com/infinityloop-dev/graphpinator-tokenizer/tree/v1.1.1" + "issues": "https://github.com/graphpql/graphpinator-tokenizer/issues", + "source": "https://github.com/graphpql/graphpinator-tokenizer/tree/v1.2" }, - "time": "2021-06-01T20:40:36+00:00" + "time": "2023-11-10T13:55:56+00:00" }, { "name": "infinityloop-dev/utils", - "version": "v2.2.1", + "version": "v2.3", "source": { "type": "git", - "url": "https://github.com/infinityloop-dev/utils.git", - "reference": "50448ea11d51eb0314b84c858722c35a8b9d1bc0" + "url": "https://github.com/graphpql/utils.git", + "reference": "560a91790921ce6ebb67759b789893c884d479a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infinityloop-dev/utils/zipball/50448ea11d51eb0314b84c858722c35a8b9d1bc0", - "reference": "50448ea11d51eb0314b84c858722c35a8b9d1bc0", + "url": "https://api.github.com/repos/graphpql/utils/zipball/560a91790921ce6ebb67759b789893c884d479a3", + "reference": "560a91790921ce6ebb67759b789893c884d479a3", "shasum": "" }, "require": { "ext-json": "*", - "nette/utils": "^3.0", - "php": ">=8.0" + "php": ">=8.1" }, "require-dev": { - "infection/infection": "^0.20", + "infection/infection": "^0.27", "infinityloop-dev/coding-standard": "^0.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9.1" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" }, "type": "library", "autoload": { @@ -203,96 +197,10 @@ "description": "Common utils for infinityloop packages.", "homepage": "https://www.infinityloop.dev/", "support": { - "issues": "https://github.com/infinityloop-dev/utils/issues", - "source": "https://github.com/infinityloop-dev/utils/tree/v2.2.1" - }, - "time": "2022-02-14T13:09:56+00:00" - }, - { - "name": "nette/utils", - "version": "v3.2.10", - "source": { - "type": "git", - "url": "https://github.com/nette/utils.git", - "reference": "a4175c62652f2300c8017fb7e640f9ccb11648d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/a4175c62652f2300c8017fb7e640f9ccb11648d2", - "reference": "a4175c62652f2300c8017fb7e640f9ccb11648d2", - "shasum": "" - }, - "require": { - "php": ">=7.2 <8.4" - }, - "conflict": { - "nette/di": "<3.0.6" - }, - "require-dev": { - "jetbrains/phpstorm-attributes": "dev-master", - "nette/tester": "~2.0", - "phpstan/phpstan": "^1.0", - "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" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" - ], - "authors": [ - { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "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.10" + "issues": "https://github.com/graphpql/utils/issues", + "source": "https://github.com/graphpql/utils/tree/v2.3" }, - "time": "2023-07-30T15:38:18+00:00" + "time": "2023-11-10T10:40:43+00:00" } ], "packages-dev": [ @@ -599,88 +507,18 @@ }, "time": "2022-02-04T12:51:07+00:00" }, - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, { "name": "fidry/cpu-core-counter", - "version": "0.4.1", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2" + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/79261cc280aded96d098e1b0e0ba0c4881b432c2", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", "shasum": "" }, "require": { @@ -688,13 +526,13 @@ }, "require-dev": { "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^1.9.2", "phpstan/phpstan-deprecation-rules": "^1.0.0", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.26 || ^8.5.31", - "theofidry/php-cs-fixer-config": "^1.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -720,7 +558,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.4.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" }, "funding": [ { @@ -728,7 +566,7 @@ "type": "github" } ], - "time": "2022-12-16T22:01:02+00:00" + "time": "2023-09-17T21:38:23+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -909,16 +747,16 @@ }, { "name": "infection/infection", - "version": "0.26.21", + "version": "0.27.8", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "9bbe4994d204587e0e27475e6681b66608a690a9" + "reference": "673ce762abf3355fcdc186ca17eb89edf86993bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/9bbe4994d204587e0e27475e6681b66608a690a9", - "reference": "9bbe4994d204587e0e27475e6681b66608a690a9", + "url": "https://api.github.com/repos/infection/infection/zipball/673ce762abf3355fcdc186ca17eb89edf86993bf", + "reference": "673ce762abf3355fcdc186ca17eb89edf86993bf", "shasum": "" }, "require": { @@ -929,7 +767,7 @@ "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", - "fidry/cpu-core-counter": "^0.4.0", + "fidry/cpu-core-counter": "^0.4.0 || ^0.5.0 || ^1.0", "infection/abstract-testframework-adapter": "^0.5.0", "infection/extension-installer": "^0.1.0", "infection/include-interceptor": "^0.2.5", @@ -940,10 +778,10 @@ "sanmai/later": "^0.1.1", "sanmai/pipeline": "^5.1 || ^6", "sebastian/diff": "^3.0.2 || ^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/process": "^5.4 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/process": "^5.4 || ^6.0 || ^7.0", "thecodingmachine/safe": "^2.1.2", "webmozart/assert": "^1.11" }, @@ -953,20 +791,22 @@ "phpunit/php-code-coverage": ">9,<9.1.4 || >9.2.17,<9.2.21" }, "require-dev": { - "brianium/paratest": "^6.3", + "brianium/paratest": "^6.11", "ext-simplexml": "*", "fidry/makefile": "^0.2.0", "helmich/phpunit-json-assert": "^3.0", "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1.1.0", - "phpstan/phpstan": "^1.3.0", + "phpstan/phpstan": "^1.10.15", "phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.1.0", "phpstan/phpstan-webmozart-assert": "^1.0.2", - "phpunit/phpunit": "^9.5.5", - "symfony/phpunit-bridge": "^5.4 || ^6.0", - "symfony/yaml": "^5.4 || ^6.0", + "phpunit/phpunit": "^9.6", + "rector/rector": "^0.16.0", + "sidz/phpstan-rules": "^0.4.0", + "symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0", "thecodingmachine/phpstan-safe-rule": "^1.2.0" }, "bin": [ @@ -1023,7 +863,7 @@ ], "support": { "issues": "https://github.com/infection/infection/issues", - "source": "https://github.com/infection/infection/tree/0.26.21" + "source": "https://github.com/infection/infection/tree/0.27.8" }, "funding": [ { @@ -1035,7 +875,7 @@ "type": "open_collective" } ], - "time": "2023-04-25T19:40:27+00:00" + "time": "2023-11-08T14:29:03+00:00" }, { "name": "infinityloop-dev/coding-standard", @@ -1499,16 +1339,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.39", + "version": "1.10.41", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4" + "reference": "c6174523c2a69231df55bdc65b61655e72876d76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d9dedb0413f678b4d03cbc2279a48f91592c97c4", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c6174523c2a69231df55bdc65b61655e72876d76", + "reference": "c6174523c2a69231df55bdc65b61655e72876d76", "shasum": "" }, "require": { @@ -1557,20 +1397,20 @@ "type": "tidelift" } ], - "time": "2023-10-17T15:46:26+00:00" + "time": "2023-11-05T12:57:57+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "10.1.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e", + "reference": "355324ca4980b8916c18b9db29f3ef484078f26e", "shasum": "" }, "require": { @@ -1578,18 +1418,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.15", - "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", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1598,7 +1438,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -1627,7 +1467,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7" }, "funding": [ { @@ -1635,32 +1475,32 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-10-04T15:34:17+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1687,7 +1527,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -1695,28 +1536,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -1724,7 +1565,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1750,7 +1591,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -1758,32 +1599,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1809,7 +1650,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -1817,32 +1659,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1868,7 +1710,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -1876,24 +1718,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "10.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1903,27 +1744,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "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.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -1931,7 +1771,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.4-dev" } }, "autoload": { @@ -1963,7 +1803,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2" }, "funding": [ { @@ -1979,7 +1819,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-10-26T07:21:45+00:00" }, { "name": "psr/container", @@ -2215,28 +2055,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2259,7 +2099,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -2267,32 +2107,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2315,7 +2155,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -2323,32 +2163,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "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/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2370,7 +2210,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -2378,34 +2218,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2444,7 +2286,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -2452,33 +2295,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.1-dev" } }, "autoload": { @@ -2501,7 +2344,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -2509,33 +2353,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2567,7 +2411,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -2575,27 +2420,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -2603,7 +2448,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2622,7 +2467,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -2630,7 +2475,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -2638,34 +2484,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -2707,7 +2553,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -2715,38 +2562,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2771,7 +2615,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -2779,33 +2624,33 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2828,7 +2673,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" }, "funding": [ { @@ -2836,34 +2682,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-08-31T09:25:50+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2885,7 +2731,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -2893,32 +2739,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2940,7 +2786,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -2948,32 +2794,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3003,62 +2849,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "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" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -3066,32 +2857,32 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3114,7 +2905,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -3122,29 +2913,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3167,7 +2958,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -3175,7 +2966,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "slevomat/coding-standard", @@ -3296,16 +3087,16 @@ }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92", + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92", "shasum": "" }, "require": { @@ -3366,7 +3157,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.3.8" }, "funding": [ { @@ -3382,7 +3173,7 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2023-10-31T08:09:35+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4053,16 +3844,16 @@ }, { "name": "symfony/string", - "version": "v6.3.5", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "reference": "13880a87790c76ef994c91e87efb96134522577a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", + "reference": "13880a87790c76ef994c91e87efb96134522577a", "shasum": "" }, "require": { @@ -4119,7 +3910,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/string/tree/v6.3.8" }, "funding": [ { @@ -4135,7 +3926,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T10:38:32+00:00" + "time": "2023-11-09T08:28:21+00:00" }, { "name": "thecodingmachine/safe", diff --git a/phpunit.xml b/phpunit.xml index 6e5521a..d1801d2 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,9 +1,6 @@ - - - - src - + + @@ -18,4 +15,9 @@ + + + src + + diff --git a/src/Directive/Directive.php b/src/Directive/Directive.php index 84419b6..049abc3 100644 --- a/src/Directive/Directive.php +++ b/src/Directive/Directive.php @@ -6,8 +6,6 @@ final class Directive { - use \Nette\SmartObject; - public function __construct( private string $name, private ?\Graphpinator\Parser\Value\ArgumentValueSet $arguments, diff --git a/src/Exception/DuplicateArgument.php b/src/Exception/DuplicateArgument.php index 54bfb45..254aec5 100644 --- a/src/Exception/DuplicateArgument.php +++ b/src/Exception/DuplicateArgument.php @@ -10,8 +10,6 @@ final class DuplicateArgument extends \Graphpinator\Parser\Exception\ParserError public function __construct(string $name, \Graphpinator\Common\Location $location) { - $this->messageArgs = [$name]; - - parent::__construct($location); + parent::__construct($location, [$name]); } } diff --git a/src/Exception/ExpectedError.php b/src/Exception/ExpectedError.php index 87a2a91..0825524 100644 --- a/src/Exception/ExpectedError.php +++ b/src/Exception/ExpectedError.php @@ -6,10 +6,8 @@ abstract class ExpectedError extends \Graphpinator\Parser\Exception\ParserError { - final public function __construct(\Graphpinator\Common\Location $location, string $token) + final public function __construct(\Graphpinator\Common\Location $location, \Graphpinator\Tokenizer\TokenType $token) { - $this->messageArgs[] = $token; - - parent::__construct($location); + parent::__construct($location, [$token->value]); } } diff --git a/src/Exception/ParserError.php b/src/Exception/ParserError.php index daeae67..eea5cb8 100644 --- a/src/Exception/ParserError.php +++ b/src/Exception/ParserError.php @@ -6,11 +6,11 @@ abstract class ParserError extends \Graphpinator\Exception\GraphpinatorBase { - public function __construct(\Graphpinator\Common\Location $location) + public function __construct(\Graphpinator\Common\Location $location, array $messageArgs = []) { - parent::__construct(); + parent::__construct($messageArgs); - $this->location = $location; + $this->setLocation($location); } final public function isOutputable() : bool diff --git a/src/Field/Field.php b/src/Field/Field.php index ed3d60d..f6066a5 100644 --- a/src/Field/Field.php +++ b/src/Field/Field.php @@ -6,8 +6,6 @@ final class Field { - use \Nette\SmartObject; - public function __construct( private string $name, private ?string $alias = null, diff --git a/src/Fragment/Fragment.php b/src/Fragment/Fragment.php index a8f17d9..d3f2616 100644 --- a/src/Fragment/Fragment.php +++ b/src/Fragment/Fragment.php @@ -6,8 +6,6 @@ final class Fragment { - use \Nette\SmartObject; - public function __construct( private string $name, private \Graphpinator\Parser\TypeRef\NamedTypeRef $typeCond, diff --git a/src/FragmentSpread/InlineFragmentSpread.php b/src/FragmentSpread/InlineFragmentSpread.php index 96e8f2a..df2e785 100644 --- a/src/FragmentSpread/InlineFragmentSpread.php +++ b/src/FragmentSpread/InlineFragmentSpread.php @@ -6,8 +6,6 @@ final class InlineFragmentSpread implements \Graphpinator\Parser\FragmentSpread\FragmentSpread { - use \Nette\SmartObject; - private \Graphpinator\Parser\Directive\DirectiveSet $directives; public function __construct( diff --git a/src/FragmentSpread/NamedFragmentSpread.php b/src/FragmentSpread/NamedFragmentSpread.php index 0d0d7d9..d92fbdc 100644 --- a/src/FragmentSpread/NamedFragmentSpread.php +++ b/src/FragmentSpread/NamedFragmentSpread.php @@ -6,8 +6,6 @@ final class NamedFragmentSpread implements \Graphpinator\Parser\FragmentSpread\FragmentSpread { - use \Nette\SmartObject; - private \Graphpinator\Parser\Directive\DirectiveSet $directives; public function __construct( diff --git a/src/Operation/Operation.php b/src/Operation/Operation.php index 215b757..0160d62 100644 --- a/src/Operation/Operation.php +++ b/src/Operation/Operation.php @@ -6,8 +6,6 @@ final class Operation { - use \Nette\SmartObject; - private ?\Graphpinator\Parser\Variable\VariableSet $variables; private ?\Graphpinator\Parser\Directive\DirectiveSet $directives; diff --git a/src/ParsedRequest.php b/src/ParsedRequest.php index c3ea643..4d1c7f1 100644 --- a/src/ParsedRequest.php +++ b/src/ParsedRequest.php @@ -6,8 +6,6 @@ final class ParsedRequest { - use \Nette\SmartObject; - public function __construct( private \Graphpinator\Parser\Operation\OperationSet $operations, private \Graphpinator\Parser\Fragment\FragmentSet $fragments, diff --git a/src/Parser.php b/src/Parser.php index b77ac01..7ab4866 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -8,8 +8,6 @@ final class Parser { - use \Nette\SmartObject; - private \Graphpinator\Parser\TokenContainer $tokenizer; /** @@ -43,7 +41,7 @@ public function parse(\Graphpinator\Source\Source $source) : ParsedRequest // query shorthand case TokenType::CUR_O: $operation = new \Graphpinator\Parser\Operation\Operation( - \Graphpinator\Tokenizer\OperationType::QUERY, + \Graphpinator\Tokenizer\TokenType::QUERY->value, null, new \Graphpinator\Parser\Variable\VariableSet(), new \Graphpinator\Parser\Directive\DirectiveSet(), @@ -57,14 +55,14 @@ public function parse(\Graphpinator\Source\Source $source) : ParsedRequest break; case TokenType::NAME: switch ($this->tokenizer->getCurrent()->getValue()) { - case TokenType::FRAGMENT: + case TokenType::FRAGMENT->value: $fragment = $this->parseFragmentDefinition(); $fragments[$fragment->getName()] = $fragment; break; - case TokenType::QUERY: - case TokenType::MUTATION: - case TokenType::SUBSCRIPTION: + case TokenType::QUERY->value: + case TokenType::MUTATION->value: + case TokenType::SUBSCRIPTION->value: $operationType = $this->tokenizer->getCurrent()->getValue(); $this->tokenizer->getNext(); @@ -125,12 +123,12 @@ private function parseFragmentDefinition() : \Graphpinator\Parser\Fragment\Fragm { $fragmentName = $this->tokenizer->assertNext(TokenType::NAME, \Graphpinator\Parser\Exception\ExpectedFragmentName::class)->getValue(); - if ($fragmentName === TokenType::ON) { + if ($fragmentName === TokenType::ON->value) { throw new \Graphpinator\Parser\Exception\DisallowedFragmentName($this->tokenizer->getPrev()->getLocation()); } - $this->tokenizer->assertNextValue(TokenType::NAME, TokenType::ON, \Graphpinator\Parser\Exception\ExpectedTypeCondition::class); - $typeCond = $this->parseType(true); + $this->tokenizer->assertNextValue(TokenType::NAME, TokenType::ON->value, \Graphpinator\Parser\Exception\ExpectedTypeCondition::class); + $typeCond = $this->parseNamedType(); $directives = $this->parseDirectives(); $this->tokenizer->assertNext(TokenType::CUR_O, \Graphpinator\Parser\Exception\ExpectedSelectionSet::class); @@ -276,8 +274,8 @@ private function parseFragmentSpread() : \Graphpinator\Parser\FragmentSpread\Fra { switch ($this->tokenizer->getNext()->getType()) { case TokenType::NAME: - if ($this->tokenizer->getCurrent()->getValue() === TokenType::ON) { - $typeCond = $this->parseType(true); + if ($this->tokenizer->getCurrent()->getValue() === TokenType::ON->value) { + $typeCond = $this->parseNamedType(); $directives = $this->parseDirectives(); $this->tokenizer->assertNext(TokenType::CUR_O, \Graphpinator\Parser\Exception\ExpectedSelectionSet::class); @@ -435,9 +433,9 @@ private function parseValue(bool $literalOnly) : \Graphpinator\Parser\Value\Valu return new \Graphpinator\Parser\Value\VariableRef($this->tokenizer->getCurrent()->getValue()); case TokenType::NAME: return match ($this->tokenizer->getCurrent()->getValue()) { - TokenType::TRUE => new \Graphpinator\Parser\Value\Literal(true), - TokenType::FALSE => new \Graphpinator\Parser\Value\Literal(false), - TokenType::NULL => new \Graphpinator\Parser\Value\Literal(null), + TokenType::TRUE->value => new \Graphpinator\Parser\Value\Literal(true), + TokenType::FALSE->value => new \Graphpinator\Parser\Value\Literal(false), + TokenType::NULL->value => new \Graphpinator\Parser\Value\Literal(null), default => new \Graphpinator\Parser\Value\EnumLiteral($this->tokenizer->getCurrent()->getValue()), }; case TokenType::STRING: @@ -477,14 +475,13 @@ private function parseValue(bool $literalOnly) : \Graphpinator\Parser\Value\Valu } /** - * Parses type reference. + * Parses type reference with modifiers. * * Expects iterator on previous token * Leaves iterator to last used token - last token in type definition * - * @param bool $namedOnly */ - private function parseType(bool $namedOnly) : \Graphpinator\Parser\TypeRef\TypeRef + private function parseType() : \Graphpinator\Parser\TypeRef\TypeRef { switch ($this->tokenizer->getNext()->getType()) { case TokenType::NAME: @@ -509,13 +506,25 @@ private function parseType(bool $namedOnly) : \Graphpinator\Parser\TypeRef\TypeR $type = new \Graphpinator\Parser\TypeRef\NotNullRef($type); } - if ($namedOnly && !$type instanceof \Graphpinator\Parser\TypeRef\NamedTypeRef) { + return $type; + } + + /** + * Parses type reference without modifiers + * + * Expects iterator on previous token + * Leaves iterator to last used token - last token in type definition + * + */ + private function parseNamedType() : \Graphpinator\Parser\TypeRef\NamedTypeRef + { + if ($this->tokenizer->getNext()->getType() !== TokenType::NAME) { throw new \Graphpinator\Parser\Exception\ExpectedNamedType( $this->tokenizer->getCurrent()->getLocation(), - $type->print(), + $this->tokenizer->getCurrent()->getType(), ); } - return $type; + return new \Graphpinator\Parser\TypeRef\NamedTypeRef($this->tokenizer->getCurrent()->getValue()); } } diff --git a/src/TokenContainer.php b/src/TokenContainer.php index a042b6d..7f27441 100644 --- a/src/TokenContainer.php +++ b/src/TokenContainer.php @@ -4,10 +4,10 @@ namespace Graphpinator\Parser; +use \Graphpinator\Tokenizer\Token; + final class TokenContainer implements \IteratorAggregate { - use \Nette\SmartObject; - private array $tokens = []; private int $currentIndex = 0; @@ -30,12 +30,12 @@ public function isEmpty() : bool return \count($this->tokens) === 0; } - public function getCurrent() : \Graphpinator\Tokenizer\Token + public function getCurrent() : Token { return $this->tokens[$this->currentIndex]; } - public function getPrev() : \Graphpinator\Tokenizer\Token + public function getPrev() : Token { \assert(\array_key_exists($this->currentIndex - 1, $this->tokens)); @@ -44,7 +44,7 @@ public function getPrev() : \Graphpinator\Tokenizer\Token return $this->tokens[$this->currentIndex]; } - public function getNext() : \Graphpinator\Tokenizer\Token + public function getNext() : Token { if (!$this->hasNext()) { throw new \Graphpinator\Parser\Exception\UnexpectedEnd($this->getCurrent()->getLocation()); @@ -55,7 +55,7 @@ public function getNext() : \Graphpinator\Tokenizer\Token return $this->tokens[$this->currentIndex]; } - public function peekNext() : \Graphpinator\Tokenizer\Token + public function peekNext() : Token { if (!$this->hasNext()) { throw new \Graphpinator\Parser\Exception\UnexpectedEnd($this->getCurrent()->getLocation()); @@ -64,7 +64,7 @@ public function peekNext() : \Graphpinator\Tokenizer\Token return $this->tokens[$this->currentIndex + 1]; } - public function assertNext(string $tokenType, string $exceptionClass) : \Graphpinator\Tokenizer\Token + public function assertNext(\Graphpinator\Tokenizer\TokenType $tokenType, string $exceptionClass) : Token { $token = $this->getNext(); @@ -75,7 +75,7 @@ public function assertNext(string $tokenType, string $exceptionClass) : \Graphpi throw new $exceptionClass($token->getLocation(), $token->getType()); } - public function assertNextValue(string $tokenType, string $value, string $exceptionClass) : \Graphpinator\Tokenizer\Token + public function assertNextValue(\Graphpinator\Tokenizer\TokenType $tokenType, string $value, string $exceptionClass) : Token { $token = $this->getNext(); diff --git a/src/TypeRef/ListTypeRef.php b/src/TypeRef/ListTypeRef.php index cb7c8d7..c14d941 100644 --- a/src/TypeRef/ListTypeRef.php +++ b/src/TypeRef/ListTypeRef.php @@ -6,8 +6,6 @@ final class ListTypeRef implements \Graphpinator\Parser\TypeRef\TypeRef { - use \Nette\SmartObject; - public function __construct( private TypeRef $innerRef, ) diff --git a/src/TypeRef/NamedTypeRef.php b/src/TypeRef/NamedTypeRef.php index cbb7df8..8e66dc7 100644 --- a/src/TypeRef/NamedTypeRef.php +++ b/src/TypeRef/NamedTypeRef.php @@ -6,8 +6,6 @@ final class NamedTypeRef implements \Graphpinator\Parser\TypeRef\TypeRef { - use \Nette\SmartObject; - public function __construct( private string $name, ) diff --git a/src/TypeRef/NotNullRef.php b/src/TypeRef/NotNullRef.php index 131c8fa..386ed1c 100644 --- a/src/TypeRef/NotNullRef.php +++ b/src/TypeRef/NotNullRef.php @@ -6,8 +6,6 @@ final class NotNullRef implements \Graphpinator\Parser\TypeRef\TypeRef { - use \Nette\SmartObject; - public function __construct( private TypeRef $innerRef, ) diff --git a/src/Value/ArgumentValue.php b/src/Value/ArgumentValue.php index d01e383..481c8d3 100644 --- a/src/Value/ArgumentValue.php +++ b/src/Value/ArgumentValue.php @@ -6,8 +6,6 @@ final class ArgumentValue { - use \Nette\SmartObject; - public function __construct( private \Graphpinator\Parser\Value\Value $value, private string $name, diff --git a/src/Value/EnumLiteral.php b/src/Value/EnumLiteral.php index 6fa3605..f077107 100644 --- a/src/Value/EnumLiteral.php +++ b/src/Value/EnumLiteral.php @@ -6,8 +6,6 @@ final class EnumLiteral implements \Graphpinator\Parser\Value\Value { - use \Nette\SmartObject; - public function __construct( private string $value, ) diff --git a/src/Value/ListVal.php b/src/Value/ListVal.php index 9a5c98b..a8ee032 100644 --- a/src/Value/ListVal.php +++ b/src/Value/ListVal.php @@ -6,8 +6,6 @@ final class ListVal implements \Graphpinator\Parser\Value\Value { - use \Nette\SmartObject; - public function __construct( private array $value, ) diff --git a/src/Value/Literal.php b/src/Value/Literal.php index ccdb40a..38f5b3e 100644 --- a/src/Value/Literal.php +++ b/src/Value/Literal.php @@ -6,8 +6,6 @@ final class Literal implements \Graphpinator\Parser\Value\Value { - use \Nette\SmartObject; - public function __construct( private string|int|float|bool|null $value, ) diff --git a/src/Value/ObjectVal.php b/src/Value/ObjectVal.php index 95ea859..0ea94e6 100644 --- a/src/Value/ObjectVal.php +++ b/src/Value/ObjectVal.php @@ -6,8 +6,6 @@ final class ObjectVal implements \Graphpinator\Parser\Value\Value { - use \Nette\SmartObject; - public function __construct( private \stdClass $value, ) diff --git a/src/Value/VariableRef.php b/src/Value/VariableRef.php index 135c9bc..3066cb8 100644 --- a/src/Value/VariableRef.php +++ b/src/Value/VariableRef.php @@ -6,8 +6,6 @@ final class VariableRef implements \Graphpinator\Parser\Value\Value { - use \Nette\SmartObject; - public function __construct( private string $varName, ) diff --git a/src/Variable/Variable.php b/src/Variable/Variable.php index 93fd039..3f8f895 100644 --- a/src/Variable/Variable.php +++ b/src/Variable/Variable.php @@ -6,8 +6,6 @@ final class Variable { - use \Nette\SmartObject; - public function __construct( private string $name, private \Graphpinator\Parser\TypeRef\TypeRef $type, diff --git a/tests/Unit/ParserTest.php b/tests/Unit/ParserTest.php index 4acf13c..ceb35fd 100644 --- a/tests/Unit/ParserTest.php +++ b/tests/Unit/ParserTest.php @@ -745,7 +745,7 @@ public function testMultipleOperations() : void self::assertCount(1, $operation->getFields()->offsetGet(0)->getFields()->offsetGet(0)->getArguments()); } - public function invalidDataProvider() : array + public static function invalidDataProvider() : array { return [ ['', \Graphpinator\Parser\Exception\EmptyRequest::class], @@ -776,13 +776,13 @@ public function invalidDataProvider() : array ], [ 'fragment fragmentName on TypeName! { f }', - \Graphpinator\Parser\Exception\ExpectedNamedType::class, - 'Expected named type without type modifiers, got "TypeName!".', + \Graphpinator\Parser\Exception\ExpectedSelectionSet::class, + 'Expected selection set, got "!".', ], [ 'fragment fragmentName on [TypeName] { f }', \Graphpinator\Parser\Exception\ExpectedNamedType::class, - 'Expected named type without type modifiers, got "[TypeName]".', + 'Expected named type without type modifiers, got "[".', ], [ 'fragment fragmentName { f }', @@ -791,8 +791,8 @@ public function invalidDataProvider() : array ], [ 'fragment fragmentName on { f }', - \Graphpinator\Parser\Exception\ExpectedType::class, - 'Expected type reference, got "{".', + \Graphpinator\Parser\Exception\ExpectedNamedType::class, + 'Expected named type without type modifiers, got "{".', ], [ 'queryName { f }', @@ -824,23 +824,23 @@ public function invalidDataProvider() : array ], [ 'query queryName { ... on { f } }', - \Graphpinator\Parser\Exception\ExpectedType::class, - 'Expected type reference, got "{".', + \Graphpinator\Parser\Exception\ExpectedNamedType::class, + 'Expected named type without type modifiers, got "{".', ], [ 'query queryName { ... on Int! { f } }', - \Graphpinator\Parser\Exception\ExpectedNamedType::class, - 'Expected named type without type modifiers, got "Int!".', + \Graphpinator\Parser\Exception\ExpectedSelectionSet::class, + 'Expected selection set, got "!".', ], [ 'query queryName { ... on [Int] { f } }', \Graphpinator\Parser\Exception\ExpectedNamedType::class, - 'Expected named type without type modifiers, got "[Int]".', + 'Expected named type without type modifiers, got "[".', ], [ 'query queryName { ... on [Int { f } }', - \Graphpinator\Parser\Exception\ExpectedClosingBracket::class, - 'Expected closing ] for list type modifier, got "{".', + \Graphpinator\Parser\Exception\ExpectedNamedType::class, + 'Expected named type without type modifiers, got "[".', ], [ 'query queryName { ... on Int }', diff --git a/tests/Unit/Value/NamedValueTest.php b/tests/Unit/Value/NamedValueTest.php index e448826..5c9e3b7 100644 --- a/tests/Unit/Value/NamedValueTest.php +++ b/tests/Unit/Value/NamedValueTest.php @@ -6,7 +6,7 @@ final class NamedValueTest extends \PHPUnit\Framework\TestCase { - public function simpleDataProvider() : array + public static function simpleDataProvider() : array { return [ [new \Graphpinator\Parser\Value\Literal(123), 'name'],