From 1b0756449d61c24d7a065af11ad16b3535f3b9a5 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sun, 3 Nov 2024 00:20:09 +0100 Subject: [PATCH] Switch to OpenAPI Tools for generation --- Makefile | 3 + bin/openapi-client-generator.source | 41 - composer.json | 21 +- composer.lock | 3719 +++++++++++------ example/client-gitub-one.php | 77 + example/templates/composer.json | 8 +- src/ClassString.php | 41 - src/Configuration.php | 39 - src/Configuration/Destination.php | 15 - src/Configuration/EntryPoints.php | 19 - src/Configuration/Namespace_.php | 14 - src/Configuration/QA.php | 17 - src/Configuration/QA/Tool.php | 17 - src/Configuration/Schemas.php | 18 - src/Configuration/State.php | 20 - src/Configuration/SubSplit.php | 34 - src/Configuration/SubSplit/RootPackage.php | 14 - src/Configuration/SubSplit/SectionPackage.php | 14 - src/Configuration/Templates.php | 15 - src/Configuration/Voter.php | 23 - src/Contract/SectionGenerator.php | 7 +- src/Contract/Voter/AbstractListOperation.php | 2 +- src/Contract/Voter/ListOperation.php | 2 +- src/Contract/Voter/StreamOperation.php | 2 +- src/File.php | 17 - src/Gatherer/Client.php | 33 - src/Gatherer/CompositSchema.php | 97 - src/Gatherer/ExampleData.php | 232 - src/Gatherer/Hydrator.php | 28 - src/Gatherer/HydratorUtils.php | 31 - ...erPretendingToBeARandomNumberGenerator.php | 37 - src/Gatherer/IntersectionSchema.php | 106 - src/Gatherer/Operation.php | 203 - src/Gatherer/OperationHydrator.php | 39 - src/Gatherer/Path.php | 131 - src/Gatherer/Property.php | 129 - src/Gatherer/Schema.php | 116 - src/Gatherer/Type.php | 280 -- src/Gatherer/WebHook.php | 77 - src/Gatherer/WebHookHydrator.php | 34 - src/Generator.php | 1089 ----- src/Generator/Client.php | 224 +- .../Client/PHPStan/ClientCallReturnTypes.php | 16 +- .../PHPStan/ClientCallReturnTypesTest.php | 14 +- src/Generator/Client/Routers.php | 11 +- src/Generator/Client/Routers/Router.php | 4 +- src/Generator/ClientInterface.php | 64 +- src/Generator/Contract.php | 162 - src/Generator/Error.php | 30 - src/Generator/Helper/Operation.php | 16 +- src/Generator/Helper/OperationArray.php | 6 +- src/Generator/Hydrator.php | 45 - src/Generator/Hydrators.php | 301 -- src/Generator/Operations.php | 132 - src/Generator/OperationsInterface.php | 54 - src/Generator/Operators.php | 116 - src/Generator/Paths.php | 58 + src/Generator/{ => Paths}/Operation.php | 99 +- src/Generator/{ => Paths}/OperationTest.php | 215 +- src/Generator/Paths/Operations.php | 124 + src/Generator/Paths/OperationsInterface.php | 58 + src/Generator/{ => Paths}/Operator.php | 39 +- src/Generator/Paths/Operators.php | 123 + src/Generator/Routers.php | 31 +- src/Generator/Schema.php | 319 -- .../Schema/MultipleCastUnionToType.php | 140 - .../Schema/SingleCastUnionToType.php | 201 - src/Generator/WebHook.php | 192 - src/Generator/WebHooks.php | 305 -- src/PrivatePromotedPropertyAsParam.php | 30 - src/PromotedPropertyAsParam.php | 30 - src/Registry/CompositSchema.php | 32 - src/Registry/Contract.php | 67 - src/Registry/Schema.php | 131 - src/Registry/ThrowableSchema.php | 23 - src/Registry/UnknownSchema.php | 17 - src/Representation/Client.php | 16 - src/Representation/Contract.php | 18 - src/Representation/ExampleData.php | 16 - src/Representation/Header.php | 15 - src/Representation/Hydrator.php | 19 - src/Representation/Operation.php | 49 - src/Representation/OperationEmptyResponse.php | 17 - src/Representation/OperationRequestBody.php | 14 - src/Representation/OperationResponse.php | 16 - src/Representation/Parameter.php | 20 - src/Representation/Path.php | 19 - src/Representation/Property.php | 20 - src/Representation/PropertyType.php | 18 - src/Representation/Schema.php | 35 - src/Representation/WebHook.php | 25 - src/SectionGenerator/OperationIdSlash.php | 7 +- src/SectionGenerator/WebHooks.php | 7 +- src/State.php | 21 - src/Utils.php | 101 - .../StreamOperation/DownloadInOperationId.php | 2 +- src/Voter/StreamOperation/DownloadInPath.php | 2 +- src/phpstan-assertType-mock.php | 1 + 98 files changed, 3164 insertions(+), 7584 deletions(-) delete mode 100755 bin/openapi-client-generator.source create mode 100644 example/client-gitub-one.php delete mode 100644 src/ClassString.php delete mode 100644 src/Configuration.php delete mode 100644 src/Configuration/Destination.php delete mode 100644 src/Configuration/EntryPoints.php delete mode 100644 src/Configuration/Namespace_.php delete mode 100644 src/Configuration/QA.php delete mode 100644 src/Configuration/QA/Tool.php delete mode 100644 src/Configuration/Schemas.php delete mode 100644 src/Configuration/State.php delete mode 100644 src/Configuration/SubSplit.php delete mode 100644 src/Configuration/SubSplit/RootPackage.php delete mode 100644 src/Configuration/SubSplit/SectionPackage.php delete mode 100644 src/Configuration/Templates.php delete mode 100644 src/Configuration/Voter.php delete mode 100644 src/File.php delete mode 100644 src/Gatherer/Client.php delete mode 100644 src/Gatherer/CompositSchema.php delete mode 100644 src/Gatherer/ExampleData.php delete mode 100644 src/Gatherer/Hydrator.php delete mode 100644 src/Gatherer/HydratorUtils.php delete mode 100644 src/Gatherer/IntegerReturnerPretendingToBeARandomNumberGenerator.php delete mode 100644 src/Gatherer/IntersectionSchema.php delete mode 100644 src/Gatherer/Operation.php delete mode 100644 src/Gatherer/OperationHydrator.php delete mode 100644 src/Gatherer/Path.php delete mode 100644 src/Gatherer/Property.php delete mode 100644 src/Gatherer/Schema.php delete mode 100644 src/Gatherer/Type.php delete mode 100644 src/Gatherer/WebHook.php delete mode 100644 src/Gatherer/WebHookHydrator.php delete mode 100644 src/Generator.php delete mode 100644 src/Generator/Contract.php delete mode 100644 src/Generator/Error.php delete mode 100644 src/Generator/Hydrator.php delete mode 100644 src/Generator/Hydrators.php delete mode 100644 src/Generator/Operations.php delete mode 100644 src/Generator/OperationsInterface.php delete mode 100644 src/Generator/Operators.php create mode 100644 src/Generator/Paths.php rename src/Generator/{ => Paths}/Operation.php (91%) rename src/Generator/{ => Paths}/OperationTest.php (84%) create mode 100644 src/Generator/Paths/Operations.php create mode 100644 src/Generator/Paths/OperationsInterface.php rename src/Generator/{ => Paths}/Operator.php (83%) create mode 100644 src/Generator/Paths/Operators.php delete mode 100644 src/Generator/Schema.php delete mode 100644 src/Generator/Schema/MultipleCastUnionToType.php delete mode 100644 src/Generator/Schema/SingleCastUnionToType.php delete mode 100644 src/Generator/WebHook.php delete mode 100644 src/Generator/WebHooks.php delete mode 100644 src/PrivatePromotedPropertyAsParam.php delete mode 100644 src/PromotedPropertyAsParam.php delete mode 100644 src/Registry/CompositSchema.php delete mode 100644 src/Registry/Contract.php delete mode 100644 src/Registry/Schema.php delete mode 100644 src/Registry/ThrowableSchema.php delete mode 100644 src/Registry/UnknownSchema.php delete mode 100644 src/Representation/Client.php delete mode 100644 src/Representation/Contract.php delete mode 100644 src/Representation/ExampleData.php delete mode 100644 src/Representation/Header.php delete mode 100644 src/Representation/Hydrator.php delete mode 100644 src/Representation/Operation.php delete mode 100644 src/Representation/OperationEmptyResponse.php delete mode 100644 src/Representation/OperationRequestBody.php delete mode 100644 src/Representation/OperationResponse.php delete mode 100644 src/Representation/Parameter.php delete mode 100644 src/Representation/Path.php delete mode 100644 src/Representation/Property.php delete mode 100644 src/Representation/PropertyType.php delete mode 100644 src/Representation/Schema.php delete mode 100644 src/Representation/WebHook.php delete mode 100644 src/State.php delete mode 100644 src/Utils.php diff --git a/Makefile b/Makefile index d68563d..c792151 100644 --- a/Makefile +++ b/Makefile @@ -77,3 +77,6 @@ generate-example-client-miele: generate-test-client: $(DOCKER_RUN) php ./bin/openapi-client-generator ./tests/openapi-client-petstore.yaml + +generate-packages: + $(DOCKER_RUN) php ./vendor/bin/openapi-generator ./example/client-gitub-one.php diff --git a/bin/openapi-client-generator.source b/bin/openapi-client-generator.source deleted file mode 100755 index aa99d5e..0000000 --- a/bin/openapi-client-generator.source +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/php -hydrateObject(Configuration::class, Yaml::parseFile($configurationFile)); - (new Generator( - $configuration, - dirname($configurationFile) . DIRECTORY_SEPARATOR, - ))->generate( - $configuration->namespace->source . '\\', - $configuration->namespace->test . '\\', - dirname($configurationFile) . DIRECTORY_SEPARATOR, - ); - - return 0; - })($configuration); - } catch (Throwable $throwable) { - Error::display($throwable); - } finally { - exit ($exitCode); - } -})($argv[1]); diff --git a/composer.json b/composer.json index ab7d2e5..1a0e341 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,16 @@ "nikic/php-parser": "^4.15", "nunomaduro/termwind": "^1.15", "ondram/ci-detector": "^4.1", + "openapi-tools/configuration": "dev-main", + "openapi-tools/contract": "dev-main", + "openapi-tools/gatherer": "dev-main", + "openapi-tools/generator": "dev-main", + "openapi-tools/generator-hydrator": "dev-main", + "openapi-tools/generator-schema": "dev-main", + "openapi-tools/generator-templates": "dev-main", + "openapi-tools/registry": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", "phpstan/phpdoc-parser": "^1.22", "pointybeard/reverse-regex": "1.0.0.3", "psr/http-message": "^1.1 || ^2 || ^3", @@ -35,7 +45,6 @@ "symfony/yaml": "^6.0", "twig/twig": "^3.5", "wyrihaximus/async-test-utilities": "^7.0", - "wyrihaximus/composer-update-bin-autoload-path": "^1", "wyrihaximus/react-awaitable-observable": "^1.0", "wyrihaximus/simple-twig": "^2.1", "wyrihaximus/subsplit-tools": "dev-main" @@ -51,9 +60,6 @@ "ApiClients\\Tests\\Tools\\OpenApiClientGenerator\\": "tests/unit/" } }, - "bin": [ - "bin/openapi-client-generator" - ], "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, @@ -65,13 +71,6 @@ "php": "8.2.13" } }, - "extra": { - "wyrihaximus": { - "bin-autoload-path-update": [ - "bin/openapi-client-generator" - ] - } - }, "scripts": { "post-install-cmd": [ "composer normalize" diff --git a/composer.lock b/composer.lock index efc2bfc..00d7055 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bd4ead13b5a208ede4245f561957c443", + "content-hash": "91d4a066e2563ff9436c442476d30f15", "packages": [ { "name": "amphp/amp", - "version": "v2.6.2", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", "shasum": "" }, "require": { @@ -29,8 +29,8 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "react/promise": "^2", + "vimeo/psalm": "^3.12" }, "type": "library", "extra": { @@ -85,7 +85,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" + "source": "https://github.com/amphp/amp/tree/v2.6.4" }, "funding": [ { @@ -93,20 +93,20 @@ "type": "github" } ], - "time": "2022-02-20T17:52:18+00:00" + "time": "2024-03-21T18:52:26+00:00" }, { "name": "amphp/byte-stream", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", "shasum": "" }, "require": { @@ -122,11 +122,6 @@ "psalm/phar": "^3.11.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ "lib/functions.php" @@ -150,7 +145,7 @@ } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "homepage": "https://amphp.org/byte-stream", "keywords": [ "amp", "amphp", @@ -160,9 +155,8 @@ "stream" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" }, "funding": [ { @@ -170,7 +164,7 @@ "type": "github" } ], - "time": "2021-03-30T17:13:30+00:00" + "time": "2024-04-13T18:00:56+00:00" }, { "name": "api-clients/contracts", @@ -218,12 +212,12 @@ "source": { "type": "git", "url": "https://github.com/php-api-clients/github.git", - "reference": "13c7dcad79a4d19f8caa9b68fb375f6722a3d76f" + "reference": "14b7a7b7175ad498268bf277311935367b1071b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-api-clients/github/zipball/13c7dcad79a4d19f8caa9b68fb375f6722a3d76f", - "reference": "13c7dcad79a4d19f8caa9b68fb375f6722a3d76f", + "url": "https://api.github.com/repos/php-api-clients/github/zipball/14b7a7b7175ad498268bf277311935367b1071b0", + "reference": "14b7a7b7175ad498268bf277311935367b1071b0", "shasum": "" }, "require": { @@ -231,7 +225,7 @@ "api-clients/openapi-client-utils": "dev-main", "devizzent/cebe-php-openapi": "^1.0.1", "eventsauce/object-hydrator": "^1.4.0", - "league/openapi-psr7-validator": "^0.21", + "league/openapi-psr7-validator": "^0.22 || ^0.21", "php": "^8.2", "react/async": "^4.1.0", "react/event-loop": "^1.4.0", @@ -262,7 +256,7 @@ "issues": "https://github.com/php-api-clients/github/issues", "source": "https://github.com/php-api-clients/github/tree/v0.2.x" }, - "time": "2023-10-17T01:22:52+00:00" + "time": "2024-11-07T17:01:29+00:00" }, { "name": "api-clients/openapi-client-utils", @@ -270,12 +264,12 @@ "source": { "type": "git", "url": "https://github.com/php-api-clients/openapi-client-utils.git", - "reference": "e1c0db6cd3e2e94958cf9e99e8395a61d2354be5" + "reference": "55c26aa512ce272a350666a5d2aceac9356dcbb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-api-clients/openapi-client-utils/zipball/e1c0db6cd3e2e94958cf9e99e8395a61d2354be5", - "reference": "e1c0db6cd3e2e94958cf9e99e8395a61d2354be5", + "url": "https://api.github.com/repos/php-api-clients/openapi-client-utils/zipball/55c26aa512ce272a350666a5d2aceac9356dcbb2", + "reference": "55c26aa512ce272a350666a5d2aceac9356dcbb2", "shasum": "" }, "require": { @@ -283,7 +277,7 @@ "php": "^8.2" }, "require-dev": { - "wyrihaximus/async-test-utilities": "^7.1" + "wyrihaximus/async-test-utilities": "^8" }, "default-branch": true, "type": "library", @@ -313,20 +307,20 @@ "type": "github" } ], - "time": "2023-09-27T07:38:48+00:00" + "time": "2024-04-02T09:54:21+00:00" }, { "name": "azjezz/psl", - "version": "2.7.0", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/azjezz/psl.git", - "reference": "cd599829541caf1bc87fa0b2a3367e050ff1f837" + "reference": "1ade4f1a99fe07a8e06f8dee596609aa07585422" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/azjezz/psl/zipball/cd599829541caf1bc87fa0b2a3367e050ff1f837", - "reference": "cd599829541caf1bc87fa0b2a3367e050ff1f837", + "url": "https://api.github.com/repos/azjezz/psl/zipball/1ade4f1a99fe07a8e06f8dee596609aa07585422", + "reference": "1ade4f1a99fe07a8e06f8dee596609aa07585422", "shasum": "" }, "require": { @@ -335,7 +329,7 @@ "ext-json": "*", "ext-mbstring": "*", "ext-sodium": "*", - "php": "~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "revolt/event-loop": "^1.0.1" }, "require-dev": { @@ -379,28 +373,28 @@ "description": "PHP Standard Library", "support": { "issues": "https://github.com/azjezz/psl/issues", - "source": "https://github.com/azjezz/psl/tree/2.7.0" + "source": "https://github.com/azjezz/psl/tree/2.9.1" }, "funding": [ { - "url": "https://opencollective.com/php-standard-library", - "type": "open_collective" + "url": "https://github.com/azjezz", + "type": "github" } ], - "time": "2023-07-19T20:13:26+00:00" + "time": "2024-04-05T05:18:37+00:00" }, { "name": "beberlei/assert", - "version": "v3.3.2", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/beberlei/assert.git", - "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655" + "reference": "b5fd8eacd8915a1b627b8bfc027803f1939734dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/cb70015c04be1baee6f5f5c953703347c0ac1655", - "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655", + "url": "https://api.github.com/repos/beberlei/assert/zipball/b5fd8eacd8915a1b627b8bfc027803f1939734dd", + "reference": "b5fd8eacd8915a1b627b8bfc027803f1939734dd", "shasum": "" }, "require": { @@ -408,7 +402,7 @@ "ext-json": "*", "ext-mbstring": "*", "ext-simplexml": "*", - "php": "^7.0 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "*", @@ -452,9 +446,9 @@ ], "support": { "issues": "https://github.com/beberlei/assert/issues", - "source": "https://github.com/beberlei/assert/tree/v3.3.2" + "source": "https://github.com/beberlei/assert/tree/v3.3.3" }, - "time": "2021-12-16T21:41:27+00:00" + "time": "2024-07-15T13:18:35+00:00" }, { "name": "ckr/arraymerger", @@ -684,34 +678,34 @@ }, { "name": "composer-unused/symbol-parser", - "version": "0.2.1", + "version": "0.2.5", "source": { "type": "git", "url": "https://github.com/composer-unused/symbol-parser.git", - "reference": "a395a555aa38b63cadf9b2f396880ac86abb44a9" + "reference": "96cee7244aea405e936247d42c49332d52d90ae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer-unused/symbol-parser/zipball/a395a555aa38b63cadf9b2f396880ac86abb44a9", - "reference": "a395a555aa38b63cadf9b2f396880ac86abb44a9", + "url": "https://api.github.com/repos/composer-unused/symbol-parser/zipball/96cee7244aea405e936247d42c49332d52d90ae7", + "reference": "96cee7244aea405e936247d42c49332d52d90ae7", "shasum": "" }, "require": { "composer-unused/contracts": "^0.3", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": "^7.4 || ^8.0", - "phpstan/phpdoc-parser": "^1.16", + "phpstan/phpdoc-parser": "^1.25", "psr/container": "^1.0 || ^2.0", "psr/log": "^1.1 || ^2 || ^3", - "symfony/finder": "^4.4 || ^5.3 || ^6.0" + "symfony/finder": "^5.3 || ^6.0 || ^7.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.28", + "ergebnis/composer-normalize": "^2.42", "ext-ds": "*", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6.5", + "phpunit/phpunit": "^9.6.10 || ^10.5", "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.7.2", + "squizlabs/php_codesniffer": "^3.9.0", "symfony/serializer": "^5.4" }, "type": "library", @@ -751,32 +745,32 @@ "type": "other" } ], - "time": "2023-03-17T00:45:47+00:00" + "time": "2024-03-09T15:25:51+00:00" }, { "name": "composer/ca-bundle", - "version": "1.3.7", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" + "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/3b1fc3f0be055baa7c6258b1467849c3e8204eb2", + "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2", "shasum": "" }, "require": { "ext-openssl": "*", "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8 || ^9", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { @@ -811,7 +805,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.7" + "source": "https://github.com/composer/ca-bundle/tree/1.5.3" }, "funding": [ { @@ -827,20 +821,20 @@ "type": "tidelift" } ], - "time": "2023-08-30T09:31:38+00:00" + "time": "2024-11-04T10:15:26+00:00" }, { "name": "composer/class-map-generator", - "version": "1.1.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9" + "reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/953cc4ea32e0c31f2185549c7d216d7921f03da9", - "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/98bbf6780e56e0fd2404fe4b82eb665a0f93b783", + "reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783", "shasum": "" }, "require": { @@ -853,8 +847,8 @@ "phpstan/phpstan-deprecation-rules": "^1", "phpstan/phpstan-phpunit": "^1", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/filesystem": "^5.4 || ^6", - "symfony/phpunit-bridge": "^5" + "phpunit/phpunit": "^8", + "symfony/filesystem": "^5.4 || ^6" }, "type": "library", "extra": { @@ -884,7 +878,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.1.0" + "source": "https://github.com/composer/class-map-generator/tree/1.4.0" }, "funding": [ { @@ -900,52 +894,52 @@ "type": "tidelift" } ], - "time": "2023-06-30T13:58:57+00:00" + "time": "2024-10-03T18:14:00+00:00" }, { "name": "composer/composer", - "version": "2.6.5", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "4b0fe89db9e65b1e64df633a992e70a7a215ab33" + "reference": "6e543d03187c882ea1c6ba43add2467754427803" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/4b0fe89db9e65b1e64df633a992e70a7a215ab33", - "reference": "4b0fe89db9e65b1e64df633a992e70a7a215ab33", + "url": "https://api.github.com/repos/composer/composer/zipball/6e543d03187c882ea1c6ba43add2467754427803", + "reference": "6e543d03187c882ea1c6ba43add2467754427803", "shasum": "" }, "require": { - "composer/ca-bundle": "^1.0", - "composer/class-map-generator": "^1.0", + "composer/ca-bundle": "^1.5", + "composer/class-map-generator": "^1.4.0", "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2.1 || ^3.1", - "composer/semver": "^3.2.5", + "composer/pcre": "^2.2 || ^3.2", + "composer/semver": "^3.3", "composer/spdx-licenses": "^1.5.7", "composer/xdebug-handler": "^2.0.2 || ^3.0.3", - "justinrainbow/json-schema": "^5.2.11", + "justinrainbow/json-schema": "^5.3", "php": "^7.2.5 || ^8.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^2.8 || ^3", + "react/promise": "^3.2", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.2", "seld/signal-handler": "^2.0", - "symfony/console": "^5.4.11 || ^6.0.11 || ^7", - "symfony/filesystem": "^5.4 || ^6.0 || ^7", - "symfony/finder": "^5.4 || ^6.0 || ^7", + "symfony/console": "^5.4.35 || ^6.3.12 || ^7.0.3", + "symfony/filesystem": "^5.4.35 || ^6.3.12 || ^7.0.3", + "symfony/finder": "^5.4.35 || ^6.3.12 || ^7.0.3", "symfony/polyfill-php73": "^1.24", "symfony/polyfill-php80": "^1.24", "symfony/polyfill-php81": "^1.24", - "symfony/process": "^5.4 || ^6.0 || ^7" + "symfony/process": "^5.4.35 || ^6.3.12 || ^7.0.3" }, "require-dev": { - "phpstan/phpstan": "^1.9.3", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1", - "phpstan/phpstan-symfony": "^1.2.10", - "symfony/phpunit-bridge": "^6.0 || ^7" + "phpstan/phpstan": "^1.11.8", + "phpstan/phpstan-deprecation-rules": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.0", + "phpstan/phpstan-symfony": "^1.4.0", + "symfony/phpunit-bridge": "^6.4.3 || ^7.0.1" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -958,7 +952,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.6-dev" + "dev-main": "2.8-dev" }, "phpstan": { "includes": [ @@ -998,7 +992,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.6.5" + "source": "https://github.com/composer/composer/tree/2.8.2" }, "funding": [ { @@ -1014,7 +1008,7 @@ "type": "tidelift" } ], - "time": "2023-10-06T08:11:52+00:00" + "time": "2024-10-29T15:12:11+00:00" }, { "name": "composer/metadata-minifier", @@ -1087,30 +1081,38 @@ }, { "name": "composer/pcre", - "version": "3.1.1", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, "require-dev": { - "phpstan/phpstan": "^1.3", + "phpstan/phpstan": "^1.11.10", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { "branch-alias": { "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -1138,7 +1140,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.1" + "source": "https://github.com/composer/pcre/tree/3.3.1" }, "funding": [ { @@ -1154,28 +1156,28 @@ "type": "tidelift" } ], - "time": "2023-10-11T07:11:09+00:00" + "time": "2024-08-27T18:44:43+00:00" }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -1219,7 +1221,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -1235,20 +1237,20 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "composer/spdx-licenses", - "version": "1.5.7", + "version": "1.5.8", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "c848241796da2abf65837d51dce1fae55a960149" + "reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", - "reference": "c848241796da2abf65837d51dce1fae55a960149", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a", + "reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a", "shasum": "" }, "require": { @@ -1297,9 +1299,9 @@ "validator" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" + "source": "https://github.com/composer/spdx-licenses/tree/1.5.8" }, "funding": [ { @@ -1315,20 +1317,20 @@ "type": "tidelift" } ], - "time": "2022-05-23T07:37:50+00:00" + "time": "2023-11-20T07:44:33+00:00" }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -1339,7 +1341,7 @@ "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -1363,9 +1365,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -1381,7 +1383,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -1569,36 +1571,38 @@ }, { "name": "devizzent/cebe-php-openapi", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/DEVizzent/cebe-php-openapi.git", - "reference": "72b48264eaeb7afb01fae80e26e99243ab6d33f1" + "reference": "9ae960c072eda54d8d0eb9dc14c1e6d815167347" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DEVizzent/cebe-php-openapi/zipball/72b48264eaeb7afb01fae80e26e99243ab6d33f1", - "reference": "72b48264eaeb7afb01fae80e26e99243ab6d33f1", + "url": "https://api.github.com/repos/DEVizzent/cebe-php-openapi/zipball/9ae960c072eda54d8d0eb9dc14c1e6d815167347", + "reference": "9ae960c072eda54d8d0eb9dc14c1e6d815167347", "shasum": "" }, "require": { "ext-json": "*", "justinrainbow/json-schema": "^5.2", "php": ">=7.1.0", - "symfony/yaml": "^3.4 || ^4 || ^5 || ^6" + "symfony/yaml": "^3.4 || ^4 || ^5 || ^6 || ^7" }, "conflict": { "symfony/yaml": "3.4.0 - 3.4.4 || 4.0.0 - 4.4.17 || 5.0.0 - 5.1.9 || 5.2.0" }, + "replace": { + "cebe/php-openapi": "1.7.0" + }, "require-dev": { "apis-guru/openapi-directory": "1.0.0", "cebe/indent": "*", "mermade/openapi3-examples": "1.0.0", - "nexmo/api-specification": "1.0.0", "oai/openapi-specification-3.0": "3.0.3", "oai/openapi-specification-3.1": "3.1.0", "phpstan/phpstan": "^0.12.0", - "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.4" + "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.4 || ^11.4" }, "bin": [ "bin/php-openapi" @@ -1639,7 +1643,7 @@ "issues": "https://github.com/DEVizzent/cebe-php-openapi/issues", "source": "https://github.com/DEVizzent/cebe-php-openapi" }, - "time": "2023-07-12T09:00:33+00:00" + "time": "2024-10-30T05:57:15+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -1806,16 +1810,16 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -1847,9 +1851,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/instantiator", @@ -1999,40 +2003,40 @@ }, { "name": "ergebnis/composer-normalize", - "version": "2.39.0", + "version": "2.44.0", "source": { "type": "git", "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "a878360bc8cb5cb440b9381f72b0aaa125f937c7" + "reference": "bd0c446426bb837ae0cc9f97948167e658bd11d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/a878360bc8cb5cb440b9381f72b0aaa125f937c7", - "reference": "a878360bc8cb5cb440b9381f72b0aaa125f937c7", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/bd0c446426bb837ae0cc9f97948167e658bd11d2", + "reference": "bd0c446426bb837ae0cc9f97948167e658bd11d2", "shasum": "" }, "require": { "composer-plugin-api": "^2.0.0", - "ergebnis/json": "^1.1.0", - "ergebnis/json-normalizer": "^4.3.0", - "ergebnis/json-printer": "^3.4.0", + "ergebnis/json": "^1.2.0", + "ergebnis/json-normalizer": "^4.5.0", + "ergebnis/json-printer": "^3.5.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", "localheinz/diff": "^1.1.1", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "composer/composer": "^2.6.5", - "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "~6.7.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", - "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.4", - "phpunit/phpunit": "^10.4.1", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.5", - "symfony/filesystem": "^6.0.13", - "vimeo/psalm": "^5.15.0" + "composer/composer": "^2.7.7", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.20", + "psalm/plugin-phpunit": "~0.19.0", + "rector/rector": "^1.2.5", + "symfony/filesystem": "^5.4.41", + "vimeo/psalm": "^5.26.1" }, "type": "composer-plugin", "extra": { @@ -2072,37 +2076,37 @@ "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/composer-normalize" }, - "time": "2023-10-10T15:43:27+00:00" + "time": "2024-09-30T21:56:22+00:00" }, { "name": "ergebnis/json", - "version": "1.1.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json.git", - "reference": "9f2b9086c43b189d7044a5b6215a931fb6e9125d" + "reference": "84051b4e243d6a8e2f8271604b11ffa52d29bc7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json/zipball/9f2b9086c43b189d7044a5b6215a931fb6e9125d", - "reference": "9f2b9086c43b189d7044a5b6215a931fb6e9125d", + "url": "https://api.github.com/repos/ergebnis/json/zipball/84051b4e243d6a8e2f8271604b11ffa52d29bc7a", + "reference": "84051b4e243d6a8e2f8271604b11ffa52d29bc7a", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "ext-json": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.29.0", - "ergebnis/data-provider": "^3.0.0", - "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "^6.6.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", - "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.4", - "phpunit/phpunit": "^10.4.1", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.5", - "vimeo/psalm": "^5.15.0" + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.36.0", + "ergebnis/phpunit-slow-test-detector": "^2.15.1", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.18", + "psalm/plugin-phpunit": "~0.19.0", + "rector/rector": "^1.2.5", + "vimeo/psalm": "^5.26.1" }, "type": "library", "extra": { @@ -2137,45 +2141,43 @@ "security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json" }, - "time": "2023-10-10T07:57:48+00:00" + "time": "2024-09-27T15:01:05+00:00" }, { "name": "ergebnis/json-normalizer", - "version": "4.3.0", + "version": "4.6.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd" + "reference": "859fd3cee417f0b10a8e6ffb8dbeb03587106b8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", - "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/859fd3cee417f0b10a8e6ffb8dbeb03587106b8b", + "reference": "859fd3cee417f0b10a8e6ffb8dbeb03587106b8b", "shasum": "" }, "require": { - "ergebnis/json": "^1.1.0", - "ergebnis/json-pointer": "^3.2.0", - "ergebnis/json-printer": "^3.4.0", - "ergebnis/json-schema-validator": "^4.1.0", + "ergebnis/json": "^1.2.0", + "ergebnis/json-pointer": "^3.4.0", + "ergebnis/json-printer": "^3.5.0", + "ergebnis/json-schema-validator": "^4.2.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "composer/semver": "^3.4.0", - "ergebnis/data-provider": "^3.0.0", - "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "~6.7.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", - "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.4", - "phpunit/phpunit": "^10.4.1", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.5", - "symfony/filesystem": "^6.3.1", - "symfony/finder": "^6.3.5", - "vimeo/psalm": "^5.15.0" + "composer/semver": "^3.4.3", + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.36.0", + "ergebnis/phpunit-slow-test-detector": "^2.15.1", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.19", + "psalm/plugin-phpunit": "~0.19.0", + "rector/rector": "^1.2.5", + "vimeo/psalm": "^5.26.1" }, "suggest": { "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" @@ -2208,40 +2210,43 @@ "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-normalizer" }, - "time": "2023-10-10T15:15:03+00:00" + "time": "2024-09-27T15:11:59+00:00" }, { "name": "ergebnis/json-pointer", - "version": "3.3.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-pointer.git", - "reference": "8e517faefc06b7c761eaa041febef51a9375819a" + "reference": "f6ff71e69305b8ab5e4457e374b35dcd0812609b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/8e517faefc06b7c761eaa041febef51a9375819a", - "reference": "8e517faefc06b7c761eaa041febef51a9375819a", + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/f6ff71e69305b8ab5e4457e374b35dcd0812609b", + "reference": "f6ff71e69305b8ab5e4457e374b35dcd0812609b", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.29.0", - "ergebnis/data-provider": "^3.0.0", - "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "~6.7.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", - "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.4", - "phpunit/phpunit": "^10.4.1", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.5", - "vimeo/psalm": "^5.15.0" + "ergebnis/composer-normalize": "^2.43.0", + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.32.0", + "ergebnis/phpunit-slow-test-detector": "^2.15.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.19", + "psalm/plugin-phpunit": "~0.19.0", + "rector/rector": "^1.2.1", + "vimeo/psalm": "^5.25.0" }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, "composer-normalize": { "indent-size": 2, "indent-style": "space" @@ -2263,7 +2268,7 @@ "homepage": "https://localheinz.com" } ], - "description": "Provides JSON pointer as a value object.", + "description": "Provides an abstraction of a JSON pointer.", "homepage": "https://github.com/ergebnis/json-pointer", "keywords": [ "RFC6901", @@ -2275,37 +2280,38 @@ "security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-pointer" }, - "time": "2023-10-10T14:41:06+00:00" + "time": "2024-09-27T15:47:15+00:00" }, { "name": "ergebnis/json-printer", - "version": "3.4.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-printer.git", - "reference": "05841593d72499de4f7ce4034a237c77e470558f" + "reference": "d2e51379dc62d73017a779a78fcfba568de39e0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/05841593d72499de4f7ce4034a237c77e470558f", - "reference": "05841593d72499de4f7ce4034a237c77e470558f", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/d2e51379dc62d73017a779a78fcfba568de39e0a", + "reference": "d2e51379dc62d73017a779a78fcfba568de39e0a", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "^6.6.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", - "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.3", - "phpunit/phpunit": "^10.4.1", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.5", - "vimeo/psalm": "^5.15.0" + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.36.0", + "ergebnis/phpunit-slow-test-detector": "^2.15.1", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.19", + "psalm/plugin-phpunit": "~0.19.0", + "rector/rector": "~1.2.5", + "vimeo/psalm": "^5.26.1" }, "type": "library", "autoload": { @@ -2336,41 +2342,40 @@ "security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-printer" }, - "time": "2023-10-10T07:42:48+00:00" + "time": "2024-09-27T15:19:56+00:00" }, { "name": "ergebnis/json-schema-validator", - "version": "4.1.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-schema-validator.git", - "reference": "d568ed85d1cdc2e49d650c2fc234dc2516f3f25b" + "reference": "73f938f8995c6ad1e37d2c1dfeaa8336861f9db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/d568ed85d1cdc2e49d650c2fc234dc2516f3f25b", - "reference": "d568ed85d1cdc2e49d650c2fc234dc2516f3f25b", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/73f938f8995c6ad1e37d2c1dfeaa8336861f9db8", + "reference": "73f938f8995c6ad1e37d2c1dfeaa8336861f9db8", "shasum": "" }, "require": { - "ergebnis/json": "^1.0.1", - "ergebnis/json-pointer": "^3.2.0", + "ergebnis/json": "^1.2.0", + "ergebnis/json-pointer": "^3.4.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.21.0", - "ergebnis/data-provider": "^3.0.0", - "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "~6.6.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", - "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.4", - "phpunit/phpunit": "^10.4.1", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.5", - "vimeo/psalm": "^5.15.0" + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.36.0", + "ergebnis/phpunit-slow-test-detector": "^2.15.1", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.20", + "psalm/plugin-phpunit": "~0.19.0", + "rector/rector": "^1.2.5", + "vimeo/psalm": "^5.26.1" }, "type": "library", "extra": { @@ -2407,43 +2412,42 @@ "security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-schema-validator" }, - "time": "2023-10-10T14:16:57+00:00" + "time": "2024-09-27T15:16:33+00:00" }, { "name": "ergebnis/phpstan-rules", - "version": "2.1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "119e229c48688946450ccca9f1c57c9ca4fb6f02" + "reference": "2e9946491d39ea1eb043738309895e08f025a7a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/119e229c48688946450ccca9f1c57c9ca4fb6f02", - "reference": "119e229c48688946450ccca9f1c57c9ca4fb6f02", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/2e9946491d39ea1eb043738309895e08f025a7a0", + "reference": "2e9946491d39ea1eb043738309895e08f025a7a0", "shasum": "" }, "require": { "ext-mbstring": "*", - "nikic/php-parser": "^4.2.3", + "nikic/php-parser": "^4.2.3 || ^5.0.0", "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "phpstan/phpstan": "^1.10.21" }, "require-dev": { - "doctrine/orm": "^2.16.1", - "ergebnis/composer-normalize": "^2.35.0", - "ergebnis/license": "^2.1.0", - "ergebnis/php-cs-fixer-config": "^5.13.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", - "infection/infection": "~0.27.0", - "nette/di": "^3.1.3", + "doctrine/orm": "^3.0.0", + "ergebnis/composer-normalize": "^2.42.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.22.0", + "ergebnis/phpunit-slow-test-detector": "^2.10.0", + "nette/di": "^3.2.0", "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpunit/phpunit": "^10.3.2", + "phpstan/phpstan-strict-rules": "^1.5.2", + "phpunit/phpunit": "^10.5.10", "psalm/plugin-phpunit": "~0.18.4", - "psr/container": "^1.1.2", - "rector/rector": "~0.17.13", - "vimeo/psalm": "^5.14.1" + "psr/container": "^2.0.2", + "rector/rector": "^1.0.0", + "vimeo/psalm": "^5.21.1" }, "type": "phpstan-extension", "extra": { @@ -2465,21 +2469,22 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Provides additional rules for phpstan/phpstan.", + "description": "Provides rules for phpstan/phpstan.", "homepage": "https://github.com/ergebnis/phpstan-rules", "keywords": [ "PHPStan", - "phpstan-extreme-rules", "phpstan-rules" ], "support": { "issues": "https://github.com/ergebnis/phpstan-rules/issues", + "security": "https://github.com/ergebnis/phpstan-rules/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/phpstan-rules" }, - "time": "2023-08-17T10:28:37+00:00" + "time": "2024-02-07T17:49:28+00:00" }, { "name": "evenement/evenement", @@ -2530,16 +2535,16 @@ }, { "name": "eventsauce/object-hydrator", - "version": "1.4.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/EventSaucePHP/ObjectHydrator.git", - "reference": "743ee4524d1a3d7b381ef9f61afcb18e0cc81cb0" + "reference": "98941783b5d2373f02295707ece60275d3ecb89a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/EventSaucePHP/ObjectHydrator/zipball/743ee4524d1a3d7b381ef9f61afcb18e0cc81cb0", - "reference": "743ee4524d1a3d7b381ef9f61afcb18e0cc81cb0", + "url": "https://api.github.com/repos/EventSaucePHP/ObjectHydrator/zipball/98941783b5d2373f02295707ece60275d3ecb89a", + "reference": "98941783b5d2373f02295707ece60275d3ecb89a", "shasum": "" }, "require": { @@ -2582,7 +2587,7 @@ ], "support": { "issues": "https://github.com/EventSaucePHP/ObjectHydrator/issues", - "source": "https://github.com/EventSaucePHP/ObjectHydrator/tree/1.4.0" + "source": "https://github.com/EventSaucePHP/ObjectHydrator/tree/1.6.0" }, "funding": [ { @@ -2590,7 +2595,7 @@ "type": "github" } ], - "time": "2023-08-03T07:27:58+00:00" + "time": "2024-10-30T18:48:59+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -2639,16 +2644,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "v1.5.2", + "version": "v1.5.3", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" + "reference": "a9e113dbc7d849e35b8776da39edaf4313b7b6c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/a9e113dbc7d849e35b8776da39edaf4313b7b6c9", + "reference": "a9e113dbc7d849e35b8776da39edaf4313b7b6c9", "shasum": "" }, "require": { @@ -2689,22 +2694,22 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.3" }, - "time": "2022-03-02T22:36:06+00:00" + "time": "2024-04-30T00:40:11+00:00" }, { "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "reference": "8520451a140d3f46ac33042715115e290cf5785f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", "shasum": "" }, "require": { @@ -2712,13 +2717,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", @@ -2744,7 +2749,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" }, "funding": [ { @@ -2752,7 +2757,7 @@ "type": "github" } ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2024-08-06T10:04:20+00:00" }, { "name": "fig/http-message-util", @@ -2812,26 +2817,26 @@ }, { "name": "filp/whoops", - "version": "2.15.3", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" + "reference": "befcdc0e5dce67252aa6322d82424be928214fa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", + "url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2", + "reference": "befcdc0e5dce67252aa6322d82424be928214fa2", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", + "php": "^7.1 || ^8.0", "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^4.0 || ^5.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -2871,7 +2876,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.3" + "source": "https://github.com/filp/whoops/tree/2.16.0" }, "funding": [ { @@ -2879,26 +2884,26 @@ "type": "github" } ], - "time": "2023-07-13T12:00:00+00:00" + "time": "2024-09-25T12:00:00+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "version": "7.9.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -2907,11 +2912,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -2989,7 +2994,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.0" + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" }, "funding": [ { @@ -3005,28 +3010,28 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:20:53+00:00" + "time": "2024-07-24T11:22:20+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -3072,7 +3077,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.1" + "source": "https://github.com/guzzle/promises/tree/2.0.4" }, "funding": [ { @@ -3088,20 +3093,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2024-10-17T10:06:22+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.1", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -3115,9 +3120,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -3188,7 +3193,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.1" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -3204,20 +3209,20 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "icanhazstring/composer-unused", - "version": "0.8.10", + "version": "0.8.11", "source": { "type": "git", "url": "https://github.com/composer-unused/composer-unused.git", - "reference": "fd2624f49de2d8925355cfb8739e2b2a57017d10" + "reference": "4720206edc29a7da1913ece0e508f6d82fbcd905" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer-unused/composer-unused/zipball/fd2624f49de2d8925355cfb8739e2b2a57017d10", - "reference": "fd2624f49de2d8925355cfb8739e2b2a57017d10", + "url": "https://api.github.com/repos/composer-unused/composer-unused/zipball/4720206edc29a7da1913ece0e508f6d82fbcd905", + "reference": "4720206edc29a7da1913ece0e508f6d82fbcd905", "shasum": "" }, "require": { @@ -3230,17 +3235,19 @@ "phpstan/phpdoc-parser": "^1.12", "psr/container": "^1.0 || ^2.0", "psr/log": "^1.1 || ^2 || ^3", - "symfony/config": "^4.4 || ^5.4 || ^6.0", - "symfony/console": "^4.4 || ^5.4 || ^6.0", - "symfony/dependency-injection": "^4.4.8 || ^5.4 || ^6.0", - "symfony/property-access": "^4.4 || ^5.4 || ^6.0", - "symfony/serializer": "^4.4 || ^5.4 || ^6.0", + "symfony/config": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/console": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^4.4.8 || ^5.4 || ^6.0 || ^7.0", + "symfony/property-access": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/serializer": "^4.4 || ^5.4 || ^6.0 || ^7.0", + "symfony/validator": "^4.4 || ^5.4 || ^6.0 || ^7.0", "webmozart/assert": "^1.10", "webmozart/glob": "^4.4" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8", - "dg/bypass-finals": "^1.4", + "codeception/verify": "^3.0", + "dg/bypass-finals": "^1.5", "ergebnis/composer-normalize": "^2.28", "ext-ds": "*", "ext-zend-opcache": "*", @@ -3250,7 +3257,7 @@ "phpstan/extension-installer": "^1.3", "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.6.8", + "phpunit/phpunit": "^9.6.13", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "^3.7" }, @@ -3301,7 +3308,7 @@ "type": "other" } ], - "time": "2023-07-06T05:41:37+00:00" + "time": "2023-11-30T14:35:29+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -3482,16 +3489,16 @@ }, { "name": "infection/infection", - "version": "0.27.0", + "version": "0.27.10", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "a9ff8171577d98b887d7f16428edd81ff69ce887" + "reference": "873cd3335774a114bef9ca93388e623bf362d820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/a9ff8171577d98b887d7f16428edd81ff69ce887", - "reference": "a9ff8171577d98b887d7f16428edd81ff69ce887", + "url": "https://api.github.com/repos/infection/infection/zipball/873cd3335774a114bef9ca93388e623bf362d820", + "reference": "873cd3335774a114bef9ca93388e623bf362d820", "shasum": "" }, "require": { @@ -3502,7 +3509,7 @@ "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", - "fidry/cpu-core-counter": "^0.4.0 || ^0.5.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", @@ -3512,11 +3519,11 @@ "php": "^8.1", "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", + "sebastian/diff": "^3.0.2 || ^4.0 || ^5.0 || ^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" }, @@ -3526,7 +3533,7 @@ "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", @@ -3537,11 +3544,11 @@ "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", + "phpunit/phpunit": "^9.6", "rector/rector": "^0.16.0", - "sidz/phpstan-rules": "^0.2.1", - "symfony/phpunit-bridge": "^5.4 || ^6.0", - "symfony/yaml": "^5.4 || ^6.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": [ @@ -3598,7 +3605,7 @@ ], "support": { "issues": "https://github.com/infection/infection/issues", - "source": "https://github.com/infection/infection/tree/0.27.0" + "source": "https://github.com/infection/infection/tree/0.27.10" }, "funding": [ { @@ -3610,7 +3617,7 @@ "type": "open_collective" } ], - "time": "2023-05-16T05:28:04+00:00" + "time": "2024-02-20T00:08:52+00:00" }, { "name": "jakobbuis/simple-slow-test-reporter", @@ -3650,20 +3657,21 @@ "issues": "https://github.com/jakobbuis/simple-slow-test-reporter/issues", "source": "https://github.com/jakobbuis/simple-slow-test-reporter/tree/v1.0.0" }, + "abandoned": "ergebnis/phpunit-slow-test-detector", "time": "2020-12-26T16:20:53+00:00" }, { "name": "jangregor/phpstan-prophecy", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/Jan0707/phpstan-prophecy.git", - "reference": "2bc7ca9460395690c6bf7332bdfb2f25d5cae8e0" + "reference": "5ee56c7db1d58f0578c82a35e3c1befe840e85a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jan0707/phpstan-prophecy/zipball/2bc7ca9460395690c6bf7332bdfb2f25d5cae8e0", - "reference": "2bc7ca9460395690c6bf7332bdfb2f25d5cae8e0", + "url": "https://api.github.com/repos/Jan0707/phpstan-prophecy/zipball/5ee56c7db1d58f0578c82a35e3c1befe840e85a9", + "reference": "5ee56c7db1d58f0578c82a35e3c1befe840e85a9", "shasum": "" }, "require": { @@ -3671,8 +3679,8 @@ "phpstan/phpstan": "^1.0.0" }, "conflict": { - "phpspec/prophecy": "<1.7.0,>=2.0.0", - "phpunit/phpunit": "<6.0.0,>=10.0.0" + "phpspec/prophecy": "<1.7.0 || >=2.0.0", + "phpunit/phpunit": "<6.0.0 || >=12.0.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.1.1", @@ -3707,15 +3715,9 @@ "description": "Provides a phpstan/phpstan extension for phpspec/prophecy", "support": { "issues": "https://github.com/Jan0707/phpstan-prophecy/issues", - "source": "https://github.com/Jan0707/phpstan-prophecy/tree/1.0.0" + "source": "https://github.com/Jan0707/phpstan-prophecy/tree/1.0.2" }, - "funding": [ - { - "url": "https://github.com/localheinz", - "type": "github" - } - ], - "time": "2021-11-08T16:37:47+00:00" + "time": "2024-04-03T08:15:54+00:00" }, { "name": "jawira/case-converter", @@ -3786,16 +3788,16 @@ }, { "name": "jetbrains/phpstorm-stubs", - "version": "v2023.2", + "version": "v2023.3", "source": { "type": "git", "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "3bb9c8a1050ad324c2dca7964487fa9f081f1005" + "reference": "99d8bcab934ae5362f33660b1cd4b8c4d617c40b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/3bb9c8a1050ad324c2dca7964487fa9f081f1005", - "reference": "3bb9c8a1050ad324c2dca7964487fa9f081f1005", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/99d8bcab934ae5362f33660b1cd4b8c4d617c40b", + "reference": "99d8bcab934ae5362f33660b1cd4b8c4d617c40b", "shasum": "" }, "require-dev": { @@ -3828,26 +3830,26 @@ "type" ], "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2023.2" + "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2023.3" }, - "time": "2023-07-14T12:50:15+00:00" + "time": "2023-11-01T18:52:29+00:00" }, { "name": "justinrainbow/json-schema", - "version": "v5.2.13", + "version": "5.3.0", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" + "url": "https://github.com/jsonrainbow/json-schema.git", + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", @@ -3858,11 +3860,6 @@ "bin/validate-json" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, "autoload": { "psr-4": { "JsonSchema\\": "src/JsonSchema/" @@ -3897,30 +3894,30 @@ "schema" ], "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/5.3.0" }, - "time": "2023-09-26T02:20:38+00:00" + "time": "2024-07-06T21:00:26+00:00" }, { "name": "kwn/number-to-words", - "version": "2.7.2", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/kwn/number-to-words.git", - "reference": "6821e1f6c2195ceff1595cfba9ecb13c9b121579" + "reference": "4eecd25251335114f0f9fb9cea5d141609a07f21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kwn/number-to-words/zipball/6821e1f6c2195ceff1595cfba9ecb13c9b121579", - "reference": "6821e1f6c2195ceff1595cfba9ecb13c9b121579", + "url": "https://api.github.com/repos/kwn/number-to-words/zipball/4eecd25251335114f0f9fb9cea5d141609a07f21", + "reference": "4eecd25251335114f0f9fb9cea5d141609a07f21", "shasum": "" }, "require": { "php": ">=7.4" }, "require-dev": { - "phpunit/phpunit": "^9.6.7", + "phpunit/phpunit": "^9.6", "squizlabs/php_codesniffer": "^3.7.2" }, "type": "library", @@ -3951,9 +3948,9 @@ ], "support": { "issues": "https://github.com/kwn/number-to-words/issues", - "source": "https://github.com/kwn/number-to-words/tree/2.7.2" + "source": "https://github.com/kwn/number-to-words/tree/2.11.0" }, - "time": "2023-09-16T15:30:18+00:00" + "time": "2024-11-04T21:09:14+00:00" }, { "name": "league/openapi-psr7-validator", @@ -4250,36 +4247,37 @@ }, { "name": "maglnet/composer-require-checker", - "version": "4.7.1", + "version": "4.13.0", "source": { "type": "git", "url": "https://github.com/maglnet/ComposerRequireChecker.git", - "reference": "e49c58b18fef21e37941a642c1a70d3962e86f28" + "reference": "3f998740566e3e9b3f7321167fd2f4fd645129da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maglnet/ComposerRequireChecker/zipball/e49c58b18fef21e37941a642c1a70d3962e86f28", - "reference": "e49c58b18fef21e37941a642c1a70d3962e86f28", + "url": "https://api.github.com/repos/maglnet/ComposerRequireChecker/zipball/3f998740566e3e9b3f7321167fd2f4fd645129da", + "reference": "3f998740566e3e9b3f7321167fd2f4fd645129da", "shasum": "" }, "require": { "composer-runtime-api": "^2.0.0", "ext-phar": "*", - "nikic/php-parser": "^4.17.1", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "symfony/console": "^6.3.4", + "nikic/php-parser": "^4.19.4", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0", + "symfony/console": "^6.4.1 || ^7.0.1", "webmozart/assert": "^1.11.0", - "webmozart/glob": "^4.6.0" + "webmozart/glob": "^4.7.0" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-zend-opcache": "*", - "mikey179/vfsstream": "^1.6.11", "phing/phing": "^2.17.4", - "phpstan/phpstan": "^1.10.34", - "phpunit/phpunit": "^10.3.4", - "roave/infection-static-analysis-plugin": "^1.33", - "vimeo/psalm": "^5.15" + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^10.5.36", + "psalm/plugin-phpunit": "^0.19.0", + "roave/infection-static-analysis-plugin": "^1.35.0", + "spatie/temporary-directory": "^2.2.1", + "vimeo/psalm": "^5.26.1" }, "bin": [ "bin/composer-require-checker" @@ -4314,32 +4312,32 @@ "description": "CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package", "homepage": "https://github.com/maglnet/ComposerRequireChecker", "keywords": [ - "analysis", "cli", "composer", "dependency", "imports", "require", - "requirements" + "requirements", + "static analysis" ], "support": { "issues": "https://github.com/maglnet/ComposerRequireChecker/issues", - "source": "https://github.com/maglnet/ComposerRequireChecker/tree/4.7.1" + "source": "https://github.com/maglnet/ComposerRequireChecker/tree/4.13.0" }, - "time": "2023-09-27T14:57:19+00:00" + "time": "2024-10-18T08:08:55+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -4347,11 +4345,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -4377,7 +4376,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -4385,20 +4384,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.2.0", + "version": "v4.5.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5", "shasum": "" }, "require": { @@ -4409,7 +4408,7 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -4434,31 +4433,31 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0" }, - "time": "2023-04-09T17:37:40+00:00" + "time": "2024-09-08T10:13:13+00:00" }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v4.19.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2", + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -4490,39 +4489,39 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-09-29T15:01:53+00:00" }, { "name": "nikolaposa/version", - "version": "4.1.1", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/nikolaposa/version.git", - "reference": "f6bdd64be914940529b843a67335d6386d980cec" + "reference": "003fefa14f47cd44917546285e39d196af062a95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikolaposa/version/zipball/f6bdd64be914940529b843a67335d6386d980cec", - "reference": "f6bdd64be914940529b843a67335d6386d980cec", + "url": "https://api.github.com/repos/nikolaposa/version/zipball/003fefa14f47cd44917546285e39d196af062a95", + "reference": "003fefa14f47cd44917546285e39d196af062a95", "shasum": "" }, "require": { "beberlei/assert": "^3.2", - "php": "^7.2 || ^8.0" + "php": "^8.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.17", - "phpstan/phpstan": "^0.12.10", - "phpstan/phpstan-beberlei-assert": "^0.12.2", - "phpstan/phpstan-phpunit": "^0.12.6", - "phpunit/phpunit": "^8.0" + "friendsofphp/php-cs-fixer": "^3.44", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-beberlei-assert": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1.x-dev" + "dev-master": "4.2.x-dev" } }, "autoload": { @@ -4551,46 +4550,46 @@ ], "support": { "issues": "https://github.com/nikolaposa/version/issues", - "source": "https://github.com/nikolaposa/version/tree/4.1.1" + "source": "https://github.com/nikolaposa/version/tree/4.2.0" }, - "time": "2023-08-04T17:13:40+00:00" + "time": "2023-12-29T22:07:54+00:00" }, { "name": "nunomaduro/collision", - "version": "v7.10.0", + "version": "v7.11.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2" + "reference": "994ea93df5d4132f69d3f1bd74730509df6e8a05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/994ea93df5d4132f69d3f1bd74730509df6e8a05", + "reference": "994ea93df5d4132f69d3f1bd74730509df6e8a05", "shasum": "" }, "require": { - "filp/whoops": "^2.15.3", + "filp/whoops": "^2.16.0", "nunomaduro/termwind": "^1.15.1", "php": "^8.1.0", - "symfony/console": "^6.3.4" + "symfony/console": "^6.4.12" }, "conflict": { "laravel/framework": ">=11.0.0" }, "require-dev": { - "brianium/paratest": "^7.3.0", - "laravel/framework": "^10.28.0", - "laravel/pint": "^1.13.3", - "laravel/sail": "^1.25.0", - "laravel/sanctum": "^3.3.1", - "laravel/tinker": "^2.8.2", - "nunomaduro/larastan": "^2.6.4", - "orchestra/testbench-core": "^8.13.0", - "pestphp/pest": "^2.23.2", - "phpunit/phpunit": "^10.4.1", - "sebastian/environment": "^6.0.1", - "spatie/laravel-ignition": "^2.3.1" + "brianium/paratest": "^7.3.1", + "laravel/framework": "^10.48.22", + "laravel/pint": "^1.18.1", + "laravel/sail": "^1.36.0", + "laravel/sanctum": "^3.3.3", + "laravel/tinker": "^2.10.0", + "nunomaduro/larastan": "^2.9.8", + "orchestra/testbench-core": "^8.28.3", + "pestphp/pest": "^2.35.1", + "phpunit/phpunit": "^10.5.36", + "sebastian/environment": "^6.1.0", + "spatie/laravel-ignition": "^2.8.0" }, "type": "library", "extra": { @@ -4649,37 +4648,36 @@ "type": "patreon" } ], - "time": "2023-10-11T15:45:01+00:00" + "time": "2024-10-15T15:12:40+00:00" }, { "name": "nunomaduro/termwind", - "version": "v1.15.1", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" + "reference": "dcf1ec3dfa36137b7ce41d43866644a7ab8fc257" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/dcf1ec3dfa36137b7ce41d43866644a7ab8fc257", + "reference": "dcf1ec3dfa36137b7ce41d43866644a7ab8fc257", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^8.0", - "symfony/console": "^5.3.0|^6.0.0" + "php": "^8.1", + "symfony/console": "^6.4.12" }, "require-dev": { - "ergebnis/phpstan-rules": "^1.0.", - "illuminate/console": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "laravel/pint": "^1.0.0", - "pestphp/pest": "^1.21.0", - "pestphp/pest-plugin-mock": "^1.0", - "phpstan/phpstan": "^1.4.6", - "phpstan/phpstan-strict-rules": "^1.1.0", - "symfony/var-dumper": "^5.2.7|^6.0.0", + "illuminate/console": "^10.48.22", + "illuminate/support": "^10.48.22", + "laravel/pint": "^1.18.1", + "pestphp/pest": "^2", + "pestphp/pest-plugin-mock": "2.0.0", + "phpstan/phpstan": "^1.12.6", + "phpstan/phpstan-strict-rules": "^1.6.1", + "symfony/var-dumper": "^6.4.11", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -4719,7 +4717,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" + "source": "https://github.com/nunomaduro/termwind/tree/v1.16.0" }, "funding": [ { @@ -4735,36 +4733,36 @@ "type": "github" } ], - "time": "2023-02-08T01:06:31+00:00" + "time": "2024-10-15T15:27:12+00:00" }, { "name": "ocramius/package-versions", - "version": "2.8.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "7b5821f854cf1e6753c4ed7ceb3b11ae83bbad4e" + "reference": "b3397b9b4578989929d3bc2602c26fe19f035095" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/7b5821f854cf1e6753c4ed7ceb3b11ae83bbad4e", - "reference": "7b5821f854cf1e6753c4ed7ceb3b11ae83bbad4e", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/b3397b9b4578989929d3bc2602c26fe19f035095", + "reference": "b3397b9b4578989929d3bc2602c26fe19f035095", "shasum": "" }, "require": { "composer-runtime-api": "^2.2.0", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "replace": { "composer/package-versions-deprecated": "*" }, "require-dev": { - "composer/composer": "^2.6.3", + "composer/composer": "^2.7.7", "doctrine/coding-standard": "^12.0.0", "ext-zip": "^1.15.0", - "phpunit/phpunit": "^9.6.12", - "roave/infection-static-analysis-plugin": "^1.33", - "vimeo/psalm": "^5.15.0" + "phpunit/phpunit": "^9.6.20", + "roave/infection-static-analysis-plugin": "^1.35.0", + "vimeo/psalm": "^5.25.0" }, "type": "library", "autoload": { @@ -4785,7 +4783,7 @@ "description": "Provides efficient querying for installed package versions (no runtime IO)", "support": { "issues": "https://github.com/Ocramius/PackageVersions/issues", - "source": "https://github.com/Ocramius/PackageVersions/tree/2.8.0" + "source": "https://github.com/Ocramius/PackageVersions/tree/2.9.0" }, "funding": [ { @@ -4797,33 +4795,33 @@ "type": "tidelift" } ], - "time": "2023-09-15T11:02:59+00:00" + "time": "2024-08-04T10:04:51+00:00" }, { "name": "ondram/ci-detector", - "version": "4.1.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/OndraM/ci-detector.git", - "reference": "8a4b664e916df82ff26a44709942dfd593fa6f30" + "reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OndraM/ci-detector/zipball/8a4b664e916df82ff26a44709942dfd593fa6f30", - "reference": "8a4b664e916df82ff26a44709942dfd593fa6f30", + "url": "https://api.github.com/repos/OndraM/ci-detector/zipball/8b0223b5ed235fd377c75fdd1bfcad05c0f168b8", + "reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.2", - "lmc/coding-standard": "^1.3 || ^2.1", + "ergebnis/composer-normalize": "^2.13.2", + "lmc/coding-standard": "^3.0.0", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0.5", - "phpstan/phpstan": "^0.12.58", - "phpstan/phpstan-phpunit": "^0.12.16", - "phpunit/phpunit": "^7.1 || ^8.0 || ^9.0" + "phpstan/extension-installer": "^1.1.0", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpunit/phpunit": "^9.6.13" }, "type": "library", "autoload": { @@ -4873,46 +4871,40 @@ ], "support": { "issues": "https://github.com/OndraM/ci-detector/issues", - "source": "https://github.com/OndraM/ci-detector/tree/4.1.0" + "source": "https://github.com/OndraM/ci-detector/tree/4.2.0" }, - "time": "2021-04-14T09:16:52+00:00" + "time": "2024-03-12T13:22:30+00:00" }, { - "name": "orklah/psalm-insane-comparison", - "version": "v2.2.0", + "name": "openapi-tools/configuration", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/orklah/psalm-insane-comparison.git", - "reference": "f0e44bf31678d189c8ee4556598d0ad6e3f853c9" + "url": "https://github.com/php-openapi-tools/configuration.git", + "reference": "d5b09713a7f4341340b74c3534397cafc217b69c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orklah/psalm-insane-comparison/zipball/f0e44bf31678d189c8ee4556598d0ad6e3f853c9", - "reference": "f0e44bf31678d189c8ee4556598d0ad6e3f853c9", + "url": "https://api.github.com/repos/php-openapi-tools/configuration/zipball/d5b09713a7f4341340b74c3534397cafc217b69c", + "reference": "d5b09713a7f4341340b74c3534397cafc217b69c", "shasum": "" }, "require": { - "ext-simplexml": "*", - "php": "^7.3|^8.0" + "eventsauce/object-hydrator": "^1.4", + "jawira/case-converter": "^3.5", + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2" }, "require-dev": { - "nikic/php-parser": "^4.0", - "vimeo/psalm": "^4.0|^5" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Orklah\\PsalmInsaneComparison\\Plugin" - } + "wyrihaximus/test-utilities": "^5.6" }, + "default-branch": true, + "type": "library", "autoload": { "psr-4": { - "Orklah\\PsalmInsaneComparison\\": [ - "." - ], - "Orklah\\PsalmInsaneComparison\\Hooks\\": [ - "hooks" - ] + "OpenAPITools\\Configuration\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4921,166 +4913,744 @@ ], "authors": [ { - "name": "orklah" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Detects possible insane comparison (\"string\" == 0) to help migrate to PHP8", + "description": "Configuration for package generators", "support": { - "issues": "https://github.com/orklah/psalm-insane-comparison/issues", - "source": "https://github.com/orklah/psalm-insane-comparison/tree/v2.2.0" + "issues": "https://github.com/php-openapi-tools/configuration/issues", + "source": "https://github.com/php-openapi-tools/configuration/tree/main" }, - "time": "2023-01-06T09:06:11+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-08-29T06:16:47+00:00" }, { - "name": "pepakriz/phpstan-exception-rules", - "version": "v0.12.0", + "name": "openapi-tools/contract", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/pepakriz/phpstan-exception-rules.git", - "reference": "c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd" + "url": "https://github.com/php-openapi-tools/contract.git", + "reference": "23c1cb97f9f7020f0e3a0f720e04492991426f7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pepakriz/phpstan-exception-rules/zipball/c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd", - "reference": "c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd", + "url": "https://api.github.com/repos/php-openapi-tools/contract/zipball/23c1cb97f9f7020f0e3a0f720e04492991426f7b", + "reference": "23c1cb97f9f7020f0e3a0f720e04492991426f7b", "shasum": "" }, "require": { - "nikic/php-parser": "^4.13", - "php": ">=7.1", - "phpstan/phpstan": "^1.0" + "nikic/php-parser": "^4.18", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2" }, "require-dev": { - "nette/utils": "^3.0", - "php-parallel-lint/php-console-highlighter": "^0.4.0", - "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phpstan/phpstan-nette": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^7.5.6 || ^9.4.2", - "slevomat/coding-standard": "^6.4.1", - "squizlabs/php_codesniffer": "~3.5.2" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } + "wyrihaximus/test-utilities": "^5.6" }, + "default-branch": true, + "type": "library", "autoload": { "psr-4": { - "Pepakriz\\PHPStanExceptionRules\\": "src" + "OpenAPITools\\Contract\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Exception rules for PHPStan", + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Contracts for OpenAPI Tools", "support": { - "issues": "https://github.com/pepakriz/phpstan-exception-rules/issues", - "source": "https://github.com/pepakriz/phpstan-exception-rules/tree/v0.12.0" + "issues": "https://github.com/php-openapi-tools/contract/issues", + "source": "https://github.com/php-openapi-tools/contract/tree/main" }, - "time": "2021-11-07T19:03:56+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-10-22T11:01:06+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.3", + "name": "openapi-tools/gatherer", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "url": "https://github.com/php-openapi-tools/gatherer.git", + "reference": "1033338b0c2832f406febb89580687cdd1142419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/php-openapi-tools/gatherer/zipball/1033338b0c2832f406febb89580687cdd1142419", + "reference": "1033338b0c2832f406febb89580687cdd1142419", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" + "ckr/arraymerger": "^3.0", + "codeinc/http-reason-phrase-lookup": "^1.0", + "devizzent/cebe-php-openapi": "^1.0.3", + "eventsauce/object-hydrator": "^1.4", + "jawira/case-converter": "^3.5.1", + "kwn/number-to-words": "^2.9.1", + "nikic/php-parser": "^4.19.1", + "openapi-tools/configuration": "dev-main", + "openapi-tools/contract": "dev-main", + "openapi-tools/registry": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2", + "pointybeard/reverse-regex": "1.0.0.3", + "psr/http-message": "^1 || ^2 || ^3", + "thecodingmachine/safe": "^2.5" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "require-dev": { + "wyrihaximus/async-test-utilities": "^8.0.4" }, + "default-branch": true, + "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "OpenAPITools\\Gatherer\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "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" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "Utils for OpenAPI Tools", "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "issues": "https://github.com/php-openapi-tools/gatherer/issues", + "source": "https://github.com/php-openapi-tools/gatherer/tree/main" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-06-29T19:54:27+00:00" }, { - "name": "phar-io/version", - "version": "3.2.1", + "name": "openapi-tools/generator", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + "url": "https://github.com/php-openapi-tools/generator.git", + "reference": "bfded35c119a21bd4e0a789388af0b560b1eb335" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "url": "https://api.github.com/repos/php-openapi-tools/generator/zipball/bfded35c119a21bd4e0a789388af0b560b1eb335", + "reference": "bfded35c119a21bd4e0a789388af0b560b1eb335", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "openapi-tools/configuration": "dev-main", + "openapi-tools/contract": "dev-main", + "openapi-tools/gatherer": "dev-main", + "openapi-tools/registry": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2", + "thecodingmachine/safe": "^2.5", + "wyrihaximus/subsplit-tools": "dev-main" }, + "require-dev": { + "openapi-tools/generator-hydrator": "dev-main", + "openapi-tools/generator-schema": "dev-main", + "openapi-tools/generator-templates": "dev-main", + "wyrihaximus/test-utilities": "^5.6" + }, + "default-branch": true, + "bin": [ + "bin/openapi-generator" + ], "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "OpenAPITools\\Generator\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Package generation tool for OpenAPI Spec based packages", + "support": { + "issues": "https://github.com/php-openapi-tools/generator/issues", + "source": "https://github.com/php-openapi-tools/generator/tree/main" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-11-07T14:58:23+00:00" + }, + { + "name": "openapi-tools/generator-hydrator", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/php-openapi-tools/generator-hydrator.git", + "reference": "1776848e07d853d0664c9bee4ec1c3747c2faae4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-openapi-tools/generator-hydrator/zipball/1776848e07d853d0664c9bee4ec1c3747c2faae4", + "reference": "1776848e07d853d0664c9bee4ec1c3747c2faae4", + "shasum": "" + }, + "require": { + "eventsauce/object-hydrator": "^1.5", + "nikic/php-parser": "^4.19", + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2" + }, + "require-dev": { + "openapi-tools/gatherer": "dev-main", + "openapi-tools/test-data": "dev-main", + "wyrihaximus/test-utilities": "^6.0.10" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "OpenAPITools\\Generator\\Hydrator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Schema (+ contract + error) generator", + "support": { + "issues": "https://github.com/php-openapi-tools/generator-hydrator/issues", + "source": "https://github.com/php-openapi-tools/generator-hydrator/tree/main" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-11-08T18:46:48+00:00" + }, + { + "name": "openapi-tools/generator-schema", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/php-openapi-tools/generator-schema.git", + "reference": "b1a525e0677e4356baae186902549ba923b95b4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-openapi-tools/generator-schema/zipball/b1a525e0677e4356baae186902549ba923b95b4b", + "reference": "b1a525e0677e4356baae186902549ba923b95b4b", + "shasum": "" + }, + "require": { + "eventsauce/object-hydrator": "^1.5", + "ext-json": "^8.2", + "nikic/php-parser": "^4.19", + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2" + }, + "require-dev": { + "openapi-tools/gatherer": "dev-main", + "openapi-tools/test-data": "dev-main", + "wyrihaximus/test-utilities": "^6.0.10" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "OpenAPITools\\Generator\\Schema\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Schema (+ contract + error) generator", + "support": { + "issues": "https://github.com/php-openapi-tools/generator-schema/issues", + "source": "https://github.com/php-openapi-tools/generator-schema/tree/main" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-11-07T14:49:47+00:00" + }, + { + "name": "openapi-tools/generator-templates", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/php-openapi-tools/generator-templates.git", + "reference": "49815a0f6883c969f96ce9330c7dbc48942bf0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-openapi-tools/generator-templates/zipball/49815a0f6883c969f96ce9330c7dbc48942bf0bc", + "reference": "49815a0f6883c969f96ce9330c7dbc48942bf0bc", + "shasum": "" + }, + "require": { + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2", + "wyrihaximus/subsplit-tools": "dev-main" + }, + "require-dev": { + "openapi-tools/gatherer": "dev-main", + "openapi-tools/test-data": "dev-main", + "wyrihaximus/test-utilities": "^6.0.10" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "OpenAPITools\\Generator\\Templates\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Templates generator", + "support": { + "issues": "https://github.com/php-openapi-tools/generator-templates/issues", + "source": "https://github.com/php-openapi-tools/generator-templates/tree/main" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-11-07T06:56:28+00:00" + }, + { + "name": "openapi-tools/registry", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/php-openapi-tools/registry.git", + "reference": "83b08bb972e31d49a5d0bae5e7c05e3ee05f176f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-openapi-tools/registry/zipball/83b08bb972e31d49a5d0bae5e7c05e3ee05f176f", + "reference": "83b08bb972e31d49a5d0bae5e7c05e3ee05f176f", + "shasum": "" + }, + "require": { + "devizzent/cebe-php-openapi": "^1", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.2" + }, + "require-dev": { + "wyrihaximus/test-utilities": "^5.6" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "OpenAPITools\\Registry\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Class Registries for OpenAPI Tools", + "support": { + "issues": "https://github.com/php-openapi-tools/registry/issues", + "source": "https://github.com/php-openapi-tools/registry/tree/main" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2023-12-28T18:51:49+00:00" + }, + { + "name": "openapi-tools/representation", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/php-openapi-tools/representation.git", + "reference": "ab05885f0c812f5c4fc1c35bfcb870c6a137214a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-openapi-tools/representation/zipball/ab05885f0c812f5c4fc1c35bfcb870c6a137214a", + "reference": "ab05885f0c812f5c4fc1c35bfcb870c6a137214a", + "shasum": "" + }, + "require": { + "devizzent/cebe-php-openapi": "^1", + "openapi-tools/utils": "dev-main", + "php": "^8.2" + }, + "require-dev": { + "wyrihaximus/test-utilities": "^5.6" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "OpenAPITools\\Representation\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "User friendly OpenAPI Spec representation", + "support": { + "issues": "https://github.com/php-openapi-tools/representation/issues", + "source": "https://github.com/php-openapi-tools/representation/tree/main" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-08-06T13:25:14+00:00" + }, + { + "name": "openapi-tools/utils", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/php-openapi-tools/utils.git", + "reference": "e83f5d031f62a47419ea2da5751aee59d59a7b14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-openapi-tools/utils/zipball/e83f5d031f62a47419ea2da5751aee59d59a7b14", + "reference": "e83f5d031f62a47419ea2da5751aee59d59a7b14", + "shasum": "" + }, + "require": { + "eventsauce/object-hydrator": "^1.4", + "jawira/case-converter": "^3.5", + "php": "^8.2" + }, + "require-dev": { + "wyrihaximus/test-utilities": "^5.6" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "OpenAPITools\\Utils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Utils for OpenAPI Tools", + "support": { + "issues": "https://github.com/php-openapi-tools/utils/issues", + "source": "https://github.com/php-openapi-tools/utils/tree/main" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-11-06T11:34:41+00:00" + }, + { + "name": "orklah/psalm-insane-comparison", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/orklah/psalm-insane-comparison.git", + "reference": "d9e608e787e5ae1c994ae07095eea26029d6d0bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orklah/psalm-insane-comparison/zipball/d9e608e787e5ae1c994ae07095eea26029d6d0bd", + "reference": "d9e608e787e5ae1c994ae07095eea26029d6d0bd", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "php": "^7.3|^8.0", + "vimeo/psalm": "^4|^5|dev-master" + }, + "require-dev": { + "nikic/php-parser": "^4.0|^5" + }, + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "Orklah\\PsalmInsaneComparison\\Plugin" + } + }, + "autoload": { + "psr-4": { + "Orklah\\PsalmInsaneComparison\\": [ + "." + ], + "Orklah\\PsalmInsaneComparison\\Hooks\\": [ + "hooks" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "orklah" + } + ], + "description": "Detects possible insane comparison (\"string\" == 0) to help migrate to PHP8", + "support": { + "issues": "https://github.com/orklah/psalm-insane-comparison/issues", + "source": "https://github.com/orklah/psalm-insane-comparison/tree/v2.3.0" + }, + "time": "2024-03-20T21:49:45+00:00" + }, + { + "name": "pepakriz/phpstan-exception-rules", + "version": "v0.12.0", + "source": { + "type": "git", + "url": "https://github.com/pepakriz/phpstan-exception-rules.git", + "reference": "c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pepakriz/phpstan-exception-rules/zipball/c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd", + "reference": "c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.13", + "php": ">=7.1", + "phpstan/phpstan": "^1.0" + }, + "require-dev": { + "nette/utils": "^3.0", + "php-parallel-lint/php-console-highlighter": "^0.4.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-nette": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^7.5.6 || ^9.4.2", + "slevomat/coding-standard": "^6.4.1", + "squizlabs/php_codesniffer": "~3.5.2" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Pepakriz\\PHPStanExceptionRules\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Exception rules for PHPStan", + "support": { + "issues": "https://github.com/pepakriz/phpstan-exception-rules/issues", + "source": "https://github.com/pepakriz/phpstan-exception-rules/tree/v0.12.0" + }, + "time": "2021-11-07T19:03:56+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "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" + } + ], + "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/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "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", @@ -5101,28 +5671,28 @@ }, { "name": "php-coveralls/php-coveralls", - "version": "v2.6.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "9e88d7d38e9eab7c675da674481784321ea7a9bc" + "reference": "b36fa4394e519dafaddc04ae03976bc65a25ba15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/9e88d7d38e9eab7c675da674481784321ea7a9bc", - "reference": "9e88d7d38e9eab7c675da674481784321ea7a9bc", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/b36fa4394e519dafaddc04ae03976bc65a25ba15", + "reference": "b36fa4394e519dafaddc04ae03976bc65a25ba15", "shasum": "" }, "require": { "ext-json": "*", "ext-simplexml": "*", "guzzlehttp/guzzle": "^6.0 || ^7.0", - "php": "^5.5 || ^7.0 || ^8.0", + "php": "^7.0 || ^8.0", "psr/log": "^1.0 || ^2.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/config": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || >=8.0 <8.5.29 || >=9.0 <9.5.23", @@ -5178,9 +5748,9 @@ ], "support": { "issues": "https://github.com/php-coveralls/php-coveralls/issues", - "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.6.0" + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.7.0" }, - "time": "2023-07-16T08:39:10+00:00" + "time": "2023-11-22T10:21:01+00:00" }, { "name": "php-parallel-lint/php-console-color", @@ -5285,16 +5855,16 @@ }, { "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.3.2", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" + "reference": "6db563514f27e19595a19f45a4bf757b6401194e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6483c9832e71973ed29cf71bd6b3f4fde438a9de", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e", + "reference": "6db563514f27e19595a19f45a4bf757b6401194e", "shasum": "" }, "require": { @@ -5332,31 +5902,35 @@ "email": "ahoj@jakubonderka.cz" } ], - "description": "This tool check syntax of PHP files about 20x faster than serial check.", + "description": "This tool checks the syntax of PHP files about 20x faster than serial check.", "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", + "keywords": [ + "lint", + "static analysis" + ], "support": { "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.3.2" + "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.4.0" }, - "time": "2022-02-21T12:50:22+00:00" + "time": "2024-03-27T12:14:49+00:00" }, { "name": "php-standard-library/psalm-plugin", - "version": "2.2.1", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/php-standard-library/psalm-plugin.git", - "reference": "068bc7a8fcbe53658c94d54eec65205eb7e6caae" + "reference": "bf6d560ae498966150bc66a42e02744b0ee242c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-standard-library/psalm-plugin/zipball/068bc7a8fcbe53658c94d54eec65205eb7e6caae", - "reference": "068bc7a8fcbe53658c94d54eec65205eb7e6caae", + "url": "https://api.github.com/repos/php-standard-library/psalm-plugin/zipball/bf6d560ae498966150bc66a42e02744b0ee242c5", + "reference": "bf6d560ae498966150bc66a42e02744b0ee242c5", "shasum": "" }, "require": { "php": "^8.1", - "vimeo/psalm": "^5.0" + "vimeo/psalm": ">=5.16" }, "conflict": { "azjezz/psl": "<2.0" @@ -5390,9 +5964,9 @@ "description": "Psalm plugin for the PHP Standard Library", "support": { "issues": "https://github.com/php-standard-library/psalm-plugin/issues", - "source": "https://github.com/php-standard-library/psalm-plugin/tree/2.2.1" + "source": "https://github.com/php-standard-library/psalm-plugin/tree/2.3.0" }, - "time": "2022-12-06T10:44:56+00:00" + "time": "2023-11-28T12:22:48+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -5449,28 +6023,35 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", + "version": "5.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + "reference": "0c70d2c566e899666f367ab7b80986beb3581e6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/0c70d2c566e899666f367ab7b80986beb3581e6f", + "reference": "0c70d2c566e899666f367ab7b80986beb3581e6f", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.1", "ext-filter": "*", - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7", "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" + "mockery/mockery": "~1.3.5 || ~1.6.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "psalm/phar": "^5.26" }, "type": "library", "extra": { @@ -5494,35 +6075,35 @@ }, { "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "email": "opensource@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.3.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.5.1" }, - "time": "2021-10-19T17:43:47+00:00" + "time": "2024-11-06T11:58:54+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.3", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + "reference": "1fb5ba8d045f5dd984ebded5b1cc66f29459422d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/1fb5ba8d045f5dd984ebded5b1cc66f29459422d", + "reference": "1fb5ba8d045f5dd984ebded5b1cc66f29459422d", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" + "phpstan/phpdoc-parser": "^1.18" }, "require-dev": { "ext-tokenizer": "*", @@ -5558,35 +6139,35 @@ "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.7.3" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.9.0" }, - "time": "2023-08-12T11:01:26+00:00" + "time": "2024-11-03T20:11:34+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.17.0", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2" + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/15873c65b207b07765dbc3c95d20fdf4a320cbe2", - "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", + "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { "phpspec/phpspec": "^6.0 || ^7.0", "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^8.0 || ^9.0" + "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" }, "type": "library", "extra": { @@ -5619,6 +6200,7 @@ "keywords": [ "Double", "Dummy", + "dev", "fake", "mock", "spy", @@ -5626,33 +6208,33 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.17.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" }, - "time": "2023-02-02T15:41:36+00:00" + "time": "2024-02-29T11:52:51+00:00" }, { "name": "phpspec/prophecy-phpunit", - "version": "v2.0.2", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "9f26c224a2fa335f33e6666cc078fbf388255e87" + "reference": "16e1247e139434bce0bac09848bc5c8d882940fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/9f26c224a2fa335f33e6666cc078fbf388255e87", - "reference": "9f26c224a2fa335f33e6666cc078fbf388255e87", + "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/16e1247e139434bce0bac09848bc5c8d882940fc", + "reference": "16e1247e139434bce0bac09848bc5c8d882940fc", "shasum": "" }, "require": { "php": "^7.3 || ^8", - "phpspec/prophecy": "^1.3", - "phpunit/phpunit": "^9.1" + "phpspec/prophecy": "^1.18", + "phpunit/phpunit": "^9.1 || ^10.1 || ^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -5678,22 +6260,22 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.2" + "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.2.0" }, - "time": "2023-04-18T11:58:05+00:00" + "time": "2024-03-01T08:33:58+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.2", + "version": "1.33.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "bcad8d995980440892759db0c32acae7c8e79442" + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", - "reference": "bcad8d995980440892759db0c32acae7c8e79442", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", "shasum": "" }, "require": { @@ -5725,22 +6307,22 @@ "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/1.24.2" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0" }, - "time": "2023-09-26T12:28:12+00:00" + "time": "2024-10-13T11:25:22+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.39", + "version": "1.12.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4" + "reference": "f6a60a4d66142b8156c9da923f1972657bc4748c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d9dedb0413f678b4d03cbc2279a48f91592c97c4", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f6a60a4d66142b8156c9da923f1972657bc4748c", + "reference": "f6a60a4d66142b8156c9da923f1972657bc4748c", "shasum": "" }, "require": { @@ -5783,35 +6365,30 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2023-10-17T15:46:26+00:00" + "time": "2024-11-06T19:06:49+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.1.4", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa" + "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/f94d246cc143ec5a23da868f8f7e1393b50eaa82", + "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10.3" + "phpstan/phpstan": "^1.12" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-php-parser": "^1.1", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^9.5" }, @@ -5835,34 +6412,34 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.4" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.1" }, - "time": "2023-08-05T09:02:04+00:00" + "time": "2024-09-11T15:52:35+00:00" }, { "name": "phpstan/phpstan-mockery", - "version": "1.1.1", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-mockery.git", - "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6" + "reference": "98cac6e256b4ee60fdeb26a7dd81bb271b454e80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", - "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", + "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/98cac6e256b4ee60fdeb26a7dd81bb271b454e80", + "reference": "98cac6e256b4ee60fdeb26a7dd81bb271b454e80", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.12" }, "require-dev": { - "mockery/mockery": "^1.2.4", + "mockery/mockery": "^1.6.11", "nikic/php-parser": "^4.13.0", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-strict-rules": "^1.6", "phpunit/phpunit": "^9.5" }, "type": "phpstan-extension", @@ -5885,9 +6462,9 @@ "description": "PHPStan Mockery extension", "support": { "issues": "https://github.com/phpstan/phpstan-mockery/issues", - "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.1" + "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.3" }, - "time": "2023-02-18T13:54:03+00:00" + "time": "2024-09-11T15:47:29+00:00" }, { "name": "phpstan/phpstan-php-parser", @@ -5943,21 +6520,21 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.15", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a" + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", - "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/f3ea021866f4263f07ca3636bf22c64be9610c11", + "reference": "f3ea021866f4263f07ca3636bf22c64be9610c11", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.11" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -5989,27 +6566,27 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.15" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.4.0" }, - "time": "2023-10-09T18:58:39+00:00" + "time": "2024-04-20T06:39:00+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.5.1", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6" + "reference": "daeec748b53de80a97498462513066834ec28f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b21c03d4f6f3a446e4311155f4be9d65048218e6", - "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/daeec748b53de80a97498462513066834ec28f8b", + "reference": "daeec748b53de80a97498462513066834ec28f8b", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.12.4" }, "require-dev": { "nikic/php-parser": "^4.13.0", @@ -6038,41 +6615,41 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.1" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.1" }, - "time": "2023-03-29T14:47:40+00:00" + "time": "2024-09-20T14:04:44+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "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/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "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" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -6081,7 +6658,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -6110,7 +6687,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/9.2.32" }, "funding": [ { @@ -6118,7 +6695,7 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6363,45 +6940,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "9.6.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "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", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", "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", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "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/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -6446,7 +7023,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/9.6.21" }, "funding": [ { @@ -6462,7 +7039,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2024-09-19T10:50:18+00:00" }, { "name": "pointybeard/reverse-regex", @@ -6745,20 +7322,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -6782,7 +7359,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -6794,9 +7371,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -7060,26 +7637,26 @@ }, { "name": "react/async", - "version": "v4.1.0", + "version": "v4.3.0", "source": { "type": "git", "url": "https://github.com/reactphp/async.git", - "reference": "b9641ac600b4b144e71a87dcf1be4d41dd3a3548" + "reference": "635d50e30844a484495713e8cb8d9e079c0008a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/async/zipball/b9641ac600b4b144e71a87dcf1be4d41dd3a3548", - "reference": "b9641ac600b4b144e71a87dcf1be4d41dd3a3548", + "url": "https://api.github.com/repos/reactphp/async/zipball/635d50e30844a484495713e8cb8d9e079c0008a5", + "reference": "635d50e30844a484495713e8cb8d9e079c0008a5", "shasum": "" }, "require": { "php": ">=8.1", "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.8 || ^1.2.1" + "react/promise": "^3.2 || ^2.8 || ^1.2.1" }, "require-dev": { - "phpstan/phpstan": "1.10.18", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan": "1.10.39", + "phpunit/phpunit": "^9.6" }, "type": "library", "autoload": { @@ -7123,7 +7700,7 @@ ], "support": { "issues": "https://github.com/reactphp/async/issues", - "source": "https://github.com/reactphp/async/tree/v4.1.0" + "source": "https://github.com/reactphp/async/tree/v4.3.0" }, "funding": [ { @@ -7131,7 +7708,7 @@ "type": "open_collective" } ], - "time": "2023-06-22T14:10:50+00:00" + "time": "2024-06-04T14:40:02+00:00" }, { "name": "react/cache", @@ -7207,28 +7784,28 @@ }, { "name": "react/dns", - "version": "v1.11.0", + "version": "v1.13.0", "source": { "type": "git", "url": "https://github.com/reactphp/dns.git", - "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f" + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", - "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", + "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", "shasum": "" }, "require": { "php": ">=5.3.0", "react/cache": "^1.0 || ^0.6 || ^0.5", "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.7 || ^1.2.1" + "react/promise": "^3.2 || ^2.7 || ^1.2.1" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^4.8.35", - "react/async": "^4 || ^3 || ^2", - "react/promise-timer": "^1.9" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" }, "type": "library", "autoload": { @@ -7271,7 +7848,7 @@ ], "support": { "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.11.0" + "source": "https://github.com/reactphp/dns/tree/v1.13.0" }, "funding": [ { @@ -7279,20 +7856,20 @@ "type": "open_collective" } ], - "time": "2023-06-02T12:45:26+00:00" + "time": "2024-06-13T14:18:03+00:00" }, { "name": "react/event-loop", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05" + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6e7e587714fff7a83dcc7025aee42ab3b265ae05", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", "shasum": "" }, "require": { @@ -7343,7 +7920,7 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.4.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" }, "funding": [ { @@ -7351,20 +7928,20 @@ "type": "open_collective" } ], - "time": "2023-05-05T10:11:24+00:00" + "time": "2023-11-13T13:48:05+00:00" }, { "name": "react/http", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/reactphp/http.git", - "reference": "bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0" + "reference": "8111281ee57f22b7194f5dba225e609ba7ce4d20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/http/zipball/bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0", - "reference": "bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0", + "url": "https://api.github.com/repos/reactphp/http/zipball/8111281ee57f22b7194f5dba225e609ba7ce4d20", + "reference": "8111281ee57f22b7194f5dba225e609ba7ce4d20", "shasum": "" }, "require": { @@ -7375,14 +7952,13 @@ "react/event-loop": "^1.2", "react/promise": "^3 || ^2.3 || ^1.2.1", "react/socket": "^1.12", - "react/stream": "^1.2", - "ringcentral/psr7": "^1.2" + "react/stream": "^1.2" }, "require-dev": { "clue/http-proxy-react": "^1.8", "clue/reactphp-ssh-proxy": "^1.4", "clue/socks-react": "^1.4", - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", "react/async": "^4 || ^3 || ^2", "react/promise-stream": "^1.4", "react/promise-timer": "^1.9" @@ -7435,7 +8011,7 @@ ], "support": { "issues": "https://github.com/reactphp/http/issues", - "source": "https://github.com/reactphp/http/tree/v1.9.0" + "source": "https://github.com/reactphp/http/tree/v1.10.0" }, "funding": [ { @@ -7443,27 +8019,28 @@ "type": "open_collective" } ], - "time": "2023-04-26T10:29:24+00:00" + "time": "2024-03-27T17:20:46+00:00" }, { "name": "react/promise", - "version": "v2.10.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" + "reference": "8a164643313c71354582dc850b42b33fa12a4b63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", - "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", "autoload": { @@ -7507,7 +8084,7 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.10.0" + "source": "https://github.com/reactphp/promise/tree/v3.2.0" }, "funding": [ { @@ -7515,40 +8092,40 @@ "type": "open_collective" } ], - "time": "2023-05-02T15:15:43+00:00" + "time": "2024-05-24T10:39:05+00:00" }, { "name": "react/socket", - "version": "v1.14.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "21591111d3ea62e31f2254280ca0656bc2b1bda6" + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/21591111d3ea62e31f2254280ca0656bc2b1bda6", - "reference": "21591111d3ea62e31f2254280ca0656bc2b1bda6", + "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", - "react/dns": "^1.11", + "react/dns": "^1.13", "react/event-loop": "^1.2", - "react/promise": "^3 || ^2.6 || ^1.2.1", - "react/stream": "^1.2" + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", - "react/async": "^4 || ^3 || ^2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3.3 || ^2", "react/promise-stream": "^1.4", - "react/promise-timer": "^1.10" + "react/promise-timer": "^1.11" }, "type": "library", "autoload": { "psr-4": { - "React\\Socket\\": "src" + "React\\Socket\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -7587,7 +8164,7 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.14.0" + "source": "https://github.com/reactphp/socket/tree/v1.16.0" }, "funding": [ { @@ -7595,20 +8172,20 @@ "type": "open_collective" } ], - "time": "2023-08-25T13:48:09+00:00" + "time": "2024-07-26T10:38:09+00:00" }, { "name": "react/stream", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/reactphp/stream.git", - "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66" + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/6fbc9672905c7d5a885f2da2fc696f65840f4a66", - "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", "shasum": "" }, "require": { @@ -7618,7 +8195,7 @@ }, "require-dev": { "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -7665,7 +8242,7 @@ ], "support": { "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.3.0" + "source": "https://github.com/reactphp/stream/tree/v1.4.0" }, "funding": [ { @@ -7673,25 +8250,25 @@ "type": "open_collective" } ], - "time": "2023-06-16T10:52:11+00:00" + "time": "2024-06-11T12:45:25+00:00" }, { "name": "reactivex/rxphp", - "version": "2.0.11", + "version": "2.0.13", "source": { "type": "git", "url": "https://github.com/ReactiveX/RxPHP.git", - "reference": "dde8aec9b3a0f4913cd38203d29c6adad73194d6" + "reference": "e910b35556bceef81a19d54f34df269b643b0289" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ReactiveX/RxPHP/zipball/dde8aec9b3a0f4913cd38203d29c6adad73194d6", - "reference": "dde8aec9b3a0f4913cd38203d29c6adad73194d6", + "url": "https://api.github.com/repos/ReactiveX/RxPHP/zipball/e910b35556bceef81a19d54f34df269b643b0289", + "reference": "e910b35556bceef81a19d54f34df269b643b0289", "shasum": "" }, "require": { "php": ">=7.0.0", - "react/promise": "~2.2" + "react/promise": "^3 || ~2.2" }, "require-dev": { "phpunit/phpunit": "^8.5 || ^9", @@ -7739,9 +8316,9 @@ ], "support": { "issues": "https://github.com/ReactiveX/RxPHP/issues", - "source": "https://github.com/ReactiveX/RxPHP/tree/2.0.11" + "source": "https://github.com/ReactiveX/RxPHP/tree/2.0.13" }, - "time": "2022-09-10T17:05:40+00:00" + "time": "2024-09-21T23:52:59+00:00" }, { "name": "respect/stringifier", @@ -7799,41 +8376,42 @@ }, { "name": "respect/validation", - "version": "2.2.4", + "version": "2.3.7", "source": { "type": "git", "url": "https://github.com/Respect/Validation.git", - "reference": "d304ace5325efd7180daffb1f8627bb0affd4e3a" + "reference": "967f7b6cc71e3728bb0f766cc1aea0604b2955aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Respect/Validation/zipball/d304ace5325efd7180daffb1f8627bb0affd4e3a", - "reference": "d304ace5325efd7180daffb1f8627bb0affd4e3a", + "url": "https://api.github.com/repos/Respect/Validation/zipball/967f7b6cc71e3728bb0f766cc1aea0604b2955aa", + "reference": "967f7b6cc71e3728bb0f766cc1aea0604b2955aa", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0 || ^8.1 || ^8.2", + "php": "^8.1 || ^8.2", "respect/stringifier": "^0.2.0", "symfony/polyfill-mbstring": "^1.2" }, "require-dev": { "egulias/email-validator": "^3.0", - "malukenho/docheader": "^0.1", + "giggsey/libphonenumber-for-php-lite": "^8.13", + "malukenho/docheader": "^1.0", "mikey179/vfsstream": "^1.6", "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.1", "phpstan/phpstan-phpunit": "^1.3", "phpunit/phpunit": "^9.6", "psr/http-message": "^1.0", - "respect/coding-standard": "^3.0", - "squizlabs/php_codesniffer": "^3.7", - "symfony/validator": "^3.0||^4.0" + "respect/coding-standard": "^4.0", + "squizlabs/php_codesniffer": "^3.7" }, "suggest": { - "egulias/email-validator": "Strict (RFC compliant) email validation", + "egulias/email-validator": "Improves the Email rule if available", "ext-bcmath": "Arbitrary Precision Mathematics", "ext-fileinfo": "File Information", - "ext-mbstring": "Multibyte String Functions" + "ext-mbstring": "Multibyte String Functions", + "giggsey/libphonenumber-for-php-lite": "Enables the phone rule if available" }, "type": "library", "autoload": { @@ -7860,22 +8438,22 @@ ], "support": { "issues": "https://github.com/Respect/Validation/issues", - "source": "https://github.com/Respect/Validation/tree/2.2.4" + "source": "https://github.com/Respect/Validation/tree/2.3.7" }, - "time": "2023-02-15T01:05:24+00:00" + "time": "2024-04-13T09:45:55+00:00" }, { "name": "revolt/event-loop", - "version": "v1.0.3", + "version": "v1.0.6", "source": { "type": "git", "url": "https://github.com/revoltphp/event-loop.git", - "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03" + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/0fe2d31e1cddd26664e55d383d3d5da613334c03", - "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", "shasum": "" }, "require": { @@ -7885,7 +8463,7 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^9", - "psalm/phar": "^4.7" + "psalm/phar": "^5.15" }, "type": "library", "extra": { @@ -7932,9 +8510,9 @@ ], "support": { "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.3" + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" }, - "time": "2023-07-29T17:07:12+00:00" + "time": "2023-11-30T05:34:44+00:00" }, { "name": "ringcentral/psr7", @@ -7999,16 +8577,16 @@ }, { "name": "riverline/multipart-parser", - "version": "2.1.1", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/Riverline/multipart-parser.git", - "reference": "2418bdfc2eab01e39bcffee808b1a365c166292a" + "reference": "7a9f4646db5181516c61b8e0225a343189beedcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Riverline/multipart-parser/zipball/2418bdfc2eab01e39bcffee808b1a365c166292a", - "reference": "2418bdfc2eab01e39bcffee808b1a365c166292a", + "url": "https://api.github.com/repos/Riverline/multipart-parser/zipball/7a9f4646db5181516c61b8e0225a343189beedcd", + "reference": "7a9f4646db5181516c61b8e0225a343189beedcd", "shasum": "" }, "require": { @@ -8049,32 +8627,31 @@ ], "support": { "issues": "https://github.com/Riverline/multipart-parser/issues", - "source": "https://github.com/Riverline/multipart-parser/tree/2.1.1" + "source": "https://github.com/Riverline/multipart-parser/tree/2.1.2" }, - "time": "2023-04-28T18:53:59+00:00" + "time": "2024-03-12T16:46:05+00:00" }, { "name": "roave/backward-compatibility-check", - "version": "8.3.0", + "version": "8.6.0", "source": { "type": "git", "url": "https://github.com/Roave/BackwardCompatibilityCheck.git", - "reference": "40956d53832b80dd4025c87b4cf5e1756f42f43d" + "reference": "5e533114a996f73a7551846c06c59a80185f4d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/40956d53832b80dd4025c87b4cf5e1756f42f43d", - "reference": "40956d53832b80dd4025c87b4cf5e1756f42f43d", + "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/5e533114a996f73a7551846c06c59a80185f4d16", + "reference": "5e533114a996f73a7551846c06c59a80185f4d16", "shasum": "" }, "require": { "azjezz/psl": "^2.3.1", - "composer/composer": "^2.5.1", - "ext-json": "*", + "composer/composer": "^2.6.4", "nikic/php-parser": "^4.15.3", "nikolaposa/version": "^4.1.0", "ocramius/package-versions": "^2.7.0", - "php": "~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "roave/better-reflection": "^6.5.0", "symfony/console": "^6.2.3" }, @@ -8083,7 +8660,7 @@ "symfony/process": "<5.3.7" }, "require-dev": { - "doctrine/coding-standard": "^11.0.0", + "doctrine/coding-standard": "^12.0.0", "php-standard-library/psalm-plugin": "^2.2.1", "phpunit/phpunit": "^9.5.27", "psalm/plugin-phpunit": "^0.18.4", @@ -8118,42 +8695,34 @@ "description": "Tool to compare two revisions of a public API to check for BC breaks", "support": { "issues": "https://github.com/Roave/BackwardCompatibilityCheck/issues", - "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.3.0" + "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.6.0" }, - "time": "2023-02-11T17:26:11+00:00" + "time": "2023-12-20T14:01:33+00:00" }, { "name": "roave/better-reflection", - "version": "6.15.0", + "version": "6.26.0", "source": { "type": "git", "url": "https://github.com/Roave/BetterReflection.git", - "reference": "19b15d504ca61c5b5f10f5aafb329234c8eeaed2" + "reference": "658309b70c5afd7b9cfaad20c18aff3943cce23a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/19b15d504ca61c5b5f10f5aafb329234c8eeaed2", - "reference": "19b15d504ca61c5b5f10f5aafb329234c8eeaed2", + "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/658309b70c5afd7b9cfaad20c18aff3943cce23a", + "reference": "658309b70c5afd7b9cfaad20c18aff3943cce23a", "shasum": "" }, "require": { "ext-json": "*", - "jetbrains/phpstorm-stubs": "2023.2", - "nikic/php-parser": "^4.17.1", - "php": "~8.1.0 || ~8.2.0", - "roave/signature": "^1.7" + "jetbrains/phpstorm-stubs": "2023.3", + "nikic/php-parser": "^4.18.0", + "php": "~8.2.0 || ~8.3.2", + "roave/signature": "^1.8.0" }, "conflict": { "thecodingmachine/safe": "<1.1.3" }, - "require-dev": { - "doctrine/coding-standard": "^12.0.0", - "phpstan/phpstan": "^1.10.37", - "phpstan/phpstan-phpunit": "^1.3.14", - "phpunit/phpunit": "^10.4.0", - "roave/infection-static-analysis-plugin": "^1.33.0", - "vimeo/psalm": "5.15.0" - }, "suggest": { "composer/composer": "Required to use the ComposerSourceLocator" }, @@ -8192,34 +8761,34 @@ "description": "Better Reflection - an improved code reflection API", "support": { "issues": "https://github.com/Roave/BetterReflection/issues", - "source": "https://github.com/Roave/BetterReflection/tree/6.15.0" + "source": "https://github.com/Roave/BetterReflection/tree/6.26.0" }, - "time": "2023-10-06T14:31:35+00:00" + "time": "2024-03-11T17:43:07+00:00" }, { "name": "roave/infection-static-analysis-plugin", - "version": "1.33.0", + "version": "1.35.0", "source": { "type": "git", "url": "https://github.com/Roave/infection-static-analysis-plugin.git", - "reference": "3dd4ea3d5c4b380bb426c8b943328796a5664587" + "reference": "3cb32845c5f758913a4b9eafd91ae18eafc26d82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/infection-static-analysis-plugin/zipball/3dd4ea3d5c4b380bb426c8b943328796a5664587", - "reference": "3dd4ea3d5c4b380bb426c8b943328796a5664587", + "url": "https://api.github.com/repos/Roave/infection-static-analysis-plugin/zipball/3cb32845c5f758913a4b9eafd91ae18eafc26d82", + "reference": "3cb32845c5f758913a4b9eafd91ae18eafc26d82", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", - "infection/infection": "0.27.0", + "infection/infection": "0.27.10", "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "sanmai/later": "^0.1.2", + "sanmai/later": "^0.1.4", "vimeo/psalm": "^4.30.0 || ^5.15" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", - "phpunit/phpunit": "^10.3.4" + "phpunit/phpunit": "^10.5.12" }, "bin": [ "bin/roave-infection-static-analysis-plugin" @@ -8243,32 +8812,32 @@ "description": "Static analysis on top of mutation testing - prevents escaped mutants from being invalid according to static analysis", "support": { "issues": "https://github.com/Roave/infection-static-analysis-plugin/issues", - "source": "https://github.com/Roave/infection-static-analysis-plugin/tree/1.33.0" + "source": "https://github.com/Roave/infection-static-analysis-plugin/tree/1.35.0" }, - "time": "2023-09-15T10:43:53+00:00" + "time": "2024-03-10T11:55:48+00:00" }, { "name": "roave/signature", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/Roave/Signature.git", - "reference": "2ab4eadcb9f9d449f673a97b67797403b35eca94" + "reference": "f92ce20f82c9a1df3b50fc56fbdaeb82cf4c9c5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/Signature/zipball/2ab4eadcb9f9d449f673a97b67797403b35eca94", - "reference": "2ab4eadcb9f9d449f673a97b67797403b35eca94", + "url": "https://api.github.com/repos/Roave/Signature/zipball/f92ce20f82c9a1df3b50fc56fbdaeb82cf4c9c5b", + "reference": "f92ce20f82c9a1df3b50fc56fbdaeb82cf4c9c5b", "shasum": "" }, "require": { - "php": "8.0.*|8.1.*|8.2.*" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "doctrine/coding-standard": "^10.0.0", - "infection/infection": "^0.26.15", - "phpunit/phpunit": "^9.5.25", - "vimeo/psalm": "^4.28.0" + "doctrine/coding-standard": "^12.0.0", + "infection/infection": "^0.26.19", + "phpunit/phpunit": "^9.6.7", + "vimeo/psalm": "^5.9.0" }, "type": "library", "autoload": { @@ -8283,37 +8852,43 @@ "description": "Sign and verify stuff", "support": { "issues": "https://github.com/Roave/Signature/issues", - "source": "https://github.com/Roave/Signature/tree/1.7.0" + "source": "https://github.com/Roave/Signature/tree/1.8.0" }, - "time": "2022-10-10T08:44:53+00:00" + "time": "2023-11-25T00:11:29+00:00" }, { "name": "sanmai/later", - "version": "0.1.2", + "version": "0.1.4", "source": { "type": "git", "url": "https://github.com/sanmai/later.git", - "reference": "9b659fecef2030193fd02402955bc39629d5606f" + "reference": "e24c4304a4b1349c2a83151a692cec0c10579f60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sanmai/later/zipball/9b659fecef2030193fd02402955bc39629d5606f", - "reference": "9b659fecef2030193fd02402955bc39629d5606f", + "url": "https://api.github.com/repos/sanmai/later/zipball/e24c4304a4b1349c2a83151a692cec0c10579f60", + "reference": "e24c4304a4b1349c2a83151a692cec0c10579f60", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.4" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.13", - "infection/infection": ">=0.10.5", + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^3.35.1", + "infection/infection": ">=0.27.6", "phan/phan": ">=2", "php-coveralls/php-coveralls": "^2.0", - "phpstan/phpstan": ">=0.10", - "phpunit/phpunit": ">=7.4", + "phpstan/phpstan": ">=1.4.5", + "phpunit/phpunit": ">=9.5 <10", "vimeo/psalm": ">=2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + } + }, "autoload": { "files": [ "src/functions.php" @@ -8335,7 +8910,7 @@ "description": "Later: deferred wrapper object", "support": { "issues": "https://github.com/sanmai/later/issues", - "source": "https://github.com/sanmai/later/tree/0.1.2" + "source": "https://github.com/sanmai/later/tree/0.1.4" }, "funding": [ { @@ -8343,20 +8918,20 @@ "type": "github" } ], - "time": "2021-01-02T10:26:44+00:00" + "time": "2023-10-24T00:25:28+00:00" }, { "name": "sanmai/pipeline", - "version": "v6.9", + "version": "v6.11", "source": { "type": "git", "url": "https://github.com/sanmai/pipeline.git", - "reference": "c48f45c22c3ce4140d071f7658fb151df1cc08ea" + "reference": "a5fa2a6c6ca93efa37e7c24aab72f47448a6b110" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sanmai/pipeline/zipball/c48f45c22c3ce4140d071f7658fb151df1cc08ea", - "reference": "c48f45c22c3ce4140d071f7658fb151df1cc08ea", + "url": "https://api.github.com/repos/sanmai/pipeline/zipball/a5fa2a6c6ca93efa37e7c24aab72f47448a6b110", + "reference": "a5fa2a6c6ca93efa37e7c24aab72f47448a6b110", "shasum": "" }, "require": { @@ -8400,7 +8975,7 @@ "description": "General-purpose collections pipeline", "support": { "issues": "https://github.com/sanmai/pipeline/issues", - "source": "https://github.com/sanmai/pipeline/tree/v6.9" + "source": "https://github.com/sanmai/pipeline/tree/v6.11" }, "funding": [ { @@ -8408,20 +8983,20 @@ "type": "github" } ], - "time": "2023-10-08T11:56:54+00:00" + "time": "2024-06-15T03:11:19+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "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/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -8456,7 +9031,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/1.0.2" }, "funding": [ { @@ -8464,7 +9039,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -8653,20 +9228,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -8698,7 +9273,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -8706,20 +9281,20 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -8764,7 +9339,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -8772,7 +9347,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -8839,16 +9414,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -8904,7 +9479,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -8912,20 +9487,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "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/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -8968,7 +9543,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -8976,24 +9551,24 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "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/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -9025,7 +9600,7 @@ "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" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -9033,7 +9608,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -9212,16 +9787,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -9233,7 +9808,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -9254,8 +9829,7 @@ "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/resource-operations/tree/3.0.4" }, "funding": [ { @@ -9263,7 +9837,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -9376,23 +9950,23 @@ }, { "name": "seld/jsonlint", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/1748aaf847fc731cfad7725aec413ee46f0cc3a2", + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.5", + "phpstan/phpstan": "^1.11", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ @@ -9412,7 +9986,7 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "JSON Linter", @@ -9424,7 +9998,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" + "source": "https://github.com/Seldaek/jsonlint/tree/1.11.0" }, "funding": [ { @@ -9436,7 +10010,7 @@ "type": "tidelift" } ], - "time": "2023-05-11T13:16:46+00:00" + "time": "2024-07-11T14:55:45+00:00" }, { "name": "seld/phar-utils", @@ -9549,32 +10123,32 @@ }, { "name": "slevomat/coding-standard", - "version": "8.14.1", + "version": "8.15.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926" + "reference": "7d1d957421618a3803b593ec31ace470177d7817" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926", - "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/7d1d957421618a3803b593ec31ace470177d7817", + "reference": "7d1d957421618a3803b593ec31ace470177d7817", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", "phpstan/phpdoc-parser": "^1.23.1", - "squizlabs/php_codesniffer": "^3.7.1" + "squizlabs/php_codesniffer": "^3.9.0" }, "require-dev": { "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.37", + "phpstan/phpstan": "1.10.60", "phpstan/phpstan-deprecation-rules": "1.1.4", - "phpstan/phpstan-phpunit": "1.3.14", - "phpstan/phpstan-strict-rules": "1.5.1", - "phpunit/phpunit": "8.5.21|9.6.8|10.3.5" + "phpstan/phpstan-phpunit": "1.3.16", + "phpstan/phpstan-strict-rules": "1.5.2", + "phpunit/phpunit": "8.5.21|9.6.8|10.5.11" }, "type": "phpcodesniffer-standard", "extra": { @@ -9598,7 +10172,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.14.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.15.0" }, "funding": [ { @@ -9610,20 +10184,20 @@ "type": "tidelift" } ], - "time": "2023-10-08T07:28:08+00:00" + "time": "2024-03-09T15:20:58+00:00" }, { "name": "spatie/array-to-xml", - "version": "3.2.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7" + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f9ab39c808500c347d5a8b6b13310bd5221e39e7", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f56b220fe2db1ade4c88098d83413ebdfc3bf876", + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876", "shasum": "" }, "require": { @@ -9636,6 +10210,11 @@ "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Spatie\\ArrayToXml\\": "src" @@ -9661,7 +10240,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.0" + "source": "https://github.com/spatie/array-to-xml/tree/3.3.0" }, "funding": [ { @@ -9673,20 +10252,20 @@ "type": "github" } ], - "time": "2023-07-19T18:30:26+00:00" + "time": "2024-05-01T10:20:27+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.10.3", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -9696,11 +10275,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -9715,53 +10294,76 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "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", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-09-18T10:38:58+00:00" }, { "name": "symfony/config", - "version": "v6.3.2", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467" + "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", - "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", + "url": "https://api.github.com/repos/symfony/config/zipball/dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", + "reference": "dc373a5cbd345354696f5dfd39c5c7a8ea23f4c8", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^5.4|^6.0", + "symfony/filesystem": "^7.1", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<5.4", + "symfony/finder": "<6.4", "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/messenger": "^5.4|^6.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0" + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -9789,7 +10391,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.3.2" + "source": "https://github.com/symfony/config/tree/v7.1.7" }, "funding": [ { @@ -9805,20 +10407,20 @@ "type": "tidelift" } ], - "time": "2023-07-19T20:22:16+00:00" + "time": "2024-11-04T11:34:07+00:00" }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v6.4.14", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/897c2441ed4eec8a8a2c37b943427d24dba3f26b", + "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b", "shasum": "" }, "require": { @@ -9826,7 +10428,7 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { "symfony/dependency-injection": "<5.4", @@ -9840,12 +10442,16 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -9879,7 +10485,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.4.14" }, "funding": [ { @@ -9895,44 +10501,43 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2024-11-05T15:34:40+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.3.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "2ed62b3bf98346e1f45529a7b6be2196739bb993" + "reference": "1f12f9d580ef8dd09e3b756aa111cc2d5f311bfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2ed62b3bf98346e1f45529a7b6be2196739bb993", - "reference": "2ed62b3bf98346e1f45529a7b6be2196739bb993", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1f12f9d580ef8dd09e3b756aa111cc2d5f311bfd", + "reference": "1f12f9d580ef8dd09e3b756aa111cc2d5f311bfd", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.2.10" + "symfony/service-contracts": "^3.5", + "symfony/var-exporter": "^6.4|^7.0" }, "conflict": { "ext-psr": "<1.1|>=2", - "symfony/config": "<6.1", - "symfony/finder": "<5.4", - "symfony/proxy-manager-bridge": "<6.3", - "symfony/yaml": "<5.4" + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { "psr/container-implementation": "1.1|2.0", "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^6.1", - "symfony/expression-language": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" + "symfony/config": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -9960,7 +10565,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.3.5" + "source": "https://github.com/symfony/dependency-injection/tree/v7.1.6" }, "funding": [ { @@ -9976,20 +10581,20 @@ "type": "tidelift" } ], - "time": "2023-09-25T16:46:40+00:00" + "time": "2024-10-25T15:11:02+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { @@ -9998,7 +10603,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -10027,7 +10632,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -10043,27 +10648,30 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c835867b3c62bb05c7fe3d637c871c7ae52024d4", + "reference": "c835867b3c62bb05c7fe3d637c871c7ae52024d4", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, + "require-dev": { + "symfony/process": "^6.4|^7.0" + }, "type": "library", "autoload": { "psr-4": { @@ -10090,7 +10698,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "source": "https://github.com/symfony/filesystem/tree/v7.1.6" }, "funding": [ { @@ -10106,27 +10714,27 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2024-10-25T15:11:02+00:00" }, { "name": "symfony/finder", - "version": "v6.3.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" + "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/2cb89664897be33f78c65d3d2845954c8d7a43b8", + "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -10154,7 +10762,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.5" + "source": "https://github.com/symfony/finder/tree/v7.1.6" }, "funding": [ { @@ -10170,24 +10778,24 @@ "type": "tidelift" } ], - "time": "2023-09-26T12:56:25+00:00" + "time": "2024-10-01T08:31:23+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -10197,9 +10805,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -10236,7 +10841,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -10252,33 +10857,30 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -10317,7 +10919,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -10333,33 +10935,30 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -10401,7 +11000,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -10417,24 +11016,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -10444,9 +11043,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -10484,7 +11080,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -10500,30 +11096,103 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" + }, + "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": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -10534,7 +11203,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "classmap": [ "Resources/stubs" @@ -10545,6 +11214,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -10554,7 +11227,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -10563,7 +11236,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -10579,30 +11252,27 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "name": "symfony/polyfill-php81", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -10613,7 +11283,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, "classmap": [ "Resources/stubs" @@ -10624,10 +11294,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -10637,7 +11303,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -10646,7 +11312,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -10662,30 +11328,27 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "name": "symfony/polyfill-php83", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -10696,7 +11359,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" + "Symfony\\Polyfill\\Php83\\": "" }, "classmap": [ "Resources/stubs" @@ -10716,7 +11379,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -10725,7 +11388,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" }, "funding": [ { @@ -10741,24 +11404,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v6.3.4", + "version": "v7.1.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "reference": "9b8a40b7289767aa7117e957573c2a535efe6585" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/symfony/process/zipball/9b8a40b7289767aa7117e957573c2a535efe6585", + "reference": "9b8a40b7289767aa7117e957573c2a535efe6585", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -10786,7 +11449,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.4" + "source": "https://github.com/symfony/process/tree/v7.1.7" }, "funding": [ { @@ -10802,29 +11465,28 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:39:22+00:00" + "time": "2024-11-06T09:25:12+00:00" }, { "name": "symfony/property-access", - "version": "v6.3.2", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "2dc4f9da444b8f8ff592e95d570caad67924f1d0" + "reference": "975d7f7fd8fcb952364c6badc46d01a580532bf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/2dc4f9da444b8f8ff592e95d570caad67924f1d0", - "reference": "2dc4f9da444b8f8ff592e95d570caad67924f1d0", + "url": "https://api.github.com/repos/symfony/property-access/zipball/975d7f7fd8fcb952364c6badc46d01a580532bf9", + "reference": "975d7f7fd8fcb952364c6badc46d01a580532bf9", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/property-info": "^5.4|^6.0" + "php": ">=8.2", + "symfony/property-info": "^6.4|^7.0" }, "require-dev": { - "symfony/cache": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -10863,7 +11525,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v6.3.2" + "source": "https://github.com/symfony/property-access/tree/v7.1.6" }, "funding": [ { @@ -10879,38 +11541,39 @@ "type": "tidelift" } ], - "time": "2023-07-13T15:26:11+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/property-info", - "version": "v6.3.0", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd" + "reference": "6b630ff585d9fdc72f50369885ad4364a849cf02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/7f3a03716112269741fe2a809f8f791a371d1fcd", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd", + "url": "https://api.github.com/repos/symfony/property-info/zipball/6b630ff585d9fdc72f50369885ad4364a849cf02", + "reference": "6b630ff585d9fdc72f50369885ad4364a849cf02", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/string": "^5.4|^6.0" + "php": ">=8.2", + "symfony/string": "^6.4|^7.0", + "symfony/type-info": "^7.1" }, "conflict": { "phpdocumentor/reflection-docblock": "<5.2", "phpdocumentor/type-resolver": "<1.5.1", - "symfony/dependency-injection": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/serializer": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.10.4|^2", "phpdocumentor/reflection-docblock": "^5.2", "phpstan/phpdoc-parser": "^1.0", - "symfony/cache": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -10946,7 +11609,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v6.3.0" + "source": "https://github.com/symfony/property-info/tree/v7.1.6" }, "funding": [ { @@ -10962,57 +11625,62 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/serializer", - "version": "v6.3.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c" + "reference": "537f125ed7ddb8fffac34a83dfd6905e044ca76f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c", - "reference": "855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c", + "url": "https://api.github.com/repos/symfony/serializer/zipball/537f125ed7ddb8fffac34a83dfd6905e044ca76f", + "reference": "537f125ed7ddb8fffac34a83dfd6905e044ca76f", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "doctrine/annotations": "<1.12", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/dependency-injection": "<5.4", - "symfony/property-access": "<5.4", - "symfony/property-info": "<5.4.24|>=6,<6.2.11", - "symfony/uid": "<5.4", - "symfony/yaml": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/property-access": "<6.4", + "symfony/property-info": "<6.4", + "symfony/type-info": "<7.1.5", + "symfony/uid": "<6.4", + "symfony/validator": "<6.4", + "symfony/yaml": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.12|^2", "phpdocumentor/reflection-docblock": "^3.2|^4.0|^5.0", - "symfony/cache": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/filesystem": "^5.4|^6.0", - "symfony/form": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/mime": "^5.4|^6.0", - "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.4.24|^6.2.11", - "symfony/uid": "^5.4|^6.0", - "symfony/validator": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0", - "symfony/var-exporter": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" + "phpstan/phpdoc-parser": "^1.0", + "seld/jsonlint": "^1.10", + "symfony/cache": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/filesystem": "^6.4|^7.0", + "symfony/form": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/type-info": "^7.1.5", + "symfony/uid": "^6.4|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -11040,7 +11708,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v6.3.5" + "source": "https://github.com/symfony/serializer/tree/v7.1.6" }, "funding": [ { @@ -11056,25 +11724,26 @@ "type": "tidelift" } ], - "time": "2023-09-29T16:18:53+00:00" + "time": "2024-10-09T08:46:59+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -11082,7 +11751,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -11122,7 +11791,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" }, "funding": [ { @@ -11138,24 +11807,24 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.3.0", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8b4a434e6e7faf6adedffb48783a5c75409a1a05", + "reference": "8b4a434e6e7faf6adedffb48783a5c75409a1a05", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -11184,7 +11853,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.1.6" }, "funding": [ { @@ -11200,24 +11869,24 @@ "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/string", - "version": "v6.3.5", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/string/zipball/61b72d66bf96c360a727ae6232df5ac83c71f626", + "reference": "61b72d66bf96c360a727ae6232df5ac83c71f626", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -11227,11 +11896,12 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -11270,7 +11940,264 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/string/tree/v7.1.6" + }, + "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": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" + }, + "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": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/type-info", + "version": "v7.1.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/type-info.git", + "reference": "a13032128c307470955c45c99201349b15cd7f4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/type-info/zipball/a13032128c307470955c45c99201349b15cd7f4a", + "reference": "a13032128c307470955c45c99201349b15cd7f4a", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0" + }, + "conflict": { + "phpstan/phpdoc-parser": "<1.0", + "symfony/dependency-injection": "<6.4", + "symfony/property-info": "<6.4" + }, + "require-dev": { + "phpstan/phpdoc-parser": "^1.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\TypeInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Arlaud", + "email": "mathias.arlaud@gmail.com" + }, + { + "name": "Baptiste LEDUC", + "email": "baptiste.leduc@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts PHP types information.", + "homepage": "https://symfony.com", + "keywords": [ + "PHPStan", + "phpdoc", + "symfony", + "type" + ], + "support": { + "source": "https://github.com/symfony/type-info/tree/v7.1.6" + }, + "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": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/validator", + "version": "v7.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/validator.git", + "reference": "7ec52f844ee39f6d8120e421df75b972deff29eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/validator/zipball/7ec52f844ee39f6d8120e421df75b972deff29eb", + "reference": "7ec52f844ee39f6d8120e421df75b972deff29eb", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php83": "^1.27", + "symfony/translation-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/lexer": "<1.1", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<7.0", + "symfony/expression-language": "<6.4", + "symfony/http-kernel": "<6.4", + "symfony/intl": "<6.4", + "symfony/property-info": "<6.4", + "symfony/translation": "<6.4.3|>=7.0,<7.0.3", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3|^4", + "symfony/cache": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/translation": "^6.4.3|^7.0.3", + "symfony/type-info": "^7.1", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Validator\\": "" + }, + "exclude-from-classmap": [ + "/Tests/", + "/Resources/bin/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to validate values", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/validator/tree/v7.1.7" }, "funding": [ { @@ -11286,27 +12213,29 @@ "type": "tidelift" } ], - "time": "2023-09-18T10:38:32+00:00" + "time": "2024-11-04T11:34:07+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.3.4", + "version": "v7.1.6", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691" + "reference": "90173ef89c40e7c8c616653241048705f84130ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df1f8aac5751871b83d30bf3e2c355770f8f0691", - "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/90173ef89c40e7c8c616653241048705f84130ef", + "reference": "90173ef89c40e7c8c616653241048705f84130ef", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/var-dumper": "^5.4|^6.0" + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -11344,7 +12273,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.3.4" + "source": "https://github.com/symfony/var-exporter/tree/v7.1.6" }, "funding": [ { @@ -11360,20 +12289,20 @@ "type": "tidelift" } ], - "time": "2023-08-16T18:14:47+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/yaml", - "version": "v6.3.3", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add" + "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", + "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", "shasum": "" }, "require": { @@ -11385,7 +12314,7 @@ "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0" + "symfony/console": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -11416,7 +12345,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.3" + "source": "https://github.com/symfony/yaml/tree/v6.4.13" }, "funding": [ { @@ -11432,7 +12361,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "thecodingmachine/phpstan-safe-rule", @@ -11687,16 +12616,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -11725,7 +12654,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/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -11733,33 +12662,41 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "twig/twig", - "version": "v3.7.1", + "version": "v3.14.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554" + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", + "reference": "0b6f9d8370bb3b7f1ce5313ed8feb0fafd6e399a", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php81": "^1.29" }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.3" + "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, "type": "library", "autoload": { + "files": [ + "src/Resources/core.php", + "src/Resources/debug.php", + "src/Resources/escaper.php", + "src/Resources/string_loader.php" + ], "psr-4": { "Twig\\": "src/" } @@ -11792,7 +12729,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.7.1" + "source": "https://github.com/twigphp/Twig/tree/v3.14.2" }, "funding": [ { @@ -11804,20 +12741,20 @@ "type": "tidelift" } ], - "time": "2023-08-28T11:09:02+00:00" + "time": "2024-11-07T12:36:22+00:00" }, { "name": "vimeo/psalm", - "version": "5.15.0", + "version": "5.26.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352" + "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/5c774aca4746caf3d239d9c8cadb9f882ca29352", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", + "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", "shasum": "" }, "require": { @@ -11836,14 +12773,14 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.16", + "nikic/php-parser": "^4.17", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", - "sebastian/diff": "^4.0 || ^5.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", - "symfony/console": "^4.1.6 || ^5.0 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0" + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" }, "conflict": { "nikic/php-parser": "4.17.0" @@ -11865,7 +12802,7 @@ "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0" + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -11878,7 +12815,7 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { "dev-master": "5.x-dev", @@ -11910,10 +12847,11 @@ "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.15.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2023-08-20T23:07:30+00:00" + "time": "2024-09-08T18:53:08+00:00" }, { "name": "webmozart/assert", @@ -11975,16 +12913,16 @@ }, { "name": "webmozart/glob", - "version": "4.6.0", + "version": "4.7.0", "source": { "type": "git", "url": "https://github.com/webmozarts/glob.git", - "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655" + "reference": "8a2842112d6916e61e0e15e316465b611f3abc17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/glob/zipball/3c17f7dec3d9d0e87b575026011f2e75a56ed655", - "reference": "3c17f7dec3d9d0e87b575026011f2e75a56ed655", + "url": "https://api.github.com/repos/webmozarts/glob/zipball/8a2842112d6916e61e0e15e316465b611f3abc17", + "reference": "8a2842112d6916e61e0e15e316465b611f3abc17", "shasum": "" }, "require": { @@ -12018,30 +12956,31 @@ "description": "A PHP implementation of Ant's glob.", "support": { "issues": "https://github.com/webmozarts/glob/issues", - "source": "https://github.com/webmozarts/glob/tree/4.6.0" + "source": "https://github.com/webmozarts/glob/tree/4.7.0" }, - "time": "2022-05-24T19:45:58+00:00" + "time": "2024-03-07T20:33:40+00:00" }, { "name": "wyrihaximus/async-test-utilities", - "version": "7.2.0", + "version": "7.3.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-async-test-utilities.git", - "reference": "3cac9f58ec6674b4e30decd31958e4999cd22db7" + "reference": "8c7acb8bdb045c72b85ec267532aa1dbc59950dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-async-test-utilities/zipball/3cac9f58ec6674b4e30decd31958e4999cd22db7", - "reference": "3cac9f58ec6674b4e30decd31958e4999cd22db7", + "url": "https://api.github.com/repos/WyriHaximus/php-async-test-utilities/zipball/8c7acb8bdb045c72b85ec267532aa1dbc59950dd", + "reference": "8c7acb8bdb045c72b85ec267532aa1dbc59950dd", "shasum": "" }, "require": { "php": "^8.2", - "phpunit/phpunit": "^9.6.10", - "react/async": "^4.1.0", - "react/event-loop": "^1.4.0", - "react/promise": "^2.10 || ^3.0", + "phpunit/phpunit": "^9.6.17", + "react/async": "^4.2.0", + "react/event-loop": "^1.5.0", + "react/promise": "^3.1", + "wyrihaximus/phpstan-react": "^1", "wyrihaximus/test-utilities": "^5.5.4 || ^6" }, "conflict": { @@ -12052,6 +12991,11 @@ "wyrihaximus/iterator-or-array-to-array": "^1.2" }, "type": "library", + "extra": { + "unused": [ + "wyrihaximus/phpstan-react" + ] + }, "autoload": { "psr-4": { "WyriHaximus\\AsyncTestUtilities\\": "src/" @@ -12070,7 +13014,7 @@ "description": "Test utilities for api-clients packages", "support": { "issues": "https://github.com/WyriHaximus/php-async-test-utilities/issues", - "source": "https://github.com/WyriHaximus/php-async-test-utilities/tree/7.2.0" + "source": "https://github.com/WyriHaximus/php-async-test-utilities/tree/7.3.0" }, "funding": [ { @@ -12078,7 +13022,7 @@ "type": "github" } ], - "time": "2023-09-07T13:00:15+00:00" + "time": "2024-02-29T21:53:30+00:00" }, { "name": "wyrihaximus/coding-standard", @@ -12120,46 +13064,41 @@ "time": "2023-05-06T11:54:10+00:00" }, { - "name": "wyrihaximus/composer-update-bin-autoload-path", - "version": "1.1.1", + "name": "wyrihaximus/phpstan-react", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/WyriHaximus/php-composer-update-bin-autoload-path.git", - "reference": "33413e3af4f4d7ab4de3653a706aed57f51e84af" + "url": "https://github.com/WyriHaximus/phpstan-reactphp.git", + "reference": "da07f594ea52390771aefbd3c5d850219aa75e64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-composer-update-bin-autoload-path/zipball/33413e3af4f4d7ab4de3653a706aed57f51e84af", - "reference": "33413e3af4f4d7ab4de3653a706aed57f51e84af", + "url": "https://api.github.com/repos/WyriHaximus/phpstan-reactphp/zipball/da07f594ea52390771aefbd3c5d850219aa75e64", + "reference": "da07f594ea52390771aefbd3c5d850219aa75e64", "shasum": "" }, "require": { - "composer-plugin-api": "^2", - "php": "^8 || ^7.4" + "php": "^8.2" }, "require-dev": { - "wyrihaximus/test-utilities": "^3" - }, - "type": "composer-plugin", - "extra": { - "class": "WyriHaximus\\Composer\\BinAutoloadPathUpdater", - "unused": [ - "php" - ] + "nikic/php-parser": "^4.18", + "phpstan/phpdoc-parser": "^1.24", + "wyrihaximus/test-utilities": "^5.6" }, + "type": "library", "autoload": { "psr-4": { - "WyriHaximus\\Composer\\": "src" + "WyriHaximus\\React\\PHPStan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "🏰 Composer plugin that fills a bin file with the absolute composer autoload path", + "description": "👎 ReactPHP extension for PHPStan", "support": { - "issues": "https://github.com/WyriHaximus/php-composer-update-bin-autoload-path/issues", - "source": "https://github.com/WyriHaximus/php-composer-update-bin-autoload-path/tree/1.1.1" + "issues": "https://github.com/WyriHaximus/phpstan-reactphp/issues", + "source": "https://github.com/WyriHaximus/phpstan-reactphp/tree/1.0.0" }, "funding": [ { @@ -12167,32 +13106,32 @@ "type": "github" } ], - "time": "2021-03-14T20:55:38+00:00" + "time": "2024-02-29T20:19:44+00:00" }, { "name": "wyrihaximus/phpstan-rules-wrapper", - "version": "3.3.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper.git", - "reference": "8e65ee7749a3e10100f0abec58b7e53ee540c43d" + "reference": "81c836687273520c04e7907c630e37fa2f42a8b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-phpstan-rules-wrapper/zipball/8e65ee7749a3e10100f0abec58b7e53ee540c43d", - "reference": "8e65ee7749a3e10100f0abec58b7e53ee540c43d", + "url": "https://api.github.com/repos/WyriHaximus/php-phpstan-rules-wrapper/zipball/81c836687273520c04e7907c630e37fa2f42a8b7", + "reference": "81c836687273520c04e7907c630e37fa2f42a8b7", "shasum": "" }, "require": { - "ergebnis/phpstan-rules": "^2.1.0", - "jangregor/phpstan-prophecy": "^1.0", + "ergebnis/phpstan-rules": "^2.2.0", + "jangregor/phpstan-prophecy": "^1.0.1", "pepakriz/phpstan-exception-rules": "^0.12.0", "php": "^8.2", "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-mockery": "^1.1.2", "phpstan/phpstan-php-parser": "^1.1", - "phpstan/phpstan-phpunit": "^1.3.14", - "phpstan/phpstan-strict-rules": "^1.5.1", + "phpstan/phpstan-phpunit": "^1.3.16", + "phpstan/phpstan-strict-rules": "^1.5.2", "thecodingmachine/phpstan-safe-rule": "^1.2", "thecodingmachine/phpstan-strict-rules": "^1.0" }, @@ -12210,7 +13149,7 @@ "description": "🌯 PHPStan rules wrapper", "support": { "issues": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/issues", - "source": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/tree/3.3.0" + "source": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/tree/3.5.0" }, "funding": [ { @@ -12218,30 +13157,30 @@ "type": "github" } ], - "time": "2023-09-26T09:07:47+00:00" + "time": "2024-04-02T21:20:40+00:00" }, { "name": "wyrihaximus/react-awaitable-observable", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/reactphp-awaitable-observable.git", - "reference": "d8423f506342f15d4c30a4da404bd25f457caddb" + "reference": "b942237bef3ad20300cafd9ec1a80e8529fed77b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/reactphp-awaitable-observable/zipball/d8423f506342f15d4c30a4da404bd25f457caddb", - "reference": "d8423f506342f15d4c30a4da404bd25f457caddb", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-awaitable-observable/zipball/b942237bef3ad20300cafd9ec1a80e8529fed77b", + "reference": "b942237bef3ad20300cafd9ec1a80e8529fed77b", "shasum": "" }, "require": { - "php": "^8.1", + "php": "^8.2", "react/async": "^4", - "react/promise": "^2.9", - "reactivex/rxphp": "^2.0.10" + "react/promise": "^2.10 || ^3", + "reactivex/rxphp": "^2.0.12" }, "require-dev": { - "wyrihaximus/async-test-utilities": "^5.0.11" + "wyrihaximus/async-test-utilities": "^7.2" }, "type": "library", "autoload": { @@ -12265,7 +13204,7 @@ "description": "🛠️ Make observables foreachable using async & await", "support": { "issues": "https://github.com/WyriHaximus/reactphp-awaitable-observable/issues", - "source": "https://github.com/WyriHaximus/reactphp-awaitable-observable/tree/1.0.0" + "source": "https://github.com/WyriHaximus/reactphp-awaitable-observable/tree/1.1.0" }, "funding": [ { @@ -12273,28 +13212,28 @@ "type": "github" } ], - "time": "2022-08-11T13:15:09+00:00" + "time": "2023-11-30T22:01:46+00:00" }, { "name": "wyrihaximus/simple-twig", - "version": "2.1.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-simple-twig.git", - "reference": "aa0d055c13a25b0318aa55edaea13fe12af15939" + "reference": "1647efb09c4acb66d36911f480c7881be1ade99e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-simple-twig/zipball/aa0d055c13a25b0318aa55edaea13fe12af15939", - "reference": "aa0d055c13a25b0318aa55edaea13fe12af15939", + "url": "https://api.github.com/repos/WyriHaximus/php-simple-twig/zipball/1647efb09c4acb66d36911f480c7881be1ade99e", + "reference": "1647efb09c4acb66d36911f480c7881be1ade99e", "shasum": "" }, "require": { - "php": "^8 || ^7.4", - "twig/twig": "^3.3.2" + "php": "^8.2", + "twig/twig": "^3.14" }, "require-dev": { - "wyrihaximus/test-utilities": "^3.7.3" + "wyrihaximus/test-utilities": "^6.0.10" }, "type": "library", "autoload": { @@ -12318,7 +13257,7 @@ "description": "🌱 Wrapper around Twig making rendering a string template trivial", "support": { "issues": "https://github.com/WyriHaximus/php-simple-twig/issues", - "source": "https://github.com/WyriHaximus/php-simple-twig/tree/2.1.0" + "source": "https://github.com/WyriHaximus/php-simple-twig/tree/2.2.1" }, "funding": [ { @@ -12326,7 +13265,7 @@ "type": "github" } ], - "time": "2021-09-08T22:05:38+00:00" + "time": "2024-10-12T14:20:51+00:00" }, { "name": "wyrihaximus/subsplit-tools", @@ -12334,12 +13273,12 @@ "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-subsplit-tools.git", - "reference": "22db9bbeced36051af9eb13f8cc4d5d6ec8c4765" + "reference": "3f4b95b43c695e6eafa2c160bbdcfc87d0d01b28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-subsplit-tools/zipball/22db9bbeced36051af9eb13f8cc4d5d6ec8c4765", - "reference": "22db9bbeced36051af9eb13f8cc4d5d6ec8c4765", + "url": "https://api.github.com/repos/WyriHaximus/php-subsplit-tools/zipball/3f4b95b43c695e6eafa2c160bbdcfc87d0d01b28", + "reference": "3f4b95b43c695e6eafa2c160bbdcfc87d0d01b28", "shasum": "" }, "require": { @@ -12381,7 +13320,7 @@ "type": "github" } ], - "time": "2023-10-05T10:18:29+00:00" + "time": "2024-08-28T07:13:32+00:00" }, { "name": "wyrihaximus/test-utilities", @@ -12485,6 +13424,16 @@ "stability-flags": { "api-clients/github": 20, "api-clients/openapi-client-utils": 20, + "openapi-tools/configuration": 20, + "openapi-tools/contract": 20, + "openapi-tools/gatherer": 20, + "openapi-tools/generator": 20, + "openapi-tools/generator-hydrator": 20, + "openapi-tools/generator-schema": 20, + "openapi-tools/generator-templates": 20, + "openapi-tools/registry": 20, + "openapi-tools/representation": 20, + "openapi-tools/utils": 20, "wyrihaximus/subsplit-tools": 20 }, "prefer-stable": false, @@ -12496,5 +13445,5 @@ "platform-overrides": { "php": "8.2.13" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/example/client-gitub-one.php b/example/client-gitub-one.php new file mode 100644 index 0000000..bce36b3 --- /dev/null +++ b/example/client-gitub-one.php @@ -0,0 +1,77 @@ + 0 %} diff --git a/src/ClassString.php b/src/ClassString.php deleted file mode 100644 index c334c65..0000000 --- a/src/ClassString.php +++ /dev/null @@ -1,41 +0,0 @@ -source, '\\') . '\\' . $relative), - Utils::cleanUpNamespace(trim($namespace->test, '\\') . '\\' . $relative), - ); - - return new self( - $namespace, - new Namespace_( - Utils::dirname($fullyQualified->source), - Utils::dirname($fullyQualified->test), - ), - $fullyQualified, - $relative, - Utils::basename($relative), - ); - } - - private function __construct( - public Namespace_ $baseNamespaces, - public Namespace_ $namespace, - public Namespace_ $fullyQualified, - public string $relative, - public string $className, - ) { - } -} diff --git a/src/Configuration.php b/src/Configuration.php deleted file mode 100644 index a993bb2..0000000 --- a/src/Configuration.php +++ /dev/null @@ -1,39 +0,0 @@ ->|null $contentType */ - public function __construct( - public State $state, - public string $spec, - #[MapFrom('entryPoints')] - public EntryPoints $entryPoints, - public Templates|null $templates, - public Namespace_ $namespace, - public Destination $destination, - #[MapFrom('contentType')] - public array|null $contentType, - #[MapFrom('subSplit')] - public SubSplit|null $subSplit, - public Schemas|null $schemas, - public Voter|null $voter, - public QA|null $qa, - ) { - } -} diff --git a/src/Configuration/Destination.php b/src/Configuration/Destination.php deleted file mode 100644 index 4477248..0000000 --- a/src/Configuration/Destination.php +++ /dev/null @@ -1,15 +0,0 @@ - $additionalFiles */ - public function __construct( - public string $file, - #[MapFrom('additionalFiles')] - #[CastListToType('string')] - public array|null $additionalFiles, - ) { - } -} diff --git a/src/Configuration/SubSplit.php b/src/Configuration/SubSplit.php deleted file mode 100644 index 1dbc648..0000000 --- a/src/Configuration/SubSplit.php +++ /dev/null @@ -1,34 +0,0 @@ ->|null $sectionGenerator */ - public function __construct( - #[MapFrom('subSplitsDestination')] - public string $subSplitsDestination, - public string $branch, - #[MapFrom('targetVersion')] - public string $targetVersion, - #[MapFrom('subSplitConfiguration')] - public string $subSplitConfiguration, - #[MapFrom('fullName')] - public string $fullName, - public string $vendor, - #[MapFrom('sectionGenerator')] - public array|null $sectionGenerator, - #[MapFrom('rootPackage')] - public RootPackage $rootPackage, - #[MapFrom('sectionPackage')] - public SectionPackage $sectionPackage, - ) { - } -} diff --git a/src/Configuration/SubSplit/RootPackage.php b/src/Configuration/SubSplit/RootPackage.php deleted file mode 100644 index 2cad1dc..0000000 --- a/src/Configuration/SubSplit/RootPackage.php +++ /dev/null @@ -1,14 +0,0 @@ -|null $variables */ - public function __construct( - public string $dir, - public array|null $variables, - ) { - } -} diff --git a/src/Configuration/Voter.php b/src/Configuration/Voter.php deleted file mode 100644 index 6c59e7c..0000000 --- a/src/Configuration/Voter.php +++ /dev/null @@ -1,23 +0,0 @@ ->|null $listOperation - * @param array>|null $streamOperation - */ - public function __construct( - #[MapFrom('listOperation')] - public array|null $listOperation, - #[MapFrom('streamOperation')] - public array|null $streamOperation, - ) { - } -} diff --git a/src/Contract/SectionGenerator.php b/src/Contract/SectionGenerator.php index 875fd83..8b6c05d 100644 --- a/src/Contract/SectionGenerator.php +++ b/src/Contract/SectionGenerator.php @@ -4,12 +4,11 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Contract; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Path; -use ApiClients\Tools\OpenApiClientGenerator\Representation\WebHook; +use OpenAPITools\Representation; interface SectionGenerator { - public static function path(Path $path): string|false; + public static function path(Representation\Namespaced\Path $path): string|false; - public static function webHook(WebHook ...$webHooks): string|false; + public static function webHook(Representation\WebHook ...$webHooks): string|false; } diff --git a/src/Contract/Voter/AbstractListOperation.php b/src/Contract/Voter/AbstractListOperation.php index be1aa5b..96b8388 100644 --- a/src/Contract/Voter/AbstractListOperation.php +++ b/src/Contract/Voter/AbstractListOperation.php @@ -4,9 +4,9 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Contract\Voter; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Operation; use ApiClients\Tools\OpenApiClientGenerator\Representation\PropertyType; use ApiClients\Tools\OpenApiClientGenerator\Representation\Schema; +use OpenAPITools\Representation\Namespaced\Operation; use function array_key_exists; diff --git a/src/Contract/Voter/ListOperation.php b/src/Contract/Voter/ListOperation.php index d1f1bcc..c7adf2c 100644 --- a/src/Contract/Voter/ListOperation.php +++ b/src/Contract/Voter/ListOperation.php @@ -4,7 +4,7 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Contract\Voter; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Operation; +use OpenAPITools\Representation\Namespaced\Operation; interface ListOperation { diff --git a/src/Contract/Voter/StreamOperation.php b/src/Contract/Voter/StreamOperation.php index 6711bf8..6ebc315 100644 --- a/src/Contract/Voter/StreamOperation.php +++ b/src/Contract/Voter/StreamOperation.php @@ -4,7 +4,7 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Contract\Voter; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Operation; +use OpenAPITools\Representation\Namespaced\Operation; interface StreamOperation { diff --git a/src/File.php b/src/File.php deleted file mode 100644 index a2a50ea..0000000 --- a/src/File.php +++ /dev/null @@ -1,17 +0,0 @@ -servers ?? [] as $server) { - if (strlen($server->url) === 0) { - continue; - } - - $baseUrl = $server->url; - break; - } - - return new \ApiClients\Tools\OpenApiClientGenerator\Representation\Client( - $baseUrl, - $paths, - ); - } -} diff --git a/src/Gatherer/CompositSchema.php b/src/Gatherer/CompositSchema.php deleted file mode 100644 index 5e5ec33..0000000 --- a/src/Gatherer/CompositSchema.php +++ /dev/null @@ -1,97 +0,0 @@ -type === 'array'; - $properties = []; - $example = []; - - if ($isArray) { - $schema = $schema->items; - } - - foreach ($schema->properties as $propertyName => $property) { - $gatheredProperty = Property::gather( - $baseNamespace, - $className, - (string) $propertyName, - in_array( - (string) $propertyName, - $schema->required ?? [], - false, - ), - $property, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - $properties[] = $gatheredProperty; - - $example[$gatheredProperty->sourceName] = $gatheredProperty->example->raw; - - foreach (['examples', 'example'] as $examplePropertyName) { - if (array_key_exists($gatheredProperty->sourceName, $example)) { - break; - } - - if (! property_exists($schema, $examplePropertyName) || ! is_array($schema->$examplePropertyName) || ! array_key_exists($gatheredProperty->sourceName, $schema->$examplePropertyName)) { - continue; - } - - $example[$gatheredProperty->sourceName] = $schema->$examplePropertyName[$gatheredProperty->sourceName]; - } - - foreach ($property->enum ?? [] as $value) { - $example[$gatheredProperty->sourceName] = $value; - break; - } - - if ($example[$gatheredProperty->sourceName] !== null || $schema->required) { - continue; - } - - unset($example[$gatheredProperty->sourceName]); - } - - return new Schema( - ClassString::factory($baseNamespace, 'Schema\\' . $className), - ClassString::factory($baseNamespace, 'Contract\\' . $className), - ClassString::factory($baseNamespace, 'Error\\' . $className), - ClassString::factory($baseNamespace, 'ErrorSchemas\\' . $className), - $schema->title ?? '', - $schema->description ?? '', - $example, - $properties, - $schema, - $isArray, - ($schema->type === null ? ['object'] : (is_array($schema->type) ? $schema->type : [$schema->type])), - ); - } -} diff --git a/src/Gatherer/ExampleData.php b/src/Gatherer/ExampleData.php deleted file mode 100644 index f9c4ec1..0000000 --- a/src/Gatherer/ExampleData.php +++ /dev/null @@ -1,232 +0,0 @@ -type === 'array' || $type->type === 'union') { - if ($type->payload instanceof Schema) { - $exampleData = ArrayMerger::doMerge( - $type->payload->example, - is_array($exampleData) ? $exampleData : [], - ArrayMerger::FLAG_OVERWRITE_NUMERIC_KEY | ArrayMerger::FLAG_ALLOW_SCALAR_TO_ARRAY_CONVERSION, - ); - } elseif ($type->payload instanceof PropertyType) { - return self::gather($exampleData, $type->payload, $propertyName); - } - - return new Representation\ExampleData($exampleData, $exampleData instanceof Node\Expr ? $exampleData : self::turnArrayIntoNode((array) $exampleData)); - } - - if ($type->payload instanceof Schema) { - $exampleData = ArrayMerger::doMerge($type->payload->example, is_array($exampleData) ? $exampleData : [], ArrayMerger::FLAG_OVERWRITE_NUMERIC_KEY | ArrayMerger::FLAG_ALLOW_SCALAR_TO_ARRAY_CONVERSION); - - return new Representation\ExampleData($exampleData, self::turnArrayIntoNode($exampleData)); - } - - if ($exampleData === null && $type->type === 'scalar' && is_string($type->payload)) { - return self::scalarData(strlen($propertyName), $type->payload, $type->format, $type->pattern); - } - - return self::determiteType($exampleData); - } - - public static function determiteType(mixed $exampleData): Representation\ExampleData - { - return match (gettype($exampleData)) { - 'boolean' => new Representation\ExampleData( - $exampleData, - new Node\Expr\ConstFetch( - new Node\Name( - $exampleData ? 'true' : 'false', - ), - ), - ), - 'integer' => new Representation\ExampleData( - $exampleData, - new Node\Scalar\LNumber($exampleData), - ), - 'double' => new Representation\ExampleData( - $exampleData, - new Node\Scalar\DNumber($exampleData), - ), - 'string' => new Representation\ExampleData( - $exampleData, - new Node\Scalar\String_($exampleData), - ), - 'array' => new Representation\ExampleData($exampleData, self::turnArrayIntoNode($exampleData)), - default => new Representation\ExampleData( - null, - new Node\Expr\ConstFetch( - new Node\Name( - 'null', - ), - ), - ), - }; - } - - /** @phpstan-ignore-next-line */ - public static function scalarData(int $seed, string $type, string|null $format, string|null $pattern = null): Representation\ExampleData - { - if (strpos($type, '|') !== false) { - [$firstType] = explode('|', $type); - - return self::scalarData($seed, $firstType, $format, $pattern); - } - - if ($type === 'int' || $type === '?int') { - return new Representation\ExampleData($seed, new Node\Scalar\LNumber($seed)); - } - - if ($type === 'float' || $type === '?float' || $type === 'int|float' || $type === 'null|int|float') { - return new Representation\ExampleData($seed / 10, new Node\Scalar\DNumber($seed / 10)); - } - - if ($type === 'bool' || $type === '?bool') { - return new Representation\ExampleData( - false, - new Node\Expr\ConstFetch( - new Node\Name( - 'false', - ), - ), - ); - } - - if ($type === 'string' || $type === '?string') { - if ($pattern !== null) { - $result = ''; - - /** @phpstan-ignore-next-line */ - @(new Parser(new Lexer($pattern), new Scope(), new Scope()))->parse()->getResult()->generate( - $result, - new IntegerReturnerPretendingToBeARandomNumberGenerator(strlen($pattern)), - ); - - return new Representation\ExampleData($result, new Node\Scalar\String_($result)); - } - - if ($format === 'uri') { - return new Representation\ExampleData('https://example.com/', new Node\Scalar\String_('https://example.com/')); - } - - if ($format === 'email') { - return new Representation\ExampleData('hi@example.com', new Node\Scalar\String_('hi@example.com')); - } - - if ($format === 'date-time') { - return new Representation\ExampleData(date(DateTimeInterface::RFC3339, 0), new Node\Scalar\String_(date(DateTimeInterface::RFC3339, 0))); - } - - if ($format === 'uuid') { - return new Representation\ExampleData('4ccda740-74c3-4cfa-8571-ebf83c8f300a', new Node\Scalar\String_('4ccda740-74c3-4cfa-8571-ebf83c8f300a')); - } - - if ($format === 'ipv4') { - return new Representation\ExampleData('127.0.0.1', new Node\Scalar\String_('127.0.0.1')); - } - - if ($format === 'ipv6') { - return new Representation\ExampleData('::1', new Node\Scalar\String_('::1')); - } - - return new Representation\ExampleData('generated', new Node\Scalar\String_('generated')); - } - - if ($type === 'array' || $type === '?array') { - $string = self::scalarData($seed, 'string', $format, $pattern); - - return new Representation\ExampleData( - [ - $string->raw, - ], - new Node\Expr\Array_( - [ - new Node\Expr\ArrayItem( - $string->node, - ), - ], - ), - ); - } - - return new Representation\ExampleData( - null, - new Node\Expr\ConstFetch( - new Node\Name( - 'null', - ), - ), - ); - } - - /** @param array $array */ - private static function turnArrayIntoNode(array $array): Node\Expr - { - return new Node\Expr\FuncCall( - new Node\Name('\json_decode'), - [ - new Node\Arg( - new Node\Scalar\String_( - json_encode([...self::arrayToRaw($array)]), - ), - ), - new Node\Arg( - new Node\Expr\ConstFetch( - new Node\Name( - 'false', - ), - ), - ), - ], - ); - } - - /** - * @param array $exampleData - * - * @return iterable - */ - private static function arrayToRaw(array $exampleData): iterable - { - foreach ($exampleData as $key => $value) { - if ($value instanceof Representation\ExampleData) { - $value = $value->raw; - } - - if (is_array($value)) { - $value = [...self::arrayToRaw($value)]; - } - - yield $key => $value; - } - } -} diff --git a/src/Gatherer/Hydrator.php b/src/Gatherer/Hydrator.php deleted file mode 100644 index a40aa4a..0000000 --- a/src/Gatherer/Hydrator.php +++ /dev/null @@ -1,28 +0,0 @@ - */ - public static function listSchemas(Schema $schema): iterable - { - yield $schema; - - foreach ($schema->properties as $property) { - yield from self::listSchemasFromPropertyType($property->type); - } - } - - /** @return iterable */ - private static function listSchemasFromPropertyType(PropertyType $propertyType): iterable - { - if ($propertyType->payload instanceof Schema) { - yield from self::listSchemas($propertyType->payload); - } elseif ($propertyType->payload instanceof PropertyType) { - yield from self::listSchemasFromPropertyType($propertyType->payload); - } - } -} diff --git a/src/Gatherer/IntegerReturnerPretendingToBeARandomNumberGenerator.php b/src/Gatherer/IntegerReturnerPretendingToBeARandomNumberGenerator.php deleted file mode 100644 index 9752698..0000000 --- a/src/Gatherer/IntegerReturnerPretendingToBeARandomNumberGenerator.php +++ /dev/null @@ -1,37 +0,0 @@ -randomNumber > $max ? $max : $this->randomNumber; - } - - /** - * @phpstan-ignore-next-line - */ - public function seed($seed = null) - { - return $this->randomNumber; - } - - public function max() - { - return $this->randomNumber; - } -} diff --git a/src/Gatherer/IntersectionSchema.php b/src/Gatherer/IntersectionSchema.php deleted file mode 100644 index 3ef12a7..0000000 --- a/src/Gatherer/IntersectionSchema.php +++ /dev/null @@ -1,106 +0,0 @@ -allOf as $schema) { - $gatheredProperties = []; - foreach ($schema->properties as $propertyName => $property) { - $gatheredProperty = $gatheredProperties[(string) $propertyName] = Property::gather( - $baseNamespace, - $className, - (string) $propertyName, - in_array( - (string) $propertyName, - $schema->required ?? [], - false, - ), - $property, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - - $example[$gatheredProperty->sourceName] = $gatheredProperty->example->raw; - - foreach (['examples', 'example'] as $examplePropertyName) { - if (array_key_exists($gatheredProperty->sourceName, $example)) { - break; - } - - if (! property_exists($schema, $examplePropertyName) || ! is_array($schema->$examplePropertyName) || ! array_key_exists($gatheredProperty->sourceName, $schema->$examplePropertyName)) { - continue; - } - - $example[$gatheredProperty->sourceName] = $schema->$examplePropertyName[$gatheredProperty->sourceName]; - } - - foreach ($property->enum ?? [] as $value) { - $example[$gatheredProperty->sourceName] = $value; - break; - } - - if ($example[$gatheredProperty->sourceName] !== null || $property->required || $baseProperty->required) { - continue; - } - - unset($example[$gatheredProperty->sourceName]); - } - - $contracts[] = new Contract( - ClassString::factory( - $baseNamespace, - $contractRegistry->get($schema, 'Contract\\' . $className . '\\' . $schema->title), - ), - $gatheredProperties, - ); - - $properties = [...$properties, ...$gatheredProperties]; - } - - return new Schema( - ClassString::factory($baseNamespace, 'Schema\\' . $className), - $contracts, - ClassString::factory($baseNamespace, 'Error\\' . $className), - ClassString::factory($baseNamespace, 'ErrorSchemas\\' . $className), - $baseProperty->title ?? '', - $baseProperty->description ?? '', - $example, - $properties, - $baseProperty, - false, - ($baseProperty->type === null ? ['object'] : (is_array($baseProperty->type) ? $baseProperty->type : [$baseProperty->type])), - ); - } -} diff --git a/src/Gatherer/Operation.php b/src/Gatherer/Operation.php deleted file mode 100644 index 0985a1e..0000000 --- a/src/Gatherer/Operation.php +++ /dev/null @@ -1,203 +0,0 @@ - $metaData */ - public static function gather( - Namespace_ $baseNamespace, - string $className, - string $matchMethod, - string $method, - string $path, - array $metaData, - openAPIOperation $operation, - ThrowableSchema $throwableSchemaRegistry, - SchemaRegistry $schemaRegistry, - ContractRegistry $contractRegistry, - CompositSchemaRegistry $compositSchemaRegistry, - ): \ApiClients\Tools\OpenApiClientGenerator\Representation\Operation { - $returnType = []; - $parameters = []; - $empties = []; - foreach ($operation->parameters as $parameter) { - $types = is_array($parameter->schema->type) ? $parameter->schema->type : [$parameter->schema->type]; - if (count($parameter->schema->oneOf ?? []) > 0) { - $types = []; - foreach ($parameter->schema->oneOf as $oneOfSchema) { - $types[] = $oneOfSchema->type; - } - } - - $parameterType = str_replace([ - 'integer', - 'any', - 'boolean', - ], [ - 'int', - 'string|object', - 'bool', - ], implode('|', $types)); - - $parameters[] = new Parameter( - (new Convert($parameter->name))->toCamel(), - $parameter->name, - $parameter->description ?? '', - $parameterType, - $parameter->schema->format, - $parameter->in, - $parameter->schema->default, - ExampleData::scalarData($parameter->name === 'page' ? 1 : strlen($parameter->name), $parameterType, $parameter->schema->format), - ); - } - - $classNameSanitized = str_replace('/', '\\', Utils::className($className)); - $requestBody = []; - if ($operation->requestBody !== null) { - foreach ($operation->requestBody->content as $contentType => $requestBodyDetails) { - $requestBodyClassname = $schemaRegistry->get( - $requestBodyDetails->schema, - $classNameSanitized . '\\Request\\' . Utils::className(str_replace('/', '_', $contentType)), - ); - $requestBody[] = new OperationRequestBody( - $contentType, - Schema::gather($baseNamespace, $requestBodyClassname, $requestBodyDetails->schema, $schemaRegistry, $contractRegistry, $compositSchemaRegistry), - ); - } - } - - $response = []; - foreach ($operation->responses ?? [] as $code => $spec) { - $isError = $code === 'default' || $code >= 400; - $contentCount = 0; - foreach ($spec->content as $contentType => $contentTypeMediaType) { - $contentCount++; - $responseClassname = $schemaRegistry->get( - $contentTypeMediaType->schema, - 'Operations\\' . $classNameSanitized . '\\Response\\' . Utils::className( - str_replace( - '/', - '_', - $contentType, - ) . '\\' . ($code === 'default' ? 'Default' : (HttpReasonPhraseLookup::getReasonPhrase($code) ?? 'Unknown')), - ), - ); - - $response[] = new OperationResponse( - $code, - $contentType, - $spec->description, - Type::gather( - $baseNamespace, - $responseClassname, - $contentType, - $contentTypeMediaType->schema, - true, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ), - ); - if ($isError) { - $throwableSchemaRegistry->add('Schema\\' . $responseClassname); - continue; - } - - $returnType[] = $responseClassname; - } - - if ($contentCount !== 0) { - continue; - } - - $headers = []; - foreach ($spec->headers as $headerName => $headerSpec) { - $headers[$headerName] = new Header($headerName, Schema::gather( - $baseNamespace, - $schemaRegistry->get( - $headerSpec->schema, - 'WebHookHeader\\' . ucfirst(preg_replace('/\PL/u', '', $headerName)), - ), - $headerSpec->schema, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ), ExampleData::determiteType($headerSpec->example)); - } - - $empties[] = new OperationEmptyResponse($code, $spec->description, $headers); - } - - if (count($returnType) === 0) { - $returnType[] = '\\' . ResponseInterface::class; - } - - $name = lcfirst(trim(Utils::basename($className), '\\')); - $group = strlen(trim(trim(Utils::dirname($className), '\\'), '.')) > 0 ? trim(str_replace('\\', '', Utils::dirname($className)), '\\') : null; - - return new \ApiClients\Tools\OpenApiClientGenerator\Representation\Operation( - ClassString::factory($baseNamespace, 'Internal\\Operation\\' . Utils::fixKeyword($className)), - ClassString::factory($baseNamespace, $classNameSanitized), - ClassString::factory($baseNamespace, 'Internal\\Operator\\' . Utils::fixKeyword($className)), - lcfirst( - str_replace( - ['\\'], - ['👷'], - ClassString::factory($baseNamespace, Utils::fixKeyword($className))->relative, - ), - ), - $name, - (new Convert($name))->toCamel(), - $group, - $group === null ? null : (new Convert($group))->toCamel(), - $operation->operationId, - strtoupper($matchMethod), - strtoupper($method), - $operation->summary, - $operation->externalDocs, - $path, - $metaData, - array_unique($returnType), - [ - ...array_filter($parameters, static fn (Parameter $parameter): bool => $parameter->default === null), - ...array_filter($parameters, static fn (Parameter $parameter): bool => $parameter->default !== null), - ], - $requestBody, - $response, - $empties, - ); - } -} diff --git a/src/Gatherer/OperationHydrator.php b/src/Gatherer/OperationHydrator.php deleted file mode 100644 index 2156c17..0000000 --- a/src/Gatherer/OperationHydrator.php +++ /dev/null @@ -1,39 +0,0 @@ -response as $response) { - if (! ($response->content->payload instanceof Schema)) { - continue; - } - - foreach (HydratorUtils::listSchemas($response->content->payload) as $schema) { - $schemaClasses[] = $schema; - } - } - } - - return Hydrator::gather( - $baseNamespace, - 'Operation\\' . $className, - '🌀', - ...$schemaClasses, - ); - } -} diff --git a/src/Gatherer/Path.php b/src/Gatherer/Path.php deleted file mode 100644 index a8a85b8..0000000 --- a/src/Gatherer/Path.php +++ /dev/null @@ -1,131 +0,0 @@ -getOperations() as $method => $operation) { - $operationClassName = Utils::className($operation->operationId); - if (strlen($operationClassName) === 0) { - continue; - } - - $operations[] = $opp = Operation::gather( - $baseNamespace, - $operationClassName, - $method, - $method, - $path, - [], - $operation, - $throwableSchemaRegistry, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - - if ($voters !== null && is_array($voters->listOperation)) { - $shouldStream = false; - $voter = null; - /** @phpstan-ignore-next-line */ - foreach ($voters->listOperation as $voter) { - if ($voter::list($opp)) { - $shouldStream = true; - break; - } - } - - if ($voter !== null && $shouldStream) { - $operations[] = Operation::gather( - $baseNamespace, - $operationClassName . 'Listing', - 'LIST', - $method, - $path, - [ - 'listOperation' => [ - 'key' => $voter::incrementorKey(), - 'initialValue' => $voter::incrementorInitialValue(), - 'keys' => $voter::keys(), - ], - ], - $operation, - $throwableSchemaRegistry, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - } - - if ($voters === null || ! is_array($voters->streamOperation)) { - continue; - } - - $shouldStream = false; - foreach ($voters->streamOperation as $voter) { - if ($voter::stream($opp)) { - $shouldStream = true; - break; - } - } - - if (! $shouldStream) { - continue; - } - - $operations[] = Operation::gather( - $baseNamespace, - $operationClassName . 'Streaming', - 'STREAM', - $method, - $path, - [], - $operation, - $throwableSchemaRegistry, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - - return new \ApiClients\Tools\OpenApiClientGenerator\Representation\Path( - ClassString::factory($baseNamespace, $className), - OperationHydrator::gather( - $baseNamespace, - $className, - ...$operations, - ), - $operations, - ); - } -} diff --git a/src/Gatherer/Property.php b/src/Gatherer/Property.php deleted file mode 100644 index ae71253..0000000 --- a/src/Gatherer/Property.php +++ /dev/null @@ -1,129 +0,0 @@ -examples ?? []) > 0) { - $examples = array_values(array_filter($property->examples, static fn (mixed $value): bool => $value !== null)); - // Main reason we're doing this is so we cause more variety in the example data when a list of examples is provided, but also consistently pick the same item so we do don't cause code churn - /** @phpstan-ignore-next-line */ - $exampleData = $examples[strlen($sourcePropertyName) % 2 ? 0 : count($examples) - 1]; - } - - if ($exampleData === null && $property->example !== null) { - $exampleData = $property->example; - } - - if ($exampleData === null && count($property->enum ?? []) > 0) { - $enum = $property->enum; - $enums = array_values(array_filter($property->enum, static fn (mixed $value): bool => $value !== null)); - // Main reason we're doing this is so we cause more variety in the enum based example data, but also consistently pick the same item so we do don't cause code churn - /** @phpstan-ignore-next-line */ - $exampleData = $enums[strlen($sourcePropertyName) % 2 ? 0 : count($enums) - 1]; - } - - $propertyName = str_replace([ - '@', - '+', - '-', - '$', - ], [ - '_AT_', - '_PLUS_', - '_MIN_', - '_DOLLAR_', - ], $sourcePropertyName); - $propertyName = preg_replace_callback( - '/[0-9]+/', - static function ($matches) { - return '_' . str_replace(['-', ' '], '_', NumberToWords::transformNumber('en', (int) $matches[0])) . '_'; - }, - $propertyName, - ); - - $type = Type::gather( - $baseNamespace, - $className, - $propertyName, - $property, - $required, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - - if ($property->type === 'array' && is_array($type->payload)) { - $arrayItemsRaw = []; - $arrayItemsNode = []; - - foreach ($type->payload as $index => $arrayItem) { - $arrayItemExampleData = ExampleData::gather( - $exampleData, - $arrayItem->type === 'union' ? $arrayItem->payload[(array_key_exists($index, $arrayItem->payload) ? $index : 0)] : $arrayItem, - $propertyName . str_pad('', $index + 1, '_'), - ); - $arrayItemsRaw[] = $arrayItemExampleData->raw; - $arrayItemsNode[] = new Node\Expr\ArrayItem($arrayItemExampleData->node); - } - - $exampleData = new Representation\ExampleData($arrayItemsRaw, new Node\Expr\Array_($arrayItemsNode)); - } elseif ($type->type === 'union') { - foreach ($type->payload as $index => $arrayItem) { - $exampleData = ExampleData::gather( - $arrayItem->payload instanceof Representation\PropertyType ? $exampleData : null, - $arrayItem->payload instanceof Representation\PropertyType ? $arrayItem->payload : $arrayItem, - $propertyName . str_pad('', $index + 1, '_'), - ); - } - } else { - $exampleData = ExampleData::gather($exampleData, $type, $propertyName); - } - - return new Representation\Property( - (new Convert($propertyName))->toCamel(), - $sourcePropertyName, - $property->description ?? '', - $exampleData, - $type, - $type->nullable, - $enum, - ); - } -} diff --git a/src/Gatherer/Schema.php b/src/Gatherer/Schema.php deleted file mode 100644 index 36d0cd2..0000000 --- a/src/Gatherer/Schema.php +++ /dev/null @@ -1,116 +0,0 @@ -allOf) && count($schema->allOf) > 0) { - return IntersectionSchema::gather( - $baseNamespace, - $className, - $schema, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - - $className = Utils::className($className); - $isArray = $schema->type === 'array'; - $properties = []; - $example = []; - - if ($isArray) { - $schema = $schema->items; - } - - foreach ($schema->properties as $propertyName => $property) { - $gatheredProperty = $properties[] = Property::gather( - $baseNamespace, - $className, - (string) $propertyName, - in_array( - (string) $propertyName, - $schema->required ?? [], - false, - ), - $property, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - - $example[$gatheredProperty->sourceName] = $gatheredProperty->example->raw; - - foreach (['examples', 'example'] as $examplePropertyName) { - if (array_key_exists($gatheredProperty->sourceName, $example)) { - break; - } - - if (! property_exists($schema, $examplePropertyName) || ! is_array($schema->$examplePropertyName) || ! array_key_exists($gatheredProperty->sourceName, $schema->$examplePropertyName)) { - continue; - } - - $example[$gatheredProperty->sourceName] = $schema->$examplePropertyName[$gatheredProperty->sourceName]; - } - - foreach ($property->enum ?? [] as $value) { - $example[$gatheredProperty->sourceName] = $value; - break; - } - - if ($example[$gatheredProperty->sourceName] !== null || $schema->required) { - continue; - } - - unset($example[$gatheredProperty->sourceName]); - } - - return new \ApiClients\Tools\OpenApiClientGenerator\Representation\Schema( - ClassString::factory($baseNamespace, 'Schema\\' . $className), - [ - new Contract( - ClassString::factory( - $baseNamespace, - $contractRegistry->get($schema, 'Contract\\' . $className), - ), - $properties, - ), - ], - ClassString::factory($baseNamespace, 'Error\\' . $className), - ClassString::factory($baseNamespace, 'ErrorSchemas\\' . $className), - $schema->title ?? '', - $schema->description ?? '', - $example, - $properties, - $schema, - $isArray, - ($schema->type === null ? ['object'] : (is_array($schema->type) ? $schema->type : [$schema->type])), - ); - } -} diff --git a/src/Gatherer/Type.php b/src/Gatherer/Type.php deleted file mode 100644 index 470fb06..0000000 --- a/src/Gatherer/Type.php +++ /dev/null @@ -1,280 +0,0 @@ -type; - $nullable = ! $required; - - if (is_array($property->allOf) && count($property->allOf) > 0) { - return new PropertyType( - 'object', - null, - null, - IntersectionSchema::gather( - $baseNamespace, - $schemaRegistry->get( - $property, - Utils::className($className . '\\' . $propertyName), - ), - $property, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ), - $nullable, - ); - } - - if (is_array($property->oneOf) && count($property->oneOf) > 0) { - // Check if nullable - if ( - count($property->oneOf) === 2 && - count(array_filter($property->oneOf, static fn (BaseSchema $schema): bool => $schema->type === 'null')) === 1 - ) { - return self::gather( - $baseNamespace, - $className, - $propertyName, - current(array_filter($property->oneOf, static fn (BaseSchema $schema): bool => $schema->type !== 'null')), - false, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - - return new PropertyType( - 'union', - null, - null, - [ - ...(static function ( - Namespace_ $baseNamespace, - string $className, - string $propertyName, - array $properties, - bool $required, - SchemaRegistry $schemaRegistry, - ContractRegistry $contractRegistry, - CompositSchemaRegistry $compositSchemaRegistry, - ): iterable { - foreach ($properties as $index => $property) { - yield self::gather( - $baseNamespace, - $className, - $propertyName . '\\' . NumberToWords::transformNumber('en', $index), - $property, - $required, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - })( - $baseNamespace, - $className, - $propertyName, - $property->oneOf, - $required, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ), - ], - $nullable, - ); - } - - if (is_array($property->anyOf) && count($property->anyOf) > 0) { - // Check if nullable - if ( - count($property->anyOf) === 2 && - count(array_filter($property->anyOf, static fn (BaseSchema $schema): bool => $schema->type === 'null')) === 1 - ) { - return self::gather( - $baseNamespace, - $className, - $propertyName, - current(array_filter($property->anyOf, static fn (BaseSchema $schema): bool => $schema->type !== 'null')), - false, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - - return new PropertyType( - 'union', - null, - null, - [ - ...(static function ( - Namespace_ $baseNamespace, - string $className, - string $propertyName, - array $properties, - bool $required, - SchemaRegistry $schemaRegistry, - ContractRegistry $contractRegistry, - CompositSchemaRegistry $compositSchemaRegistry, - ): iterable { - foreach ($properties as $index => $property) { - yield self::gather( - $baseNamespace, - $className, - $propertyName . '\\' . NumberToWords::transformNumber('en', $index), - $property, - $required, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - })( - $baseNamespace, - $className, - $propertyName, - $property->anyOf, - $required, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ), - ], - $nullable, - ); - } - - if ( - is_array($type) && - count($type) === 2 && - ( - in_array(null, $type, false) || - in_array('null', $type, false) - ) - ) { - foreach ($type as $pt) { - /** @phpstan-ignore-next-line */ - if ($pt !== null && $pt !== 'null') { - $type = $pt; - break; - } - } - - $nullable = true; - } - - if ($type === 'array') { - $arrayItems = []; - - foreach (range(0, ($property->maxItems ?? $property->minItems ?? 2) - 1) as $index) { - $arrayItems[] = self::gather( - $baseNamespace, - $className, - $propertyName, - $property->items, - $required, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - - return new PropertyType( - 'array', - null, - null, - $arrayItems, - $nullable, - ); - } - - if (is_string($type)) { - $type = str_replace([ - 'integer', - 'number', - 'any', - 'null', - 'boolean', - ], [ - 'int', - 'int|float', - '', - '', - 'bool', - ], $type); - } else { - $type = ''; - } - - if ($type === '') { - return new PropertyType( - 'scalar', - null, - null, - 'string', - false, - ); - } - - if ($type === 'object') { - return new PropertyType( - 'object', - null, - null, - Schema::gather( - $baseNamespace, - $schemaRegistry->get( - $property, - Utils::className($className . '\\' . $propertyName), - ), - $property, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ), - $nullable, - ); - } - - return new PropertyType( - 'scalar', - $property->format ?? null, - $property->pattern ?? null, - $type, - $nullable, - ); - } -} diff --git a/src/Gatherer/WebHook.php b/src/Gatherer/WebHook.php deleted file mode 100644 index 182c733..0000000 --- a/src/Gatherer/WebHook.php +++ /dev/null @@ -1,77 +0,0 @@ -post?->requestBody === null && ! property_exists($webhook->post->requestBody, 'content')) { - throw new RuntimeException('Missing request body content to deal with'); - } - - [$event] = explode('/', $webhook->post->operationId); - - $headers = []; - foreach ($webhook->post->parameters ?? [] as $header) { - if ($header->in !== 'header') { - continue; - } - - $headers[] = new Header($header->name, Schema::gather( - $baseNamespace, - $schemaRegistry->get( - $header->schema, - 'WebHookHeader\\' . ucfirst(preg_replace('/\PL/u', '', $header->name)), - ), - $header->schema, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ), ExampleData::determiteType($header->example)); - } - - return new \ApiClients\Tools\OpenApiClientGenerator\Representation\WebHook( - $event, - $webhook->post->summary ?? '', - $webhook->post->description ?? '', - $webhook->post->operationId, - $webhook->post->externalDocs->url ?? '', - $headers, - iterator_to_array((static function (array $content, SchemaRegistry $schemaRegistry, ContractRegistry $contractRegistry, CompositSchemaRegistry $compositSchemaRegistry, Namespace_ $baseNamespace): iterable { - foreach ($content as $type => $schema) { - yield $type => Schema::gather( - $baseNamespace, - $schemaRegistry->get($schema->schema, 'T' . time()), - $schema->schema, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - ); - } - })($webhook->post->requestBody->content, $schemaRegistry, $contractRegistry, $compositSchemaRegistry, $baseNamespace)), - ); - } -} diff --git a/src/Gatherer/WebHookHydrator.php b/src/Gatherer/WebHookHydrator.php deleted file mode 100644 index 413a651..0000000 --- a/src/Gatherer/WebHookHydrator.php +++ /dev/null @@ -1,34 +0,0 @@ -schema as $webHookSchema) { - foreach (HydratorUtils::listSchemas($webHookSchema) as $schema) { - $schemaClasses[] = $schema; - } - } - } - - return Hydrator::gather( - $baseNamespace, - 'WebHook\\' . Utils::className($event), - '🪝', - ...$schemaClasses, - ); - } -} diff --git a/src/Generator.php b/src/Generator.php deleted file mode 100644 index 30c1daf..0000000 --- a/src/Generator.php +++ /dev/null @@ -1,1089 +0,0 @@ -forceGeneration = is_string(getenv('FORCE_GENERATION')) && strlen(getenv('FORCE_GENERATION')) > 0; - - $this->statusOutput = new Output\Status( - ! (new CiDetector())->isCiDetected(), - new Step('hash_current_spec', 'Hashing current spec', false), - new Step('loading_state', 'Loading state', false), - new Step('loading_spec', 'Loading spec', false), - new Step('gathering_schemas', 'Gathering: Schemas', true), - new Step('gathering_webhooks', 'Gathering: WebHooks', true), - new Step('gathering_paths', 'Gathering: Paths', true), - new Step('client_single', 'Client: Single package', false), - new Step('client_subsplit', 'Client: SubSplit across multiple package', false), - new Step('generating_operations', 'Generating: Operations', true), - new Step('gathering_unknown_schemas', 'Gathering: Unknown Schemas', true), - new Step('generating_contracts', 'Generating: Contracts', true), - new Step('generating_schemas', 'Generating: Schemas', true), - new Step('generating_clientinterface', 'Generating: ClientInterface', false), - new Step('generating_client', 'Generating: Client', false), - new Step('generating_operationsinterface_entry_point', 'Generating: OperationsInterface Entry Point', false), - new Step('generating_operations_entry_point', 'Generating: Operations Entry Point', false), - new Step('generating_webhooks', 'Generating: WebHooks', true), - new Step('generating_webhooks_entry_point', 'Generating: WebHooks Entry Point', false), - new Step('generating_hydrators', 'Generating: Hydrators', true), - new Step('generating_hydrators_entry_point', 'Generating: Hydrators Entry Point', false), - new Step('generating_templated_files', 'Generating: Templated files', false), - new Step('generating_templates_files_root_package', 'Generating: Templates Files: Root Package', false), - new Step('generating_templates_files_common_package', 'Generating: Templates Files: Common Package', false), - new Step('generating_templates_files_subsplit_package', 'Generating: Templates Files: SubSplit Packages', true), - new Step('generating_subsplit_configuration', 'Generating: SubSplit Configuration', false), - ); - - if (! $this->configuration->entryPoints->operations) { - $this->statusOutput->markStepWontDo('generating_operationsinterface_entry_point'); - $this->statusOutput->markStepWontDo('generating_operations_entry_point'); - } - - if (! $this->configuration->entryPoints->webHooks) { - $this->statusOutput->markStepWontDo('generating_webhooks'); - $this->statusOutput->markStepWontDo('generating_webhooks_entry_point'); - } - - if ($this->configuration->templates === null) { - $this->statusOutput->markStepWontDo('generating_templated_files'); - $this->statusOutput->markStepWontDo('generating_templates_files_root_package'); - $this->statusOutput->markStepWontDo('generating_templates_files_common_package'); - $this->statusOutput->markStepWontDo('generating_templates_files_subsplit_package'); - } - - $specLocation = $this->configuration->spec; - if (strpos($specLocation, '://') === false) { - $specLocation = realpath($configurationLocation . $specLocation); - } - - $this->statusOutput->markStepBusy('hash_current_spec'); - $this->currentSpecHash = md5(file_get_contents($specLocation)); - $this->statusOutput->markStepDone('hash_current_spec'); - - $this->statusOutput->markStepBusy('loading_state'); - $this->state = (new ObjectMapperUsingReflection())->hydrateObject( - State::class, - /** @phpstan-ignore-next-line */ - file_exists($configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $this->configuration->state->file) ? json_decode( - file_get_contents( - $configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $this->configuration->state->file, - ), - true, - ) : [ - 'specHash' => '', - 'generatedFiles' => [ - 'files' => [], - ], - 'additionalFiles' => [ - 'files' => [], - ], - ], - ); - $this->statusOutput->markStepDone('loading_state'); - - if ( - ! $this->forceGeneration && - $this->state->specHash === $this->currentSpecHash && - (static function (string $root, Files $files, string ...$additionalFiles): bool { - foreach ($additionalFiles as $additionalFile) { - if (! $files->has($additionalFile)) { - return false; - } - - if ($files->has($additionalFile) && (! file_exists($root . $additionalFile) || $files->get($additionalFile)->hash !== md5(file_get_contents($root . $additionalFile)))) { - return false; - } - } - - return true; - })($configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR, $this->state->additionalFiles, ...($this->configuration->state->additionalFiles ?? [])) - ) { - throw new RuntimeException('Neither spec or marker files has changed so no need to regenerate'); - } - - $this->state->specHash = $this->currentSpecHash; - - $this->statusOutput->markStepBusy('loading_spec'); - $this->spec = Reader::readFromYamlFile($specLocation); - $this->statusOutput->markStepDone('loading_spec'); - } - - public function generate(string $namespace, string $namespaceTest, string $configurationLocation): void - { - $existingFiles = array_map( - static fn (StateFile $file): string => $file->name, - $this->state->generatedFiles->files(), - ); - $codePrinter = new Standard(); - - foreach ($this->all($configurationLocation) as $file) { - $fileName = $configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $file->pathPrefix . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $file->fqcn) . (strpos($file->fqcn, '.') !== false ? '' : '.php'); - if ($file->contents instanceof Node\Stmt\Namespace_) { - array_unshift($file->contents->stmts, ...(static function (array $uses): iterable { - foreach ($uses as $use => $alias) { - yield new Node\Stmt\Use_([ - new Node\Stmt\UseUse( - new Node\Name( - $use, - ), - $alias, - ), - ]); - } - })([ - ltrim($namespace, '\\') . 'Contract' => null, - ltrim($namespace, '\\') . 'Error' => 'ErrorSchemas', - ltrim($namespace, '\\') . 'Internal' => null, - ltrim($namespace, '\\') . 'Operation' => null, - ltrim($namespace, '\\') . 'Schema' => null, - 'League\OpenAPIValidation' => null, - 'React\Http' => null, - 'ApiClients\Contracts' => null, - ])); - } - - $fileContents = (! is_string($file->contents) ? $codePrinter->prettyPrintFile([ - new Node\Stmt\Declare_([ - new Node\Stmt\DeclareDeclare('strict_types', new Node\Scalar\LNumber(1)), - ]), - $file->contents, - ]) : $file->contents) . PHP_EOL; - $fileContentsHash = md5($fileContents); - if ( - ! $this->state->generatedFiles->has($fileName) || - $this->state->generatedFiles->get($fileName)->hash !== $fileContentsHash || - $this->forceGeneration - ) { - try { - /** @phpstan-ignore-next-line */ - @mkdir(dirname($fileName), 0744, true); - } catch (FilesystemException) { - // @ignoreException - } - - file_put_contents($fileName, $fileContents); - $this->state->generatedFiles->upsert($fileName, $fileContentsHash); - - while (! file_exists($fileName) || $fileContentsHash !== md5(file_get_contents($fileName))) { - usleep(100); - } - } - - if (! (strpos($fileName, DIRECTORY_SEPARATOR . 'Types' . DIRECTORY_SEPARATOR) !== false) && substr($fileName, -4) === '.php') { - include_once $fileName; - } - - $existingFiles = array_filter( - $existingFiles, - static fn (string $file): bool => $file !== $fileName, - ); - } - - foreach ($existingFiles as $existingFile) { - $this->state->generatedFiles->remove($existingFile); - unlink($existingFile); - } - - foreach ($this->state->additionalFiles->files() as $file) { - $this->state->additionalFiles->remove($file->name); - } - - foreach ($this->configuration->state->additionalFiles ?? [] as $additionalFile) { - $this->state->additionalFiles->upsert( - $additionalFile, - file_exists($configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $additionalFile) ? md5(file_get_contents($configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $additionalFile)) : '', - ); - } - - try { - /** @phpstan-ignore-next-line */ - @mkdir(dirname($configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $this->configuration->state->file), 0744, true); - } catch (FilesystemException) { - // @ignoreException - } - - file_put_contents( - $configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $this->configuration->state->file, - json_encode( - (new ObjectMapperUsingReflection())->serializeObject( - $this->state, - ), - JSON_PRETTY_PRINT, - ), - ); - } - - /** @return iterable */ - private function all(string $configurationLocation): iterable - { - $schemaRegistry = new SchemaRegistry( - $this->configuration->namespace, - $this->configuration->schemas->allowDuplication ?? false, - $this->configuration->schemas->useAliasesForDuplication ?? false, - ); - $contractRegistry = new ContractRegistry(); - $compositSchemaRegistry = new CompositSchemaRegistry( - $this->configuration->namespace, - ); - - $contracts = []; - $schemas = []; - $throwableSchemaRegistry = new ThrowableSchema(); - if (count($this->spec->components->schemas ?? []) > 0) { - /** @phpstan-ignore-next-line */ - $this->statusOutput->itemForStep('gathering_schemas', count($this->spec->components->schemas)); - /** - * Do this loop twice to ensure we added all schemas to the schema registry BEFORE we start to gather them - * which will trigger looking up schemas as properties and end up with weird naming. - * - * @phpstan-ignore-next-line - */ - foreach ($this->spec->components->schemas as $name => $schema) { - assert($schema instanceof \cebe\openapi\spec\Schema); - $schemaRegistry->addClassName(Utils::className($name), $schema); - } - - /** - * Gather all the schemas now that we've added all of them to the schema registry. - * - * @phpstan-ignore-next-line - */ - foreach ($this->spec->components->schemas as $name => $schema) { - assert($schema instanceof \cebe\openapi\spec\Schema); - $schema = Gatherer\Schema::gather($this->configuration->namespace, Utils::className($name), $schema, $schemaRegistry, $contractRegistry, $compositSchemaRegistry); - $schemas[] = $schema; - $contracts = [...$contracts, ...$schema->contracts]; - $this->statusOutput->advanceStep('gathering_schemas'); - } - } - - $this->statusOutput->markStepDone('gathering_schemas'); - - /** @var array> $webHooks */ - $webHooks = []; - if (count($this->spec->webhooks ?? []) > 0) { - $this->statusOutput->itemForStep('gathering_webhooks', count($this->spec->webhooks)); - foreach ($this->spec->webhooks as $webHook) { - try { - $webHookje = Gatherer\WebHook::gather($this->configuration->namespace, $webHook, $schemaRegistry, $contractRegistry, $compositSchemaRegistry); - if (! array_key_exists($webHookje->event, $webHooks)) { - $webHooks[$webHookje->event] = []; - } - - $webHooks[$webHookje->event][] = $webHookje; - /** @phpstan-ignore-next-line */ - } catch (RuntimeException) { - // @ignoreException - } - - $this->statusOutput->advanceStep('gathering_webhooks'); - } - } - - $this->statusOutput->markStepDone('gathering_webhooks'); - - $paths = []; - if (count($this->spec->paths ?? []) > 0) { - $this->statusOutput->itemForStep('gathering_paths', count($this->spec->paths)); - foreach ($this->spec->paths as $path => $pathItem) { - if ($path === '/') { - $pathClassName = 'Root'; - } else { - $pathClassName = trim(Utils::className($path), '\\'); - } - - if (strlen($path) === 0 || strlen($pathClassName) === 0) { - continue; - } - - $paths[] = Gatherer\Path::gather( - $this->configuration->namespace, - $pathClassName, - $path, - $pathItem, - $schemaRegistry, - $contractRegistry, - $compositSchemaRegistry, - $throwableSchemaRegistry, - $this->configuration->voter, - ); - $this->statusOutput->advanceStep('gathering_paths'); - } - - $this->statusOutput->markStepDone('gathering_paths'); - } - - if ($this->configuration->subSplit === null) { - $this->statusOutput->markStepWontDo( - 'client_subsplit', - 'generating_templates_files_root_package', - 'generating_templates_files_common_package', - 'generating_templates_files_subsplit_package', - 'generating_subsplit_configuration', - ); - - $this->statusOutput->markStepBusy('client_single'); - - /** @phpstan-ignore-next-line */ - yield from $this->oneClient($configurationLocation, $schemaRegistry, $contractRegistry, $compositSchemaRegistry, $throwableSchemaRegistry, $contracts, $schemas, $paths, $webHooks); - - $this->statusOutput->markStepDone('client_single'); - } else { - $this->statusOutput->markStepWontDo( - 'client_single', - 'generating_templated_files', - ); - - $this->statusOutput->markStepBusy('client_subsplit'); - - /** @phpstan-ignore-next-line */ - yield from $this->subSplitClient($configurationLocation, $schemaRegistry, $contractRegistry, $compositSchemaRegistry, $throwableSchemaRegistry, $contracts, $schemas, $paths, $webHooks); - - $this->statusOutput->markStepDone('client_subsplit'); - } - } - - /** - * @param array $contracts - * @param array $schemas - * @param array $paths - * @param array> $webHooks - * - * @return iterable - */ - private function oneClient( - string $configurationLocation, - SchemaRegistry $schemaRegistry, - ContractRegistry $contractRegistry, - CompositSchemaRegistry $compositSchemaRegistry, - ThrowableSchema $throwableSchemaRegistry, - array $contracts, - array $schemas, - array $paths, - array $webHooks, - ): iterable { - $hydrators = []; - $operations = []; - $this->statusOutput->itemForStep('generating_operations', count($paths)); - foreach ($paths as $path) { - $hydrators[] = $path->hydrator; - $operations = [...$operations, ...$path->operations]; - foreach ($path->operations as $operation) { - yield from Operation::generate( - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $operation, - $path->hydrator, - $throwableSchemaRegistry, - $this->configuration, - ); - - yield from Operator::generate( - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $operation, - $path->hydrator, - $throwableSchemaRegistry, - $this->configuration, - ); - - yield from OperationTest::generate( - $this->configuration->destination->test . DIRECTORY_SEPARATOR, - $operation, - $path->hydrator, - $throwableSchemaRegistry, - $this->configuration, - ); - } - - $this->statusOutput->advanceStep('generating_operations'); - } - - $this->statusOutput->markStepDone('generating_operations'); - - $unknownSchemaCount = 0; - while ($schemaRegistry->hasUnknownSchemas()) { - $unknownSchemas = [...$schemaRegistry->unknownSchemas()]; - $unknownSchemaCount += count($unknownSchemas); - $this->statusOutput->itemForStep('gathering_unknown_schemas', $unknownSchemaCount); - foreach ($unknownSchemas as $schema) { - $schema = Gatherer\Schema::gather($this->configuration->namespace, $schema->className, $schema->schema, $schemaRegistry, $contractRegistry, $compositSchemaRegistry); - $schemas[] = $schema; - $contracts = [...$contracts, ...$schema->contracts]; - $this->statusOutput->advanceStep('gathering_unknown_schemas'); - } - } - - $this->statusOutput->markStepDone('gathering_unknown_schemas'); - - $this->statusOutput->itemForStep('generating_contracts', count($contracts)); - foreach ($contracts as $contract) { - yield from Contract::generate( - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $contract, - ); - - $this->statusOutput->advanceStep('generating_contracts'); - } - - $this->statusOutput->markStepDone('generating_contracts'); - - $this->statusOutput->itemForStep('generating_schemas', count($schemas)); - foreach ($schemas as $schema) { - yield from Schema::generate( - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $schema, - [...$schemaRegistry->aliasesForClassName($schema->className->relative)], - ); - - if ($throwableSchemaRegistry->has($schema->className->relative)) { - yield from Error::generate( - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $schema, - ); - } - - $this->statusOutput->advanceStep('generating_schemas'); - } - - $this->statusOutput->markStepDone('generating_schemas'); - - $client = Gatherer\Client::gather($this->spec, ...$paths); - $routers = new Client\Routers(); - - $this->statusOutput->markStepBusy('generating_clientinterface'); - - yield from ClientInterface::generate( - $this->configuration, - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $operations, - ); - - $this->statusOutput->markStepDone('generating_clientinterface'); - - $this->statusOutput->markStepBusy('generating_client'); - - yield from Client::generate( - $this->configuration, - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $this->configuration->destination->test . DIRECTORY_SEPARATOR, - $client, - $routers, - ); - - $this->statusOutput->markStepDone('generating_client'); - - if ($this->configuration->entryPoints->operations) { - $this->statusOutput->markStepBusy('generating_operationsinterface_entry_point'); - - yield from OperationsInterface::generate( - $this->configuration, - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $operations, - ); - - $this->statusOutput->markStepDone('generating_operationsinterface_entry_point'); - - $this->statusOutput->markStepBusy('generating_operations_entry_point'); - - yield from Operations::generate( - $this->configuration, - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $paths, - $operations, - ); - - $this->statusOutput->markStepDone('generating_operations_entry_point'); - } - - if ($this->configuration->entryPoints->webHooks) { - $webHooksHydrators = []; - $this->statusOutput->itemForStep('generating_webhooks', count($webHooks)); - foreach ($webHooks as $event => $webHook) { - $webHooksHydrators[$event] = $hydrators[] = WebHookHydrator::gather( - $this->configuration->namespace, - $event, - ...$webHook, - ); - - yield from WebHook::generate( - $this->configuration->destination->source . DIRECTORY_SEPARATOR, - $this->configuration->namespace->source . '\\', - $event, - $schemaRegistry, - ...$webHook, - ); - - $this->statusOutput->advanceStep('generating_webhooks'); - } - - $this->statusOutput->markStepDone('generating_webhooks'); - - $this->statusOutput->markStepBusy('generating_webhooks_entry_point'); - - yield from WebHooks::generate($this->configuration->destination->source . DIRECTORY_SEPARATOR, $this->configuration->namespace->source . '\\', $webHooksHydrators, $webHooks); - - $this->statusOutput->markStepDone('generating_webhooks_entry_point'); - } - - $this->statusOutput->itemForStep('generating_hydrators', count($hydrators)); - foreach ($hydrators as $hydrator) { - yield from Hydrator::generate($this->configuration->destination->source . DIRECTORY_SEPARATOR, $hydrator); - - $this->statusOutput->advanceStep('generating_hydrators'); - } - - $this->statusOutput->markStepDone('generating_hydrators'); - - $this->statusOutput->markStepBusy('generating_hydrators_entry_point'); - - yield from Hydrators::generate($this->configuration->destination->source . DIRECTORY_SEPARATOR, $this->configuration->namespace->source . '\\', ...$hydrators); - - $this->statusOutput->markStepDone('generating_hydrators_entry_point'); - - if (! ($this->configuration->templates instanceof Templates)) { - return; - } - - $this->statusOutput->markStepBusy('generating_templated_files'); - \WyriHaximus\SubSplitTools\Files::setUp( - $configurationLocation . $this->configuration->templates->dir, - $configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR, - (static function (string $namespace, array|null $variables, array $operations, array $webHooks, Configuration $configuration): array { - $vars = $variables ?? []; - $vars['namespace'] = $namespace; - $vars['client'] = [ - 'configuration' => $configuration, - 'operations' => $operations, - 'webHooks' => $webHooks, - ]; - $vars['qa'] = $configuration->qa; - - return $vars; - })( - $this->configuration->namespace->source . '\\', - $this->configuration->templates->variables, - $operations, - $webHooks, - $this->configuration, - ), - ); - $this->statusOutput->markStepDone('generating_templated_files'); - } - - /** - * @param array $contracts - * @param array $schemas - * @param array $paths - * @param array> $webHooks - * - * @return iterable - */ - private function subSplitClient( - string $configurationLocation, - SchemaRegistry $schemaRegistry, - ContractRegistry $contractRegistry, - CompositSchemaRegistry $compositSchemaRegistry, - ThrowableSchema $throwableSchemaRegistry, - array $contracts, - array $schemas, - array $paths, - array $webHooks, - ): iterable { - if ($this->configuration->subSplit === null) { - throw new RuntimeException('Subsplit configuration must be present'); - } - - $splits = []; - /** @var array> $hydrators */ - $hydrators = []; - $operations = []; - $this->statusOutput->itemForStep('generating_operations', count($paths)); - foreach ($paths as $path) { - $split = null; - foreach ($this->configuration->subSplit->sectionGenerator ?? [] as $generator) { - $split = $generator::path($path); - if (is_string($split)) { - break; - } - } - - if (! is_string($split)) { - continue; - } - - $splits[] = $split; - $hydrators[$split][] = $path->hydrator; - $operations = [...$operations, ...$path->operations]; - foreach ($path->operations as $operation) { - yield from Operation::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->sectionPackage, $split) . $this->configuration->destination->source, - $operation, - $path->hydrator, - $throwableSchemaRegistry, - $this->configuration, - ); - - yield from Operator::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->sectionPackage, $split) . $this->configuration->destination->source, - $operation, - $path->hydrator, - $throwableSchemaRegistry, - $this->configuration, - ); - - yield from OperationTest::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->sectionPackage, $split) . $this->configuration->destination->test, - $operation, - $path->hydrator, - $throwableSchemaRegistry, - $this->configuration, - ); - } - - $this->statusOutput->advanceStep('generating_operations'); - } - - $this->statusOutput->markStepDone('generating_operations'); - - $webHooksHydrators = []; - foreach ($webHooks as $event => $webHook) { - $split = null; - foreach ($this->configuration->subSplit->sectionGenerator ?? [] as $generator) { - $split = $generator::webHook(...$webHook); - if (is_string($split)) { - break; - } - } - - if (! is_string($split)) { - continue; - } - - $splits[] = $split; - $webHooksHydrators[$event] = $hydrators[$split][] = WebHookHydrator::gather( - $this->configuration->namespace, - $event, - ...$webHook, - ); - } - - $unknownSchemaCount = 0; - while ($schemaRegistry->hasUnknownSchemas()) { - $unknownSchemas = [...$schemaRegistry->unknownSchemas()]; - $unknownSchemaCount += count($unknownSchemas); - $this->statusOutput->itemForStep('gathering_unknown_schemas', $unknownSchemaCount); - foreach ($unknownSchemas as $schema) { - $schema = Gatherer\Schema::gather($this->configuration->namespace, $schema->className, $schema->schema, $schemaRegistry, $contractRegistry, $compositSchemaRegistry); - $schemas[] = $schema; - $contracts = [...$contracts, ...$schema->contracts]; - $this->statusOutput->advanceStep('gathering_unknown_schemas'); - } - } - - $this->statusOutput->markStepDone('gathering_unknown_schemas'); - -// $contractCount = 0; -// while ($contractRegistry->hasContracts()) { -// $contracts = [...$contractRegistry->contracts()]; -// $contractCount += count($unknownSchemas); -// $this->statusOutput->itemForStep('generating_contracts', $contractCount); -// foreach ($contracts as $contract) { -// yield from Contract::generate( -// $this->configuration->destination->source . DIRECTORY_SEPARATOR, -// $contract, -// ); -// $this->statusOutput->advanceStep('generating_contracts'); -// } -// } -// -// $this->statusOutput->markStepDone('generating_contracts'); - - $sortedSchemas = []; - foreach ($schemas as $schema) { - if (array_key_exists($schema->className->relative, $sortedSchemas)) { - continue; - } - - $sortedSchemas[$schema->className->relative] = [ - 'section' => 'common', - 'sections' => [], - ]; - } - - foreach ($hydrators as $section => $sectionHydrators) { - foreach ($sectionHydrators as $hydrator) { - foreach ($hydrator->schemas as $schema) { - if ($throwableSchemaRegistry->has($schema->className->relative)) { - continue; - } - - $sortedSchemas[$schema->className->relative]['sections'][] = $section; - } - } - } - - foreach ($sortedSchemas as $className => $sortedSchema) { - $sortedSchemas[$className]['sections'] = array_values(array_unique($sortedSchemas[$className]['sections'])); - if (count($sortedSchemas[$className]['sections']) !== 1) { - continue; - } - - $sortedSchemas[$className]['section'] = array_pop($sortedSchemas[$className]['sections']); - $sortedSchemas[$className]['sections'] = [ - $sortedSchemas[$className]['section'], - ]; - } - - $this->statusOutput->itemForStep('generating_schemas', count($schemas)); - foreach ($schemas as $schema) { - yield from Schema::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->sectionPackage, 'common') . $this->configuration->destination->source, - $schema, - [...$schemaRegistry->aliasesForClassName($schema->className->relative)], - ); - - if ($throwableSchemaRegistry->has($schema->className->relative)) { - yield from Error::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->sectionPackage, 'common') . $this->configuration->destination->source, - $schema, - ); - } - - $this->statusOutput->advanceStep('generating_schemas'); - } - - $this->statusOutput->markStepDone('generating_schemas'); - - $client = Gatherer\Client::gather($this->spec, ...$paths); - $routers = new Client\Routers(); - - $this->statusOutput->markStepBusy('generating_clientinterface'); - - yield from ClientInterface::generate( - $this->configuration, - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->rootPackage, '') . $this->configuration->destination->source, - $operations, - ); - - $this->statusOutput->markStepDone('generating_clientinterface'); - - $this->statusOutput->markStepBusy('generating_client'); - - yield from Client::generate( - $this->configuration, - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->rootPackage, '') . $this->configuration->destination->source, - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->rootPackage, '') . $this->configuration->destination->test, - $client, - $routers, - ); - - $this->statusOutput->markStepDone('generating_client'); - - if ($this->configuration->entryPoints->operations) { - $this->statusOutput->markStepBusy('generating_operationsinterface_entry_point'); - - yield from OperationsInterface::generate( - $this->configuration, - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->rootPackage, '') . $this->configuration->destination->source, - $operations, - ); - - $this->statusOutput->markStepDone('generating_operationsinterface_entry_point'); - - $this->statusOutput->markStepBusy('generating_operations_entry_point'); - - yield from Operations::generate( - $this->configuration, - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->rootPackage, '') . $this->configuration->destination->source, - $paths, - $operations, - ); - - $this->statusOutput->markStepDone('generating_operations_entry_point'); - } - - if ($this->configuration->entryPoints->webHooks) { - $this->statusOutput->itemForStep('generating_webhooks', count($webHooks)); - foreach ($webHooks as $event => $webHook) { - $split = null; - foreach ($this->configuration->subSplit->sectionGenerator ?? [] as $generator) { - $split = $generator::webHook(...$webHook); - if (is_string($split)) { - break; - } - } - - if (! is_string($split)) { - continue; - } - - $splits[] = $split; - - yield from WebHook::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->sectionPackage, $split) . $this->configuration->destination->source, - $this->configuration->namespace->source, - $event, - $schemaRegistry, - ...$webHook, - ); - - $this->statusOutput->advanceStep('generating_webhooks'); - } - - $this->statusOutput->markStepDone('generating_webhooks'); - - $this->statusOutput->markStepBusy('generating_webhooks_entry_point'); - - yield from WebHooks::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->rootPackage, '') . $this->configuration->destination->source, - $this->configuration->namespace->source, - $webHooksHydrators, - $webHooks, - ); - - $this->statusOutput->markStepDone('generating_webhooks_entry_point'); - } - - $this->statusOutput->itemForStep('generating_hydrators', count($hydrators)); - foreach ($hydrators as $section => $sectionHydrators) { - foreach ($sectionHydrators as $hydrator) { - yield from Hydrator::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->sectionPackage, $section) . $this->configuration->destination->source, - $hydrator, - ); - } - - $this->statusOutput->advanceStep('generating_hydrators'); - } - - $this->statusOutput->markStepDone('generating_hydrators'); - - $this->statusOutput->markStepBusy('generating_hydrators_entry_point'); - - yield from Hydrators::generate( - $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->splitPathPrefix($this->configuration->subSplit->rootPackage, '') . $this->configuration->destination->source, - $this->configuration->namespace->source . '\\', - ...(static function (array $hydratorSplit): iterable { - foreach ($hydratorSplit as $hydrators) { - yield from [...$hydrators]; - } - })($hydrators), - ); - - $this->statusOutput->markStepDone('generating_hydrators_entry_point'); - - $subSplitConfig = []; - $splits = array_values(array_unique($splits)); - - if ($this->configuration->templates instanceof Templates) { - $this->statusOutput->markStepBusy('generating_templates_files_root_package'); - $subSplitConfig['root'] = [ - 'name' => $this->packageName($this->configuration->subSplit->rootPackage->name, ''), - 'directory' => $this->packageName($this->configuration->subSplit->rootPackage->name, ''), - 'target' => 'git@github.com:php-api-clients/' . $this->packageName($this->configuration->subSplit->rootPackage->name, '') . '.git', - 'target-branch' => $this->configuration->subSplit->branch, - ]; - \WyriHaximus\SubSplitTools\Files::setUp( - $configurationLocation . $this->configuration->templates->dir, - $configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->packageName($this->configuration->subSplit->rootPackage->name, ''), - [ - 'packageName' => $this->configuration->subSplit->rootPackage->name, - 'fullName' => render($this->configuration->subSplit->fullName, ['section' => '']), - 'namespace' => $this->configuration->namespace->source, - 'requires' => [ - [ - 'name' => $this->configuration->subSplit->vendor . '/' . $this->packageName($this->configuration->subSplit->sectionPackage->name, 'common'), - 'version' => '^0.3', - ], - ], - 'suggests' => [ - ...(function (string $sectionPackageName, string ...$splits): iterable { - foreach ($splits as $split) { - yield [ - 'name' => $this->packageName($sectionPackageName, $split), - 'reason' => '*', - ]; - } - })($this->configuration->subSplit->sectionPackage->name, ...$splits), - ], - 'qa' => $this->configuration->qa, - ], - ); - $this->statusOutput->markStepDone('generating_templates_files_root_package'); - - $this->statusOutput->markStepBusy('generating_templates_files_common_package'); - $subSplitConfig['common'] = [ - 'name' => $this->packageName($this->configuration->subSplit->sectionPackage->name, 'common'), - 'directory' => $this->packageName($this->configuration->subSplit->sectionPackage->name, 'common'), - 'target' => 'git@github.com:php-api-clients/' . $this->packageName($this->configuration->subSplit->sectionPackage->name, 'common') . '.git', - 'target-branch' => $this->configuration->subSplit->branch, - ]; - \WyriHaximus\SubSplitTools\Files::setUp( - $configurationLocation . $this->configuration->templates->dir, - $configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->packageName($this->configuration->subSplit->sectionPackage->name, 'common'), - [ - 'packageName' => $this->packageName($this->configuration->subSplit->sectionPackage->name, 'common'), - 'fullName' => render($this->configuration->subSplit->fullName, ['section' => 'common']), - 'namespace' => $this->configuration->namespace->source, - 'requires-dev' => [ - [ - 'name' => $this->configuration->subSplit->vendor . '/' . $this->configuration->subSplit->rootPackage->name, - 'version' => $this->configuration->subSplit->targetVersion, - ], - ], - 'qa' => $this->configuration->qa, - ], - ); - $this->statusOutput->markStepDone('generating_templates_files_common_package'); - - $this->statusOutput->itemForStep('generating_templates_files_subsplit_package', count($splits)); - foreach ($splits as $split) { - $subSplitConfig[$split] = [ - 'name' => $this->packageName($this->configuration->subSplit->sectionPackage->name, $split), - 'directory' => $this->packageName($this->configuration->subSplit->sectionPackage->name, $split), - 'target' => 'git@github.com:php-api-clients/' . $this->packageName($this->configuration->subSplit->sectionPackage->name, $split) . '.git', - 'target-branch' => $this->configuration->subSplit->branch, - ]; - \WyriHaximus\SubSplitTools\Files::setUp( - $configurationLocation . $this->configuration->templates->dir, - $configurationLocation . $this->configuration->destination->root . DIRECTORY_SEPARATOR . $this->configuration->subSplit->subSplitsDestination . DIRECTORY_SEPARATOR . $this->packageName($this->configuration->subSplit->sectionPackage->name, $split), - [ - 'packageName' => $this->packageName($this->configuration->subSplit->sectionPackage->name, $split), - 'fullName' => render($this->configuration->subSplit->fullName, ['section' => $split]), - 'namespace' => $this->configuration->namespace->source, - 'requires' => [ - [ - 'name' => $this->configuration->subSplit->vendor . '/' . $this->packageName($this->configuration->subSplit->sectionPackage->name, 'common'), - 'version' => $this->configuration->subSplit->targetVersion, - ], - ], - 'requires-dev' => [ - [ - 'name' => $this->configuration->subSplit->vendor . '/' . $this->configuration->subSplit->rootPackage->name, - 'version' => $this->configuration->subSplit->targetVersion, - ], - ], - 'qa' => $this->configuration->qa, - ], - ); - $this->statusOutput->advanceStep('generating_templates_files_subsplit_package'); - } - - $this->statusOutput->markStepDone('generating_templates_files_subsplit_package'); - } - - $this->statusOutput->markStepBusy('generating_subsplit_configuration'); - try { - /** @phpstan-ignore-next-line */ - @mkdir(dirname($configurationLocation . $this->configuration->subSplit->subSplitConfiguration), 0744, true); - } catch (FilesystemException) { - // @ignoreException - } - - file_put_contents( - $configurationLocation . $this->configuration->subSplit->subSplitConfiguration, - json_encode( - [ - 'sub-splits' => array_values($subSplitConfig), - ], - JSON_PRETTY_PRINT, - ) . PHP_EOL, - ); - $this->statusOutput->markStepDone('generating_subsplit_configuration'); - } - - private function packageName(string $name, string $split): string - { - return render( - $name, - ['section' => $split], - ); - } - - private function splitPathPrefix(RootPackage|SectionPackage $package, string $section): string - { - return $this->packageName($package->name, $section) . '/'; - } -} diff --git a/src/Generator/Client.php b/src/Generator/Client.php index b9b8741..e59ae03 100644 --- a/src/Generator/Client.php +++ b/src/Generator/Client.php @@ -5,9 +5,6 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; -use ApiClients\Contracts\OpenAPI\WebHooksInterface; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; use ApiClients\Tools\OpenApiClientGenerator\Generator\Client\Methods\ChunkCount; use ApiClients\Tools\OpenApiClientGenerator\Generator\Client\PHPStan\ClientCallReturnTypes; use ApiClients\Tools\OpenApiClientGenerator\Generator\Client\PHPStan\ClientCallReturnTypesTest; @@ -15,12 +12,13 @@ use ApiClients\Tools\OpenApiClientGenerator\Generator\Client\Routers\RouterClass; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Types; -use ApiClients\Tools\OpenApiClientGenerator\PrivatePromotedPropertyAsParam; -use ApiClients\Tools\OpenApiClientGenerator\Representation; -use ApiClients\Tools\OpenApiClientGenerator\Utils; use Jawira\CaseConverter\Convert; use NumberToWords\NumberToWords; -use PhpParser\Builder\Param; +use OpenAPITools\Contract\FileGenerator; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; +use OpenAPITools\Utils\Utils; use PhpParser\BuilderFactory; use PhpParser\Comment\Doc; use PhpParser\Node; @@ -51,47 +49,48 @@ use const DIRECTORY_SEPARATOR; use const PHP_EOL; -final class Client +final readonly class Client implements FileGenerator { + public function __construct( + private BuilderFactory $builderFactory, + private bool $call, + private bool $operations, + ) { + } + /** @return iterable */ - public static function generate(Configuration $configuration, string $pathPrefix, string $pathPrefixTests, Representation\Client $client, Routers $routers): iterable + public function generate(Package $package, Namespaced\Representation $representation): iterable { + $routers = new Routers(); $operations = []; - foreach ($client->paths as $path) { + foreach ($representation->client->paths as $path) { $operations = [...$operations, ...$path->operations]; } - $factory = new BuilderFactory(); - $stmt = $factory->namespace(trim($configuration->namespace->source, '\\')); - - $class = $factory->class('Client')->implement(new Node\Name('ClientInterface'))->makeFinal(); + $stmt = $this->builderFactory->namespace(trim($package->namespace->source, '\\')); - if ($configuration->entryPoints->call) { - $class->addStmt( - $factory->property('router')->setType('array')->setDefault([])->makePrivate(), - ); - } + $class = $this->builderFactory->class('Client')->implement(new Node\Name('ClientInterface'))->makeFinal(); - if ($configuration->entryPoints->operations) { + if ($this->call) { $class->addStmt( - $factory->property('operations')->setType('OperationsInterface')->makeReadonly()->makePrivate(), + $this->builderFactory->property('router')->setType('array')->setDefault([])->makePrivate(), ); } - if ($configuration->entryPoints->webHooks) { + if ($this->operations) { $class->addStmt( - $factory->property('webHooks')->setType('WebHooks')->makeReadonly()->makePrivate(), + $this->builderFactory->property('operations')->setType('OperationsInterface')->makeReadonly()->makePrivate(), ); } $class->addStmt( - $factory->property('routers')->setType('Internal\\Routers')->makeReadonly()->makePrivate(), + $this->builderFactory->property('routers')->setType('\\' . $package->namespace->source . '\\Internal\\Routers')->makeReadonly()->makePrivate(), )->addStmt( - $factory->method('__construct')->makePublic()->addParam( - (new Param('authentication'))->setType('\\' . AuthenticationInterface::class), + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('authentication')->makePrivate()->setType('\\' . AuthenticationInterface::class), )->addParam( - (new Param('browser'))->setType('\\' . Browser::class), - )->addStmt((static function (Representation\Client $client): Node\Expr { + $this->builderFactory->param('browser')->makePrivate()->setType('\\' . Browser::class), + )->addStmt((static function (Namespaced\Client $client): Node\Expr { $assignExpr = new Node\Expr\Variable('browser'); if ($client->baseUrl !== null) { @@ -118,7 +117,7 @@ public static function generate(Configuration $configuration, string $pathPrefix ], ), ); - })($client))->addStmt( + })($representation->client))->addStmt( new Node\Expr\Assign( new Node\Expr\Variable('requestSchemaValidator'), new Node\Expr\New_( @@ -148,12 +147,12 @@ public static function generate(Configuration $configuration, string $pathPrefix new Node\Expr\Assign( new Node\Expr\Variable('hydrators'), new Node\Expr\New_( - new Node\Name('Internal\\Hydrators'), + new Node\Name('\\' . $package->namespace->source . '\\Internal\\Hydrators'), [], ), ), )->addStmts([ - ...($configuration->entryPoints->operations ? [ + ...($this->operations ? [ new Node\Expr\Assign( new Node\Expr\PropertyFetch( new Node\Expr\Variable('this'), @@ -164,7 +163,7 @@ public static function generate(Configuration $configuration, string $pathPrefix [ new Arg( new Node\Expr\New_( - new Node\Name('Internal\\Operators'), + new Node\Name('\\' . $package->namespace->source . '\\Internal\\Operators'), [ new Arg( new Node\Expr\Variable('browser'), @@ -208,34 +207,6 @@ public static function generate(Configuration $configuration, string $pathPrefix ), ), ] : []), - ])->addStmts([ - ...($configuration->entryPoints->webHooks ? [ - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'webHooks', - ), - new Node\Expr\New_( - new Node\Name('WebHooks'), - [ - new Arg( - new Node\Expr\Variable('requestSchemaValidator'), - false, - false, - [], - new Node\Identifier('requestSchemaValidator'), - ), - new Arg( - new Node\Expr\Variable('hydrators'), - false, - false, - [], - new Node\Identifier('hydrator'), - ), - ], - ), - ), - ] : []), ])->addStmt( new Node\Stmt\Expression( new Node\Expr\Assign( @@ -244,7 +215,7 @@ public static function generate(Configuration $configuration, string $pathPrefix 'routers', ), new Node\Expr\New_( - new Node\Name('Internal\\Routers'), + new Node\Name('\\' . $package->namespace->source . '\\Internal\\Routers'), [ new Arg( new Node\Expr\Variable('browser'), @@ -289,7 +260,7 @@ public static function generate(Configuration $configuration, string $pathPrefix ); $sortedOperations = []; - foreach ($client->paths as $path) { + foreach ($representation->client->paths as $path) { foreach ($path->operations as $operation) { if ($operation->path === '/') { $operationPath = ['']; @@ -314,7 +285,7 @@ public static function generate(Configuration $configuration, string $pathPrefix } } - if ($configuration->entryPoints->call) { + if ($this->call) { $chunkCountClasses = []; $operationsIfs = []; foreach ($sortedOperations as $method => $ops) { @@ -325,7 +296,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $traverseForReturnTypes = static function (array $moar) use (&$returnTypes, &$docBlockReturnTypes, &$traverseForReturnTypes): void { foreach ( array_map( - static fn (array $a): Representation\Operation => $a['operation'], + static fn (array $a): Namespaced\Operation => $a['operation'], $moar['operations'], ) as $operation ) { @@ -383,6 +354,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $returnTypes, $docBlockReturnTypes, self::traverseOperations( + $package, $moar['operations'], /** @phpstan-ignore-line */ $moar['paths'], /** @phpstan-ignore-line */ 0, @@ -518,9 +490,9 @@ public static function generate(Configuration $configuration, string $pathPrefix ); $class->addStmt( - $factory->method('call')->makePublic()->setDocComment( + $this->builderFactory->method('call')->makePublic()->setDocComment( new Doc(implode(PHP_EOL, [ - ...($configuration->qa?->phpcs ? ['// phpcs:disable'] : []), + ...($package->qa?->phpcs ? ['// phpcs:disable'] : []), '/**', // ' * @return ' . (static function (array $operations): string { // $count = count($operations); @@ -541,9 +513,9 @@ public static function generate(Configuration $configuration, string $pathPrefix // return $left . $right; // })($operations), ' */', - ...($configuration->qa?->phpcs ? ['// phpcs:enable'] : []), + ...($package->qa?->phpcs ? ['// phpcs:enable'] : []), ])), - )->addParam((new Param('call'))->setType('string'))->addParam((new Param('params'))->setType('array')->setDefault([]))->setReturnType( + )->addParam($this->builderFactory->param('call')->setType('string'))->addParam($this->builderFactory->param('params')->setType('array')->setDefault([]))->setReturnType( new UnionType( array_map( static fn (string $type): Name => new Name($type), @@ -619,9 +591,9 @@ public static function generate(Configuration $configuration, string $pathPrefix ); } - if ($configuration->entryPoints->operations) { + if ($this->operations) { $class->addStmt( - $factory->method('operations')->makePublic()->setReturnType('OperationsInterface')->addStmt(new Node\Stmt\Return_( + $this->builderFactory->method('operations')->makePublic()->setReturnType('OperationsInterface')->addStmt(new Node\Stmt\Return_( new Node\Expr\PropertyFetch( new Node\Expr\Variable('this'), 'operations', @@ -630,23 +602,11 @@ public static function generate(Configuration $configuration, string $pathPrefix ); } - if ($configuration->entryPoints->webHooks) { - $class->addStmt( - $factory->method('webHooks')->makePublic()->setReturnType('\\' . WebHooksInterface::class)->addStmt(new Node\Stmt\Return_( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'webHooks', - ), - )), - ); - } - - yield new File($pathPrefix, 'Client', $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, 'Client', $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); foreach ($routers->get() as $router) { - yield from self::createRouter( - $pathPrefix, - $configuration->namespace->source . '\\', + yield from $this->createRouter( + $package, $router, $routers, ); @@ -658,36 +618,35 @@ public static function generate(Configuration $configuration, string $pathPrefix } foreach ($chunkCountClasses as $chunkCountClass) { - yield from self::createRouterChunkSize( - $pathPrefix, - $configuration->namespace->source . '\\', + yield from $this->createRouterChunkSize( + $package, $chunkCountClass, ); } - yield from \ApiClients\Tools\OpenApiClientGenerator\Generator\Routers::generate($configuration, $pathPrefix, $routers); + yield from \ApiClients\Tools\OpenApiClientGenerator\Generator\Routers::generate($package, $routers); - if (! $configuration->qa?->phpstan) { + if (! $package->qa?->phpstan) { return; } require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'phpstan-assertType-mock.php'; assertType('bool', true); - yield from ClientCallReturnTypes::generate($configuration, $pathPrefix, $client); - yield from ClientCallReturnTypesTest::generate($configuration, $pathPrefixTests, $client); + yield from ClientCallReturnTypes::generate($package, $representation->client); + yield from ClientCallReturnTypesTest::generate($package, $representation->client); - if ($configuration->qa->phpstan->configFilePath === null) { + if ($package->qa->phpstan->configFilePath === null) { return; } - yield new File($pathPrefix, '../' . $configuration->qa->phpstan->configFilePath, implode(PHP_EOL, [ + yield new File($package->destination->source, '../' . $package->qa->phpstan->configFilePath, implode(PHP_EOL, [ 'services:', - ' - class: ' . $configuration->namespace->source . '\PHPStan\ClientCallReturnTypes', + ' - class: ' . $package->namespace->source . '\PHPStan\ClientCallReturnTypes', ' tags:', ' - phpstan.broker.dynamicMethodReturnTypeExtension', '', - ])); + ]), File::DO_NOT_LOAD_ON_WRITE); } /** @@ -696,7 +655,7 @@ public static function generate(Configuration $configuration, string $pathPrefix * * @return array */ - private static function traverseOperationPaths(array $operations, array &$operationPath, Representation\Operation $operation, Representation\Path $path): array + private static function traverseOperationPaths(array $operations, array &$operationPath, Namespaced\Operation $operation, Namespaced\Path $path): array { if (count($operationPath) === 0) { $operations['operations'][] = [ /** @phpstan-ignore-line */ @@ -721,9 +680,9 @@ private static function traverseOperationPaths(array $operations, array &$operat } /** - * @param array $paths + * @param array $paths * - * @return iterable + * @return iterable */ private static function operationsInThisThree(array $paths, int $level, Routers $routers): iterable { @@ -738,12 +697,12 @@ private static function operationsInThisThree(array $paths, int $level, Routers } /** - * @param array $operations - * @param array $paths + * @param array $operations + * @param array $paths * * @return array */ - private static function traverseOperations(array $operations, array $paths, int $level, Routers $routers): array + private static function traverseOperations(Package $package, array $operations, array $paths, int $level, Routers $routers): array { $nonArgumentPathChunks = []; foreach (array_keys($paths) as $pathChunk) { @@ -775,6 +734,7 @@ private static function traverseOperations(array $operations, array $paths, int new Node\Scalar\String_($operation['operation']->matchMethod . ' ' . $operation['operation']->path), /** @phpstan-ignore-line */ ), static::callOperation( + $package, $routers, ...$operation, /** @phpstan-ignore-line */ ), @@ -792,6 +752,7 @@ private static function traverseOperations(array $operations, array $paths, int new Node\Scalar\String_($pathChunk), ), self::traverseOperations( + $package, $path['operations'], /** @phpstan-ignore-line */ $path['paths'], /** @phpstan-ignore-line */ $level + 1, @@ -824,7 +785,7 @@ private static function traverseOperations(array $operations, array $paths, int } /** @return array */ - private static function callOperation(Routers $routers, Representation\Operation $operation, Representation\Path $path): array + private static function callOperation(Package $package, Routers $routers, Namespaced\Operation $operation, Namespaced\Path $path): array { $returnType = implode( '|', @@ -837,7 +798,9 @@ private static function callOperation(Routers $routers, Representation\Operation ), ], ); - $router = $routers->add( + + $router = $routers->add( + $package, $operation->matchMethod, $operation->group, $operation->name, @@ -905,7 +868,7 @@ private static function callOperation(Routers $routers, Representation\Operation ...($operation->matchMethod !== 'LIST' ? self::makeCall( $operation, $path, - $returnType === 'void' ? static fn (Expr $expr): Node\Stmt\Expression => new Node\Stmt\Expression($expr) : static fn (Expr $expr): Node\Stmt\Return_ => new Node\Stmt\Return_($expr) + $returnType === 'void' ? static fn (Expr $expr): Node\Stmt\Expression => new Node\Stmt\Expression($expr) : static fn (Expr $expr): Node\Stmt\Return_ => new Node\Stmt\Return_($expr), ) : [ new Node\Stmt\Expression( new Node\Expr\Assign( @@ -986,13 +949,13 @@ private static function callOperation(Routers $routers, Representation\Operation } /** @return array */ - private static function makeCall(Representation\Operation $operation, Representation\Path $path, callable $calWrap): array + private static function makeCall(Namespaced\Operation $operation, Namespaced\Path $path, callable $calWrap): array { return [ new Node\Stmt\Expression(new Node\Expr\Assign( new Node\Expr\Variable('operator'), new Node\Expr\New_( - new Node\Name($operation->operatorClassName->relative), + new Node\Name($operation->operatorClassName->fullyQualified->source), [ new Arg(new Node\Expr\PropertyFetch( new Node\Expr\Variable('this'), @@ -1045,31 +1008,30 @@ private static function makeCall(Representation\Operation $operation, Representa } /** @return iterable */ - private static function createRouter(string $pathPrefix, string $namespace, RouterClass $router, Routers $routers): iterable + private function createRouter(Package $package, RouterClass $router, Routers $routers): iterable { - $className = $routers->createClassName(Utils::fixKeyword($router->method), $router->group, '')->class; - $factory = new BuilderFactory(); - $stmt = $factory->namespace(Utils::dirname($namespace . $className)); - $class = $factory->class(Utils::basename($namespace . $className))->makeFinal()->addStmt( - $factory->method('__construct')->makePublic()->addParam( - (new PrivatePromotedPropertyAsParam('requestSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $className = $routers->createClassName($package, Utils::fixKeyword($router->method), $router->group, '')->class; + $stmt = $this->builderFactory->namespace($className->namespace->source); + $class = $this->builderFactory->class($className->className)->makeFinal()->addStmt( + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('requestSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), )->addParam( - (new PrivatePromotedPropertyAsParam('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $this->builderFactory->param('responseSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), )->addParam( - (new PrivatePromotedPropertyAsParam('hydrators'))->setType('Internal\\Hydrators'), + $this->builderFactory->param('hydrators')->makePrivate()->setType('\\' . $package->namespace->source . '\\Internal\\Hydrators'), )->addParam( - (new PrivatePromotedPropertyAsParam('browser'))->setType('\\' . Browser::class), + $this->builderFactory->param('browser')->makePrivate()->setType('\\' . Browser::class), )->addParam( - (new PrivatePromotedPropertyAsParam('authentication'))->setType('\\' . AuthenticationInterface::class), + $this->builderFactory->param('authentication')->makePrivate()->setType('\\' . AuthenticationInterface::class), ), ); foreach ($router->methods as $method) { $class->addStmt( - $factory->method( + $this->builderFactory->method( (new Convert($method->name))->toCamel(), )->makePublic()->addParam( - (new Param('params'))->setType('array'), + $this->builderFactory->param('params')->setType('array'), )->addStmts($method->nodes)->setReturnType( $method->returnType, )->setDocComment( @@ -1087,25 +1049,25 @@ private static function createRouter(string $pathPrefix, string $namespace, Rout ); } - yield new File($pathPrefix, $className, $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, $className->relative, $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); } /** @return iterable */ - private static function createRouterChunkSize(string $pathPrefix, string $namespace, ChunkCount $chunkCount): iterable + private function createRouterChunkSize(Package $package, ChunkCount $chunkCount): iterable { - $factory = new BuilderFactory(); - $stmt = $factory->namespace(Utils::dirname($namespace . $chunkCount->className)); + $namespace = $package->namespace->source . '\\'; + $stmt = $this->builderFactory->namespace(Utils::dirname($namespace . $chunkCount->className)); - $class = $factory->class(Utils::basename($namespace . $chunkCount->className))->makeFinal()->addStmt( - $factory->method('__construct')->makePublic()->addParam( - (new PrivatePromotedPropertyAsParam('routers'))->setType('\\' . $namespace . 'Internal\\Routers'), + $class = $this->builderFactory->class(Utils::basename($namespace . $chunkCount->className))->makeFinal()->addStmt( + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('routers')->makePrivate()->setType('\\' . $namespace . 'Internal\\Routers'), ), ); - $callMethod = $factory->method('call')->makePublic()->addParams([ - ...(static function (array $params): iterable { + $callMethod = $this->builderFactory->method('call')->makePublic()->addParams([ + ...(function (array $params): iterable { foreach ($params as $param => $type) { - yield (new Param($param))->setType($type); + yield $this->builderFactory->param($param)->setType($type); } })([ 'call' => 'string', @@ -1141,6 +1103,6 @@ private static function createRouterChunkSize(string $pathPrefix, string $namesp $class->addStmt($callMethod); - yield new File($pathPrefix, $chunkCount->className, $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, $chunkCount->className, $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); } } diff --git a/src/Generator/Client/PHPStan/ClientCallReturnTypes.php b/src/Generator/Client/PHPStan/ClientCallReturnTypes.php index 3c85132..800681b 100644 --- a/src/Generator/Client/PHPStan/ClientCallReturnTypes.php +++ b/src/Generator/Client/PHPStan/ClientCallReturnTypes.php @@ -4,10 +4,10 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Client\PHPStan; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation; -use ApiClients\Tools\OpenApiClientGenerator\Representation; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; use PhpParser\BuilderFactory; use PhpParser\Node; use PhpParser\Node\Arg; @@ -25,9 +25,9 @@ final class ClientCallReturnTypes { /** @return iterable */ - public static function generate(Configuration $configuration, string $pathPrefix, Representation\Client $client): iterable + public static function generate(Package $package, Namespaced\Client $client): iterable { - /** @var array $operations */ + /** @var array $operations */ $operations = []; foreach ($client->paths as $path) { $operations = [...$operations, ...$path->operations]; @@ -76,7 +76,7 @@ public static function generate(Configuration $configuration, string $pathPrefix } $factory = new BuilderFactory(); - $stmt = $factory->namespace(new Node\Name(trim($configuration->namespace->source . '\PHPStan', '\\'))); + $stmt = $factory->namespace(new Node\Name(trim($package->namespace->source . '\PHPStan', '\\'))); $class = $factory->class('ClientCallReturnTypes')->makeFinal()->makeReadonly()->implement( new Node\Name('\\' . DynamicMethodReturnTypeExtension::class), )->addStmt( @@ -109,7 +109,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $factory->method('getClass')->makePublic()->setReturnType('string')->addStmt( new Node\Stmt\Return_( new Expr\ClassConstFetch( - new Node\Name('\\' . $configuration->namespace->source . '\Client'), + new Node\Name('\\' . $package->namespace->source . '\Client'), new Node\Name('class'), ), ), @@ -301,6 +301,6 @@ public static function generate(Configuration $configuration, string $pathPrefix ), ); - yield new File($pathPrefix, 'PHPStan\ClientCallReturnTypes', $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, 'PHPStan\\ClientCallReturnTypes', $stmt->addStmt($class)->getNode(), File::DO_NOT_LOAD_ON_WRITE); } } diff --git a/src/Generator/Client/PHPStan/ClientCallReturnTypesTest.php b/src/Generator/Client/PHPStan/ClientCallReturnTypesTest.php index c283f30..34d4d06 100644 --- a/src/Generator/Client/PHPStan/ClientCallReturnTypesTest.php +++ b/src/Generator/Client/PHPStan/ClientCallReturnTypesTest.php @@ -5,10 +5,10 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Client\PHPStan; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation; -use ApiClients\Tools\OpenApiClientGenerator\Representation; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; use PhpParser\BuilderFactory; use PhpParser\Node; use PhpParser\Node\Arg; @@ -21,7 +21,7 @@ final class ClientCallReturnTypesTest { /** @return iterable */ - public static function generate(Configuration $configuration, string $pathPrefix, Representation\Client $client): iterable + public static function generate(Package $package, Namespaced\Client $client): iterable { $operations = []; foreach ($client->paths as $path) { @@ -29,7 +29,7 @@ public static function generate(Configuration $configuration, string $pathPrefix } $factory = new BuilderFactory(); - $stmt = $factory->namespace(new Node\Name(trim($configuration->namespace->test . '\\Types', '\\'))); + $stmt = $factory->namespace(new Node\Name(trim($package->namespace->test . '\\Types', '\\'))); $stmt->addStmt( new Node\Stmt\Expression( @@ -41,7 +41,7 @@ public static function generate(Configuration $configuration, string $pathPrefix ), new Expr\New_( new Node\Name( - '\\' . $configuration->namespace->source . '\\Client', + '\\' . $package->namespace->source . '\\Client', ), [ new Arg( @@ -114,6 +114,6 @@ public static function generate(Configuration $configuration, string $pathPrefix ); } - yield new File($pathPrefix, 'Types\ClientCallReturnTypes', $stmt->getNode()); + yield new File($package->destination->test, 'Types\\ClientCallReturnTypes', $stmt->getNode(), File::DO_NOT_LOAD_ON_WRITE); } } diff --git a/src/Generator/Client/Routers.php b/src/Generator/Client/Routers.php index 9670860..b456461 100644 --- a/src/Generator/Client/Routers.php +++ b/src/Generator/Client/Routers.php @@ -8,10 +8,11 @@ use ApiClients\Tools\OpenApiClientGenerator\Generator\Client\Routers\RouterClass; use ApiClients\Tools\OpenApiClientGenerator\Generator\Client\Routers\RouterClassMethod; use Jawira\CaseConverter\Convert; +use OpenAPITools\Configuration\Package; +use OpenAPITools\Utils\ClassString; use PhpParser\Node; use function lcfirst; -use function rtrim; use function str_replace; final class Routers @@ -21,6 +22,7 @@ final class Routers /** @param array $nodes */ public function add( + Package $package, string $method, string|null $group, string $name, @@ -34,7 +36,7 @@ public function add( 'docBlockReturnType' => $docBlockReturnType, ]; - return $this->createClassName($method, $group, $name); + return $this->createClassName($package, $method, $group, $name); } /** @return iterable */ @@ -57,11 +59,12 @@ public function get(): iterable } public function createClassName( + Package $package, string $method, string|null $group, string $name, ): Router { - $className = rtrim('Internal\\Router\\' . (new Convert($method))->toPascal() . ($group === null ? '' : '\\' . (new Convert($group))->toPascal()), '\\'); + $className = ClassString::factory($package->namespace, 'Internal\\Router\\' . (new Convert($method))->toPascal() . ($group === null ? '' : '\\' . (new Convert($group))->toPascal()), '\\'); return new Router( $className, @@ -70,7 +73,7 @@ public function createClassName( '\\', '🔀', lcfirst( - $className, + $className->relative, ), ), ); diff --git a/src/Generator/Client/Routers/Router.php b/src/Generator/Client/Routers/Router.php index 5c2f189..db3d6d0 100644 --- a/src/Generator/Client/Routers/Router.php +++ b/src/Generator/Client/Routers/Router.php @@ -4,10 +4,12 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Client\Routers; +use OpenAPITools\Utils\ClassString; + final readonly class Router { public function __construct( - public string $class, + public ClassString $class, public string $method, public string $loopUpMethod, ) { diff --git a/src/Generator/ClientInterface.php b/src/Generator/ClientInterface.php index 4b7db9d..ffbdddd 100644 --- a/src/Generator/ClientInterface.php +++ b/src/Generator/ClientInterface.php @@ -4,12 +4,12 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator; -use ApiClients\Contracts\OpenAPI\WebHooksInterface; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; +use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Types; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Operation; -use PhpParser\Builder\Param; +use OpenAPITools\Contract\FileGenerator; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; use PhpParser\BuilderFactory; use PhpParser\Comment\Doc; use PhpParser\Node\Name; @@ -23,25 +23,27 @@ use const PHP_EOL; -final class ClientInterface +final class ClientInterface implements FileGenerator { - /** - * @param array $operations - * - * @return iterable - */ - public static function generate(Configuration $configuration, string $pathPrefix, array $operations): iterable + public function __construct( + private BuilderFactory $builderFactory, + private bool $call, + private bool $operations, + ) { + } + + /** @return iterable */ + public function generate(Package $package, Namespaced\Representation $representation): iterable { - $factory = new BuilderFactory(); - $stmt = $factory->namespace(trim($configuration->namespace->source, '\\')); + $stmt = $this->builderFactory->namespace(trim($package->namespace->source, '\\')); - $class = $factory->interface('ClientInterface'); + $class = $this->builderFactory->interface('ClientInterface'); - if ($configuration->entryPoints->call) { + if ($this->call) { $class->addStmt( - $factory->method('call')->makePublic()->setDocComment( + $this->builderFactory->method('call')->makePublic()->setDocComment( new Doc(implode(PHP_EOL, [ - ...($configuration->qa?->phpcs ? ['// phpcs:disable'] : []), + ...($package->qa?->phpcs ? ['// phpcs:disable'] : []), '/**', // ' * @return ' . (static function (array $operations): string { // $count = count($operations); @@ -62,19 +64,21 @@ public static function generate(Configuration $configuration, string $pathPrefix // return $left . $right; // })($operations), ' */', - ...($configuration->qa?->phpcs ? ['// phpcs:enabled'] : []), + ...($package->qa?->phpcs ? ['// phpcs:enabled'] : []), ])), - )->addParam((new Param('call'))->setType('string'))->addParam((new Param('params'))->setType('array')->setDefault([]))->setReturnType( + )->addParam($this->builderFactory->param('call')->setType('string'))->addParam($this->builderFactory->param('params')->setType('array')->setDefault([]))->setReturnType( new UnionType( array_map( static fn (string $type): Name => new Name($type), array_unique( [ - ...Types::filterDuplicatesAndIncompatibleRawTypes(...(static function (array $operations): iterable { - foreach ($operations as $operation) { - yield from explode('|', \ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation::getResultTypeFromOperation($operation)); + ...Types::filterDuplicatesAndIncompatibleRawTypes(...(static function (Namespaced\Path ...$paths): iterable { + foreach ($paths as $path) { + foreach ($path->operations as $operation) { + yield from explode('|', Operation::getResultTypeFromOperation($operation)); + } } - })($operations)), + })(...$representation->client->paths)), ], ), ), @@ -83,18 +87,12 @@ public static function generate(Configuration $configuration, string $pathPrefix ); } - if ($configuration->entryPoints->operations) { - $class->addStmt( - $factory->method('operations')->setReturnType('OperationsInterface')->makePublic(), - ); - } - - if ($configuration->entryPoints->webHooks) { + if ($this->operations) { $class->addStmt( - $factory->method('webHooks')->setReturnType('\\' . WebHooksInterface::class)->makePublic(), + $this->builderFactory->method('operations')->setReturnType('OperationsInterface')->makePublic(), ); } - yield new File($pathPrefix, 'ClientInterface', $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, 'ClientInterface', $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); } } diff --git a/src/Generator/Contract.php b/src/Generator/Contract.php deleted file mode 100644 index 4bad613..0000000 --- a/src/Generator/Contract.php +++ /dev/null @@ -1,162 +0,0 @@ - $aliases - * - * @return iterable - */ - public static function generate(string $pathPrefix, Representation\Contract $contract): iterable - { - $factory = new BuilderFactory(); - - $interface = $factory->interface($contract->className->className); - $contractProperties = []; - foreach ($contract->properties as $property) { - $types = []; - if ($property->type->type === 'union' && is_array($property->type->payload)) { - $types[] = self::buildUnionType($property->type); - } - - if ($property->type->type === 'array' && ! is_string($property->type->payload)) { - if ($property->type->payload instanceof Representation\PropertyType) { - if (! $property->type->payload->payload instanceof Representation\PropertyType) { - $iterableType = $property->type->payload; - if ($iterableType->payload instanceof Representation\Schema) { - $iterableType = $iterableType->payload->className->fullyQualified->source; - } - - if ($iterableType instanceof Representation\PropertyType && (($iterableType->payload instanceof Representation\PropertyType && $iterableType->payload->type === 'union') || is_array($iterableType->payload))) { - $iterableType = self::buildUnionType($iterableType); - } - - if ($iterableType instanceof Representation\PropertyType) { - $iterableType = $iterableType->payload; - } - - $compiledTYpe = ($property->nullable ? '?' : '') . 'array<' . $iterableType . '>'; - $contractProperties[$property->name] = '@property ' . $compiledTYpe . ' $' . $property->name; - } - } elseif (is_array($property->type->payload)) { - $schemaClasses = []; - foreach ($property->type->payload as $payloadType) { - $schemaClasses = [...$schemaClasses, ...self::getUnionTypeSchemas($payloadType)]; - } - - if (count($schemaClasses) > 0) { - $compiledTYpe = ($property->nullable ? '?' : '') . 'array<' . implode('|', array_unique([ - ...(static function (Representation\Schema ...$schemas): iterable { - foreach ($schemas as $schema) { - yield $schema->className->fullyQualified->source; - } - })(...$schemaClasses), - ])) . '>'; - $contractProperties[$property->name] = '@property ' . $compiledTYpe . ' $' . $property->name; - } - } - - $types[] = 'array'; - } elseif ($property->type->payload instanceof Representation\Schema) { - $types[] = $property->type->payload->className->relative; - } elseif (is_string($property->type->payload)) { - $types[] = $property->type->payload; - } - - $types = array_unique($types); - - $nullable = ''; - if ($property->nullable) { - $nullable = count($types) > 1 || count(explode('|', implode('|', $types))) > 1 ? 'null|' : '?'; - } - - if (count($types) > 0) { - if (! array_key_exists($property->name, $contractProperties)) { - $contractProperties[$property->name] = '@property ' . $nullable . implode('|', $types) . ' $' . $property->name; - } - } else { - if (! array_key_exists($property->name, $contractProperties)) { - $contractProperties[$property->name] = '@property $' . $property->name; - } - } - } - - if (count($contractProperties) > 0) { - $interface->setDocComment('/**' . PHP_EOL . ' * ' . implode(PHP_EOL . ' * ', $contractProperties) . PHP_EOL . ' */'); - } - - yield new File($pathPrefix, $contract->className->relative, $factory->namespace($contract->className->namespace->source)->addStmt($interface)->getNode()); - } - - private static function buildUnionType(Representation\PropertyType $type): string - { - $typeList = []; - if (is_array($type->payload)) { - foreach ($type->payload as $typeInUnion) { - $typeList[] = match (gettype($typeInUnion->payload)) { - 'string' => $typeInUnion->payload, - 'array' => 'array', - 'object' => match ($typeInUnion->payload::class) { - Representation\Schema::class => $typeInUnion->payload->className->relative, - Representation\PropertyType::class => self::buildUnionType($typeInUnion->payload), - }, - }; - } - } else { - $typeList[] = $type->payload; - } - - return implode( - '|', - array_unique( - array_filter( - $typeList, - static fn (string $item): bool => strlen(trim($item)) > 0, - ), - ), - ); - } - - /** @return iterable */ - private static function getUnionTypeSchemas(Representation\PropertyType $type): iterable - { - if (! is_array($type->payload)) { - return; - } - - foreach ($type->payload as $typeInUnion) { - if ($typeInUnion->payload instanceof Representation\Schema) { - yield $typeInUnion->payload; - } - - if (! ($typeInUnion->payload instanceof Representation\PropertyType)) { - continue; - } - - yield from self::getUnionTypeSchemas($typeInUnion->payload); - } - } -} diff --git a/src/Generator/Error.php b/src/Generator/Error.php deleted file mode 100644 index f63ab1a..0000000 --- a/src/Generator/Error.php +++ /dev/null @@ -1,30 +0,0 @@ - */ - public static function generate(string $pathPrefix, Schema $schema): iterable - { - $factory = new BuilderFactory(); - $stmt = $factory->namespace($schema->errorClassName->namespace->source); - - $class = $factory->class($schema->errorClassName->className)->extend('\\' . \Error::class)->makeFinal(); - - $class->addStmt((new BuilderFactory())->method('__construct')->makePublic()->addParam( - (new PromotedPropertyAsParam('status'))->setType('int'), - )->addParam( - (new PromotedPropertyAsParam('error'))->setType($schema->className->relative), - )); - - yield new File($pathPrefix, $schema->errorClassName->relative, $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/Helper/Operation.php b/src/Generator/Helper/Operation.php index 38d273b..683869c 100644 --- a/src/Generator/Helper/Operation.php +++ b/src/Generator/Helper/Operation.php @@ -4,7 +4,7 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Helper; -use ApiClients\Tools\OpenApiClientGenerator\Representation; +use OpenAPITools\Representation; use PhpParser\Builder; use PhpParser\Comment\Doc; use PhpParser\Node; @@ -31,12 +31,12 @@ final class Operation { - public static function methodSignature(Builder\Method $method, Representation\Operation $operation): Builder\Method + public static function methodSignature(Builder\Method $method, Representation\Namespaced\Operation $operation): Builder\Method { return self::methodReturnType(self::methodParams($method, $operation), $operation); } - public static function methodParams(Builder\Method $method, Representation\Operation $operation): Builder\Method + public static function methodParams(Builder\Method $method, Representation\Namespaced\Operation $operation): Builder\Method { return $method->addParams([ ...(static function (array $params): iterable { @@ -50,7 +50,7 @@ public static function methodParams(Builder\Method $method, Representation\Opera ]); } - public static function methodReturnType(Builder\Method $method, Representation\Operation $operation): Builder\Method + public static function methodReturnType(Builder\Method $method, Representation\Namespaced\Operation $operation): Builder\Method { $docComment = ReflectionTypes::copyDocBlock($operation->operatorClassName->fullyQualified->source, 'call'); @@ -63,7 +63,7 @@ public static function methodReturnType(Builder\Method $method, Representation\O ); } - public static function methodCallOperation(Representation\Operation $operation): Node\Stmt\Return_ + public static function methodCallOperation(Representation\Namespaced\Operation $operation): Node\Stmt\Return_ { return new Node\Stmt\Return_( new Expr\MethodCall( @@ -87,7 +87,7 @@ public static function methodCallOperation(Representation\Operation $operation): ); } - public static function getResultTypeFromOperation(Representation\Operation $operation): string + public static function getResultTypeFromOperation(Representation\Namespaced\Operation $operation): string { /** @phpstan-ignore-next-line */ $returnType = (new ReflectionClass($operation->className->fullyQualified->source))->getMethod('createResponse')->getReturnType(); @@ -110,7 +110,7 @@ public static function getResultTypeFromOperation(Representation\Operation $oper ); } - public static function getDocBlockFromOperation(Representation\Operation $operation): Doc + public static function getDocBlockFromOperation(Representation\Namespaced\Operation $operation): Doc { return new Doc( implode( @@ -124,7 +124,7 @@ public static function getDocBlockFromOperation(Representation\Operation $operat ); } - public static function getDocBlockResultTypeFromOperation(Representation\Operation $operation): string + public static function getDocBlockResultTypeFromOperation(Representation\Namespaced\Operation $operation): string { /** @phpstan-ignore-next-line */ $docComment = (new ReflectionClass($operation->className->fullyQualified->source))->getMethod('createResponse')->getDocComment(); diff --git a/src/Generator/Helper/OperationArray.php b/src/Generator/Helper/OperationArray.php index 77c8ddb..51bf096 100644 --- a/src/Generator/Helper/OperationArray.php +++ b/src/Generator/Helper/OperationArray.php @@ -4,9 +4,9 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Helper; -use ApiClients\Tools\OpenApiClientGenerator\Representation\PropertyType; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Schema; use cebe\openapi\spec\Schema as cebeSchema; +use OpenApiTools\Representation\Namespaced\Property\Type; +use OpenApiTools\Representation\Namespaced\Schema; use PhpParser\Node; use PhpParser\Node\Arg; @@ -58,7 +58,7 @@ public static function validate(string $className, bool $isArray): Node\Stmt\Exp } /** @return iterable */ - public static function uniqueSchemas(string|Schema|PropertyType ...$propertyTypes): iterable + public static function uniqueSchemas(string|Schema|Type ...$propertyTypes): iterable { $schemas = []; diff --git a/src/Generator/Hydrator.php b/src/Generator/Hydrator.php deleted file mode 100644 index 2df9883..0000000 --- a/src/Generator/Hydrator.php +++ /dev/null @@ -1,45 +0,0 @@ - */ - public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiClientGenerator\Representation\Hydrator $hydrator): iterable - { - $schemaClasses = []; - - foreach ($hydrator->schemas as $schema) { - $schemaClasses[] = trim($schema->className->fullyQualified->source, '\\'); - } - - if (count($schemaClasses) <= 0) { - return; - } - - yield new File( - $pathPrefix, - $hydrator->className->relative, - (new ObjectMapperCodeGenerator())->dump( - array_unique( - array_filter( - $schemaClasses, - static fn (string $className): bool => count((new ReflectionMethod($className, '__construct'))->getParameters()) > 0, - ), - ), - trim($hydrator->className->fullyQualified->source, '\\'), - ), - ); - } -} diff --git a/src/Generator/Hydrators.php b/src/Generator/Hydrators.php deleted file mode 100644 index f3423e9..0000000 --- a/src/Generator/Hydrators.php +++ /dev/null @@ -1,301 +0,0 @@ - */ - public static function generate(string $pathPrefix, string $namespace, Hydrator ...$hydrators): iterable - { - $knownScehmas = []; - $factory = new BuilderFactory(); - $stmt = $factory->namespace(trim($namespace, '\\') . '\\Internal'); - - $class = $factory->class('Hydrators')->makeFinal()->implement('\\' . ObjectMapper::class); - - $usefullHydrators = []; - foreach ($hydrators as $hydrator) { - $usefullHydrators[$hydrator->className->relative] = array_filter($hydrator->schemas, static function (Schema $schema) use (&$knownScehmas): bool { - if (array_key_exists($schema->className->relative, $knownScehmas)) { - return false; - } - - $knownScehmas[$schema->className->relative] = $schema->className; - - return true; - }); - } - - $matchHydrators = array_filter($hydrators, static fn (Hydrator $hydrator): bool => count($usefullHydrators[$hydrator->className->relative]) > 0); - - foreach ($hydrators as $hydrator) { - $class->addStmt($factory->property($hydrator->methodName)->setType('?' . $hydrator->className->relative)->setDefault(null)->makePrivate()); - } - - $class->addStmt( - $factory->method('hydrateObject')->makePublic()->setReturnType('object')->addParams([ - (new Param('className'))->setType('string'), - (new Param('payload'))->setType('array'), - ])->addStmt( - new Node\Stmt\Return_( - new Node\Expr\Match_( - new Node\Expr\Variable('className'), - array_map(static fn (Hydrator $hydrator): Node\MatchArm => new Node\MatchArm( - array_map(static fn (Schema $schema): Node\Scalar\String_ => new Node\Scalar\String_( - $schema->className->fullyQualified->source, - ), $usefullHydrators[$hydrator->className->relative]), - new Node\Expr\MethodCall( - new Node\Expr\MethodCall( - new Node\Expr\Variable('this'), - 'getObjectMapper' . ucfirst($hydrator->methodName), - ), - 'hydrateObject', - [ - new Node\Arg( - new Node\Expr\Variable('className'), - ), - new Node\Arg( - new Node\Expr\Variable('payload'), - ), - ], - ), - ), $matchHydrators), - ), - ), - ), - ); - - $class->addStmt( - $factory->method('hydrateObjects')->makePublic()->setReturnType('\\' . IterableList::class)->addParams([ - (new Param('className'))->setType('string'), - (new Param('payloads'))->setType('iterable'), - ])->addStmt( - new Node\Stmt\Return_( - new Node\Expr\New_( - new Node\Name('\\' . IterableList::class), - [ - new Node\Arg( - new Node\Expr\MethodCall( - new Node\Expr\Variable('this'), - 'doHydrateObjects', - [ - new Node\Arg( - new Node\Expr\Variable('className'), - ), - new Node\Arg( - new Node\Expr\Variable('payloads'), - ), - ], - ), - ), - ], - ), - ), - ), - ); - - $class->addStmt( - $factory->method('doHydrateObjects')->makePrivate()->setReturnType('\\' . Generator::class)->addParams([ - (new Param('className'))->setType('string'), - (new Param('payloads'))->setType('iterable'), - ])->addStmt( - new Node\Stmt\Foreach_( - new Node\Expr\Variable('payloads'), - new Node\Expr\Variable('payload'), - [ - 'keyVar' => new Node\Expr\Variable('index'), - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Yield_( - new Node\Expr\MethodCall( - new Node\Expr\Variable('this'), - 'hydrateObject', - [ - new Node\Arg( - new Node\Expr\Variable('className'), - ), - new Node\Arg( - new Node\Expr\Variable('payload'), - ), - ], - ), - new Node\Expr\Variable('index'), - ), - ), - ], - ], - ), - ), - ); - - $class->addStmt( - $factory->method('serializeObject')->makePublic()->setReturnType('mixed')->addParams([ - (new Param('object'))->setType('object'), - ])->addStmt( - new Node\Stmt\Return_( - new Node\Expr\MethodCall( - new Node\Expr\Variable('this'), - 'serializeObjectOfType', - [ - new Node\Arg( - new Node\Expr\Variable('object'), - ), - new Node\Arg( - new Node\Expr\ClassConstFetch( - new Node\Expr\Variable('object'), - 'class', - ), - ), - ], - ), - ), - ), - ); - - $class->addStmt( - $factory->method('serializeObjectOfType')->makePublic()->setReturnType('mixed')->addParams([ - (new Param('object'))->setType('object'), - (new Param('className'))->setType('string'), - ])->addStmt( - new Node\Stmt\Return_( - new Node\Expr\Match_( - new Node\Expr\Variable('className'), - array_map(static fn (Hydrator $hydrator): Node\MatchArm => new Node\MatchArm( - array_map(static fn (Schema $schema): Node\Scalar\String_ => new Node\Scalar\String_( - $schema->className->fullyQualified->source, - ), $usefullHydrators[$hydrator->className->relative]), - new Node\Expr\MethodCall( - new Node\Expr\MethodCall( - new Node\Expr\Variable('this'), - 'getObjectMapper' . ucfirst($hydrator->methodName), - ), - 'serializeObject', - [ - new Node\Arg( - new Node\Expr\Variable('object'), - ), - ], - ), - ), $matchHydrators), - ), - ), - ), - ); - - $class->addStmt( - $factory->method('serializeObjects')->makePublic()->setReturnType('\\' . IterableList::class)->addParams([ - (new Param('payloads'))->setType('iterable'), - ])->addStmt( - new Node\Stmt\Return_( - new Node\Expr\New_( - new Node\Name('\\' . IterableList::class), - [ - new Node\Arg( - new Node\Expr\MethodCall( - new Node\Expr\Variable('this'), - 'doSerializeObjects', - [ - new Node\Arg( - new Node\Expr\Variable('payloads'), - ), - ], - ), - ), - ], - ), - ), - ), - ); - - $class->addStmt( - $factory->method('doSerializeObjects')->makePrivate()->setReturnType('\\' . Generator::class)->addParams([ - (new Param('objects'))->setType('iterable'), - ])->addStmt( - new Node\Stmt\Foreach_( - new Node\Expr\Variable('objects'), - new Node\Expr\Variable('object'), - [ - 'keyVar' => new Node\Expr\Variable('index'), - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Yield_( - new Node\Expr\MethodCall( - new Node\Expr\Variable('this'), - 'serializeObject', - [ - new Node\Arg( - new Node\Expr\Variable('object'), - ), - ], - ), - new Node\Expr\Variable('index'), - ), - ), - ], - ], - ), - ), - ); - - foreach ($hydrators as $hydrator) { - $class->addStmt( - $factory->method('getObjectMapper' . ucfirst($hydrator->methodName))->makePublic()->setReturnType($hydrator->className->relative)->addStmts([ - new Node\Stmt\If_( - new Node\Expr\BinaryOp\Identical( - new Node\Expr\Instanceof_( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $hydrator->methodName, - ), - new Node\Name($hydrator->className->relative), - ), - new Node\Expr\ConstFetch(new Node\Name('false')), - ), - [ - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $hydrator->methodName, - ), - new Node\Expr\New_( - new Node\Name($hydrator->className->relative), - ), - ), - ), - ], - ], - ), - new Node\Stmt\Return_( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $hydrator->methodName, - ), - ), - ]), - ); - } - - yield new File($pathPrefix, 'Internal\\Hydrators', $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/Operations.php b/src/Generator/Operations.php deleted file mode 100644 index b2e1550..0000000 --- a/src/Generator/Operations.php +++ /dev/null @@ -1,132 +0,0 @@ - $paths - * @param array $operations - * - * @return iterable - */ - public static function generate(Configuration $configuration, string $pathPrefix, array $paths, array $operations): iterable - { - $operationHydratorMap = []; - foreach ($paths as $path) { - foreach ($path->operations as $pathOperation) { - $operationHydratorMap[$pathOperation->operationId] = $path->hydrator; - } - } - - $groups = []; - foreach ($operations as $operation) { - $groups[$operation->group][] = $operation; - } - - $factory = new BuilderFactory(); - $stmt = $factory->namespace($configuration->namespace->source); - - $class = $factory->class('Operations')->makeFinal()->implement(new Name('OperationsInterface'))->makeReadonly(); - - $class->addStmt( - $factory->method('__construct')->makePublic()->addParam( - (new PrivatePromotedPropertyAsParam('operators'))->setType('Internal\\Operators'), - ), - ); - - foreach ($groups as $group => $groupsOperations) { - if ($group === '') { - foreach ($groupsOperations as $groupsOperation) { - $class->addStmt( - Helper\Operation::methodSignature( - $factory->method((new Convert($groupsOperation->name))->toCamel())->makePublic(), - $groupsOperation, - )->addStmt(Helper\Operation::methodCallOperation($groupsOperation)), - ); - } - - continue; - } - - $class->addStmt( - $factory->method((new Convert($group))->toCamel())->makePublic()->setReturnType('Operation\\' . $group)->addStmts([ - new Node\Stmt\Return_( - new Expr\New_( - new Name( - 'Operation\\' . $group, - ), - [ - new Arg( - new Expr\PropertyFetch( - new Expr\Variable('this'), - 'operators', - ), - ), - ], - ), - ), - ]), - ); - - yield from self::generateOperationsGroup( - $pathPrefix, - $configuration->namespace, - 'Operation\\' . $group, - $groupsOperations, - $group, - ); - } - - yield from Operators::generate($configuration, $pathPrefix, $operations, $operationHydratorMap); - yield new File($pathPrefix, 'Operations', $stmt->addStmt($class)->getNode()); - } - - /** - * @param array $operations - * @param array $operationHydratorMap - * - * @return iterable - */ - private static function generateOperationsGroup(string $pathPrefix, Configuration\Namespace_ $namespace, string $className, array $operations, string $group): iterable - { - $factory = new BuilderFactory(); - $stmt = $factory->namespace(Utils::dirname($namespace->source . '\\' . $className)); - - $class = $factory->class(Utils::basename($className))->makeFinal()->addStmt( - $factory->method('__construct')->makePublic()->addParam( - (new PrivatePromotedPropertyAsParam('operators'))->setType('Internal\Operators'), - ), - ); - - foreach ($operations as $operation) { - if ($operation->group !== $group) { - continue; - } - - $class->addStmt( - Helper\Operation::methodSignature( - $factory->method((new Convert($operation->name))->toCamel())->makePublic(), - $operation, - )->addStmt(Helper\Operation::methodCallOperation($operation)), - ); - } - - yield new File($pathPrefix, $className, $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/OperationsInterface.php b/src/Generator/OperationsInterface.php deleted file mode 100644 index 9b6b773..0000000 --- a/src/Generator/OperationsInterface.php +++ /dev/null @@ -1,54 +0,0 @@ - $operations - * - * @return iterable - */ - public static function generate(Configuration $configuration, string $pathPrefix, array $operations): iterable - { - $factory = new BuilderFactory(); - $stmt = $factory->namespace($configuration->namespace->source); - $class = $factory->interface('OperationsInterface'); - - /** @var array> $groups */ - $groups = []; - foreach ($operations as $operation) { - $groups[$operation->group][] = $operation; - } - - foreach ($groups as $group => $groupOperations) { - if (strlen($group) > 0) { - $class->addStmt( - $factory->method((new Convert($group))->toCamel())->makePublic()->setReturnType('Operation\\' . $group), - ); - continue; - } - - foreach ($groupOperations as $groupOperation) { - $class->addStmt( - Helper\Operation::methodSignature( - $factory->method($groupOperation->nameCamel)->makePublic(), - $groupOperation, - ), - ); - } - } - - yield new File($pathPrefix, 'OperationsInterface', $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/Operators.php b/src/Generator/Operators.php deleted file mode 100644 index dbf3361..0000000 --- a/src/Generator/Operators.php +++ /dev/null @@ -1,116 +0,0 @@ - $operations - * @param array $operationHydratorMap - * - * @return iterable - */ - public static function generate(Configuration $configuration, string $pathPrefix, array $operations, array $operationHydratorMap): iterable - { - $factory = new BuilderFactory(); - $stmt = $factory->namespace(trim($configuration->namespace->source, '\\') . '\\Internal'); - - $class = $factory->class('Operators')->makeFinal()->addStmt( - $factory->method('__construct')->makePublic()->addParam( - (new PrivatePromotedPropertyAsParam('authentication'))->setType('\\' . AuthenticationInterface::class)->makeReadonly(), - )->addParam( - (new PrivatePromotedPropertyAsParam('browser'))->setType('\\' . Browser::class)->makeReadonly(), - )->addParam( - (new PrivatePromotedPropertyAsParam('requestSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), - )->addParam( - (new PrivatePromotedPropertyAsParam('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), - )->addParam( - (new PrivatePromotedPropertyAsParam('hydrators'))->setType('Internal\\Hydrators')->makeReadonly(), - ), - ); - - foreach ($operations as $operation) { - $class->addStmts([ - $factory->property($operation->operatorLookUpMethod)->setType('?' . $operation->operatorClassName->relative)->setDefault(null)->makePrivate(), - $factory->method($operation->operatorLookUpMethod)->setReturnType($operation->operatorClassName->relative)->makePublic()->addStmts([ - new Node\Stmt\If_( - new Node\Expr\BinaryOp\Identical( - new Node\Expr\Instanceof_( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $operation->operatorLookUpMethod, - ), - new Node\Name($operation->operatorClassName->relative), - ), - new Node\Expr\ConstFetch(new Node\Name('false')), - ), - [ - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $operation->operatorLookUpMethod, - ), - new Node\Expr\New_( - new Node\Name($operation->operatorClassName->relative), - [ - ...(static function (Operation $operation, array $operationHydratorMap): iterable { - foreach ((new ReflectionClass($operation->operatorClassName->fullyQualified->source))->getConstructor()->getParameters() as $parameter) { - if ($parameter->name === 'hydrator') { - yield new Arg( - new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'hydrators', - ), - 'getObjectMapper' . ucfirst($operationHydratorMap[$operation->operationId]->methodName), - ), - ); - continue; - } - - yield new Arg( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $parameter->name, - ), - ); - } - })($operation, $operationHydratorMap), - ], - ), - ), - ), - ], - ], - ), - new Node\Stmt\Return_( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $operation->operatorLookUpMethod, - ), - ), - ]), - ]); - } - - yield new File($pathPrefix, 'Internal\\Operators', $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/Paths.php b/src/Generator/Paths.php new file mode 100644 index 0000000..8926c55 --- /dev/null +++ b/src/Generator/Paths.php @@ -0,0 +1,58 @@ +operators = new Operators($builderFactory); + $this->operator = new Operator($builderFactory); + $this->operationsInterface = new OperationsInterface($builderFactory); + $this->operations = new Operations($builderFactory); + $this->operation = new Operation($builderFactory, new Json(), new Raw()); + $this->operationTest = new OperationTest($builderFactory, $call, $operations); + } + + /** @return iterable */ + public function generate(Package $package, Representation $representation): iterable + { + foreach ($representation->client->paths as $path) { + foreach ($path->operations as $operation) { + yield from $this->operation->generate($package, $operation, $path->hydrator); + yield from $this->operator->generate($package, $operation, $path->hydrator); + yield from $this->operationTest->generate($package, $operation); + } + } + + yield from $this->operationsInterface->generate($package, $representation); + yield from $this->operations->generate($package, $representation); + yield from $this->operators->generate($package, $representation); + } +} diff --git a/src/Generator/Operation.php b/src/Generator/Paths/Operation.php similarity index 91% rename from src/Generator/Operation.php rename to src/Generator/Paths/Operation.php index 97c13cd..f0c1af7 100644 --- a/src/Generator/Operation.php +++ b/src/Generator/Paths/Operation.php @@ -2,21 +2,21 @@ declare(strict_types=1); -namespace ApiClients\Tools\OpenApiClientGenerator\Generator; +namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Paths; use ApiClients\Tools\OpenApiClient\Utils\Response\Header; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; +use ApiClients\Tools\OpenApiClientGenerator\Contract\ContentType; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\OperationArray; -use ApiClients\Tools\OpenApiClientGenerator\Registry\ThrowableSchema; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Hydrator; -use ApiClients\Tools\OpenApiClientGenerator\Utils; use cebe\openapi\Reader; use cebe\openapi\spec\Schema; use Jawira\CaseConverter\Convert; use League\Uri\UriTemplate; use NumberToWords\NumberToWords; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; +use OpenAPITools\Utils\Utils; use PhpParser\Builder\Param; use PhpParser\BuilderFactory; use PhpParser\Comment\Doc; @@ -27,8 +27,8 @@ use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\StreamInterface; use React\Http\Browser; +use React\Http\Message\Request; use React\Stream\ReadableStreamInterface; -use RingCentral\Psr7\Request; use RuntimeException; use Rx\Observable; use Rx\Scheduler\ImmediateScheduler; @@ -53,14 +53,23 @@ final class Operation { + /** @var array */ + private array $contentTypes = []; + + public function __construct( + private BuilderFactory $builderFactory, + ContentType ...$contentTypes, + ) { + $this->contentTypes = $contentTypes; + } + /** @return iterable */ - public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiClientGenerator\Representation\Operation $operation, Hydrator $hydrator, ThrowableSchema $throwableSchemaRegistry, Configuration $configuration): iterable + public function generate(Package $package, Namespaced\Operation $operation, Namespaced\Hydrator $hydrator): iterable { $noHydrator = true; - $factory = new BuilderFactory(); - $stmt = $factory->namespace($operation->className->namespace->source); + $stmt = $this->builderFactory->namespace($operation->className->namespace->source); - $class = $factory->class($operation->className->className)->makeFinal()->addStmt( + $class = $this->builderFactory->class($operation->className->className)->makeFinal()->addStmt( new Node\Stmt\ClassConst( [ new Node\Const_( @@ -85,17 +94,11 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli Class_::MODIFIER_PUBLIC, ), ); - if (count($operation->requestBody) > 0) { - $class->addStmt( - $factory->property('requestSchemaValidator')->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly()->makePrivate(), - ); - } - - $constructor = $factory->method('__construct')->makePublic(); + $constructor = $this->builderFactory->method('__construct')->makePublic(); if (count($operation->requestBody) > 0) { $constructor->addParam( - (new Param('requestSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $this->builderFactory->param('requestSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), )->addStmt( new Node\Expr\Assign( new Node\Expr\PropertyFetch( @@ -111,7 +114,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli $query = []; $constructorParams = []; foreach ($operation->parameters as $parameter) { - $paramterStmt = $factory->property($parameter->name); + $paramterStmt = $this->builderFactory->property($parameter->name); $param = new Param($parameter->name); if (strlen($parameter->description) > 0) { $paramterStmt->setDocComment('/**' . $parameter->description . ' **/'); @@ -202,10 +205,10 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ), ]; - $createRequestMethod = $factory->method('createRequest')->setReturnType('\\' . RequestInterface::class)->makePublic(); + $createRequestMethod = $this->builderFactory->method('createRequest')->setReturnType('\\' . RequestInterface::class)->makePublic(); if (count($operation->requestBody) > 0) { $createRequestMethod->addParam( - $factory->param('data')->setType('array'), + $this->builderFactory->param('data')->setType('array'), ); } @@ -223,7 +226,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli new Node\Arg(new Node\Expr\Variable('data')), new Node\Arg(new Node\Expr\StaticCall(new Node\Name('\\' . Reader::class), 'readFromJson', [ new Arg(new Node\Expr\ClassConstFetch( - new Node\Name($requestBody->schema->className->relative), + new Node\Name($requestBody->schema->className->fullyQualified->source), 'SCHEMA_JSON', )), new Arg(new Node\Expr\ClassConstFetch( @@ -252,7 +255,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli $returnTypeRaw = []; $cases = []; - foreach ($configuration->contentType ?? [] as $contentType) { + foreach ($this->contentTypes ?? [] as $contentType) { foreach ($contentType::contentType() as $supportedContentType) { $caseCases = []; foreach ($operation->response as $contentTypeSchema) { @@ -264,7 +267,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli continue; } - if (! $contentTypeSchema->content->payload instanceof \ApiClients\Tools\OpenApiClientGenerator\Representation\Schema) { + if (! $contentTypeSchema->content->payload instanceof \OpenAPITools\Representation\Namespaced\Schema) { if ($contentTypeSchema->content->type === 'scalar') { $returnType[] = $returnTypeRaw[] = $contentTypeSchema->content->payload; @@ -305,7 +308,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli is_array($contentTypeSchema->content->payload) ? $contentTypeSchema->content->payload : [$contentTypeSchema->content->payload] )) as $item ) { - if ($item instanceof \ApiClients\Tools\OpenApiClientGenerator\Representation\Schema) { + if ($item instanceof \OpenAPITools\Representation\Namespaced\Schema) { $sTmts[] = new Node\Stmt\TryCatch([ new Node\Stmt\Expression(new Node\Expr\MethodCall( new Node\Expr\PropertyFetch( @@ -317,7 +320,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli new Node\Arg(new Node\Expr\Variable('body')), new Node\Arg(new Node\Expr\StaticCall(new Node\Name('\cebe\openapi\Reader'), 'readFromJson', [ new Arg(new Node\Expr\ClassConstFetch( - new Node\Name($item->className->relative), + new Node\Name($item->className->fullyQualified->source), 'SCHEMA_JSON', )), new Arg(new Node\Scalar\String_('\cebe\openapi\spec\Schema')), @@ -332,7 +335,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli 'hydrateObject', [ new Node\Arg(new Node\Expr\ClassConstFetch( - new Node\Name($item->className->relative), + new Node\Name($item->className->fullyQualified->source), 'class', )), new Node\Arg(new Node\Expr\Variable('body')), @@ -349,7 +352,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ]); $sTmts[] = new Node\Stmt\Label($gotoLabels); $gotoLabels++; - $types[] = $item->className->relative; + $types[] = $item->className->fullyQualified->source; } else { $sTmts[] = new Node\Stmt\If_( new Node\Expr\FuncCall( @@ -413,21 +416,21 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli $returnOrThrow = Node\Stmt\Return_::class; if ($isError) { $returnOrThrow = Node\Stmt\Throw_::class; - $throwableSchemaRegistry->add($contentTypeSchema->content->payload->className->relative); +// $throwableSchemaRegistry->add($contentTypeSchema->content->payload->className->fullyQualified->source); } - $object = $isError ? $contentTypeSchema->content->payload->errorClassNameAliased->relative : $contentTypeSchema->content->payload->className->relative; + $object = $isError ? $contentTypeSchema->content->payload->errorClassNameAliased->fullyQualified->source : $contentTypeSchema->content->payload->className->fullyQualified->source; if (! $isError) { - $returnType[] = ($isArray ? '\\' . Observable::class . '<' : '') . $object . ($isArray ? '>' : ''); + $returnType[] = ($isArray ? '\\' . Observable::class . '<\\' : '') . $object . ($isArray ? '>' : ''); $returnTypeRaw[] = $isArray ? '\\' . Observable::class : $object; } - $validate = OperationArray::validate($contentTypeSchema->content->payload->className->relative, $isArray); - $hydrate = OperationArray::hydrate($contentTypeSchema->content->payload->className->relative); + $validate = OperationArray::validate($contentTypeSchema->content->payload->className->fullyQualified->source, $isArray); + $hydrate = OperationArray::hydrate($contentTypeSchema->content->payload->className->fullyQualified->source); if ($isError) { $hydrate = new Node\Expr\New_( - new Node\Name($contentTypeSchema->content->payload->errorClassNameAliased->relative), + new Node\Name($contentTypeSchema->content->payload->errorClassName->fullyQualified->source), [ new Arg( is_string($contentTypeSchema->code) ? new Node\Expr\Variable('code') : new Node\Scalar\LNumber($contentTypeSchema->code), @@ -623,7 +626,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ), ], 'params' => [ - $factory->param('data')->setType('string')->getNode(), + $this->builderFactory->param('data')->setType('string')->getNode(), ], 'uses' => [ new Node\Expr\ClosureUse( @@ -685,7 +688,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ), ], 'params' => [ - $factory->param('error')->setType('\\' . Throwable::class)->getNode(), + $this->builderFactory->param('error')->setType('\\' . Throwable::class)->getNode(), ], 'uses' => [ new Node\Expr\ClosureUse( @@ -701,7 +704,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ), ], 'params' => [ - $factory->param('response')->setType('\\' . ResponseInterface::class)->getNode(), + $this->builderFactory->param('response')->setType('\\' . ResponseInterface::class)->getNode(), ], 'uses' => [ new Node\Expr\ClosureUse( @@ -771,7 +774,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli $casesWithoutContent[] = $emptyCase; } - $createResponseMethod = $factory->method('createResponse')->makePublic(); + $createResponseMethod = $this->builderFactory->method('createResponse')->makePublic(); if (count($cases) > 0 || count($casesWithoutContent) > 0) { $createResponseMethod->addStmt( @@ -868,18 +871,12 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli } $createResponseMethod->addParam( - $factory->param('response')->setType('\\' . ResponseInterface::class), + $this->builderFactory->param('response')->setType('\\' . ResponseInterface::class), ); if ($noHydrator === false) { - $class->addStmt( - $factory->property('responseSchemaValidator')->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly()->makePrivate(), - )->addStmt( - $factory->property('hydrator')->setType($hydrator->className->relative)->makeReadonly()->makePrivate(), - ); - $constructor->addParam( - (new Param('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $this->builderFactory->param('responseSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), )->addStmt( new Node\Expr\Assign( new Node\Expr\PropertyFetch( @@ -889,7 +886,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli new Node\Expr\Variable('responseSchemaValidator'), ), )->addParam( - (new Param('hydrator'))->setType($hydrator->className->relative), + $this->builderFactory->param('hydrator')->makePrivate()->setType($hydrator->className->fullyQualified->source), )->addStmt( new Node\Expr\Assign( new Node\Expr\PropertyFetch( @@ -903,10 +900,10 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli if ($operation->matchMethod === 'STREAM') { $class->addStmt( - $factory->property('browser')->setType('\\' . Browser::class)->makeReadonly()->makePrivate(), + $this->builderFactory->property('browser')->setType('\\' . Browser::class)->makeReadonly()->makePrivate(), ); $constructor->addParam( - (new Param('browser'))->setType('\\' . Browser::class), + $this->builderFactory->param('browser')->makePrivate()->setType('\\' . Browser::class), )->addStmt( new Node\Expr\Assign( new Node\Expr\PropertyFetch( @@ -924,6 +921,6 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli $class->addStmt($createRequestMethod); $class->addStmt($createResponseMethod); - yield new File($pathPrefix, $operation->className->relative, $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, $operation->className->relative, $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); } } diff --git a/src/Generator/OperationTest.php b/src/Generator/Paths/OperationTest.php similarity index 84% rename from src/Generator/OperationTest.php rename to src/Generator/Paths/OperationTest.php index 9393c52..f9305bc 100644 --- a/src/Generator/OperationTest.php +++ b/src/Generator/Paths/OperationTest.php @@ -2,17 +2,14 @@ declare(strict_types=1); -namespace ApiClients\Tools\OpenApiClientGenerator\Generator; +namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Paths; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; -use ApiClients\Tools\OpenApiClientGenerator\Gatherer\ExampleData; -use ApiClients\Tools\OpenApiClientGenerator\Registry\ThrowableSchema; -use ApiClients\Tools\OpenApiClientGenerator\Representation; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Schema; use Jawira\CaseConverter\Convert; use NumberToWords\NumberToWords; +use OpenAPITools\Configuration\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; use PhpParser\Builder\Method; use PhpParser\Builder\Param; use PhpParser\BuilderFactory; @@ -40,17 +37,23 @@ final class OperationTest { + public function __construct( + private BuilderFactory $builderFactory, + private bool $call, + private bool $operations, + ) { + } + /** @return iterable */ - public static function generate(string $pathPrefix, Representation\Operation $operation, Representation\Hydrator $hydrator, ThrowableSchema $throwableSchemaRegistry, Configuration $configuration): iterable + public function generate(Package $package, Namespaced\Operation $operation): iterable { if (count($operation->response) === 0) { return; } - $factory = new BuilderFactory(); - $stmt = $factory->namespace($operation->className->namespace->test); + $stmt = $this->builderFactory->namespace($operation->className->namespace->test); - $class = $factory->class($operation->className->className . 'Test')->extend( + $class = $this->builderFactory->class($operation->className->className . 'Test')->extend( new Node\Name( '\\' . AsyncTestCase::class, ), @@ -62,6 +65,8 @@ public static function generate(string $pathPrefix, Representation\Operation $op ])), ); + $testsStmts = []; + foreach ($operation->response as $contentTypeSchema) { $contentTypePayloads = $contentTypeSchema->content->payload; if (! is_array($contentTypePayloads)) { @@ -69,70 +74,62 @@ public static function generate(string $pathPrefix, Representation\Operation $op } foreach ($contentTypePayloads as $index => $contentTypePayload) { - if (! $contentTypePayload instanceof Representation\Schema) { + if (! $contentTypePayload instanceof Namespaced\Schema) { continue; } $testSuffix = NumberToWords::transformNumber('en', $index); if (count($operation->requestBody) === 0) { - if ($configuration->entryPoints->call) { - $class->addStmt( - self::createCallMethod( - $factory, + if ($this->call) { + $testsStmts[] = + $this->createCallMethod( $operation, null, $contentTypeSchema, - $configuration, + $package, $contentTypePayload, $testSuffix, - ), - ); + ); } - if ($configuration->entryPoints->operations) { - $class->addStmt( - self::createOperationsMethod( - $factory, + if ($this->operations) { + $testsStmts[] = + $this->createOperationsMethod( $operation, null, $contentTypeSchema, - $configuration, + $package, $contentTypePayload, $testSuffix, - ), - ); + ); } } else { foreach ($operation->requestBody as $request) { - if ($configuration->entryPoints->call) { - $class->addStmt( - self::createCallMethod( - $factory, + if ($this->call) { + $testsStmts[] = + $this->createCallMethod( $operation, $request, $contentTypeSchema, - $configuration, + $package, $contentTypePayload, $testSuffix, - ), - ); + ); } - if (! $configuration->entryPoints->operations) { + if (! $this->operations) { continue; } - $class->addStmt( - self::createOperationsMethod( - $factory, + $testsStmts[] = + $this->createOperationsMethod( $operation, $request, $contentTypeSchema, - $configuration, + $package, $contentTypePayload, $testSuffix, - ), - ); + ); } } } @@ -140,75 +137,79 @@ public static function generate(string $pathPrefix, Representation\Operation $op foreach ($operation->empty as $emptyResponse) { if (count($operation->requestBody) === 0) { - if ($configuration->entryPoints->call) { - $class->addStmt( - self::createCallMethod( - $factory, + if ($this->call) { + $testsStmts[] = + $this->createCallMethod( $operation, null, $emptyResponse, - $configuration, + $package, null, 'empty', - ), - ); + ); } - if ($configuration->entryPoints->operations) { - $class->addStmt( - self::createOperationsMethod( - $factory, + if ($this->operations) { + $testsStmts[] = + $this->createOperationsMethod( $operation, null, $emptyResponse, - $configuration, + $package, null, 'empty', - ), - ); + ); } } else { foreach ($operation->requestBody as $request) { - if ($configuration->entryPoints->call) { - $class->addStmt( - self::createCallMethod( - $factory, + if ($this->call) { + $testsStmts[] = + $this->createCallMethod( $operation, $request, $emptyResponse, - $configuration, + $package, null, 'empty', - ), - ); + ); } - if (! $configuration->entryPoints->operations) { + if (! $this->operations) { continue; } - $class->addStmt( - self::createOperationsMethod( - $factory, + $testsStmts[] = + $this->createOperationsMethod( $operation, $request, $emptyResponse, - $configuration, + $package, null, 'empty', - ), - ); + ); } } } - yield new File($pathPrefix, $operation->className->relative . 'Test', $stmt->addStmt($class)->getNode()); + if (count($testsStmts) <= 0) { + return; + } + + $class->addStmts($testsStmts); + + yield new File($package->destination->test, $operation->className->relative . 'Test', $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); } - private static function createCallMethod(BuilderFactory $factory, Representation\Operation $operation, Representation\OperationRequestBody|null $request, Representation\OperationResponse|Representation\OperationEmptyResponse $response, Configuration $configuration, Representation\Schema|Representation\PropertyType|string|null $contentTypePayload, string $testSuffix): Method - { - $methodName = 'call_httpCode_' . $response->code . ($request === null ? '' : '_requestContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $request->contentType)) . ($response instanceof Representation\OperationResponse ? '_responseContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $response->contentType) : '') . ($testSuffix !== '' ? '_' . $testSuffix : ''); - if ($response instanceof Representation\OperationResponse && $response->content->payload instanceof Representation\Schema) { + private function createCallMethod( + Namespaced\Operation $operation, + Namespaced\Operation\RequestBody|null $request, + Namespaced\Operation\Response|Namespaced\Operation\EmptyResponse $response, + Package $package, + Namespaced\Schema|Namespaced\Property\Type|string|null $contentTypePayload, + string $testSuffix, + ): Method { + $methodName = 'call_httpCode_' . $response->code . ($request === null ? '' : '_requestContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $request->contentType)) . ($response instanceof Namespaced\Operation\Response ? '_responseContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $response->contentType) : '') . ($testSuffix !== '' ? '_' . $testSuffix : ''); + if ($response instanceof Namespaced\Operation\Response && $response->content->payload instanceof Namespaced\Schema) { $responseSchemaFetch = new Node\Expr\FuncCall( new Node\Name( 'json_encode', @@ -223,7 +224,7 @@ private static function createCallMethod(BuilderFactory $factory, Representation new Arg( new Node\Expr\ClassConstFetch( new Node\Name( - $response->content->payload->className->relative, + $response->content->payload->className->fullyQualified->source, ), 'SCHEMA_EXAMPLE_DATA', ), @@ -240,20 +241,20 @@ private static function createCallMethod(BuilderFactory $factory, Representation ), ], ); - } elseif ($response instanceof Representation\OperationResponse) { + } elseif ($response instanceof Namespaced\Operation\Response) { $responseSchemaFetch = ExampleData::gather(null, $response->content, $methodName)->node; } else { $responseSchemaFetch = new Node\Scalar\String_(''); } - return $factory->method($methodName)->makePublic()->setDocComment( + return $this->builderFactory->method($methodName)->makePublic()->setDocComment( new Doc(implode(PHP_EOL, [ '/**', ' * @test', ' */', ])), )->addStmts([ - ...self::testSetUp($responseSchemaFetch, $operation, $request, $response, $configuration, $contentTypePayload), + ...$this->testSetUp($responseSchemaFetch, $operation, $request, $response, $package, $contentTypePayload), new Node\Stmt\Expression( new Node\Expr\Assign( new Node\Expr\Variable( @@ -268,7 +269,7 @@ private static function createCallMethod(BuilderFactory $factory, Representation new Arg( new Node\Expr\ClassConstFetch( new Node\Name( - $operation->className->relative, + $operation->className->fullyQualified->source, ), 'OPERATION_MATCH', ), @@ -324,7 +325,7 @@ private static function createCallMethod(BuilderFactory $factory, Representation new Arg( new Node\Expr\ClassConstFetch( new Node\Name( - $request->schema->className->relative, + $request->schema->className->fullyQualified->source, ), 'SCHEMA_EXAMPLE_DATA', ), @@ -357,10 +358,16 @@ private static function createCallMethod(BuilderFactory $factory, Representation ]); } - private static function createOperationsMethod(BuilderFactory $factory, Representation\Operation $operation, Representation\OperationRequestBody|null $request, Representation\OperationResponse|Representation\OperationEmptyResponse $response, Configuration $configuration, Representation\Schema|Representation\PropertyType|string|null $contentTypePayload, string $testSuffix): Method - { - $methodName = 'operations_httpCode_' . $response->code . ($request === null ? '' : '_requestContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $request->contentType)) . ($response instanceof Representation\OperationResponse ? '_responseContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $response->contentType) : '') . ($testSuffix !== '' ? '_' . $testSuffix : ''); - if ($response instanceof Representation\OperationResponse && $response->content->payload instanceof Representation\Schema) { + private function createOperationsMethod( + Namespaced\Operation $operation, + Namespaced\Operation\RequestBody|null $request, + Namespaced\Operation\Response|Namespaced\Operation\EmptyResponse $response, + Package $package, + Namespaced\Schema|Namespaced\Property\Type|string|null $contentTypePayload, + string $testSuffix, + ): Method { + $methodName = 'operations_httpCode_' . $response->code . ($request === null ? '' : '_requestContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $request->contentType)) . ($response instanceof Namespaced\Operation\Response ? '_responseContentType_' . preg_replace('/[^a-zA-Z0-9]+/', '_', $response->contentType) : '') . ($testSuffix !== '' ? '_' . $testSuffix : ''); + if ($response instanceof Namespaced\Operation\Response && $response->content->payload instanceof Namespaced\Schema) { $responseSchemaFetch = new Node\Expr\FuncCall( new Node\Name( 'json_encode', @@ -375,7 +382,7 @@ private static function createOperationsMethod(BuilderFactory $factory, Represen new Arg( new Node\Expr\ClassConstFetch( new Node\Name( - $response->content->payload->className->relative, + $response->content->payload->className->fullyQualified->source, ), 'SCHEMA_EXAMPLE_DATA', ), @@ -392,20 +399,20 @@ private static function createOperationsMethod(BuilderFactory $factory, Represen ), ], ); - } elseif ($response instanceof Representation\OperationResponse) { + } elseif ($response instanceof Namespaced\Operation\Response) { $responseSchemaFetch = ExampleData::gather(null, $response->content, $methodName)->node; } else { $responseSchemaFetch = new Node\Scalar\String_(''); } - return $factory->method($methodName)->makePublic()->setDocComment( + return $this->builderFactory->method($methodName)->makePublic()->setDocComment( new Doc(implode(PHP_EOL, [ '/**', ' * @test', ' */', ])), )->addStmts([ - ...self::testSetUp($responseSchemaFetch, $operation, $request, $response, $configuration, $contentTypePayload), + ...$this->testSetUp($responseSchemaFetch, $operation, $request, $response, $package, $contentTypePayload), new Node\Stmt\Expression( new Node\Expr\Assign( new Node\Expr\Variable( @@ -442,7 +449,7 @@ private static function createOperationsMethod(BuilderFactory $factory, Represen new Arg( new Node\Expr\ClassConstFetch( new Node\Name( - $request->schema->className->relative, + $request->schema->className->fullyQualified->source, ), 'SCHEMA_EXAMPLE_DATA', ), @@ -461,7 +468,7 @@ private static function createOperationsMethod(BuilderFactory $factory, Represen ), ), ), - ...($operation->matchMethod !== 'STREAM' && $response instanceof Representation\OperationEmptyResponse ? [ + ...($operation->matchMethod !== 'STREAM' && $response instanceof Namespaced\Operation\EmptyResponse ? [ new Node\Expr\StaticCall( new Node\Name('self'), 'assertArrayHasKey', @@ -495,7 +502,7 @@ private static function createOperationsMethod(BuilderFactory $factory, Represen ), ], ), - ...(static function (Representation\Header ...$headers): iterable { + ...(static function (Namespaced\Header ...$headers): iterable { foreach ($headers as $header) { yield new Node\Expr\StaticCall( new Node\Name('self'), @@ -542,7 +549,7 @@ private static function createOperationsMethod(BuilderFactory $factory, Represen ]); } - private static function wrapShouldBeCalled(Node\Expr\MethodCall $methodCall): Node\Expr\MethodCall + private function wrapShouldBeCalled(Node\Expr\MethodCall $methodCall): Node\Expr\MethodCall { return new Node\Expr\MethodCall( $methodCall, @@ -551,8 +558,14 @@ private static function wrapShouldBeCalled(Node\Expr\MethodCall $methodCall): No } /** @return array */ - private static function testSetUp(Node\Expr $responseSchemaFetch, Representation\Operation $operation, Representation\OperationRequestBody|null $request, Representation\OperationResponse|Representation\OperationEmptyResponse $response, Configuration $configuration, Representation\Schema|Representation\PropertyType|string|null $contentTypePayload): array - { + private function testSetUp( + Node\Expr $responseSchemaFetch, + Namespaced\Operation $operation, + Namespaced\Operation\RequestBody|null $request, + Namespaced\Operation\Response|Namespaced\Operation\EmptyResponse $response, + Package $package, + Namespaced\Schema|Namespaced\Property\Type|string|null $contentTypePayload, + ): array { return [ ...(is_string($response->code) || $response->code < 400 || $contentTypePayload === null ? [] : [ new Node\Stmt\Expression( @@ -565,7 +578,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation new Arg( new Node\Expr\ClassConstFetch( new Node\Name( - $contentTypePayload->errorClassNameAliased->relative, + $contentTypePayload->errorClassName->fullyQualified->source, ), 'class', ), @@ -587,7 +600,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation new Arg( new Node\Scalar\LNumber(is_string($response->code) ? 999 : $response->code), ), - ...($response instanceof Representation\OperationResponse ? [ + ...($response instanceof Namespaced\Operation\Response ? [ new Arg( new Node\Expr\Array_([ new Node\Expr\ArrayItem( @@ -597,7 +610,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation ]), ), new Arg( - $contentTypePayload instanceof Schema && $contentTypePayload->isArray ? new Node\Expr\BinaryOp\Concat( + $contentTypePayload instanceof Namespaced\Schema && $contentTypePayload->isArray ? new Node\Expr\BinaryOp\Concat( new Node\Scalar\String_('['), new Node\Expr\BinaryOp\Concat( $responseSchemaFetch, @@ -608,7 +621,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation ] : [ new Arg( new Node\Expr\Array_([ - ...(static function (Representation\Header ...$headers): iterable { + ...(static function (Namespaced\Header ...$headers): iterable { foreach ($headers as $header) { yield new Node\Expr\ArrayItem( $header->example->node, @@ -646,7 +659,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation ), ), ), - self::wrapShouldBeCalled( + $this->wrapShouldBeCalled( new Node\Expr\MethodCall( new Node\Expr\MethodCall( new Node\Expr\Variable( @@ -753,7 +766,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation ), ], ), - self::wrapShouldBeCalled( + $this->wrapShouldBeCalled( new Node\Expr\MethodCall( new Node\Expr\MethodCall( new Node\Expr\Variable( @@ -860,7 +873,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation new Arg( new Node\Expr\ClassConstFetch( new Node\Name( - $request->schema->className->relative, + $request->schema->className->fullyQualified->source, ), 'SCHEMA_EXAMPLE_DATA', ), @@ -906,7 +919,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation ), new Node\Expr\New_( new Node\Name( - '\\' . $configuration->namespace->source . '\Client', + '\\' . $package->namespace->source . '\Client', ), [ new Arg( diff --git a/src/Generator/Paths/Operations.php b/src/Generator/Paths/Operations.php new file mode 100644 index 0000000..c49b27e --- /dev/null +++ b/src/Generator/Paths/Operations.php @@ -0,0 +1,124 @@ + */ + public function generate(Package $package, Namespaced\Representation $representation): iterable + { + $groups = []; + $operationHydratorMap = []; + foreach ($representation->client->paths as $path) { + foreach ($path->operations as $operation) { + $operationHydratorMap[$operation->operationId] = $path->hydrator; + $groups[$operation->group][] = $operation; + } + } + + $stmt = $this->builderFactory->namespace($package->namespace->source); + + $class = $this->builderFactory->class('Operations')->makeFinal()->implement(new Name('OperationsInterface'))->makeReadonly(); + + $class->addStmt( + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('operators')->makePublic()->setType('\\' . $package->namespace->source . '\\Internal\\Operators'), + ), + ); + + foreach ($groups as $group => $groupsOperations) { + if ($group === '') { + foreach ($groupsOperations as $groupsOperation) { + $class->addStmt( + Helper\Operation::methodSignature( + $this->builderFactory->method((new Convert($groupsOperation->name))->toCamel())->makePublic(), + $groupsOperation, + )->addStmt(Helper\Operation::methodCallOperation($groupsOperation)), + ); + } + + continue; + } + + $class->addStmt( + $this->builderFactory->method((new Convert($group))->toCamel())->makePublic()->setReturnType('Operation\\' . $group)->addStmts([ + new Node\Stmt\Return_( + new Expr\New_( + new Name( + 'Operation\\' . $group, + ), + [ + new Arg( + new Expr\PropertyFetch( + new Expr\Variable('this'), + 'operators', + ), + ), + ], + ), + ), + ]), + ); + + yield from $this->generateOperationsGroup( + $package, + 'Operation\\' . $group, + $groupsOperations, + $group, + ); + } + + yield new File($package->destination->source, 'Operations', $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); + } + + /** + * @param array $operations + * @param array $operationHydratorMap + * + * @return iterable + */ + private function generateOperationsGroup(Package $package, string $className, array $operations, string $group): iterable + { + $stmt = $this->builderFactory->namespace(Utils::dirname($package->namespace->source . '\\' . $className)); + + $class = $this->builderFactory->class(Utils::basename($className))->makeFinal()->addStmt( + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('operators')->makePublic()->setType('\\' . $package->namespace->source . '\\Internal\\Operators'), + ), + ); + + foreach ($operations as $operation) { + if ($operation->group !== $group) { + continue; + } + + $class->addStmt( + Helper\Operation::methodSignature( + $this->builderFactory->method((new Convert($operation->name))->toCamel())->makePublic(), + $operation, + )->addStmt(Helper\Operation::methodCallOperation($operation)), + ); + } + + yield new File($package->destination->source, $className, $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); + } +} diff --git a/src/Generator/Paths/OperationsInterface.php b/src/Generator/Paths/OperationsInterface.php new file mode 100644 index 0000000..7e91651 --- /dev/null +++ b/src/Generator/Paths/OperationsInterface.php @@ -0,0 +1,58 @@ + */ + public function generate(Package $package, Representation $representation): iterable + { + $stmt = $this->builderFactory->namespace($package->namespace->source); + $class = $this->builderFactory->interface('OperationsInterface'); + + /** @var array> $groups */ + $groups = []; + foreach ($representation->client->paths as $path) { + foreach ($path->operations as $operation) { + $groups[$operation->group][] = $operation; + } + } + + foreach ($groups as $group => $groupOperations) { + if (strlen($group) > 0) { + $class->addStmt( + $this->builderFactory->method((new Convert($group))->toCamel())->makePublic()->setReturnType('Operation\\' . $group), + ); + continue; + } + + foreach ($groupOperations as $groupOperation) { + $class->addStmt( + Helper\Operation::methodSignature( + $this->builderFactory->method($groupOperation->nameCamel)->makePublic(), + $groupOperation, + ), + ); + } + } + + yield new File($package->destination->source, 'OperationsInterface', $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); + } +} diff --git a/src/Generator/Operator.php b/src/Generator/Paths/Operator.php similarity index 83% rename from src/Generator/Operator.php rename to src/Generator/Paths/Operator.php index 47f5630..b2369d7 100644 --- a/src/Generator/Operator.php +++ b/src/Generator/Paths/Operator.php @@ -2,17 +2,15 @@ declare(strict_types=1); -namespace ApiClients\Tools\OpenApiClientGenerator\Generator; +namespace ApiClients\Tools\OpenApiClientGenerator\Generator\Paths; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; +use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\ResultConverter; use ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Types; -use ApiClients\Tools\OpenApiClientGenerator\PrivatePromotedPropertyAsParam; -use ApiClients\Tools\OpenApiClientGenerator\Registry\ThrowableSchema; -use ApiClients\Tools\OpenApiClientGenerator\Representation; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Operation; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; use PhpParser\Builder\Param; use PhpParser\BuilderFactory; use PhpParser\Node; @@ -32,8 +30,13 @@ final class Operator { + public function __construct( + private BuilderFactory $builderFactory, + ) { + } + /** @return iterable */ - public static function generate(string $pathPrefix, Operation $operation, Representation\Hydrator $hydrator, ThrowableSchema $throwableSchemaRegistry, Configuration $configuration): iterable + public function generate(Package $package, Namespaced\Operation $operation, Namespaced\Hydrator $hydrator): iterable { $bringHydratorAndResponseValidator = count( array_filter( @@ -73,23 +76,23 @@ public static function generate(string $pathPrefix, Operation $operation, Repres $constructor = $factory->method('__construct')->makePublic(); $constructor->addParam( - (new PrivatePromotedPropertyAsParam('browser'))->setType('\\' . Browser::class), + $this->builderFactory->param('browser')->makePrivate()->setType('\\' . Browser::class), ); $constructor->addParam( - (new PrivatePromotedPropertyAsParam('authentication'))->setType('\\' . AuthenticationInterface::class), + $this->builderFactory->param('authentication')->makePrivate()->setType('\\' . AuthenticationInterface::class), ); if (count($operation->requestBody) > 0) { $constructor->addParam( - (new PrivatePromotedPropertyAsParam('requestSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $this->builderFactory->param('requestSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), ); } if ($bringHydratorAndResponseValidator) { $constructor->addParam( - (new PrivatePromotedPropertyAsParam('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $this->builderFactory->param('responseSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), )->addParam( - (new PrivatePromotedPropertyAsParam('hydrator'))->setType($hydrator->className->relative), + $this->builderFactory->param('hydrator')->makePrivate()->setType($hydrator->className->fullyQualified->source), ); } @@ -114,7 +117,7 @@ public static function generate(string $pathPrefix, Operation $operation, Repres $callParams[] = $factory->param('params')->setType('array'); } - $returnType = \ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation::getResultTypeFromOperation($operation); + $returnType = Operation::getResultTypeFromOperation($operation); $class->addStmt( $factory->method('call')->makePublic()->setReturnType( @@ -125,7 +128,7 @@ public static function generate(string $pathPrefix, Operation $operation, Repres ), ), )->setDocComment( - \ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation::getDocBlockFromOperation($operation), + Operation::getDocBlockFromOperation($operation), )->addParams($callParams)->addStmts([ new Node\Stmt\Expression(new Node\Expr\Assign( new Node\Expr\Variable('operation'), @@ -169,10 +172,10 @@ public static function generate(string $pathPrefix, Operation $operation, Repres ]), ); - yield new File($pathPrefix, $operation->operatorClassName->relative, $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, $operation->operatorClassName->relative, $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); } - private static function callOperation(string $returnType, Operation $operation): Node\Expr\MethodCall + private static function callOperation(string $returnType, Namespaced\Operation $operation): Node\Expr\MethodCall { return new Node\Expr\MethodCall( new Node\Expr\MethodCall( @@ -222,7 +225,7 @@ private static function callOperation(string $returnType, Operation $operation): 'uses' => [ new Node\Expr\Variable('operation'), ], - 'returnType' => (static function (Representation\Operation $operation): Node\UnionType|Node\Name { + 'returnType' => (static function (Namespaced\Operation $operation): Node\UnionType|Node\Name { /** @phpstan-ignore-next-line */ $returnType = (new ReflectionClass($operation->className->fullyQualified->source))->getMethod('createResponse')->getReturnType(); if ($returnType === null || (string) $returnType === 'void') { diff --git a/src/Generator/Paths/Operators.php b/src/Generator/Paths/Operators.php new file mode 100644 index 0000000..b8c615b --- /dev/null +++ b/src/Generator/Paths/Operators.php @@ -0,0 +1,123 @@ + */ + public function generate(Package $package, Namespaced\Representation $representation): iterable + { + $operationHydratorMap = []; + foreach ($representation->client->paths as $path) { + foreach ($path->operations as $operation) { + $operationHydratorMap[$operation->operationId] = $path->hydrator; + } + } + + $stmt = $this->builderFactory->namespace(trim($package->namespace->source, '\\') . '\\Internal'); + + $class = $this->builderFactory->class('Operators')->makeFinal()->addStmt( + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('authentication')->makePrivate()->setType('\\' . AuthenticationInterface::class)->makeReadonly(), + )->addParam( + $this->builderFactory->param('browser')->makePrivate()->setType('\\' . Browser::class)->makeReadonly(), + )->addParam( + $this->builderFactory->param('requestSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), + )->addParam( + $this->builderFactory->param('responseSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), + )->addParam( + $this->builderFactory->param('hydrators')->makePrivate()->setType('Hydrators')->makeReadonly(), + ), + ); + + foreach ($representation->client->paths as $path) { + foreach ($path->operations as $operation) { + $class->addStmts([ + $this->builderFactory->property($operation->operatorLookUpMethod)->setType('?' . $operation->operatorClassName->fullyQualified->source)->setDefault(null)->makePrivate(), + $this->builderFactory->method($operation->operatorLookUpMethod)->setReturnType($operation->operatorClassName->fullyQualified->source)->makePublic()->addStmts([ + new Node\Stmt\If_( + new Node\Expr\BinaryOp\Identical( + new Node\Expr\Instanceof_( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + $operation->operatorLookUpMethod, + ), + new Node\Name($operation->operatorClassName->fullyQualified->source), + ), + new Node\Expr\ConstFetch(new Node\Name('false')), + ), + [ + 'stmts' => [ + new Node\Stmt\Expression( + new Node\Expr\Assign( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + $operation->operatorLookUpMethod, + ), + new Node\Expr\New_( + new Node\Name($operation->operatorClassName->fullyQualified->source), + [ + ...(static function (Namespaced\Operation $operation, array $operationHydratorMap): iterable { + foreach ((new ReflectionClass($operation->operatorClassName->fullyQualified->source))->getConstructor()->getParameters() as $parameter) { + if ($parameter->name === 'hydrator') { + yield new Arg( + new Node\Expr\MethodCall( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + 'hydrators', + ), + 'getObjectMapper' . ucfirst($operationHydratorMap[$operation->operationId]->methodName), + ), + ); + continue; + } + + yield new Arg( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + $parameter->name, + ), + ); + } + })($operation, $operationHydratorMap), + ], + ), + ), + ), + ], + ], + ), + new Node\Stmt\Return_( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + $operation->operatorLookUpMethod, + ), + ), + ]), + ]); + } + } + + yield new File($package->destination->source, 'Internal\\Operators', $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); + } +} diff --git a/src/Generator/Routers.php b/src/Generator/Routers.php index efcd055..7c54512 100644 --- a/src/Generator/Routers.php +++ b/src/Generator/Routers.php @@ -5,10 +5,9 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; -use ApiClients\Tools\OpenApiClientGenerator\Configuration; -use ApiClients\Tools\OpenApiClientGenerator\File; use ApiClients\Tools\OpenApiClientGenerator\Generator\Client\Routers as ClientRouters; -use ApiClients\Tools\OpenApiClientGenerator\PrivatePromotedPropertyAsParam; +use OpenAPITools\Contract\Package; +use OpenAPITools\Utils\File; use PhpParser\BuilderFactory; use PhpParser\Node; use PhpParser\Node\Arg; @@ -19,30 +18,30 @@ final class Routers { /** @return iterable */ - public static function generate(Configuration $configuration, string $pathPrefix, ClientRouters $routers): iterable + public static function generate(Package $package, ClientRouters $routers): iterable { $factory = new BuilderFactory(); - $stmt = $factory->namespace(trim($configuration->namespace->source, '\\') . '\\Internal'); + $stmt = $factory->namespace(trim($package->namespace->source, '\\') . '\\Internal'); $class = $factory->class('Routers')->makeFinal()->addStmt( $factory->method('__construct')->makePublic()->addParam( - (new PrivatePromotedPropertyAsParam('authentication'))->setType('\\' . AuthenticationInterface::class)->makeReadonly(), + $factory->param('authentication')->makePrivate()->setType('\\' . AuthenticationInterface::class)->makeReadonly(), )->addParam( - (new PrivatePromotedPropertyAsParam('browser'))->setType('\\' . Browser::class)->makeReadonly(), + $factory->param('browser')->makePrivate()->setType('\\' . Browser::class)->makeReadonly(), )->addParam( - (new PrivatePromotedPropertyAsParam('requestSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), + $factory->param('requestSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), )->addParam( - (new PrivatePromotedPropertyAsParam('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), + $factory->param('responseSchemaValidator')->makePrivate()->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), )->addParam( - (new PrivatePromotedPropertyAsParam('hydrators'))->setType('Internal\\Hydrators')->makeReadonly(), + $factory->param('hydrators')->makePrivate()->setType('Hydrators')->makeReadonly(), ), ); foreach ($routers->get() as $group) { - $router = $routers->createClassName($group->method, $group->group, ''); + $router = $routers->createClassName($package, $group->method, $group->group, ''); $class->addStmts([ - $factory->property($router->loopUpMethod)->setType('?' . $router->class)->setDefault(null)->makePrivate(), - $factory->method($router->loopUpMethod)->setReturnType($router->class)->makePublic()->addStmts([ + $factory->property($router->loopUpMethod)->setType('?' . $router->class->fullyQualified->source)->setDefault(null)->makePrivate(), + $factory->method($router->loopUpMethod)->setReturnType($router->class->fullyQualified->source)->makePublic()->addStmts([ new Node\Stmt\If_( new Node\Expr\BinaryOp\Identical( new Node\Expr\Instanceof_( @@ -50,7 +49,7 @@ public static function generate(Configuration $configuration, string $pathPrefix new Node\Expr\Variable('this'), $router->loopUpMethod, ), - new Node\Name($router->class), + new Node\Name($router->class->fullyQualified->source), ), new Node\Expr\ConstFetch(new Node\Name('false')), ), @@ -63,7 +62,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $router->loopUpMethod, ), new Node\Expr\New_( - new Node\Name($router->class), + new Node\Name($router->class->fullyQualified->source), [ new Arg( new Node\Expr\PropertyFetch( @@ -132,6 +131,6 @@ public static function generate(Configuration $configuration, string $pathPrefix ]); } - yield new File($pathPrefix, 'Internal\\Routers', $stmt->addStmt($class)->getNode()); + yield new File($package->destination->source, 'Internal\\Routers', $stmt->addStmt($class)->getNode(), File::DO_LOAD_ON_WRITE); } } diff --git a/src/Generator/Schema.php b/src/Generator/Schema.php deleted file mode 100644 index f6ca81a..0000000 --- a/src/Generator/Schema.php +++ /dev/null @@ -1,319 +0,0 @@ - $aliases - * - * @return iterable - */ - public static function generate(string $pathPrefix, Representation\Schema $schema, array $aliases): iterable - { - $factory = new BuilderFactory(); - - $className = $schema->className; - if (count($aliases) > 0) { - $className = ClassString::factory( - $className->baseNamespaces, - 'Schema\\AliasAbstract\\Tiet' . implode('\\Tiet', str_split(strtoupper(md5(json_encode($schema->schema->getSerializableData()))), 8)), - ); - $aliases[] = $schema->className; - } - - $schemaJson = new Node\Stmt\ClassConst( - [ - new Node\Const_( - 'SCHEMA_JSON', - new Node\Scalar\String_( - json_encode($schema->schema->getSerializableData(), JSON_PRETTY_PRINT), - ), - ), - ], - Class_::MODIFIER_PUBLIC, - ); - - $class = $factory->class($className->className)->makeReadonly()->implement(...(static function (Representation\Contract ...$contracts): iterable { - foreach ($contracts as $contract) { - yield $contract->className->relative; - } - })(...$schema->contracts)); - - if (count($aliases) === 0) { - $class = $class->makeFinal(); - } else { - $class = $class->makeAbstract(); - } - - $class->addStmt( - $schemaJson, - )->addStmt( - new Node\Stmt\ClassConst( - [ - new Node\Const_( - 'SCHEMA_TITLE', - new Node\Scalar\String_( - $schema->title, - ), - ), - ], - Class_::MODIFIER_PUBLIC, - ), - )->addStmt( - new Node\Stmt\ClassConst( - [ - new Node\Const_( - 'SCHEMA_DESCRIPTION', - new Node\Scalar\String_( - $schema->description, - ), - ), - ], - Class_::MODIFIER_PUBLIC, - ), - )->addStmt( - new Node\Stmt\ClassConst( - [ - new Node\Const_( - 'SCHEMA_EXAMPLE_DATA', - $factory->val(json_encode($schema->example, JSON_PRETTY_PRINT)), - ), - ], - Class_::MODIFIER_PUBLIC, - ), - ); - - $constructor = (new BuilderFactory())->method('__construct')->makePublic(); - $constructDocBlock = []; - foreach ($schema->properties as $property) { - if (strlen($property->description) > 0) { - $constructDocBlock[] = $property->name . ': ' . $property->description; - } - - $constructorParam = new PromotedPropertyAsParam($property->name); - if ($property->name !== $property->sourceName) { - $constructorParam->addAttribute( - new Node\Attribute( - new Node\Name('\\' . MapFrom::class), - [ - new Node\Arg(new Node\Scalar\String_($property->sourceName)), - ], - ), - ); - } - - $types = []; - if ($property->type->type === 'union' && is_array($property->type->payload)) { - $types[] = self::buildUnionType($property->type); - $schemaClasses = [...self::getUnionTypeSchemas($property->type)]; - - if (count($schemaClasses) > 0) { - $castToUnionToType = ClassString::factory($schema->className->baseNamespaces, Utils::className('Internal\\Attribute\\CastUnionToType\\Single\\' . $schema->className->relative . '\\' . $property->name)); - - yield from SingleCastUnionToType::generate($pathPrefix, $castToUnionToType, ...$schemaClasses); - - $constructorParam->addAttribute( - new Node\Attribute( - new Node\Name($castToUnionToType->fullyQualified->source), - ), - ); - } - } - - if ($property->type->type === 'array' && ! is_string($property->type->payload)) { - if ($property->type->payload instanceof Representation\PropertyType) { - if (! $property->type->payload->payload instanceof Representation\PropertyType) { - $iterableType = $property->type->payload; - if ($iterableType->payload instanceof Representation\Schema) { - $iterableType = $iterableType->payload->className->fullyQualified->source; - } - - if ($iterableType instanceof Representation\PropertyType && (($iterableType->payload instanceof Representation\PropertyType && $iterableType->payload->type === 'union') || is_array($iterableType->payload))) { - $schemaClasses = [...self::getUnionTypeSchemas($iterableType)]; - $iterableType = self::buildUnionType($iterableType); - - if (count($schemaClasses) > 0) { - $castToUnionToType = ClassString::factory($schema->className->baseNamespaces, Utils::className('Internal\\Attribute\\CastUnionToType\\Single\\' . $schema->className->relative . '\\' . $property->name)); - - yield from SingleCastUnionToType::generate($pathPrefix, $castToUnionToType, ...$schemaClasses); - - $constructorParam->addAttribute( - new Node\Attribute( - new Node\Name($castToUnionToType->fullyQualified->source), - ), - ); - } - } - - if ($iterableType instanceof Representation\PropertyType) { - $iterableType = $iterableType->payload; - } - - $compiledTYpe = ($property->nullable ? '?' : '') . 'array<' . $iterableType . '>'; - $constructDocBlock[] = '@param ' . $compiledTYpe . ' $' . $property->name; - } - - if ($property->type->payload->payload instanceof Representation\Schema) { - $constructorParam->addAttribute( - new Node\Attribute( - new Node\Name('\\' . CastListToType::class), - [ - new Node\Arg(new Node\Expr\ClassConstFetch( - new Node\Name($property->type->payload->payload->className->relative), - 'class', - )), - ], - ), - ); - } - } elseif (is_array($property->type->payload)) { - $schemaClasses = []; - foreach ($property->type->payload as $payloadType) { - $schemaClasses = [...$schemaClasses, ...self::getUnionTypeSchemas($payloadType)]; - } - - if (count($schemaClasses) > 0) { - $castToUnionToType = ClassString::factory($schema->className->baseNamespaces, Utils::className('Internal\\Attribute\\CastUnionToType\\Single\\' . $schema->className->relative . '\\' . $property->name)); - $arrayCastToUnionToType = ClassString::factory($schema->className->baseNamespaces, Utils::className('Internal\\Attribute\\CastUnionToType\\Multiple\\' . $schema->className->relative . '\\' . $property->name)); - - yield from SingleCastUnionToType::generate($pathPrefix, $castToUnionToType, ...$schemaClasses); - yield from MultipleCastUnionToType::generate($pathPrefix, $arrayCastToUnionToType, $castToUnionToType, ...$schemaClasses); - - $constructorParam->addAttribute( - new Node\Attribute( - new Node\Name($arrayCastToUnionToType->fullyQualified->source), - ), - ); - - $compiledTYpe = ($property->nullable ? '?' : '') . 'array<' . implode('|', array_unique([ - ...(static function (Representation\Schema ...$schemas): iterable { - foreach ($schemas as $schema) { - yield $schema->className->fullyQualified->source; - } - })(...$schemaClasses), - ])) . '>'; - $constructDocBlock[] = '@param ' . $compiledTYpe . ' $' . $property->name; - } - } - - $types[] = 'array'; - } elseif ($property->type->payload instanceof Representation\Schema) { - $types[] = $property->type->payload->className->relative; - } elseif (is_string($property->type->payload)) { - $types[] = $property->type->payload; - } - - $types = array_unique($types); - - $nullable = ''; - if ($property->nullable) { - $nullable = count($types) > 1 || count(explode('|', implode('|', $types))) > 1 ? 'null|' : '?'; - } - - if (count($types) > 0) { - $constructorParam->setType($nullable . implode('|', $types)); - } - - $constructor->addParam($constructorParam); - } - - if (count($constructDocBlock) > 0) { - $constructor->setDocComment('/**' . PHP_EOL . ' * ' . implode(PHP_EOL . ' * ', str_replace(['/**', '*/'], '', $constructDocBlock)) . PHP_EOL . ' */'); - } - - $class->addStmt($constructor); - - yield new File($pathPrefix, $className->relative, $factory->namespace($className->namespace->source)->addStmt($class)->getNode()); - - foreach ($aliases as $alias) { - $aliasTms = $factory->namespace($alias->namespace->source); - $aliasClass = $factory->class($alias->className)->makeFinal()->makeReadonly()->extend($className->relative); - - yield new File($pathPrefix, $alias->relative, $aliasTms->addStmt($aliasClass)->getNode()); - } - } - - private static function buildUnionType(Representation\PropertyType $type): string - { - $typeList = []; - if (is_array($type->payload)) { - foreach ($type->payload as $typeInUnion) { - $typeList[] = match (gettype($typeInUnion->payload)) { - 'string' => $typeInUnion->payload, - 'array' => 'array', - 'object' => match ($typeInUnion->payload::class) { - Representation\Schema::class => $typeInUnion->payload->className->relative, - Representation\PropertyType::class => self::buildUnionType($typeInUnion->payload), - }, - }; - } - } else { - $typeList[] = $type->payload; - } - - return implode( - '|', - array_unique( - array_filter( - $typeList, - static fn (string $item): bool => strlen(trim($item)) > 0, - ), - ), - ); - } - - /** @return iterable */ - private static function getUnionTypeSchemas(Representation\PropertyType $type): iterable - { - if (! is_array($type->payload)) { - return; - } - - foreach ($type->payload as $typeInUnion) { - if ($typeInUnion->payload instanceof Representation\Schema) { - yield $typeInUnion->payload; - } - - if (! ($typeInUnion->payload instanceof Representation\PropertyType)) { - continue; - } - - yield from self::getUnionTypeSchemas($typeInUnion->payload); - } - } -} diff --git a/src/Generator/Schema/MultipleCastUnionToType.php b/src/Generator/Schema/MultipleCastUnionToType.php deleted file mode 100644 index 866730e..0000000 --- a/src/Generator/Schema/MultipleCastUnionToType.php +++ /dev/null @@ -1,140 +0,0 @@ - */ - public static function generate(string $pathPrefix, ClassString $classString, ClassString $wrappingClassString, Schema ...$schemas): iterable - { - $factory = new BuilderFactory(); - $stmt = $factory->namespace($classString->namespace->source); - - $class = $factory->class($classString->className)->makeFinal()->makeReadonly()->addAttribute( - new Node\Attribute( - new Node\Name('\\' . Attribute::class), - [ - new Node\Arg( - new Node\Expr\ClassConstFetch( - new Node\Name('\\' . Attribute::class), - 'TARGET_PARAMETER', - ), - ), - ], - ), - )->implement('\\' . PropertyCaster::class)->addStmt( - $factory->property('wrappedCaster')->makePrivate()->setType($wrappingClassString->fullyQualified->source), - )->addStmt( - $factory->method('__construct')->makePublic()->addStmts([ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable( - new Node\Name('this'), - ), - new Node\Name('wrappedCaster'), - ), - new Node\Expr\New_( - new Node\Name( - $wrappingClassString->fullyQualified->source, - ), - ), - ), - ), - ]), - )->addStmt( - $factory->method('cast')->makePublic()->addParams([ - (new Param('value'))->setType('mixed'), - (new Param('hydrator'))->setType('\\' . ObjectMapper::class), - ])->setReturnType('mixed')->addStmts([ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\Variable( - new Node\Name('data'), - ), - new Node\Expr\Array_(), - ), - ), - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\Variable( - new Node\Name('values'), - ), - new Node\Expr\Variable( - new Node\Name('value'), - ), - ), - ), - new Node\Expr\FuncCall( - new Node\Name('unset'), - [ - new Node\Arg( - new Node\Expr\Variable( - new Node\Name('value'), - ), - ), - ], - ), - new Node\Stmt\Foreach_( - new Node\Expr\Variable( - new Node\Name('values'), - ), - new Node\Expr\Variable( - new Node\Name('value'), - ), - [ - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\ArrayDimFetch( - new Node\Expr\Variable( - new Node\Name('values'), - ), - ), - new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable( - new Node\Name('this'), - ), - new Node\Name('wrappedCaster'), - ), - new Node\Name('cast'), - [ - new Node\Arg( - new Node\Expr\Variable( - new Node\Name('value'), - ), - ), - new Node\Arg( - new Node\Expr\Variable( - new Node\Name('hydrator'), - ), - ), - ], - ), - ), - ), - ], - ], - ), - new Node\Stmt\Return_( - new Node\Expr\Variable('data'), - ), - ]), - ); - - yield new File($pathPrefix, $classString->relative, $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/Schema/SingleCastUnionToType.php b/src/Generator/Schema/SingleCastUnionToType.php deleted file mode 100644 index e840e97..0000000 --- a/src/Generator/Schema/SingleCastUnionToType.php +++ /dev/null @@ -1,201 +0,0 @@ - */ - public static function generate(string $pathPrefix, ClassString $classString, Schema ...$schemas): iterable - { - $factory = new BuilderFactory(); - $stmt = $factory->namespace($classString->namespace->source); - - $class = $factory->class($classString->className)->makeFinal()->addAttribute( - new Node\Attribute( - new Node\Name('\\' . Attribute::class), - [ - new Node\Arg( - new Node\Expr\ClassConstFetch( - new Node\Name('\\' . Attribute::class), - 'TARGET_PARAMETER', - ), - ), - ], - ), - )->implement('\\' . PropertyCaster::class)->addStmt( - (new BuilderFactory())->method('cast')->makePublic()->addParams([ - (new Param('value'))->setType('mixed'), - (new Param('hydrator'))->setType('\\' . ObjectMapper::class), - ])->setReturnType('mixed')->addStmts([ - new Node\Stmt\If_( - new Node\Expr\FuncCall( - new Node\Name('\is_array'), - [ - new Node\Arg( - new Node\Expr\Variable('value'), - ), - ], - ), - [ - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\Variable('signatureChunks'), - new Node\Expr\FuncCall( - new Node\Name('\array_unique'), - [ - new Node\Arg( - new Node\Expr\FuncCall( - new Node\Name('\array_keys'), - [ - new Node\Arg( - new Node\Expr\Variable('value'), - ), - ], - ), - ), - ], - ), - ), - ), - new Node\Stmt\Expression( - new Node\Expr\FuncCall( - new Node\Name('\sort'), - [ - new Node\Arg( - new Node\Expr\Variable('signatureChunks'), - ), - ], - ), - ), - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\Variable('signature'), - new Node\Expr\FuncCall( - new Node\Name('\implode'), - [ - new Node\Arg( - new Node\Scalar\String_('|'), - ), - new Node\Arg( - new Node\Expr\Variable('signatureChunks'), - ), - ], - ), - ), - ), - ...(static function (Schema ...$schemas): iterable { - foreach ($schemas as $schema) { - $condition = new Node\Expr\BinaryOp\Identical( - new Node\Expr\Variable('signature'), - new Node\Scalar\String_( - implode( - '|', - [ - ...(static function (Property ...$properties): iterable { - $names = []; - foreach ($properties as $property) { - $names[] = $property->sourceName; - } - - sort($names); - - return $names; - })(...$schema->properties), - ], - ), - ), - ); - foreach ($schema->properties as $property) { - $enumConditionals = []; - foreach ($property->enum as $enumPossibility) { - $enumConditionals[] = new Node\Expr\BinaryOp\Identical( - new Node\Expr\ArrayDimFetch( - new Node\Expr\Variable('value'), - new Node\Scalar\String_($property->sourceName), - ), - new Node\Scalar\String_($enumPossibility), - ); - } - - if (count($enumConditionals) <= 0) { - continue; - } - - $enumCondition = array_shift($enumConditionals); - foreach ($enumConditionals as $enumConditional) { - $enumCondition = new Node\Expr\BinaryOp\BooleanOr( - $enumCondition, - $enumConditional, - ); - } - - $condition = new Node\Expr\BinaryOp\BooleanAnd( - $condition, - $enumCondition, - ); - } - - yield new Node\Stmt\If_( - $condition, - [ - 'stmts' => [ - new Node\Stmt\TryCatch([ - new Node\Stmt\Return_( - new Node\Expr\MethodCall( - new Node\Expr\Variable('hydrator'), - 'hydrateObject', - [ - new Node\Arg( - new Node\Expr\ClassConstFetch( - new Node\Name($schema->className->relative), - 'class', - ), - ), - new Node\Arg( - new Node\Expr\Variable('value'), - ), - ], - ), - ), - ], [ - new Node\Stmt\Catch_( - [new Node\Name('\\' . Throwable::class)], - ), - ]), - ], - ], - ); - } - })(...$schemas), - ], - ], - ), - new Node\Stmt\Return_( - new Node\Expr\Variable('value'), - ), - ]), - ); - - yield new File($pathPrefix, $classString->relative, $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/WebHook.php b/src/Generator/WebHook.php deleted file mode 100644 index d86f0c8..0000000 --- a/src/Generator/WebHook.php +++ /dev/null @@ -1,192 +0,0 @@ - - */ - public static function generate( - string $pathPrefix, - string $namespace, - string $event, - SchemaRegistry $schemaRegistry, - \ApiClients\Tools\OpenApiClientGenerator\Representation\WebHook ...$webHooks, - ): iterable { - $className = Utils::className($event); - - $factory = new BuilderFactory(); - $stmt = $factory->namespace(ltrim($namespace . 'Internal\WebHook', '\\')); - - $class = $factory->class(ltrim($className, '\\'))->makeFinal()->implement('\\' . WebHookInterface::class)->setDocComment(new Doc(implode(PHP_EOL, [ - '/**', - ' * @internal', - ' */', - ]))); - $class->addStmt($factory->property('requestSchemaValidator')->setType('\\' . SchemaValidator::class)->makeReadonly()->makePrivate()); - $class->addStmt($factory->property('hydrator')->setType('Internal\\Hydrator\\WebHook\\' . $className)->makeReadonly()->makePrivate()); - - $constructor = $factory->method('__construct')->makePublic()->addParam( - (new Param('requestSchemaValidator'))->setType('\\' . SchemaValidator::class), - )->addParam( - (new Param('hydrator'))->setType('Internal\\Hydrator\\WebHook\\' . $className), - )->addStmt( - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'requestSchemaValidator', - ), - new Node\Expr\Variable('requestSchemaValidator'), - ), - )->addStmt( - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'hydrator', - ), - new Node\Expr\Variable('hydrator'), - ), - ); - $class->addStmt($constructor); - - $resolveReturnTypes = []; - $method = $factory->method('resolve')->makePublic()->setReturnType('object')->addParam( - (new Param('headers'))->setType('array'), - )->addParam( - (new Param('data'))->setType('array'), - ); - $gotoLabels = 'actions_aaaaa'; - $tmts = []; - $tmts[] = new Node\Expr\Assign( - new Node\Expr\Variable('error'), - new Node\Expr\New_( - new Node\Name('\\' . RuntimeException::class), - [ - new Arg(new Node\Scalar\String_('No action matching given headers and data')), - ], - ), - ); - - foreach ($webHooks as $webHook) { - $headers = []; - foreach ($webHook->headers as $header) { - $headers[] = new Node\Stmt\Expression(new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'requestSchemaValidator', - ), - 'validate', - [ - new Node\Arg(new Node\Expr\ArrayDimFetch( - new Node\Expr\Variable('headers'), - new Node\Scalar\String_(strtolower($header->name)), - )), - new Node\Arg(new Node\Expr\StaticCall(new Node\Name('\cebe\openapi\Reader'), 'readFromJson', [ - new Node\Arg(new Node\Expr\ClassConstFetch( - new Node\Name($header->schema->className->relative), - 'SCHEMA_JSON', - )), - new Node\Arg(new Node\Scalar\String_('\cebe\openapi\spec\Schema')), - ])), - ], - )); - } - - foreach ($webHook->schema as $contentTYpe => $schema) { - $resolveReturnTypes[] = $schema->className->relative; - $tmts[] = new Node\Stmt\If_( - new Node\Expr\BinaryOp\Equal( - new Node\Expr\ArrayDimFetch(new Node\Expr\Variable('headers'), new Node\Scalar\String_('content-type')), - new Node\Scalar\String_($contentTYpe), - ), - [ - 'stmts' => [ - new Node\Stmt\TryCatch([ - ...$headers, - new Node\Stmt\Expression(new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'requestSchemaValidator', - ), - 'validate', - [ - new Node\Arg(new Node\Expr\Variable('data')), - new Node\Arg(new Node\Expr\StaticCall(new Node\Name('\cebe\openapi\Reader'), 'readFromJson', [ - new Arg(new Node\Expr\ClassConstFetch( - new Node\Name($schema->className->relative), - 'SCHEMA_JSON', - )), - new Arg(new Node\Scalar\String_('\cebe\openapi\spec\Schema')), - ])), - ], - )), - new Node\Stmt\Return_(new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'hydrator', - ), - 'hydrateObject', - [ - new Node\Arg(new Node\Expr\ClassConstFetch( - new Node\Name($schema->className->relative), - 'class', - )), - new Node\Arg(new Node\Expr\Variable('data')), - ], - )), - ], [ - new Node\Stmt\Catch_( - [new Node\Name('\\' . Throwable::class)], - new Node\Expr\Variable('error'), - [ - new Node\Stmt\Goto_($gotoLabels), - ], - ), - ]), - ], - ], - ); - } - - $tmts[] = new Node\Stmt\Label($gotoLabels); - $gotoLabels++; - } - - $tmts[] = new Node\Stmt\Throw_(new Node\Expr\Variable('error')); - - if (count($resolveReturnTypes) > 0) { - $method->setReturnType(implode('|', array_unique($resolveReturnTypes))); - } - - $method->addStmts($tmts); - $class->addStmt($method); - - yield new File($pathPrefix, 'Internal\\WebHook\\' . $className, $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/Generator/WebHooks.php b/src/Generator/WebHooks.php deleted file mode 100644 index 8b4dd41..0000000 --- a/src/Generator/WebHooks.php +++ /dev/null @@ -1,305 +0,0 @@ - $webHooksHydrators - * @param array> $webHooks - * - * @return iterable - */ - public static function generate(string $pathPrefix, string $namespace, array $webHooksHydrators, array $webHooks): iterable - { - $factory = new BuilderFactory(); - $stmt = $factory->namespace(trim($namespace, '\\')); - - $class = $factory->class('WebHooks')->makeFinal()->implement('\\' . WebHooksInterface::class); - $class->addStmt($factory->property('requestSchemaValidator')->setType('\\' . SchemaValidator::class)->makeReadonly()->makePrivate()); - $class->addStmt($factory->property('hydrator')->setType('Internal\\Hydrators')->makeReadonly()->makePrivate()); - - $constructor = $factory->method('__construct')->makePublic()->addParams([ - (new Param('requestSchemaValidator'))->setType('\\' . SchemaValidator::class), - (new Param('hydrator'))->setType('Internal\\Hydrators'), - ])->addStmts([ - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'requestSchemaValidator', - ), - new Node\Expr\Variable('requestSchemaValidator'), - ), - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'hydrator', - ), - new Node\Expr\Variable('hydrator'), - ), - ]); - $class->addStmt($constructor); - - $class->addStmt( - $factory->method('hydrateWebHook')->makePublic()->setDocComment( - new Doc(implode(PHP_EOL, [ - '/**', - ' * @template H', - ' * @param class-string $className', - ' * @return H', - ' */', - ])), - )->setReturnType('object')->addParam( - (new Param('className'))->setType('string'), - )->addParam( - (new Param('data'))->setType('array'), - )->addStmt(new Node\Stmt\Return_( - new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'hydrator', - ), - 'hydrateObject', - [ - new Node\Arg(new Node\Expr\Variable('className')), - new Node\Arg(new Node\Expr\Variable('data')), - ], - ), - )), - ); - - $class->addStmt( - $factory->method('serializeWebHook')->makePublic()->setDocComment( - new Doc(implode(PHP_EOL, [ - '/**', - ' * @return array{className: class-string, data: mixed}', - ' */', - ])), - )->setReturnType('array')->addParam( - (new Param('object'))->setType('object'), - )->addStmt(new Node\Stmt\Return_( - new Node\Expr\Array_([ - new Node\Expr\ArrayItem( - new Node\Expr\ClassConstFetch( - new Node\Expr\Variable('object'), - 'class', - ), - new Node\Scalar\String_('className'), - ), - new Node\Expr\ArrayItem( - new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'hydrator', - ), - 'serializeObject', - [ - new Node\Arg(new Node\Expr\Variable('object')), - ], - ), - new Node\Scalar\String_('data'), - ), - ]), - )), - ); - - $method = $factory->method('resolve')->makePublic()->setReturnType('object')->setDocComment(new Doc(implode(PHP_EOL, [ - '/**', - ' * @return ' . implode('|', array_unique( - (static function (WebHook ...$webHooks): array { - $schemas = []; - foreach ($webHooks as $webHook) { - foreach ($webHook->schema as $schema) { - $schemas[] = $schema->className->relative; - } - } - - return $schemas; - })(...(static function (array $webHooks) { - $hooks = []; - foreach ($webHooks as $hook) { - $hooks = [...$hooks, ...$hook]; - } - - return $hooks; - })($webHooks)), - )), - ' */', - ])))->addParam( - (new Param('headers'))->setType('array'), - )->addParam( - (new Param('data'))->setType('array'), - ); - $gotoLabels = 'webhooks_aaaaa'; - $tmts = []; - $tmts[] = new Node\Expr\Assign( - new Node\Expr\Variable('headers'), - new Node\Expr\FuncCall( - new Node\Expr\Closure( - [ - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\Variable('flatHeaders'), - new Node\Expr\Array_(), - ), - ), - new Node\Stmt\Foreach_( - new Node\Expr\Variable('headers'), - new Node\Expr\Variable('value'), - [ - 'keyVar' => new Node\Expr\Variable('key'), - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\ArrayDimFetch( - new Node\Expr\Variable('flatHeaders'), - new Node\Expr\FuncCall( - new Node\Name('strtolower'), - [ - new Arg( - new Node\Expr\Variable('key'), - ), - ], - ), - ), - new Node\Expr\Variable('value'), - ), - ), - ], - ], - ), - new Node\Stmt\Return_( - new Node\Expr\Variable('flatHeaders'), - ), - ], - 'params' => [ - new Node\Param( - new Node\Expr\Variable('headers'), - ), - ], - 'returnType' => new Node\Name('array'), - 'static' => true, - ], - ), - [ - new Arg( - new Node\Expr\Variable('headers'), - ), - ], - ), - ); - $tmts[] = new Node\Expr\Assign( - new Node\Expr\Variable('error'), - new Node\Expr\New_( - new Node\Name('\\' . RuntimeException::class), - [ - new Arg(new Node\Scalar\String_('No event matching given headers and data')), - ], - ), - ); - - foreach ($webHooks as $event => $hooks) { - $eventClassname = 'Internal\WebHook\\' . Utils::className($event); - $eventSanitized = lcfirst((new Convert($event))->toPascal()); - - $class->addStmt($factory->property($eventSanitized)->setType('?' . $eventClassname)->setDefault(null)->makePrivate()); - - $tmts[] = new Node\Stmt\TryCatch([ - new Node\Stmt\If_( - new Node\Expr\BinaryOp\Identical( - new Node\Expr\Instanceof_( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $eventSanitized, - ), - new Node\Name($eventClassname), - ), - new Node\Expr\ConstFetch(new Node\Name('false')), - ), - [ - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $eventSanitized, - ), - new Node\Expr\New_( - new Node\Name($eventClassname), - [ - new Node\Arg(new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'requestSchemaValidator', - )), - new Node\Arg(new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - 'hydrator', - ), - 'getObjectMapper' . ucfirst($webHooksHydrators[$event]->methodName), - )), - ], - ), - ), - ), - ], - ], - ), - new Node\Stmt\Return_(new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $eventSanitized, - ), - 'resolve', - [ - new Node\Arg(new Node\Expr\Variable('headers')), - new Node\Arg(new Node\Expr\Variable('data')), - ], - )), - ], [ - new Node\Stmt\Catch_( - [new Node\Name('\\' . Throwable::class)], - new Node\Expr\Variable('error'), - [ - new Node\Stmt\Goto_($gotoLabels), - ], - ), - ]); - $tmts[] = new Node\Stmt\Label($gotoLabels); - $gotoLabels++; - } - - $tmts[] = new Node\Stmt\Throw_(new Node\Expr\Variable('error')); - - $method->addStmts($tmts); - $class->addStmt($method); - - yield new File($pathPrefix, 'WebHooks', $stmt->addStmt($class)->getNode()); - } -} diff --git a/src/PrivatePromotedPropertyAsParam.php b/src/PrivatePromotedPropertyAsParam.php deleted file mode 100644 index faadfea..0000000 --- a/src/PrivatePromotedPropertyAsParam.php +++ /dev/null @@ -1,30 +0,0 @@ -name), - $this->default, - $this->type, - $this->byRef, - $this->variadic, - [], - Node\Stmt\Class_::MODIFIER_PRIVATE, - $this->attributeGroups, - ); - } -} diff --git a/src/PromotedPropertyAsParam.php b/src/PromotedPropertyAsParam.php deleted file mode 100644 index 7ae1d9b..0000000 --- a/src/PromotedPropertyAsParam.php +++ /dev/null @@ -1,30 +0,0 @@ -name), - $this->default, - $this->type, - $this->byRef, - $this->variadic, - [], - Node\Stmt\Class_::MODIFIER_PUBLIC, - $this->attributeGroups, - ); - } -} diff --git a/src/Registry/CompositSchema.php b/src/Registry/CompositSchema.php deleted file mode 100644 index 0100212..0000000 --- a/src/Registry/CompositSchema.php +++ /dev/null @@ -1,32 +0,0 @@ - */ - private array $splHash = []; - - public function __construct( - private readonly Namespace_ $baseNamespaces, - ) { - } - - public function get(PropertyType $propertyType): void - { - } - - /** @return iterable */ - public function list(): iterable - { - $unknownSchemas = $this->unknownSchemas; - $this->unknownSchemas = []; - - yield from $unknownSchemas; - } -} diff --git a/src/Registry/Contract.php b/src/Registry/Contract.php deleted file mode 100644 index fbcc9b8..0000000 --- a/src/Registry/Contract.php +++ /dev/null @@ -1,67 +0,0 @@ - */ - private array $splHash = []; - - /** @var array */ - private array $unknownSchemas = []; - - /** @throws JsonException */ - public function get(openAPISchema $schema, string $fallbackName): string - { - if ($schema->type === 'array') { - $schema = $schema->items; - } - - if (! $schema instanceof openAPISchema) { - throw new RuntimeException('Schemas has to be instance of: ' . openAPISchema::class); - } - - $hash = spl_object_hash($schema); - if (array_key_exists($hash, $this->splHash)) { - return $this->splHash[$hash]; - } - - $className = Utils::fixKeyword($fallbackName); - - $suffix = 'a'; - while (array_key_exists($className, $this->unknownSchemas)) { - $className = Utils::fixKeyword($fallbackName . strtoupper($suffix++)); - } - - $this->splHash[spl_object_hash($schema)] = $className; - $this->unknownSchemas[$className] = new UnknownSchema($fallbackName, $className, $schema); - - return $className; - } - - public function hasContracts(): bool - { - return count($this->unknownSchemas) > 0; - } - - /** @return iterable */ - public function contracts(): iterable - { - $unknownSchemas = $this->unknownSchemas; - $this->unknownSchemas = []; - - yield from $unknownSchemas; - } -} diff --git a/src/Registry/Schema.php b/src/Registry/Schema.php deleted file mode 100644 index 58b016e..0000000 --- a/src/Registry/Schema.php +++ /dev/null @@ -1,131 +0,0 @@ - */ - private array $splHash = []; - /** @var array */ - private array $json = []; - - /** @var array */ - private array $unknownSchemas = []; - - /** @var array */ - private array $unknownSchemasJson = []; - /** @var array> */ - private array $aliasses = []; - - public function __construct( - private readonly Namespace_ $baseNamespaces, - private readonly bool $allowDuplicatedSchemas, - private readonly bool $useAliasesForDuplication, - ) { - } - - public function addClassName(string $className, openAPISchema $schema): void - { - if ($schema->type === 'array') { - $schema = $schema->items; - } - - if (! $schema instanceof openAPISchema) { - throw new RuntimeException('Schemas has to be instance of: ' . openAPISchema::class); - } - - $className = Utils::className($className); - $this->splHash[spl_object_hash($schema)] = $className; - $this->json[json_encode($schema->getSerializableData())] = $className; - } - - /** @throws JsonException */ - public function get(openAPISchema $schema, string $fallbackName): string - { - if ($schema->type === 'array') { - $schema = $schema->items; - } - - if (! $schema instanceof openAPISchema) { - throw new RuntimeException('Schemas has to be instance of: ' . openAPISchema::class); - } - - $hash = spl_object_hash($schema); - if (array_key_exists($hash, $this->splHash)) { - return $this->splHash[$hash]; - } - - $json = json_encode($schema->getSerializableData()); - if (! $this->allowDuplicatedSchemas && array_key_exists($json, $this->json)) { - return $this->json[$json]; - } - - if (! $this->allowDuplicatedSchemas && array_key_exists($json, $this->unknownSchemasJson)) { - return $this->unknownSchemasJson[$json]; - } - - $className = Utils::fixKeyword($fallbackName); - - if ($this->allowDuplicatedSchemas && $this->useAliasesForDuplication && array_key_exists($json, $this->json)) { - $this->aliasses['Schema\\' . $this->json[$json]][] = ClassString::factory($this->baseNamespaces, 'Schema\\' . $className); - - return $className; - } - - if ($this->allowDuplicatedSchemas && $this->useAliasesForDuplication && array_key_exists($json, $this->unknownSchemasJson)) { - $this->aliasses['Schema\\' . $this->unknownSchemasJson[$json]][] = ClassString::factory($this->baseNamespaces, 'Schema\\' . $className); - - return $className; - } - - $suffix = 'a'; - while (array_key_exists($className, $this->unknownSchemas)) { - $className = Utils::fixKeyword($fallbackName . strtoupper($suffix++)); - } - - $this->splHash[spl_object_hash($schema)] = $className; - $this->unknownSchemasJson[$json] = $className; - $this->unknownSchemas[$className] = new UnknownSchema($fallbackName, $className, $schema); - - return $className; - } - - public function hasUnknownSchemas(): bool - { - return count($this->unknownSchemas) > 0; - } - - /** @return iterable */ - public function unknownSchemas(): iterable - { - $unknownSchemas = $this->unknownSchemas; - $this->unknownSchemas = []; - - yield from $unknownSchemas; - } - - /** @return iterable */ - public function aliasesForClassName(string $classname): iterable - { - if (! array_key_exists($classname, $this->aliasses)) { - return; - } - - yield from $this->aliasses[$classname]; - } -} diff --git a/src/Registry/ThrowableSchema.php b/src/Registry/ThrowableSchema.php deleted file mode 100644 index e6aa402..0000000 --- a/src/Registry/ThrowableSchema.php +++ /dev/null @@ -1,23 +0,0 @@ - */ - private array $throwables = []; - - public function add(string $class): void - { - $this->throwables[] = $class; - } - - public function has(string $class): bool - { - return in_array($class, $this->throwables, true); - } -} diff --git a/src/Registry/UnknownSchema.php b/src/Registry/UnknownSchema.php deleted file mode 100644 index 2fe4cf4..0000000 --- a/src/Registry/UnknownSchema.php +++ /dev/null @@ -1,17 +0,0 @@ - $paths */ - public function __construct( - public readonly string|null $baseUrl, - /** @var array $paths */ - public readonly array $paths, - ) { - } -} diff --git a/src/Representation/Contract.php b/src/Representation/Contract.php deleted file mode 100644 index f49e46a..0000000 --- a/src/Representation/Contract.php +++ /dev/null @@ -1,18 +0,0 @@ - $properties */ - public function __construct( - public readonly ClassString $className, - /** @var array $properties */ - public readonly array $properties, - ) { - } -} diff --git a/src/Representation/ExampleData.php b/src/Representation/ExampleData.php deleted file mode 100644 index 71508a5..0000000 --- a/src/Representation/ExampleData.php +++ /dev/null @@ -1,16 +0,0 @@ - $schemas */ - public function __construct( - public readonly ClassString $className, - public readonly string $methodName, - /** @var array $schemas */ - public readonly array $schemas, - ) { - } -} diff --git a/src/Representation/Operation.php b/src/Representation/Operation.php deleted file mode 100644 index 0e90c95..0000000 --- a/src/Representation/Operation.php +++ /dev/null @@ -1,49 +0,0 @@ - $metaData - * @param array $returnType - * @param array $parameters - * @param array $requestBody - * @param array $response - * @param array $empty - */ - public function __construct( - public ClassString $className, - public ClassString $classNameSanitized, - public ClassString $operatorClassName, - public string $operatorLookUpMethod, - public string $name, - public string $nameCamel, - public string|null $group, - public string|null $groupCamel, - public string $operationId, - public string $matchMethod, - public string $method, - public string $summary, - public ExternalDocumentation|null $externalDocs, - public string $path, - /** @var array $metaData */ - public array $metaData, - /** @var array $returnType */ - public array $returnType, - /** @var array $parameters */ - public array $parameters, - /** @var array $requestBody */ - public array $requestBody, - /** @var array $response */ - public array $response, - /** @var array $empty */ - public array $empty, - ) { - } -} diff --git a/src/Representation/OperationEmptyResponse.php b/src/Representation/OperationEmptyResponse.php deleted file mode 100644 index 3eb3995..0000000 --- a/src/Representation/OperationEmptyResponse.php +++ /dev/null @@ -1,17 +0,0 @@ - $headers */ - public function __construct( - public int $code, - public string $description, - /** @var array
$headers */ - public array $headers, - ) { - } -} diff --git a/src/Representation/OperationRequestBody.php b/src/Representation/OperationRequestBody.php deleted file mode 100644 index 406820d..0000000 --- a/src/Representation/OperationRequestBody.php +++ /dev/null @@ -1,14 +0,0 @@ - $operations */ - public function __construct( - public readonly ClassString $className, - public readonly Hydrator $hydrator, - /** @var array $operations */ - public readonly array $operations, - ) { - } -} diff --git a/src/Representation/Property.php b/src/Representation/Property.php deleted file mode 100644 index 87bc870..0000000 --- a/src/Representation/Property.php +++ /dev/null @@ -1,20 +0,0 @@ - $enum */ - public function __construct( - public readonly string $name, - public readonly string $sourceName, - public readonly string $description, - public readonly ExampleData $example, - public readonly PropertyType $type, - public readonly bool $nullable, - public readonly array $enum, - ) { - } -} diff --git a/src/Representation/PropertyType.php b/src/Representation/PropertyType.php deleted file mode 100644 index 4442b31..0000000 --- a/src/Representation/PropertyType.php +++ /dev/null @@ -1,18 +0,0 @@ - $payload */ - public function __construct( - public readonly string $type, - public readonly string|null $format, - public readonly string|null $pattern, - public readonly string|Schema|PropertyType|array $payload, - public readonly bool $nullable, - ) { - } -} diff --git a/src/Representation/Schema.php b/src/Representation/Schema.php deleted file mode 100644 index cd39a42..0000000 --- a/src/Representation/Schema.php +++ /dev/null @@ -1,35 +0,0 @@ - $contracts - * @param array $example - * @param array $properties - * @param array $type - */ - public function __construct( - public readonly ClassString $className, - /** @var array $contracts */ - public readonly array $contracts, - public readonly ClassString $errorClassName, - public readonly ClassString $errorClassNameAliased, - public readonly string $title, - public readonly string $description, - /** @var array $example */ - public readonly array $example, - /** @var array $properties */ - public readonly array $properties, - public readonly baseSchema $schema, - public readonly bool $isArray, - public readonly array $type, - ) { - } -} diff --git a/src/Representation/WebHook.php b/src/Representation/WebHook.php deleted file mode 100644 index eb34d2a..0000000 --- a/src/Representation/WebHook.php +++ /dev/null @@ -1,25 +0,0 @@ - $headers - * @param array $schema - */ - public function __construct( - public readonly string $event, - public readonly string $summary, - public readonly string $description, - public readonly string $operationId, - public readonly string $documentationUrl, - /** @var array
*/ - public readonly array $headers, - /** @var array */ - public readonly array $schema, - ) { - } -} diff --git a/src/SectionGenerator/OperationIdSlash.php b/src/SectionGenerator/OperationIdSlash.php index 423f1e3..c3d9869 100644 --- a/src/SectionGenerator/OperationIdSlash.php +++ b/src/SectionGenerator/OperationIdSlash.php @@ -5,8 +5,7 @@ namespace ApiClients\Tools\OpenApiClientGenerator\SectionGenerator; use ApiClients\Tools\OpenApiClientGenerator\Contract\SectionGenerator; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Path; -use ApiClients\Tools\OpenApiClientGenerator\Representation\WebHook; +use OpenAPITools\Representation; use function array_pop; use function explode; @@ -14,7 +13,7 @@ final class OperationIdSlash implements SectionGenerator { - public static function path(Path $path): string|false + public static function path(Representation\Namespaced\Path $path): string|false { $chunks = explode('/', $path->operations[0]->operationId); array_pop($chunks); @@ -22,7 +21,7 @@ public static function path(Path $path): string|false return implode('-', $chunks); } - public static function webHook(WebHook ...$webHooks): string|false + public static function webHook(Representation\WebHook ...$webHooks): string|false { return false; } diff --git a/src/SectionGenerator/WebHooks.php b/src/SectionGenerator/WebHooks.php index 5cf9cb7..fa0bd81 100644 --- a/src/SectionGenerator/WebHooks.php +++ b/src/SectionGenerator/WebHooks.php @@ -5,17 +5,16 @@ namespace ApiClients\Tools\OpenApiClientGenerator\SectionGenerator; use ApiClients\Tools\OpenApiClientGenerator\Contract\SectionGenerator; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Path; -use ApiClients\Tools\OpenApiClientGenerator\Representation\WebHook; +use OpenAPITools\Representation; final class WebHooks implements SectionGenerator { - public static function path(Path $path): string|false + public static function path(Representation\Namespaced\Path $path): string|false { return false; } - public static function webHook(WebHook ...$webHooks): string|false + public static function webHook(Representation\WebHook ...$webHooks): string|false { return 'webhook'; } diff --git a/src/State.php b/src/State.php deleted file mode 100644 index 5440af9..0000000 --- a/src/State.php +++ /dev/null @@ -1,21 +0,0 @@ - self::fixKeyword( - (new Convert($chunk))->toPascal(), - ), - explode( - '\\', - $className, - ), - ), - ); - - return trim(self::cleanUpNamespace(self::fixKeyword($className)), '\\'); - } - - public static function cleanUpNamespace(string $namespace): string - { - do { - $previousNamespace = $namespace; - $namespace = str_replace('/', '\\', $namespace); - $namespace = str_replace('\\\\', '\\', $namespace); - } while ($previousNamespace !== $namespace); - - $namespace = trim($namespace, '\\'); - - return '\\' . $namespace; - } - - public static function fqcn(string $fqcn): string - { - return str_replace('/', '\\', $fqcn); - } - - public static function dirname(string $fqcn): string - { - $fqcn = str_replace('\\', '/', $fqcn); - - return trim(self::cleanUpNamespace(dirname($fqcn)), '\\'); - } - - public static function basename(string $fqcn): string - { - $fqcn = str_replace('\\', '/', $fqcn); - - return trim(self::cleanUpNamespace(basename($fqcn)), '\\'); - } - - public static function fixKeyword(string $name): string - { - $name = self::fqcn($name); - $nameBoom = explode('\\', $name); - - /** @phpstan-ignore-next-line */ - return $name . (in_array( - strtolower($nameBoom[count($nameBoom) - 1]), - ['__halt_compiler', 'abstract', 'and', 'array', 'as', 'break', 'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'final', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', 'insteadof', 'interface', 'isset', 'list', 'namespace', 'new', 'or', 'print', 'private', 'protected', 'public', 'require', 'require_once', 'return', 'static', 'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor', 'self', 'parent', 'object'], - false, - ) ? '_' : ''); - } -} diff --git a/src/Voter/StreamOperation/DownloadInOperationId.php b/src/Voter/StreamOperation/DownloadInOperationId.php index 3e66460..3feaa99 100644 --- a/src/Voter/StreamOperation/DownloadInOperationId.php +++ b/src/Voter/StreamOperation/DownloadInOperationId.php @@ -5,7 +5,7 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Voter\StreamOperation; use ApiClients\Tools\OpenApiClientGenerator\Contract\Voter\StreamOperation; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Operation; +use OpenAPITools\Representation\Namespaced\Operation; use function strpos; diff --git a/src/Voter/StreamOperation/DownloadInPath.php b/src/Voter/StreamOperation/DownloadInPath.php index 175499a..95532c1 100644 --- a/src/Voter/StreamOperation/DownloadInPath.php +++ b/src/Voter/StreamOperation/DownloadInPath.php @@ -5,7 +5,7 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Voter\StreamOperation; use ApiClients\Tools\OpenApiClientGenerator\Contract\Voter\StreamOperation; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Operation; +use OpenAPITools\Representation\Namespaced\Operation; use function strpos; diff --git a/src/phpstan-assertType-mock.php b/src/phpstan-assertType-mock.php index 2cb4e49..60aeb85 100644 --- a/src/phpstan-assertType-mock.php +++ b/src/phpstan-assertType-mock.php @@ -4,6 +4,7 @@ namespace PHPStan\Testing; +// phpcs:disable function assertType($a, $b): void { }