From b04560d83f49da225fcd2697722e18261935b138 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 --- .gitattributes | 28 +- .github/renovate.json | 12 +- .github/workflows/{ci.yml => ci.yaml} | 0 ...managment.yaml => release-management.yaml} | 2 +- .gitignore | 3 + CONTRIBUTING.md | 27 + LICENSE | 21 + Makefile | 563 +- bin/openapi-client-generator.source | 41 - composer.json | 165 +- composer.lock | 13399 ++++++++-------- etc/Makefile | 16 + etc/ci/markdown-link-checker.json | 23 +- etc/qa/composer-require-checker.json | 4 +- etc/qa/composer-unused.php | 7 + etc/qa/infection.json5 | 21 + etc/qa/phpcs.xml | 8 +- etc/qa/phpstan.neon | 22 +- etc/qa/phpunit.xml | 26 +- etc/qa/psalm.xml | 52 - etc/qa/rector.php | 7 + 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/ContentType/Json.php | 3 +- src/Contract/SectionGenerator.php | 7 +- src/Contract/Voter/AbstractListOperation.php | 11 +- 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 | 370 +- .../Client/PHPStan/ClientCallReturnTypes.php | 114 +- .../PHPStan/ClientCallReturnTypesTest.php | 30 +- src/Generator/Client/Routers.php | 13 +- src/Generator/Client/Routers/Router.php | 4 +- src/Generator/ClientInterface.php | 61 +- src/Generator/Contract.php | 162 - src/Generator/Error.php | 30 - src/Generator/Helper/Operation.php | 52 +- src/Generator/Helper/OperationArray.php | 8 +- src/Generator/Helper/ReflectionTypes.php | 10 +- src/Generator/Helper/Types.php | 8 +- 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 | 150 +- src/Generator/{ => Paths}/OperationTest.php | 246 +- src/Generator/Paths/Operations.php | 124 + src/Generator/Paths/OperationsInterface.php | 56 + src/Generator/{ => Paths}/Operator.php | 80 +- src/Generator/Paths/Operators.php | 124 + src/Generator/Routers.php | 32 +- src/Generator/Schema.php | 319 - .../Schema/MultipleCastUnionToType.php | 140 - .../Schema/SingleCastUnionToType.php | 201 - src/Generator/WebHook.php | 284 +- src/Generator/WebHooks.php | 452 +- src/Output/Error.php | 2 +- src/Output/Status/ANSI.php | 1 - src/Output/Status/OverWritingOutPut.php | 12 +- src/Output/Status/Simple.php | 4 +- 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 | 6 +- src/Voter/StreamOperation/DownloadInPath.php | 6 +- src/phpstan-assertType-mock.php | 1 + tests/app/composer.json | 122 +- tests/app/src/Client.php | 65 +- tests/app/src/ClientInterface.php | 19 +- tests/app/src/Contract/Bird.php | 11 +- tests/app/src/Contract/BlackEyes.php | 11 +- tests/app/src/Contract/BlueEyes.php | 11 +- tests/app/src/Contract/Cat.php | 18 +- tests/app/src/Contract/Cat/Features.php | 11 +- tests/app/src/Contract/Dog.php | 19 +- tests/app/src/Contract/Error.php | 11 +- tests/app/src/Contract/Fins.php | 11 +- tests/app/src/Contract/Fish.php | 11 +- tests/app/src/Contract/GreenEyes.php | 11 +- tests/app/src/Contract/HellHound.php | 11 +- tests/app/src/Contract/HellHound/Eyes.php | 11 +- tests/app/src/Contract/Legs.php | 11 +- .../By/Type/Response/ApplicationJson/Ok.php | 19 +- .../Walking/Response/ApplicationJson/Ok.php | 11 +- .../List_/Response/ApplicationJson/Ok.php | 11 +- .../Names/Response/ApplicationJson/Ok.php | 11 +- .../Response/ApplicationJson/Ok.php | 11 +- .../Pets/Create/Request/ApplicationJson.php | 11 +- tests/app/src/Contract/RedEyes.php | 15 +- tests/app/src/Contract/RedEyes/A.php | 15 +- tests/app/src/Contract/Spider.php | 19 +- tests/app/src/Contract/Tails.php | 15 +- tests/app/src/Contract/Wings.php | 11 +- tests/app/src/Contract/YellowEyes.php | 11 +- tests/app/src/Error/Error.php | 11 +- .../Multiple/Schema/Cat/Eyes.php | 26 +- .../Multiple/Schema/Dog/Eyes.php | 26 +- .../Type/Response/ApplicationJson/Ok/Pets.php | 26 +- .../Multiple/Schema/Spider/Eyes.php | 26 +- .../Single/Schema/Bird/Eyes.php | 55 +- .../Single/Schema/Cat/Eyes.php | 74 +- .../Single/Schema/Dog/Eyes.php | 74 +- .../Single/Schema/Fish/Eyes.php | 55 +- .../Type/Response/ApplicationJson/Ok/Pets.php | 53 +- .../Single/Schema/Spider/Eyes.php | 188 +- .../src/Internal/Hydrator/Operation/Pets.php | 131 +- .../Hydrator/Operation/Pets/Gatos.php | 131 +- .../Hydrator/Operation/Pets/GroupedByType.php | 169 +- .../Hydrator/Operation/Pets/Kinds/Walking.php | 131 +- .../Hydrator/Operation/Pets/Names.php | 131 +- .../Hydrator/Operation/Pets/PetId.php | 131 +- tests/app/src/Internal/Hydrators.php | 87 +- .../src/Internal/Operation/Pets/Create.php | 82 +- .../Operation/Pets/Grouped/By/Type.php | 91 +- .../Internal/Operation/Pets/Kinds/Walking.php | 146 +- .../Operation/Pets/Kinds/WalkingListing.php | 146 +- .../Internal/Operation/Pets/ListListing.php | 194 +- .../app/src/Internal/Operation/Pets/List_.php | 194 +- .../Internal/Operation/Pets/List_/Gatos.php | 114 +- .../Operation/Pets/List_/GatosListing.php | 114 +- .../app/src/Internal/Operation/Pets/Names.php | 105 +- .../Internal/Operation/Pets/NamesListing.php | 105 +- .../src/Internal/Operation/ShowPetById.php | 164 +- .../app/src/Internal/Operator/Pets/Create.php | 44 +- .../Operator/Pets/Grouped/By/Type.php | 44 +- .../Internal/Operator/Pets/Kinds/Walking.php | 43 +- .../Operator/Pets/Kinds/WalkingListing.php | 43 +- .../Internal/Operator/Pets/ListListing.php | 43 +- .../app/src/Internal/Operator/Pets/List_.php | 43 +- .../Internal/Operator/Pets/List_/Gatos.php | 43 +- .../Operator/Pets/List_/GatosListing.php | 43 +- .../app/src/Internal/Operator/Pets/Names.php | 44 +- .../Internal/Operator/Pets/NamesListing.php | 44 +- .../app/src/Internal/Operator/ShowPetById.php | 48 +- tests/app/src/Internal/Operators.php | 83 +- tests/app/src/Internal/Router/Get.php | 30 +- tests/app/src/Internal/Router/Get/Four.php | 37 +- tests/app/src/Internal/Router/Get/Pets.php | 52 +- .../src/Internal/Router/Get/PetsGroupedBy.php | 37 +- .../app/src/Internal/Router/Get/PetsKinds.php | 36 +- .../app/src/Internal/Router/Get/PetsList.php | 36 +- tests/app/src/Internal/Router/Get/Three.php | 53 +- tests/app/src/Internal/Router/Get/Two.php | 33 +- tests/app/src/Internal/Router/List/Four.php | 37 +- tests/app/src/Internal/Router/List/Pets.php | 59 +- .../src/Internal/Router/List/PetsKinds.php | 40 +- .../app/src/Internal/Router/List/PetsList.php | 40 +- tests/app/src/Internal/Router/List/Three.php | 39 +- tests/app/src/Internal/Router/List/Two.php | 33 +- tests/app/src/Internal/Router/Post/Pets.php | 26 +- tests/app/src/Internal/Router/Post/Two.php | 34 +- tests/app/src/Internal/Routers.php | 89 +- tests/app/src/Operation/Pets.php | 47 +- tests/app/src/Operation/PetsGroupedBy.php | 20 +- tests/app/src/Operation/PetsKinds.php | 26 +- tests/app/src/Operation/PetsList.php | 26 +- tests/app/src/Operations.php | 35 +- tests/app/src/OperationsInterface.php | 34 +- .../app/src/PHPStan/ClientCallReturnTypes.php | 58 +- tests/app/src/Schema/Bird.php | 23 +- tests/app/src/Schema/BlackEyes.php | 20 +- tests/app/src/Schema/BlueEyes.php | 20 +- tests/app/src/Schema/Cat.php | 27 +- tests/app/src/Schema/Cat/Features.php | 20 +- tests/app/src/Schema/Dog.php | 30 +- tests/app/src/Schema/Error.php | 20 +- tests/app/src/Schema/EyeCount.php | 20 +- tests/app/src/Schema/Fins.php | 20 +- tests/app/src/Schema/Fish.php | 23 +- tests/app/src/Schema/GreenEyes.php | 20 +- tests/app/src/Schema/HellHound.php | 23 +- tests/app/src/Schema/HellHound/Eyes.php | 20 +- tests/app/src/Schema/Legs.php | 22 +- .../By/Type/Response/ApplicationJson/Ok.php | 31 +- .../Walking/Response/ApplicationJson/Ok.php | 20 +- .../List_/Response/ApplicationJson/Ok.php | 20 +- .../Names/Response/ApplicationJson/Ok.php | 20 +- .../Response/ApplicationJson/Ok.php | 20 +- .../Pets/Create/Request/ApplicationJson.php | 20 +- tests/app/src/Schema/RedEyes.php | 22 +- tests/app/src/Schema/Spider.php | 28 +- tests/app/src/Schema/Tails.php | 20 +- tests/app/src/Schema/Wings.php | 20 +- tests/app/src/Schema/YellowEyes.php | 20 +- .../Internal/Operation/Pets/CreateTest.php | 128 +- .../Operation/Pets/Grouped/By/TypeTest.php | 134 +- .../Pets/Kinds/WalkingListingTest.php | 81 +- .../Operation/Pets/Kinds/WalkingTest.php | 81 +- .../Operation/Pets/ListListingTest.php | 81 +- .../Operation/Pets/List_/GatosListingTest.php | 81 +- .../Operation/Pets/List_/GatosTest.php | 81 +- .../Internal/Operation/Pets/List_Test.php | 81 +- .../Operation/Pets/NamesListingTest.php | 81 +- .../Internal/Operation/Pets/NamesTest.php | 81 +- .../Internal/Operation/ShowPetByIdTest.php | 78 +- .../app/tests/Types/ClientCallReturnTypes.php | 46 +- tests/unit/GenerateTest.php | 9 +- tests/unit/Generator/Helper/TypesTest.php | 19 +- 254 files changed, 12434 insertions(+), 16330 deletions(-) rename .github/workflows/{ci.yml => ci.yaml} (100%) rename .github/workflows/{release-managment.yaml => release-management.yaml} (94%) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE delete mode 100755 bin/openapi-client-generator.source create mode 100644 etc/Makefile create mode 100644 etc/qa/composer-unused.php create mode 100644 etc/qa/infection.json5 delete mode 100644 etc/qa/psalm.xml create mode 100644 etc/qa/rector.php 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 (87%) rename src/Generator/{ => Paths}/OperationTest.php (82%) create mode 100644 src/Generator/Paths/Operations.php create mode 100644 src/Generator/Paths/OperationsInterface.php rename src/Generator/{ => Paths}/Operator.php (73%) 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/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/.gitattributes b/.gitattributes index 16226a1..672fc22 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,14 +1,36 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text eol=lf + +# These files are binary and should be left untouched +# (binary is a macro for -text -diff) +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.webp binary +*.bmp binary +*.ttf binary +*.blp binary +*.db2 binary + # Ignoring files for distribution archieves .github/ export-ignore -etc/ export-ignore +etc/ci/ export-ignore +etc/dev-app/ export-ignore +etc/state/ export-ignore +etc/qa/ export-ignore +examples/ export-ignore tests/ export-ignore var/ export-ignore +.devcontainer.json export-ignore .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore CONTRIBUTING.md export-ignore composer.lock export-ignore -infection.json.dist export-ignore Makefile export-ignore -phpunit.xml.dist export-ignore README.md export-ignore + +# Diffing +*.php diff=php diff --git a/.github/renovate.json b/.github/renovate.json index c3a6d94..1c478c4 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,6 +1,10 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "github>WyriHaximus/renovate-config:php-package" - ] + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>WyriHaximus/renovate-config:php-package" + ], + "constraints": { + "php": "8.4.x", + "composer": "2.x" + } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yaml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/ci.yaml diff --git a/.github/workflows/release-managment.yaml b/.github/workflows/release-management.yaml similarity index 94% rename from .github/workflows/release-managment.yaml rename to .github/workflows/release-management.yaml index 7f8ba22..c991328 100644 --- a/.github/workflows/release-managment.yaml +++ b/.github/workflows/release-management.yaml @@ -17,7 +17,7 @@ permissions: jobs: release-managment: name: Release Management - uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main + uses: WyriHaximus/github-workflows/.github/workflows/package-release-management.yaml@main with: milestone: ${{ github.event.milestone.title }} description: ${{ github.event.milestone.title }} diff --git a/.gitignore b/.gitignore index 388f11c..02c3325 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,11 @@ etc/qa/.phpcs.cache etc/qa/.phpunit.result.cache bin/openapi-client-generator example/etc +example/generated example/generated-github example/generated-github-subsplit example/generated-miele tests/test-app vendor +var/* +!var/.gitkeep diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..503c205 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributing + +Pull requests are highly appreciated. Here's a quick guide. + +Fork, then clone the repo: + + git clone git@github.com:your-username/openapi-client-generator.git + +Install dependencies: + + make install + +Work on the contribution and check if it passes all QA checks with: + + make + +If some of the PHPStan or other checks are to strict or intimidating that is fine, finish what you want to contribute and I'll help you with those, but please make the following command passes. It runs a subset of everything: + + make contrib + +You can list all the contrib commands with: + + make help-contrib + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b1b5bbe --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2026 Cees-Jan Kiewiet + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile index d68563d..a4d7557 100644 --- a/Makefile +++ b/Makefile @@ -3,67 +3,409 @@ SHELL=bash .PHONY: * -DOCKER_CGROUP:=$(shell cat /proc/1/cgroup | grep docker | wc -l) -COMPOSER_CACHE_DIR:=$(shell composer config --global cache-dir -q || echo ${HOME}/.composer/cache) +DOCKER_AVAILABLE=$(shell ((command -v docker >/dev/null 2>&1) && echo 0 || echo 1)) +TTY_AVAILABLE=$(shell (test -t 1 && echo 0) || echo 1) +CONTAINER_REGISTRY_REPO="ghcr.io/wyrihaximusnet/php" +SLIM_DOCKER_IMAGE="-slim" +NTS_OR_ZTS_DOCKER_IMAGE="nts" +OTEL_PHP_FIBERS_ENABLED=true +NEEDS_DOCKER_SOCKET=FALSE +ALL_HAS_DIRECT_DOCKER_TASKS=FALSE +CONTRIB_HAS_DIRECT_DOCKER_TASKS=FALSE +ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS=FALSE +PHP_VERSION="8.4" +CONTAINER_NAME=$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-${NTS_OR_ZTS_DOCKER_IMAGE}-alpine${SLIM_DOCKER_IMAGE}-dev") +CONTAINER_NAME_INTERACTIVE_SHELL=$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-zts-alpine-dev") +COMPOSER_CACHE_DIR=$(shell (command -v composer >/dev/null 2>&1) && composer config --global cache-dir -q 2>/dev/null || echo ${HOME}/.composer-php/cache) +COMPOSER_CONTAINER_CACHE_DIR=$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm $(if $(filter 0,$(TTY_AVAILABLE)),-it,-i) ${CONTAINER_NAME} composer config --global cache-dir -q) || echo ${HOME}/.composer-php/cache) -ifneq ("$(wildcard /.dockerenv)","") - IN_DOCKER:=TRUE -else ifneq ("$(DOCKER_CGROUP)","0") - IN_DOCKER:=TRUE +ifneq ("$(wildcard /.you-are-in-a-wyrihaximus.net-php-docker-image)","") + IN_DOCKER=TRUE else - IN_DOCKER:=FALSE + IN_DOCKER=FALSE endif ifeq ("$(IN_DOCKER)","TRUE") DOCKER_RUN:= + DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER:= + DOCKER_RUN_WITH_SOCKET:= + DOCKER_SHELL:= + DOCKER_INTERACTIVE_SHELL:= else - PHP_VERSION:=$(shell docker run --rm -v "`pwd`:`pwd`" jess/jq jq -r -c '.config.platform.php' "`pwd`/composer.json" | php -r "echo str_replace('|', '.', explode('.', implode('|', explode('.', stream_get_contents(STDIN), 2)), 2)[0]);") - DOCKER_RUN:=docker run --rm -it \ - -v "`pwd`:`pwd`" \ - -v "${COMPOSER_CACHE_DIR}:/home/app/.composer/cache" \ - -w "`pwd`" \ - -e "FORCE_GENERATION=$$FORCE_GENERATION" \ - "ghcr.io/wyrihaximusnet/php:${PHP_VERSION}-nts-alpine-slim-dev" + ifeq ($(DOCKER_AVAILABLE),0) + DOCKER_DEFAULT_SECURITY_OPS=--cap-drop=ALL --security-opt="no-new-privileges=true" --user="`id -u`:`id -g`" + DOCKER_COMMON_OPS:=-v "`pwd`:`pwd`" -w "`pwd`" -v "`pwd`/.git:`pwd`/.git:ro" -v "${COMPOSER_CACHE_DIR}:${COMPOSER_CONTAINER_CACHE_DIR}" --ulimit nofile=1000000 + DOCKER_COMMON_NON_INTERACTIVE_OPS:=-e OTEL_PHP_FIBERS_ENABLED="${OTEL_PHP_FIBERS_ENABLED}" + DOCKER_COMMON_INTERACTIVE_OPS:=-e OTEL_PHP_FIBERS_ENABLED="false" + ifeq ("$(NEEDS_DOCKER_SOCKET)","TRUE") + ifneq ("$(wildcard /var/run/docker.sock)","") + DOCKER_SECURITY_OPS:= + DOCKER_SOCKET_OPS:=-v "/var/run/docker.sock:/var/run/docker.sock" + DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:=-root + else + DOCKER_SECURITY_OPS:=${DOCKER_DEFAULT_SECURITY_OPS} + DOCKER_SOCKET_OPS:= + DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:= + endif + else + DOCKER_SECURITY_OPS:=${DOCKER_DEFAULT_SECURITY_OPS} + DOCKER_SOCKET_OPS:= + DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:= + endif + DOCKER_RUN:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}" + DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} -e COMPOSER_DISABLE_NETWORK="1" ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}" + DOCKER_RUN_WITH_SOCKET:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} ${DOCKER_SOCKET_OPS} "${CONTAINER_NAME}${DOCKER_SOCKET_CONTAINER_NAME_SUFFIX}" + ifeq ($(TTY_AVAILABLE),0) + DOCKER_SHELL:=docker run --rm -it ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}" + DOCKER_INTERACTIVE_SHELL:=docker run --rm -it ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME_INTERACTIVE_SHELL}" + else + DOCKER_SHELL:=$(DOCKER_RUN) + DOCKER_INTERACTIVE_SHELL:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME_INTERACTIVE_SHELL}" + endif + else + DOCKER_RUN:= + DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER:= + DOCKER_RUN_WITH_SOCKET:= + DOCKER_SHELL:= + DOCKER_INTERACTIVE_SHELL:= + endif endif -all: ## Runs everything ### - @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "###" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs --open-tty $(MAKE) +ifneq (,$(findstring icrosoft,$(shell cat /proc/version))) + THREADS=1 +else + THREADS=$(shell nproc) +endif + +## Run everything extra points +all: ## Runs everything #### +ifeq ("$(ALL_HAS_DIRECT_DOCKER_TASKS)","TRUE") + $(MAKE) all-raw +else + $(DOCKER_RUN_WITH_SOCKET) make all-raw +endif +all-raw: ## The real runs everything, but due to sponge it has to be ran inside DOCKER_RUN ##U## + $(MAKE) composer-validate syntax-php composer-normalize rector-upgrade cs-fix cs stan unit-testing mutation-testing composer-require-checker composer-unused backward-compatibility-check ## Count: 12 -syntax-php: ## Lint PHP syntax - $(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor ./src ./tests -cs-fix: ## Fix any automatically fixable code style issues - $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(shell nproc) --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(shell nproc) --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(shell nproc) --standard=./etc/qa/phpcs.xml -vvv +## Run a subset of everything for those that find everything intimidating +contrib: ## Runs a subset of everything (all) #### +ifeq ("$(CONTRIB_HAS_DIRECT_DOCKER_TASKS)","TRUE") + $(MAKE) contrib-raw +else + $(DOCKER_RUN_WITH_SOCKET) make contrib-raw +endif +contrib-raw: ## The real runs everything, but due to sponge it has to be ran inside DOCKER_RUN ##U## + $(MAKE) cs-fix cs unit-testing composer-require-checker composer-unused ## Count: 5 -cs: ## Check the code for code style issues - $(DOCKER_RUN) vendor/bin/phpcs --parallel=$(shell nproc) --standard=./etc/qa/phpcs.xml -stan: ## Run static analysis (PHPStan) - $(DOCKER_RUN) vendor/bin/phpstan analyse src tests --level max --ansi -c ./etc/qa/phpstan.neon +## Temporary set of migrations to get all my repos in shape +migrations-git-enforce-gitattributes-contents: #### Enforce `.gitattributes` contents ##*I*## + ($(DOCKER_RUN) php -r 'file_put_contents(".gitattributes", base64_decode("IyBTZXQgdGhlIGRlZmF1bHQgYmVoYXZpb3IsIGluIGNhc2UgcGVvcGxlIGRvbid0IGhhdmUgY29yZS5hdXRvY3JsZiBzZXQuCiogdGV4dCBlb2w9bGYKCiMgVGhlc2UgZmlsZXMgYXJlIGJpbmFyeSBhbmQgc2hvdWxkIGJlIGxlZnQgdW50b3VjaGVkCiMgKGJpbmFyeSBpcyBhIG1hY3JvIGZvciAtdGV4dCAtZGlmZikKKi5wbmcgYmluYXJ5CiouanBnIGJpbmFyeQoqLmpwZWcgYmluYXJ5CiouZ2lmIGJpbmFyeQoqLmljbyBiaW5hcnkKKi53ZWJwIGJpbmFyeQoqLmJtcCBiaW5hcnkKKi50dGYgYmluYXJ5CiouYmxwIGJpbmFyeQoqLmRiMiBiaW5hcnkKCiMgSWdub3JpbmcgZmlsZXMgZm9yIGRpc3RyaWJ1dGlvbiBhcmNoaWV2ZXMKLmdpdGh1Yi8gZXhwb3J0LWlnbm9yZQpldGMvY2kvIGV4cG9ydC1pZ25vcmUKZXRjL2Rldi1hcHAvIGV4cG9ydC1pZ25vcmUKZXRjL3N0YXRlLyBleHBvcnQtaWdub3JlCmV0Yy9xYS8gZXhwb3J0LWlnbm9yZQpleGFtcGxlcy8gZXhwb3J0LWlnbm9yZQp0ZXN0cy8gZXhwb3J0LWlnbm9yZQp2YXIvIGV4cG9ydC1pZ25vcmUKLmRldmNvbnRhaW5lci5qc29uIGV4cG9ydC1pZ25vcmUKLmVkaXRvcmNvbmZpZyBleHBvcnQtaWdub3JlCi5naXRhdHRyaWJ1dGVzIGV4cG9ydC1pZ25vcmUKLmdpdGlnbm9yZSBleHBvcnQtaWdub3JlCkNPTlRSSUJVVElORy5tZCBleHBvcnQtaWdub3JlCmNvbXBvc2VyLmxvY2sgZXhwb3J0LWlnbm9yZQpNYWtlZmlsZSBleHBvcnQtaWdub3JlClJFQURNRS5tZCBleHBvcnQtaWdub3JlCgojIERpZmZpbmcKKi5waHAgZGlmZj1waHAK"));' || true) -psalm: ## Run static analysis (Psalm) - $(DOCKER_RUN) vendor/bin/psalm --threads=$(shell nproc) --shepherd --stats --config=./etc/qa/psalm.xml +migrations-git-make-sure-gitignore-exists: #### Make sure `.gitignore` exists ##*I*## + ($(DOCKER_RUN) touch .gitignore || true) -unit-testing: ## Run tests - $(DOCKER_RUN) vendor/bin/phpunit --colors=always -c ./etc/qa/phpunit.xml - $(DOCKER_RUN) test -n "$(COVERALLS_REPO_TOKEN)" && test -n "$(COVERALLS_RUN_LOCALLY)" && test -f ./var/tests-unit-clover-coverage.xml && vendor/bin/php-coveralls -v --coverage_clover ./build/logs/clover.xml --json_path ./var/tests-unit-clover-coverage-upload.json || true +migrations-git-make-sure-gitignore-ignores-var: #### Make sure `.gitignore` ignores `var/*` ##*I*## + ($(DOCKER_RUN) php -r '$$gitignoreFile = ".gitignore"; if (!file_exists($$gitignoreFile)) {exit;} $$txt = file_get_contents($$gitignoreFile); if (!is_string($$txt)) {exit;} if (strpos($$txt, "var/*") !== false) {exit;} file_put_contents($$gitignoreFile, "var/*\n", FILE_APPEND);' || true) -mutation-testing: ## Run mutation testing - $(DOCKER_RUN) vendor/bin/infection --ansi --min-msi=100 --min-covered-msi=100 --threads=$(shell nproc) --ignore-msi-with-no-mutations || (cat ./var/infection.log && false) +migrations-git-make-sure-gitignore-excludes-var-gitkeep: #### Make sure `.gitignore` excludes `var/.gitkeep` ##*I*## + ($(DOCKER_RUN) php -r '$$gitignoreFile = ".gitignore"; if (!file_exists($$gitignoreFile)) {exit;} $$txt = file_get_contents($$gitignoreFile); if (!is_string($$txt)) {exit;} if (strpos($$txt, "!var/.gitkeep") !== false) {exit;} file_put_contents($$gitignoreFile, "!var/.gitkeep\n", FILE_APPEND);' || true) -backward-compatibility-check: ## Check code for backwards incompatible changes - $(DOCKER_RUN) vendor/bin/roave-backward-compatibility-check || true +migrations-docs-update-readme-copyright-c-year-to-current: #### Update readme copyright year to current ##*I*## + ($(DOCKER_RUN) php -r '$$readmeFile = "README.md"; $$copyRight = "Copyright (c) "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true) -shell: ## Provides Shell access in the expected environment ### - $(DOCKER_RUN) ash +migrations-docs-update-readme-copyright-year-to-current: #### Update readme copyright year to current ##*I*## + ($(DOCKER_RUN) php -r '$$readmeFile = "README.md"; $$copyRight = "Copyright "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true) -task-list-ci: ## CI: Generate a JSON array of jobs to run, matches the commands run when running `make (|all)` ### - @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "###" | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | jq --raw-input --slurp -c 'split("\n")| .[0:-1]' +migrations-docs-update-etc-readme-template-copyright-c-year-to-current: #### Update readme template in etc/ copyright year to current ##*I*## + ($(DOCKER_RUN) php -r '$$readmeFile = "etc/README.md.twig"; $$copyRight = "Copyright (c) "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true) -help: ## Show this help ### - @printf "\033[33mUsage:\033[0m\n make [target]\n\n\033[33mTargets:\033[0m\n" - @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-32s\033[0m %s\n", $$1, $$2}' | tr -d '#' +migrations-docs-update-etc-readme-template-copyright-year-to-current: #### Update readme template in etc/ copyright year to current ##*I*## + ($(DOCKER_RUN) php -r '$$readmeFile = "etc/README.md.twig"; $$copyRight = "Copyright "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true) + +migrations-docs-create-license-when-it-doesnt-exists: #### Create license when it doesn't exists ##*I*## + ($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$composerFIle = "composer.json"; if (file_exists($$licenseFile)) {exit;} if (file_exists($$composerFIle)) {$$json = json_decode(file_get_contents($$composerFIle), true); if (array_key_exists("license", $$json)) {if ($$json["license"] === "proprietary") {exit;}}} file_put_contents($$licenseFile, base64_decode("VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnaHQgKGMpIDIwMDEgQ2Vlcy1KYW4gS2lld2lldAoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weQpvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbAppbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzCnRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwKY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzCmZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6CgpUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpbiBhbGwKY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS4KClRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SCklNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLApGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUKQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUgpMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLApPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRQpTT0ZUV0FSRS4K"));' || true) + +migrations-docs-update-license-copyright-c-year-to-current: #### Update license copyright year to current ##*I*## + ($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$copyRight = "Copyright (c) "; $$currentYear = date("Y"); if (!file_exists($$licenseFile)) {exit;} $$licenseContents = file_get_contents($$licenseFile); foreach (range(2000, 2100) as $$year) { $$licenseContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$licenseContents); } file_put_contents($$licenseFile, $$licenseContents); ' || true) + +migrations-docs-update-license-copyright-year-to-current: #### Update license copyright year to current ##*I*## + ($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$copyRight = "Copyright "; $$currentYear = date("Y"); if (!file_exists($$licenseFile)) {exit;} $$licenseContents = file_get_contents($$licenseFile); foreach (range(2000, 2100) as $$year) { $$licenseContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$licenseContents); } file_put_contents($$licenseFile, $$licenseContents); ' || true) + +migrations-docs-enforce-contributing-md-contents: #### Enforce CONTRIBUTING.md contents ##*I*## + ($(DOCKER_RUN) php -r '$$contributingFile = "CONTRIBUTING.md"; $$contributingContents = base64_decode("IyBDb250cmlidXRpbmcKClB1bGwgcmVxdWVzdHMgYXJlIGhpZ2hseSBhcHByZWNpYXRlZC4gSGVyZSdzIGEgcXVpY2sgZ3VpZGUuCgpGb3JrLCB0aGVuIGNsb25lIHRoZSByZXBvOgoKICAgIGdpdCBjbG9uZSBnaXRAZ2l0aHViLmNvbTp5b3VyLXVzZXJuYW1lL1tyZXBvXS5naXQKCkluc3RhbGwgZGVwZW5kZW5jaWVzOgoKICAgIG1ha2UgaW5zdGFsbAoKV29yayBvbiB0aGUgY29udHJpYnV0aW9uIGFuZCBjaGVjayBpZiBpdCBwYXNzZXMgYWxsIFFBIGNoZWNrcyB3aXRoOgoKICAgIG1ha2UKCklmIHNvbWUgb2YgdGhlIFBIUFN0YW4gb3Igb3RoZXIgY2hlY2tzIGFyZSB0byBzdHJpY3Qgb3IgaW50aW1pZGF0aW5nIHRoYXQgaXMgZmluZSwgZmluaXNoIHdoYXQgeW91IHdhbnQgdG8gY29udHJpYnV0ZSBhbmQgSSdsbCBoZWxwIHlvdSB3aXRoIHRob3NlLCBidXQgcGxlYXNlIG1ha2UgdGhlIGZvbGxvd2luZyBjb21tYW5kIHBhc3Nlcy4gSXQgcnVucyBhIHN1YnNldCBvZiBldmVyeXRoaW5nOgoKICAgIG1ha2UgY29udHJpYgoKWW91IGNhbiBsaXN0IGFsbCB0aGUgY29udHJpYiBjb21tYW5kcyB3aXRoOgoKICAgIG1ha2UgaGVscC1jb250cmliCgpQdXNoIHRvIHlvdXIgZm9yayBhbmQgW3N1Ym1pdCBhIHB1bGwgcmVxdWVzdF1bcHJdLgoKW3ByXTogaHR0cHM6Ly9kb2NzLmdpdGh1Yi5jb20vZW4vcHVsbC1yZXF1ZXN0cy9jb2xsYWJvcmF0aW5nLXdpdGgtcHVsbC1yZXF1ZXN0cy9wcm9wb3NpbmctY2hhbmdlcy10by15b3VyLXdvcmstd2l0aC1wdWxsLXJlcXVlc3RzL2NyZWF0aW5nLWEtcHVsbC1yZXF1ZXN0Cg=="); file_put_contents($$contributingFile, str_replace(["[repo]"], [basename(__DIR__)], $$contributingContents)); ' || true) + +migrations-php-make-sure-var-exists: #### Make sure `var/` exists ##*I*## + ($(DOCKER_RUN) mkdir var || true) + +migrations-php-make-sure-var-gitkeep-exists: #### Make sure `var/.gitkeep` exists ##*I*## + ($(DOCKER_RUN) touch var/.gitkeep || true) + +migrations-php-make-sure-etc-exists: #### Make sure `etc/` exists ##*I*## + ($(DOCKER_RUN) mkdir etc || true) + +migrations-php-make-sure-etc-ci-exists: #### Make sure `etc/ci/` exists ##*I*## + ($(DOCKER_RUN) mkdir etc/ci || true) + +migrations-php-make-sure-etc-qa-exists: #### Make sure `etc/qa/` exists ##*I*## + ($(DOCKER_RUN) mkdir etc/qa || true) + +migrations-php-move-psalm-xml-config-to-etc: #### Move `psalm.xml` to `etc/qa/psalm.xml` ##*I*## + ($(DOCKER_RUN) mv psalm.xml etc/qa/psalm.xml || true) + +migrations-php-remove-psalm-xml-config: #### Make sure we remove `etc/qa/psalm.xml` ##*I*## + ($(DOCKER_RUN) rm etc/qa/psalm.xml || true) + +migrations-php-remove-old-phpunit-xml-dist-config: #### Make sure we remove `phpunit.xml.dist` ##*I*## + ($(DOCKER_RUN) rm phpunit.xml.dist || true) + +migrations-php-remove-old-phpunit-xml-config: #### Make sure we remove `phpunit.xml` ##*I*## + ($(DOCKER_RUN) rm phpunit.xml || true) + +migrations-php-remove-old-php-cs-fiver-config: #### Make sure we remove `.php_cs` ##*I*## + ($(DOCKER_RUN) rm .php_cs || true) + +migrations-php-remove-old-scrutinizer-yml-config: #### Make sure we remove `.scrutinizer.yml` ##*I*## + ($(DOCKER_RUN) rm .scrutinizer.yml || true) + +migrations-php-remove-old-appveyor-yml-config: #### Make sure we remove `appveyor.yml` ##*I*## + ($(DOCKER_RUN) rm appveyor.yml || true) + +migrations-php-remove-old-travis-yml-config: #### Make sure we remove `.travis.yml` ##*I*## + ($(DOCKER_RUN) rm .travis.yml || true) + +migrations-php-ensure-etc-ci-markdown-link-checker-json-exists: #### Make sure we have `etc/ci/markdown-link-checker.json` ##*I*## + ($(DOCKER_RUN) php -r '$$markdownLinkCheckerFile = "etc/ci/markdown-link-checker.json"; $$json = json_decode("{\"httpHeaders\": [{\"urls\": [\"https://docs.github.com/\"],\"headers\": {\"Accept-Encoding\": \"zstd, br, gzip, deflate\"}}]}"); if (file_exists($$markdownLinkCheckerFile)) {exit;} file_put_contents($$markdownLinkCheckerFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-move-infection-config-to-etc: #### Move `infection.json.dist` to `etc/qa/infection.json5` ##*I*## + ($(DOCKER_RUN) mv infection.json.dist etc/qa/infection.json5 || true) + +migrations-php-infection-create-config-if-not-exists: #### Create Infection config file if it doesn't exists at `etc/qa/infection.json5` ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; $$infectionConfig = base64_decode("ewogICAgInRpbWVvdXQiOiAxMjAsCiAgICAic291cmNlIjogewogICAgICAgICJkaXJlY3RvcmllcyI6IFsKICAgICAgICAgICAgInNyYyIKICAgICAgICBdCiAgICB9LAogICAgImxvZ3MiOiB7CiAgICAgICAgInRleHQiOiAiLi4vLi4vdmFyL2luZmVjdGlvbi5sb2ciLAogICAgICAgICJzdW1tYXJ5IjogIi4uLy4uL3Zhci9pbmZlY3Rpb24tc3VtbWFyeS5sb2ciLAogICAgICAgICJqc29uIjogIi4uLy4uL3Zhci9pbmZlY3Rpb24uanNvbiIsCiAgICAgICAgInBlck11dGF0b3IiOiAiLi4vLi4vdmFyL2luZmVjdGlvbi1wZXItbXV0YXRvci5tZCIsCiAgICAgICAgImdpdGh1YiI6IHRydWUKICAgIH0sCiAgICAibWluTXNpIjogMTAwLAogICAgIm1pbkNvdmVyZWRNc2kiOiAxMDAsCiAgICAiaWdub3JlTXNpV2l0aE5vTXV0YXRpb25zIjogdHJ1ZSwKICAgICJtdXRhdG9ycyI6IHsKICAgICAgICAiQGRlZmF1bHQiOiB0cnVlCiAgICB9Cn0K"); if (file_exists($$infectionFile)) {exit;} file_put_contents($$infectionFile, $$infectionConfig);' || true) + +migrations-php-remove-phpunit-config-dir-from-infection: #### Drop XXX from `etc/qa/infection.json5` ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("phpUnit", $$json)) {exit;} unset($$json["phpUnit"]); file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-fix-logs-relative-paths-for-infection: #### Fix logs paths in `etc/qa/infection.json5` ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) {exit;} foreach ($$json["logs"] as $$logsKey => $$logsPath) { if (is_string($$json["logs"][$$logsKey]) && str_starts_with($$json["logs"][$$logsKey], "./var/infection")) { $$json["logs"][$$logsKey] = str_replace("./var/infection", "../../var/infection", $$json["logs"][$$logsKey]); } } file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-infection-ensure-log-text-has-the-correct-path: #### Ensure infection's log.text has config directive has the correct path ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["text"] = "../../var/infection.log"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-infection-ensure-log-summary-has-the-correct-path: #### Ensure infection's log.summary has config directive has the correct path ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["summary"] = "../../var/infection-summary.log"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-infection-ensure-log-json-has-the-correct-path: #### Ensure infection's log.json has config directive has the correct path ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["json"] = "../../var/infection.json"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-infection-ensure-log-per-mutator-has-the-correct-path: #### Ensure infection's log.perMutator has config directive has the correct path ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["perMutator"] = "../../var/infection-per-mutator.md"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-add-github-true-to-for-infection: #### Ensure we configure infection to emit logs to GitHub in `etc/qa/infection.json5` ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) {exit;} if (array_key_exists("github", $$json["logs"])) {exit;} $$json["logs"]["github"] = true; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-make-paths-compatible-with-infection-0-32: #### We update path to be relative to `etc/qa/infection.json5` as of 0.32 ##*I*## + ($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("source", $$json)) {exit;} if (!array_key_exists("directories", $$json["source"])) {exit;} foreach ($$json["source"]["directories"] as $$key => $$value) { if (!str_starts_with($$value, "../../")) {$$json["source"]["directories"][$$key] = "../../" . $$value;} } file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-php-set-phpunit-ensure-config-file-exists: #### Make sure we have a PHPUnit config file at `etc/qa/phpunit.xml` ##*I*## + ($(DOCKER_RUN) php -r '$$phpUnitConfigFIle = "etc/qa/phpunit.xml"; if (file_exists($$phpUnitConfigFIle)) {exit;} file_put_contents($$phpUnitConfigFIle, base64_decode("PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHBocHVuaXQKICAgIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiCiAgICBib290c3RyYXA9Ii4uLy4uL3ZlbmRvci9hdXRvbG9hZC5waHAiCiAgICBjb2xvcnM9InRydWUiCiAgICB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iLi4vLi4vdmVuZG9yL3BocHVuaXQvcGhwdW5pdC9waHB1bml0LnhzZCIKICAgIGNhY2hlRGlyZWN0b3J5PSIuLi8uLi92YXIvcGhwdW5pdC9jYWNoZSIKICAgIGRpc3BsYXlEZXRhaWxzT25UZXN0c1RoYXRUcmlnZ2VyRGVwcmVjYXRpb25zPSJ0cnVlIgogICAgZGlzcGxheURldGFpbHNPblRlc3RzVGhhdFRyaWdnZXJFcnJvcnM9InRydWUiCiAgICBkaXNwbGF5RGV0YWlsc09uVGVzdHNUaGF0VHJpZ2dlck5vdGljZXM9InRydWUiCiAgICBkaXNwbGF5RGV0YWlsc09uVGVzdHNUaGF0VHJpZ2dlcldhcm5pbmdzPSJ0cnVlIgogICAgZGlzcGxheURldGFpbHNPblBocHVuaXREZXByZWNhdGlvbnM9InRydWUiCj4KICAgIDx0ZXN0c3VpdGVzPgogICAgICAgIDx0ZXN0c3VpdGUgbmFtZT0iVGVzdCBTdWl0ZSI+CiAgICAgICAgICAgIDxkaXJlY3Rvcnk+Li4vLi4vdGVzdHMvPC9kaXJlY3Rvcnk+CiAgICAgICAgPC90ZXN0c3VpdGU+CiAgICA8L3Rlc3RzdWl0ZXM+CiAgICA8c291cmNlPgogICAgICAgIDxpbmNsdWRlPgogICAgICAgICAgICA8ZGlyZWN0b3J5IHN1ZmZpeD0iLnBocCI+Li4vLi4vc3JjLzwvZGlyZWN0b3J5PgogICAgICAgIDwvaW5jbHVkZT4KICAgIDwvc291cmNlPgogICAgPGV4dGVuc2lvbnM+CiAgICAgICAgPGJvb3RzdHJhcCBjbGFzcz0iRXJnZWJuaXNcUEhQVW5pdFxTbG93VGVzdERldGVjdG9yXEV4dGVuc2lvbiIvPgogICAgPC9leHRlbnNpb25zPgo8L3BocHVuaXQ+Cg=="));' || true) + +migrations-php-set-phpunit-xsd-path-to-local: #### Ensure that the PHPUnit XDS referred in `etc/qa/phpunit.xml` points to `vendor/phpunit/phpunit/phpunit.xsd` so we don't go over the network ##*I*## + ($(DOCKER_RUN) php -r '$$phpUnitConfigFIle = "etc/qa/phpunit.xml"; if (!file_exists($$phpUnitConfigFIle)) {exit;} $$xml = file_get_contents($$phpUnitConfigFIle); if (!is_string($$xml)) {exit;} for ($$major = 0; $$major < 23; $$major++) { for ($$minor = 0; $$minor < 23; $$minor++) { $$xml = str_replace("https://schema.phpunit.de/" . $$major . "." . $$minor . "/phpunit.xsd", "../../vendor/phpunit/phpunit/phpunit.xsd", $$xml); } } file_put_contents($$phpUnitConfigFIle, $$xml);' || true) + +migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit: #### Make sure we see all the warnings, deprecations, etc etc that will make PHPunit do a non-happy exit ##*I*## + ($(DOCKER_RUN) php -r '$$phpUnitConfigFIle = "etc/qa/phpunit.xml"; if (!file_exists($$phpUnitConfigFIle)) {exit;} $$xml = file_get_contents($$phpUnitConfigFIle); if (!is_string($$xml)) {exit;} $$xml = str_replace(base64_decode("PHBocHVuaXQgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgYm9vdHN0cmFwPSIuLi8uLi92ZW5kb3IvYXV0b2xvYWQucGhwIiBjb2xvcnM9InRydWUiIHhzaTpub05hbWVzcGFjZVNjaGVtYUxvY2F0aW9uPSIuLi8uLi92ZW5kb3IvcGhwdW5pdC9waHB1bml0L3BocHVuaXQueHNkIiBjYWNoZURpcmVjdG9yeT0iLi4vLi4vdmFyL3BocHVuaXQvY2FjaGUiPgo="), base64_decode("PHBocHVuaXQKICAgIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiCiAgICBib290c3RyYXA9Ii4uLy4uL3ZlbmRvci9hdXRvbG9hZC5waHAiCiAgICBjb2xvcnM9InRydWUiCiAgICB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iLi4vLi4vdmVuZG9yL3BocHVuaXQvcGhwdW5pdC9waHB1bml0LnhzZCIKICAgIGNhY2hlRGlyZWN0b3J5PSIuLi8uLi92YXIvcGhwdW5pdC9jYWNoZSIKICAgIGRpc3BsYXlEZXRhaWxzT25UZXN0c1RoYXRUcmlnZ2VyRGVwcmVjYXRpb25zPSJ0cnVlIgogICAgZGlzcGxheURldGFpbHNPblRlc3RzVGhhdFRyaWdnZXJFcnJvcnM9InRydWUiCiAgICBkaXNwbGF5RGV0YWlsc09uVGVzdHNUaGF0VHJpZ2dlck5vdGljZXM9InRydWUiCiAgICBkaXNwbGF5RGV0YWlsc09uVGVzdHNUaGF0VHJpZ2dlcldhcm5pbmdzPSJ0cnVlIgogICAgZGlzcGxheURldGFpbHNPblBocHVuaXREZXByZWNhdGlvbnM9InRydWUiCj4K"), $$xml); file_put_contents($$phpUnitConfigFIle, $$xml);' || true) + +migrations-php-move-phpstan: #### Move `phpstan.neon` to `etc/qa/phpstan.neon` ##*I*## + ($(DOCKER_RUN) mv phpstan.neon etc/qa/phpstan.neon || true) + +migrations-php-set-phpstan-ensure-config-file-exists: #### Make sure we have a PHPStan config file at `etc/qa/phpstan.neon` ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (file_exists($$phpStanConfigFIle)) {exit;} file_put_contents($$phpStanConfigFIle, "#parameters:");' || true) + +migrations-php-set-phpstan-uncomment-parameters: #### Ensure PHPStan config as parameters not commented out in `etc/qa/phpstan.neon` ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (!str_starts_with($$neon, "#parameters:")) {exit;} $$neon = str_replace("#parameters:", "parameters:", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file: #### Add parameters to PHPStan config file at `etc/qa/phpstan.neon` if it's not present ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (strpos($$neon, "parameters:") !== false) {exit;} file_put_contents($$phpStanConfigFIle, "parameters:", FILE_APPEND);' || true) + +migrations-php-set-phpstan-paths-in-config: #### Ensure PHPStan config has the `etc`, `src`, and (optionally) `tests` paths set in `etc/qa/phpstan.neon` ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; $$pathsString = "\n\tpaths:\n\t\t- ../../etc\n\t\t- ../../src\n\t\t- ../../tests"; $$pathsStringWithoutTests = "\n\tpaths:\n\t\t- ../../etc\n\t\t- ../../src"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (strpos($$neon, $$pathsString) !== false || strpos($$neon, $$pathsStringWithoutTests) !== false) {exit;} $$neon = str_replace("parameters:", "parameters:" . $$pathsString, $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-set-phpstan-level-max-in-config: #### Ensure PHPStan config has level set to max in `etc/qa/phpstan.neon` ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; $$levelString = "\n\tlevel: max"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (strpos($$neon, $$levelString) !== false) {exit;} $$neon = str_replace("parameters:", "parameters:" . $$levelString, $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended: #### Ensure PHPStan config uses ergebnis.noExtends.classesAllowedToBeExtended not ergebnis.classesAllowedToBeExtended ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\tergebnis:\n\t\tclassesAllowedToBeExtended:\n", "\tergebnis:\n\t\tnoExtends:\n\t\t\tclassesAllowedToBeExtended:\n", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType: #### Ensure PHPStan config doesn't contain checkGenericClassInNonGenericObjectType as it's no longer a valid config option ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\tcheckGenericClassInNonGenericObjectType: false\n", "", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list: #### PHPStan add `../../` to anything in a list that starts with `vendor` ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("- vendor", "- ../../vendor", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-set-phpstan-drop-include-test-utilities-rules: #### Ensure PHPStan config doesn't contain include for `wyrihaximus/async-utilities/rules.neon` as it's now an extension ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\nincludes:\n\t- ../../vendor/wyrihaximus/test-utilities/rules.neon\n", "", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-set-phpstan-drop-include-async-test-utilities-rules: #### Ensure PHPStan config doesn't contain include for `wyrihaximus/async-test-utilities/rules.neon` as it's now an extension ##*I*## + ($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\nincludes:\n\t- ../../vendor/wyrihaximus/async-test-utilities/rules.neon", "", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true) + +migrations-php-set-rector-create-config-if-not-exists: #### Create Rector config file if it doesn't exists at `etc/qa/rector.php` ##*I*## + ($(DOCKER_RUN) php -r '$$rectorConfigFile = "etc/qa/rector.php"; $$defaultRectorConfig = "", "", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-cache-is-correct-relatively: #### Make sure PHPCS cache path is has `../../var/.phpcs.cache` and not `.phpcs.cache` ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("", "", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc: #### Make sure PHPCS has `../../` prefixing `etc/` to ensure correct relative path ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("etc", "../../etc/", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-sure-etc-has-no-trailing-slash: #### Make sure PHPCS has no tailing `/` on `etc` ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("../../etc/", "../../etc", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src: #### Make sure PHPCS has `../../` prefixing `src/` to ensure correct relative path ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("src", "../../src/", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-sure-src-has-no-trailing-slash: #### Make sure PHPCS has no tailing `/` on src ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("../../src/", "../../src", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests: #### Make sure PHPCS has `../../` prefixing `tests/` to ensure correct relative path ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("tests", "../../tests/", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-sure-tests-has-no-trailing-slash: #### Make sure PHPCS has no tailing `/` on `tests` ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("../../tests/", "../../tests", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-phpcs-make-sure-etc-is-ran-through: #### Make sure PHPCS runs through `etc` ##*I*## + ($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} if (strpos($$xml, "../../etc") !== false) {exit;} $$xml = str_replace("../../src", "../../etc\n ../../src", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-phpcs-include-examples-directory-when-present: #### Make sure PHPCS runs through `examples` when it exists ##*I*## + ($(DOCKER_RUN) php -r 'if (!file_exists("examples/")) {exit;} $$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} if (strpos($$xml, "../../examples") !== false) {exit;} $$xml = str_replace("../../etc", "../../etc\n ../../examples", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true) + +migrations-php-move-composer-require-checker: #### Move composer-require-checker.json to `etc/qa/composer-require-checker.json` ##*I*## + ($(DOCKER_RUN) mv composer-require-checker.json etc/qa/composer-require-checker.json || true) + +migrations-php-composer-require-checker-create-config-if-not-exists: #### Create Composer Require Checker config file if it doesn't exists at `etc/qa/composer-require-checker.json` ##*I*## + ($(DOCKER_RUN) php -r '$$composerRequireCheckerConfigFile = "etc/qa/composer-require-checker.json"; $$composerRequireCheckerConfig = base64_decode("ewogICJzeW1ib2wtd2hpdGVsaXN0IiA6IFsKICAgICJudWxsIiwgInRydWUiLCAiZmFsc2UiLAogICAgInN0YXRpYyIsICJzZWxmIiwgInBhcmVudCIsCiAgICAiYXJyYXkiLCAic3RyaW5nIiwgImludCIsICJmbG9hdCIsICJib29sIiwgIml0ZXJhYmxlIiwgImNhbGxhYmxlIiwgInZvaWQiLCAib2JqZWN0IgogIF0sCiAgInBocC1jb3JlLWV4dGVuc2lvbnMiIDogWwogICAgIkNvcmUiLAogICAgImRhdGUiLAogICAgInBjcmUiLAogICAgIlBoYXIiLAogICAgIlJlZmxlY3Rpb24iLAogICAgIlNQTCIsCiAgICAic3RhbmRhcmQiCiAgXSwKICAic2Nhbi1maWxlcyIgOiBbXQp9Cg=="); if (file_exists($$composerRequireCheckerConfigFile)) {exit;} file_put_contents($$composerRequireCheckerConfigFile, $$composerRequireCheckerConfig);' || true) + +migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line: #### Remove all lines that contains @phpstan-ignore-next-line ##*I*## + ($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@phpstan-ignore-next-line")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true) + +migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line: #### Remove rest of line for all lines that contain @phpstan-ignore-line ##*I*## + ($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "/** @phpstan-ignore-line")) { [$$fileContents[$$lineNumber]] = explode("/** @phpstan-ignore-line", $$lineContent); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true) + +migrations-inline-code-psalm-remove-line-psalm-suppress: #### Remove all lines that contain @psalm-suppress ##*I*## + ($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@psalm-suppress")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true) + +migrations-inline-code-remove-line-internal: #### Remove all lines that contain @internal ##*I*## + ($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@internal")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true) + +migrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains: #### Replace self::expectExceptionMessage with self::expectExceptionMessageIsOrContains in all PHPUnit tests ##*I*## + ($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = file_get_contents($$i->key()); if (str_contains($$fileContents, "#[Test]") && str_contains($$fileContents, "use PHPUnit\Framework\Attributes\Test;")) { $$fileContents = str_replace("self::expectExceptionMessage(", "self::expectExceptionMessageIsOrContains(", $$fileContents); file_put_contents($$i->key(), $$fileContents); } $$i->next(); } }' || true) + +migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled: #### Ensure we only cs check/fix tests/ if unit-tests is enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} $$phpCSCongifFIle = "etc/qa/phpcs.xml"; $$fileContents = explode("\n", file_get_contents($$phpCSCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "../../tests")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpCSCongifFIle, implode("\n", $$fileContents));' || true) + +migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled: #### Ensure we only staticly analyse tests/ with PHPStan if unit-tests is enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} $$phpStanCongifFIle = "etc/qa/phpstan.neon"; $$fileContents = explode("\n", file_get_contents($$phpStanCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "- ../../tests")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpStanCongifFIle, implode("\n", $$fileContents));' || true) + +migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled: #### Ensure we remove the PHPUnit config file when unit-tests aren't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} @unlink("etc/qa/phpunit.xml");' || true) +migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled: #### Ensure we remove the InfectionPHP config file when unit-tests aren't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} @unlink("etc/qa/infection.json5");' || true) + +migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled: #### Ensure we remove the RectorPHP config file when code-style isn't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("code-style", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} @unlink("etc/qa/rector.php");' || true) + +migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled: #### Ensure we remove the PHPCSS config file when code-style isn't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("code-style", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} @unlink("etc/qa/phpcs.xml");' || true) + +migrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled: #### Ensure we remove the Composer Require Checker config file when composer-dependency-checkers aren't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("composer-dependency-checkers", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} @unlink("etc/qa/composer-require-checker.json");' || true) + +migrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled: #### Ensure we remove the Composer Unused config file when composer-dependency-checkers aren't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("composer-dependency-checkers", ["code-style","composer-dependency-checkers","linux","macos","static-analysis","unit-tests","windows"])) {exit;} @unlink("etc/qa/composer-unused.php");' || true) + +migrations-php-make-sure-github-exists: #### Make sure `.github/` exists ##*I*## + ($(DOCKER_RUN) mkdir .github || true) + +migrations-github-codeowners: #### Ensure a `CODEOWNERS` file is present, create only if it doesn't exist yet ##*I*## + ($(DOCKER_RUN) php -r '$$codeOwnersFile = ".github/CODEOWNERS"; if (file_exists($$codeOwnersFile)) {exit;} file_put_contents($$codeOwnersFile, "* @WyriHaximus" . PHP_EOL);' || true) + +migrations-php-make-sure-github-workflows-exists: #### Make sure `.github/workflows` exists ##*I*## + ($(DOCKER_RUN) mkdir .github/workflows || true) + +migrations-github-actions-remove-composer-diff: #### Remove `composer-diff.yaml` it has been folded into centralized workflows through `ci.yaml` ##*I*## + ($(DOCKER_RUN) rm .github/workflows/composer-diff.yaml || true) + +migrations-github-actions-remove-markdown-check-links: #### Remove `markdown-check-links.yaml` it has been folded into centralized workflows through `ci.yaml` ##*I*## + ($(DOCKER_RUN) rm .github/workflows/markdown-check-links.yaml || true) + +migrations-github-actions-remove-markdown-craft-release: #### Remove `craft-release.yaml` it has been folded into centralized workflows through `release-management.yaml` ##*I*## + ($(DOCKER_RUN) rm .github/workflows/craft-release.yaml || true) + +migrations-github-actions-remove-set-milestone-on-pr: #### Remove `set-milestone-on-pr.yaml` it has been folded into centralized workflows through `release-management.yaml` ##*I*## + ($(DOCKER_RUN) rm .github/workflows/set-milestone-on-pr.yaml || true) + +migrations-github-actions-move-ci: #### Move `.github/workflows/ci.yml` to `.github/workflows/ci.yaml` ##*I*## + ($(DOCKER_RUN) mv .github/workflows/ci.yml .github/workflows/ci.yaml || true) + +migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow: #### Remove CI Workflow if its the old style PHP CI Workflow ##*I*## + ($(DOCKER_RUN) php -r '$$ciWorkflowFile = ".github/workflows/ci.yaml"; if (!file_exists($$ciWorkflowFile)) {exit;} $$yaml = file_get_contents($$ciWorkflowFile); if (!is_string($$yaml)) {exit;} if (strpos($$yaml, "composer: [lowest, locked, highest]") !== false || strpos($$yaml, "composer: [lowest, current, highest]") !== false || strpos($$yaml, "- run: make ${{ matrix.check }}") !== false || strpos($$yaml, trim(base64_decode("aWY6IG1hdHJpeC5jaGVjayA9PSAnYmFja3dhcmQtY29tcGF0aWJpbGl0eS1jaGVjaycK"))) !== false) { unlink($$ciWorkflowFile); }' || true) + +migrations-github-actions-create-ci-if-not-exists: #### Create CI Workflow if it doesn't exists at `.github/workflows/ci.yaml` ##*I*## + ($(DOCKER_RUN) php -r '$$ciWorkflowFile = ".github/workflows/ci.yaml"; $$ciWorkflowContents = base64_decode("bmFtZTogQ29udGludW91cyBJbnRlZ3JhdGlvbgpvbjoKICBwdXNoOgogICAgYnJhbmNoZXM6CiAgICAgIC0gJ21haW4nCiAgICAgIC0gJ21hc3RlcicKICAgICAgLSAncmVmcy9oZWFkcy92WzAtOV0rLlswLTldKy5bMC05XSsnCiAgcHVsbF9yZXF1ZXN0OgojIyBUaGlzIHdvcmtmbG93IG5lZWRzIHRoZSBgcHVsbC1yZXF1ZXN0YCBwZXJtaXNzaW9ucyB0byB3b3JrIGZvciB0aGUgcGFja2FnZSBkaWZmaW5nCiMjIFJlZnM6IGh0dHBzOi8vZG9jcy5naXRodWIuY29tL2VuL2FjdGlvbnMvcmVmZXJlbmNlL3dvcmtmbG93LXN5bnRheC1mb3ItZ2l0aHViLWFjdGlvbnMjcGVybWlzc2lvbnMKcGVybWlzc2lvbnM6CiAgcHVsbC1yZXF1ZXN0czogd3JpdGUKICBjb250ZW50czogcmVhZApqb2JzOgogIGNpOgogICAgbmFtZTogQ29udGludW91cyBJbnRlZ3JhdGlvbgogICAgdXNlczogV3lyaUhheGltdXMvZ2l0aHViLXdvcmtmbG93cy8uZ2l0aHViL3dvcmtmbG93cy9wYWNrYWdlLnlhbWxAbWFpbgo="); if (file_exists($$ciWorkflowFile)) {exit;} file_put_contents($$ciWorkflowFile, $$ciWorkflowContents);' || true) + +migrations-github-actions-move-release-management: #### Move `.github/workflows/release-managment.yaml` to `.github/workflows/release-management.yaml` ##*I*## + ($(DOCKER_RUN) mv .github/workflows/release-managment.yaml .github/workflows/release-management.yaml || true) + +migrations-github-actions-fix-management-in-release-management-referenced-workflow-file: #### Fix management in release-management referenced workflow file ##*I*## + ($(DOCKER_RUN) sed -i -e 's/release-managment.yaml/release-management.yaml/g' .github/workflows/release-management.yaml || true) + +migrations-github-actions-create-release-management-if-not-exists: #### Create Release Management Workflow if it doesn't exists at `.github/workflows/release-management.yaml` ##*I*## + ($(DOCKER_RUN) php -r '$$releaseManagementWorkflowFile = ".github/workflows/release-management.yaml"; $$releaseManagementWorkflowContents = base64_decode("bmFtZTogUmVsZWFzZSBNYW5hZ2VtZW50Cm9uOgogIHB1bGxfcmVxdWVzdDoKICAgIHR5cGVzOgogICAgICAtIG9wZW5lZAogICAgICAtIGxhYmVsZWQKICAgICAgLSB1bmxhYmVsZWQKICAgICAgLSBzeW5jaHJvbml6ZQogICAgICAtIHJlb3BlbmVkCiAgICAgIC0gbWlsZXN0b25lZAogICAgICAtIGRlbWlsZXN0b25lZAogICAgICAtIHJlYWR5X2Zvcl9yZXZpZXcKICBtaWxlc3RvbmU6CiAgICB0eXBlczoKICAgICAgLSBjbG9zZWQKcGVybWlzc2lvbnM6CiAgY29udGVudHM6IHdyaXRlCiAgaXNzdWVzOiB3cml0ZQogIHB1bGwtcmVxdWVzdHM6IHdyaXRlCmpvYnM6CiAgcmVsZWFzZS1tYW5hZ21lbnQ6CiAgICBuYW1lOiBSZWxlYXNlIE1hbmFnZW1lbnQKICAgIHVzZXM6IFd5cmlIYXhpbXVzL2dpdGh1Yi13b3JrZmxvd3MvLmdpdGh1Yi93b3JrZmxvd3MvcGFja2FnZS1yZWxlYXNlLW1hbmFnZW1lbnQueWFtbEBtYWluCiAgICB3aXRoOgogICAgICBtaWxlc3RvbmU6ICR7eyBnaXRodWIuZXZlbnQubWlsZXN0b25lLnRpdGxlIH19CiAgICAgIGRlc2NyaXB0aW9uOiAke3sgZ2l0aHViLmV2ZW50Lm1pbGVzdG9uZS50aXRsZSB9fQo="); if (file_exists($$releaseManagementWorkflowFile)) {exit;} file_put_contents($$releaseManagementWorkflowFile, $$releaseManagementWorkflowContents);' || true) + +migrations-renovate-remove-dependabot-config: #### Make sure we remove `.github/dependabot.yml` ##*I*## + ($(DOCKER_RUN) rm .github/dependabot.yml || true) + ($(DOCKER_RUN) rm .github/dependabot.yaml || true) + +migrations-renovate-move-config: #### Move `renovate.json` to `.github/renovate.json` ##*I*## + ($(DOCKER_RUN) mv renovate.json .github/renovate.json || true) + +migrations-renovate-create-config-if-not-exists: #### Create Renovate Config if it doesn't exists at `.github/renovate.json` ##*I*## + ($(DOCKER_RUN) php -r '$$renovateConfigFile = ".github/renovate.json"; $$renovateConfigContents = base64_decode("ewogICIkc2NoZW1hIjogImh0dHBzOi8vZG9jcy5yZW5vdmF0ZWJvdC5jb20vcmVub3ZhdGUtc2NoZW1hLmpzb24iLAogICJleHRlbmRzIjogWwogICAgImdpdGh1Yj5XeXJpSGF4aW11cy9yZW5vdmF0ZS1jb25maWc6cGhwLXBhY2thZ2UiCiAgXQp9Cg=="); if (file_exists($$renovateConfigFile)) {exit;} file_put_contents($$renovateConfigFile, $$renovateConfigContents);' || true) + +migrations-renovate-point-at-correct-config: #### Ensure `.github/renovate.json` points at github>WyriHaximus/renovate-config:php-package instead of local>WyriHaximus/renovate-config ##*I*## + ($(DOCKER_RUN) php -r '$$renovateFIle = ".github/renovate.json"; if (!file_exists($$renovateFIle)) {exit;} file_put_contents($$renovateFIle, str_replace("local>WyriHaximus/renovate-config", "github>WyriHaximus/renovate-config:php-package", file_get_contents($$renovateFIle)));' || true) + +migrations-renovate-set-php-constraint: #### Always keep renovate's constraints.php in sync with `composer.json`'s `config.platform.php` ##*I*## + ($(DOCKER_RUN) php -r '$$composerFIle = "composer.json"; if (!file_exists($$composerFIle)) {exit;} $$json = json_decode(file_get_contents($$composerFIle), true); if (!array_key_exists("config", $$json)) {exit;} if (!array_key_exists("platform", $$json["config"])) {exit;} if (!array_key_exists("php", $$json["config"]["platform"])) {exit;} $$phpVersionConstraint = str_replace(".13", ".x", $$json["config"]["platform"]["php"]); $$renovateFIle = ".github/renovate.json"; if (!file_exists($$renovateFIle)) {exit;} $$json = json_decode(file_get_contents($$renovateFIle), true); if (!is_array($$json)) {exit;} if (!array_key_exists("constraints", $$json)) {$$json["constraints"] = [];} $$json["constraints"]["php"] = $$phpVersionConstraint; file_put_contents($$renovateFIle, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + +migrations-renovate-set-composer-constraint: #### Always keep renovate's `constraints.composer` at `2.x` ##*I*## + ($(DOCKER_RUN) php -r '$$renovateFIle = ".github/renovate.json"; if (!file_exists($$renovateFIle)) {exit;} $$json = json_decode(file_get_contents($$renovateFIle), true); if (!is_array($$json)) {exit;} if (!array_key_exists("constraints", $$json)) {$$json["constraints"] = [];} $$json["constraints"]["composer"] = "2.x"; file_put_contents($$renovateFIle, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) + + +## Our default jobs generate-example-clients: generate-example-client-one generate-example-client-subsplit generate-example-client-miele generate-example-client-one: @@ -77,3 +419,144 @@ 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 + +on-install-or-update: ## Tasks, like migrations, that specifically have be run after composer install or update. These will also run by self hosted Renovate #### +ifeq ("$(ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS)","TRUE") + $(DOCKER_RUN_WITH_SOCKET) $(MAKE) migrations-git-enforce-gitattributes-contents migrations-git-make-sure-gitignore-exists migrations-git-make-sure-gitignore-ignores-var migrations-git-make-sure-gitignore-excludes-var-gitkeep migrations-docs-update-readme-copyright-c-year-to-current migrations-docs-update-readme-copyright-year-to-current migrations-docs-update-etc-readme-template-copyright-c-year-to-current migrations-docs-update-etc-readme-template-copyright-year-to-current migrations-docs-create-license-when-it-doesnt-exists migrations-docs-update-license-copyright-c-year-to-current migrations-docs-update-license-copyright-year-to-current migrations-docs-enforce-contributing-md-contents migrations-php-make-sure-var-exists migrations-php-make-sure-var-gitkeep-exists migrations-php-make-sure-etc-exists migrations-php-make-sure-etc-ci-exists migrations-php-make-sure-etc-qa-exists migrations-php-move-psalm-xml-config-to-etc migrations-php-remove-psalm-xml-config migrations-php-remove-old-phpunit-xml-dist-config migrations-php-remove-old-phpunit-xml-config migrations-php-remove-old-php-cs-fiver-config migrations-php-remove-old-scrutinizer-yml-config migrations-php-remove-old-appveyor-yml-config migrations-php-remove-old-travis-yml-config migrations-php-ensure-etc-ci-markdown-link-checker-json-exists migrations-php-move-infection-config-to-etc migrations-php-infection-create-config-if-not-exists migrations-php-remove-phpunit-config-dir-from-infection migrations-php-fix-logs-relative-paths-for-infection migrations-php-infection-ensure-log-text-has-the-correct-path migrations-php-infection-ensure-log-summary-has-the-correct-path migrations-php-infection-ensure-log-json-has-the-correct-path migrations-php-infection-ensure-log-per-mutator-has-the-correct-path migrations-php-add-github-true-to-for-infection migrations-php-make-paths-compatible-with-infection-0-32 migrations-php-set-phpunit-ensure-config-file-exists migrations-php-set-phpunit-xsd-path-to-local migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit migrations-php-move-phpstan migrations-php-set-phpstan-ensure-config-file-exists migrations-php-set-phpstan-uncomment-parameters migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file migrations-php-set-phpstan-paths-in-config migrations-php-set-phpstan-level-max-in-config migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list migrations-php-set-phpstan-drop-include-test-utilities-rules migrations-php-set-phpstan-drop-include-async-test-utilities-rules migrations-php-set-rector-create-config-if-not-exists migrations-php-composer-unused-create-config-if-not-exists migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-migrate-composer-unused-from-extra-unused-to-etc-qa-composer-used-php migrations-php-move-phpcs migrations-php-move-phpcs-not-dist migrations-php-set-phpcs-ensure-config-file-exists migrations-php-phpcs-make-basepath-is-correct-relatively migrations-php-phpcs-make-cache-is-correct-relatively migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc migrations-php-phpcs-make-sure-etc-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src migrations-php-phpcs-make-sure-src-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests migrations-php-phpcs-make-sure-tests-has-no-trailing-slash migrations-php-phpcs-make-sure-etc-is-ran-through migrations-phpcs-include-examples-directory-when-present migrations-php-move-composer-require-checker migrations-php-composer-require-checker-create-config-if-not-exists migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line migrations-inline-code-psalm-remove-line-psalm-suppress migrations-inline-code-remove-line-internal migrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-php-make-sure-github-exists migrations-github-codeowners migrations-php-make-sure-github-workflows-exists migrations-github-actions-remove-composer-diff migrations-github-actions-remove-markdown-check-links migrations-github-actions-remove-markdown-craft-release migrations-github-actions-remove-set-milestone-on-pr migrations-github-actions-move-ci migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow migrations-github-actions-create-ci-if-not-exists migrations-github-actions-move-release-management migrations-github-actions-fix-management-in-release-management-referenced-workflow-file migrations-github-actions-create-release-management-if-not-exists migrations-renovate-remove-dependabot-config migrations-renovate-move-config migrations-renovate-create-config-if-not-exists migrations-renovate-point-at-correct-config migrations-renovate-set-php-constraint migrations-renovate-set-composer-constraint composer-validate syntax-php composer-normalize rector-upgrade cs-fix ## Count: 106 +else + $(DOCKER_RUN_WITH_SOCKET) $(MAKE) migrations-git-enforce-gitattributes-contents migrations-git-make-sure-gitignore-exists migrations-git-make-sure-gitignore-ignores-var migrations-git-make-sure-gitignore-excludes-var-gitkeep migrations-docs-update-readme-copyright-c-year-to-current migrations-docs-update-readme-copyright-year-to-current migrations-docs-update-etc-readme-template-copyright-c-year-to-current migrations-docs-update-etc-readme-template-copyright-year-to-current migrations-docs-create-license-when-it-doesnt-exists migrations-docs-update-license-copyright-c-year-to-current migrations-docs-update-license-copyright-year-to-current migrations-docs-enforce-contributing-md-contents migrations-php-make-sure-var-exists migrations-php-make-sure-var-gitkeep-exists migrations-php-make-sure-etc-exists migrations-php-make-sure-etc-ci-exists migrations-php-make-sure-etc-qa-exists migrations-php-move-psalm-xml-config-to-etc migrations-php-remove-psalm-xml-config migrations-php-remove-old-phpunit-xml-dist-config migrations-php-remove-old-phpunit-xml-config migrations-php-remove-old-php-cs-fiver-config migrations-php-remove-old-scrutinizer-yml-config migrations-php-remove-old-appveyor-yml-config migrations-php-remove-old-travis-yml-config migrations-php-ensure-etc-ci-markdown-link-checker-json-exists migrations-php-move-infection-config-to-etc migrations-php-infection-create-config-if-not-exists migrations-php-remove-phpunit-config-dir-from-infection migrations-php-fix-logs-relative-paths-for-infection migrations-php-infection-ensure-log-text-has-the-correct-path migrations-php-infection-ensure-log-summary-has-the-correct-path migrations-php-infection-ensure-log-json-has-the-correct-path migrations-php-infection-ensure-log-per-mutator-has-the-correct-path migrations-php-add-github-true-to-for-infection migrations-php-make-paths-compatible-with-infection-0-32 migrations-php-set-phpunit-ensure-config-file-exists migrations-php-set-phpunit-xsd-path-to-local migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit migrations-php-move-phpstan migrations-php-set-phpstan-ensure-config-file-exists migrations-php-set-phpstan-uncomment-parameters migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file migrations-php-set-phpstan-paths-in-config migrations-php-set-phpstan-level-max-in-config migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list migrations-php-set-phpstan-drop-include-test-utilities-rules migrations-php-set-phpstan-drop-include-async-test-utilities-rules migrations-php-set-rector-create-config-if-not-exists migrations-php-composer-unused-create-config-if-not-exists migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-migrate-composer-unused-from-extra-unused-to-etc-qa-composer-used-php migrations-php-move-phpcs migrations-php-move-phpcs-not-dist migrations-php-set-phpcs-ensure-config-file-exists migrations-php-phpcs-make-basepath-is-correct-relatively migrations-php-phpcs-make-cache-is-correct-relatively migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc migrations-php-phpcs-make-sure-etc-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src migrations-php-phpcs-make-sure-src-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests migrations-php-phpcs-make-sure-tests-has-no-trailing-slash migrations-php-phpcs-make-sure-etc-is-ran-through migrations-phpcs-include-examples-directory-when-present migrations-php-move-composer-require-checker migrations-php-composer-require-checker-create-config-if-not-exists migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line migrations-inline-code-psalm-remove-line-psalm-suppress migrations-inline-code-remove-line-internal migrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-php-make-sure-github-exists migrations-github-codeowners migrations-php-make-sure-github-workflows-exists migrations-github-actions-remove-composer-diff migrations-github-actions-remove-markdown-check-links migrations-github-actions-remove-markdown-craft-release migrations-github-actions-remove-set-milestone-on-pr migrations-github-actions-move-ci migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow migrations-github-actions-create-ci-if-not-exists migrations-github-actions-move-release-management migrations-github-actions-fix-management-in-release-management-referenced-workflow-file migrations-github-actions-create-release-management-if-not-exists migrations-renovate-remove-dependabot-config migrations-renovate-move-config migrations-renovate-create-config-if-not-exists migrations-renovate-point-at-correct-config migrations-renovate-set-php-constraint migrations-renovate-set-composer-constraint composer-validate syntax-php composer-normalize rector-upgrade cs-fix ## Count: 106 +endif + +composer-validate: ## Ensure we don't require any package we don't use in this package directly ##*IC*## + $(DOCKER_SHELL) composer validate + +syntax-php: ## Lint PHP syntax ##*ILH*## + $(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor . + +composer-normalize: ## Normalize composer.json ##*I*## + $(DOCKER_RUN) composer normalize + $(MAKE) update-lock + +rector-upgrade: ## Upgrade any automatically upgradable old code ##*I*##^code-style^## + $(DOCKER_RUN) vendor/bin/rector -c ./etc/qa/rector.php + +cs-fix: ## Fix any automatically fixable code style issues ##*EI*##^code-style^## + $(DOCKER_RUN) vendor/bin/phpcbf --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml || $(MAKE) cs + +cs-fix-debug: ## Fix any automatically fixable code style issues, but with debugging output ####^code-style^## + $(DOCKER_RUN) vendor/bin/phpcbf --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml -vvvv + +cs: ## Check the code for code style issues ##*ELCH*##^code-style^## + $(DOCKER_SHELL) vendor/bin/phpcs --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml + +stan: ## Run static analysis (PHPStan) ##*LCH*##^static-analysis^## + $(DOCKER_SHELL) vendor/bin/phpstan analyse --ansi --configuration=./etc/qa/phpstan.neon + +unit-testing: ## Run tests ##*AE*##^unit-tests^## + $(DOCKER_RUN_WITH_SOCKET) vendor/bin/phpunit --colors=always -c ./etc/qa/phpunit.xml $(shell $(DOCKER_SHELL) php -r 'if (function_exists("xdebug_get_code_coverage")) { echo " --coverage-text --coverage-html ./var/tests-unit-coverage-html --coverage-clover ./var/tests-unit-clover-coverage.xml"; }') + +unit-testing-raw: ## Run tests ##*D*##^unit-tests^## + php vendor/phpunit/phpunit/phpunit --colors=always -c ./etc/qa/phpunit.xml $(shell php -r 'if (function_exists("xdebug_get_code_coverage")) { echo " --coverage-text --coverage-html ./var/tests-unit-coverage-html --coverage-clover ./var/tests-unit-clover-coverage.xml"; }') + +unit-testing-filter: ## Run tests with specified filter ####^unit-tests^## + $(DOCKER_RUN_WITH_SOCKET) vendor/bin/phpunit --colors=always --filter=$(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) -c ./etc/qa/phpunit.xml $(shell $(DOCKER_SHELL) php -r 'if (function_exists("xdebug_get_code_coverage")) { echo " --coverage-text --coverage-html ./var/tests-unit-coverage-html --coverage-clover ./var/tests-unit-clover-coverage.xml"; }') + +mutation-testing: ## Run mutation testing ##*LCH*##^static-analysis|unit-tests^## + $(DOCKER_RUN_WITH_SOCKET) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --static-analysis-tool=phpstan --static-analysis-tool-options="--memory-limit=-1" --threads=$(THREADS) + +mutation-testing-raw: ## Run mutation testing ####^static-analysis|unit-tests^## + vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --static-analysis-tool=phpstan --static-analysis-tool-options="--memory-limit=-1" --threads=$(THREADS) + +composer-require-checker: ## Ensure we require every package used in this package directly ##*EC*##^composer-dependency-checkers^## + $(DOCKER_SHELL) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=./etc/qa/composer-require-checker.json + +composer-unused: ## Ensure we don't require any package we don't use in this package directly ##*EC*##^composer-dependency-checkers^## + $(DOCKER_SHELL) vendor/bin/composer-unused --ansi --configuration=./etc/qa/composer-unused.php + +backward-compatibility-check: ## Check code for backwards incompatible changes ##*C*## + $(MAKE) backward-compatibility-check-raw || true + +backward-compatibility-check-raw: ## Check code for backwards incompatible changes, doesn't ignore the failure ### + $(DOCKER_SHELL) vendor/bin/roave-backward-compatibility-check + +install: ### Install dependencies #### +ifeq ("$(ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS)","TRUE") + $(DOCKER_SHELL) composer install --no-scripts + $(MAKE) on-install-or-update +else + $(DOCKER_SHELL) composer install +endif + +composer-require: ### Require passed dependencies #### + $(DOCKER_INTERACTIVE_SHELL) composer require -W $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) + +composer-why: ### Show why a specific dependency is loaded #### + $(DOCKER_INTERACTIVE_SHELL) composer why $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) + +composer-outdated: ### Show outdated packages #### + $(DOCKER_SHELL) composer outdated + +update: ### Update dependencies #### +ifeq ("$(ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS)","TRUE") + $(DOCKER_SHELL) composer update -W --no-scripts + $(MAKE) on-install-or-update +else + $(DOCKER_SHELL) composer update -W +endif + +update-lock: ### Update lockfile #### + $(DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER) composer update --lock --no-scripts || $(DOCKER_RUN) composer update --lock --no-scripts + +outdated: ### Show outdated dependencies #### + $(DOCKER_SHELL) composer outdated + +composer-show: ### Show dependencies #### + $(DOCKER_SHELL) composer show + +shell: ## Provides Shell access in the expected environment #### + $(DOCKER_INTERACTIVE_SHELL) bash + +run: ## Provides access in the expected environment to run a single command and then return #### + $(DOCKER_RUN) $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) + +help: ## Show this help #### + @printf "\033[33mUsage:\033[0m\n make [target]\n\n\033[33mTargets:\033[0m\n" + @printf '%b\n' 'all: ## Runs everything\nbackward-compatibility-check: ## Check code for backwards incompatible changes\nbackward-compatibility-check-raw: ## Check code for backwards incompatible changes, doesn'\''t ignore the failure\ncomposer-normalize: ## Normalize composer.json\ncomposer-outdated: ## Show outdated packages\ncomposer-require: ## Require passed dependencies\ncomposer-require-checker: ## Ensure we require every package used in this package directly\ncomposer-show: ## Show dependencies\ncomposer-unused: ## Ensure we don'\''t require any package we don'\''t use in this package directly\ncomposer-validate: ## Ensure we don'\''t require any package we don'\''t use in this package directly\ncomposer-why: ## Show why a specific dependency is loaded\ncontrib: ## Runs a subset of everything (all)\ncs: ## Check the code for code style issues\ncs-fix: ## Fix any automatically fixable code style issues\ncs-fix-debug: ## Fix any automatically fixable code style issues, but with debugging output\nhelp: ## Show this help\nhelp-contrib: ## Show the migrations help\nhelp-migrations: ## Show the migrations help\ninstall: ## Install dependencies\nmutation-testing: ## Run mutation testing\nmutation-testing-raw: ## Run mutation testing\non-install-or-update: ## Tasks, like migrations, that specifically have be run after composer install or update. These will also run by self hosted Renovate\noutdated: ## Show outdated dependencies\nrector-upgrade: ## Upgrade any automatically upgradable old code\nrun: ## Provides access in the expected environment to run a single command and then return\nshell: ## Provides Shell access in the expected environment\nstan: ## Run static analysis (PHPStan)\nsupported-features: ## CI: List the features this package supports\nsyntax-php: ## Lint PHP syntax\ntask-list-ci-all: ## CI: Generate a JSON array of jobs to run on all variations\ntask-list-ci-dos: ## CI: Generate a JSON array of jobs to run Directly on the OS variations\ntask-list-ci-high: ## CI: Generate a JSON array of jobs to run against the highest dependencies on the primary threading target\ntask-list-ci-locked: ## CI: Generate a JSON array of jobs to run against the locked dependencies on the primary threading target\ntask-list-ci-low: ## CI: Generate a JSON array of jobs to run against the lowest dependencies on the primary threading target\nunit-testing: ## Run tests\nunit-testing-filter: ## Run tests with specified filter\nunit-testing-raw: ## Run tests\nupdate: ## Update dependencies\nupdate-lock: ## Update lockfile' | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-32s\033[0m %s\n", $$1, $$2}' | tr -d '#' + +help-migrations: ## Show the migrations help #### + @printf "\033[33mUsage:\033[0m\n make [target]\n\n\033[33mTargets:\033[0m\n" + @printf '%b\n' 'migrations-docs-create-license-when-it-doesnt-exists: ## Create license when it doesn'\''t exists\nmigrations-docs-enforce-contributing-md-contents: ## Enforce CONTRIBUTING.md contents\nmigrations-docs-update-etc-readme-template-copyright-c-year-to-current: ## Update readme template in etc/ copyright year to current\nmigrations-docs-update-etc-readme-template-copyright-year-to-current: ## Update readme template in etc/ copyright year to current\nmigrations-docs-update-license-copyright-c-year-to-current: ## Update license copyright year to current\nmigrations-docs-update-license-copyright-year-to-current: ## Update license copyright year to current\nmigrations-docs-update-readme-copyright-c-year-to-current: ## Update readme copyright year to current\nmigrations-docs-update-readme-copyright-year-to-current: ## Update readme copyright year to current\nmigrations-git-enforce-gitattributes-contents: ## Enforce `.gitattributes` contents\nmigrations-git-make-sure-gitignore-excludes-var-gitkeep: ## Make sure `.gitignore` excludes `var/.gitkeep`\nmigrations-git-make-sure-gitignore-exists: ## Make sure `.gitignore` exists\nmigrations-git-make-sure-gitignore-ignores-var: ## Make sure `.gitignore` ignores `var/*`\nmigrations-github-actions-create-ci-if-not-exists: ## Create CI Workflow if it doesn'\''t exists at `.github/workflows/ci.yaml`\nmigrations-github-actions-create-release-management-if-not-exists: ## Create Release Management Workflow if it doesn'\''t exists at `.github/workflows/release-management.yaml`\nmigrations-github-actions-fix-management-in-release-management-referenced-workflow-file: ## Fix management in release-management referenced workflow file\nmigrations-github-actions-move-ci: ## Move `.github/workflows/ci.yml` to `.github/workflows/ci.yaml`\nmigrations-github-actions-move-release-management: ## Move `.github/workflows/release-managment.yaml` to `.github/workflows/release-management.yaml`\nmigrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow: ## Remove CI Workflow if its the old style PHP CI Workflow\nmigrations-github-actions-remove-composer-diff: ## Remove `composer-diff.yaml` it has been folded into centralized workflows through `ci.yaml`\nmigrations-github-actions-remove-markdown-check-links: ## Remove `markdown-check-links.yaml` it has been folded into centralized workflows through `ci.yaml`\nmigrations-github-actions-remove-markdown-craft-release: ## Remove `craft-release.yaml` it has been folded into centralized workflows through `release-management.yaml`\nmigrations-github-actions-remove-set-milestone-on-pr: ## Remove `set-milestone-on-pr.yaml` it has been folded into centralized workflows through `release-management.yaml`\nmigrations-github-codeowners: ## Ensure a `CODEOWNERS` file is present, create only if it doesn'\''t exist yet\nmigrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line: ## Remove all lines that contains @phpstan-ignore-next-line\nmigrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line: ## Remove rest of line for all lines that contain @phpstan-ignore-line\nmigrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains: ## Replace self::expectExceptionMessage with self::expectExceptionMessageIsOrContains in all PHPUnit tests\nmigrations-inline-code-psalm-remove-line-psalm-suppress: ## Remove all lines that contain @psalm-suppress\nmigrations-inline-code-remove-line-internal: ## Remove all lines that contain @internal\nmigrations-php-add-github-true-to-for-infection: ## Ensure we configure infection to emit logs to GitHub in `etc/qa/infection.json5`\nmigrations-php-composer-require-checker-create-config-if-not-exists: ## Create Composer Require Checker config file if it doesn'\''t exists at `etc/qa/composer-require-checker.json`\nmigrations-php-composer-unused-create-config-if-not-exists: ## Create Composer Unused config file if it doesn'\''t exists at `etc/qa/composer-unused.php`\nmigrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos: ## Update Composer Unused config file dropping a commented out line that is scattered cross my repos\nmigrations-php-ensure-etc-ci-markdown-link-checker-json-exists: ## Make sure we have `etc/ci/markdown-link-checker.json`\nmigrations-php-fix-logs-relative-paths-for-infection: ## Fix logs paths in `etc/qa/infection.json5`\nmigrations-php-infection-create-config-if-not-exists: ## Create Infection config file if it doesn'\''t exists at `etc/qa/infection.json5`\nmigrations-php-infection-ensure-log-json-has-the-correct-path: ## Ensure infection'\''s log.json has config directive has the correct path\nmigrations-php-infection-ensure-log-per-mutator-has-the-correct-path: ## Ensure infection'\''s log.perMutator has config directive has the correct path\nmigrations-php-infection-ensure-log-summary-has-the-correct-path: ## Ensure infection'\''s log.summary has config directive has the correct path\nmigrations-php-infection-ensure-log-text-has-the-correct-path: ## Ensure infection'\''s log.text has config directive has the correct path\nmigrations-php-make-paths-compatible-with-infection-0-32: ## We update path to be relative to `etc/qa/infection.json5` as of 0.32\nmigrations-php-make-sure-etc-ci-exists: ## Make sure `etc/ci/` exists\nmigrations-php-make-sure-etc-exists: ## Make sure `etc/` exists\nmigrations-php-make-sure-etc-qa-exists: ## Make sure `etc/qa/` exists\nmigrations-php-make-sure-github-exists: ## Make sure `.github/` exists\nmigrations-php-make-sure-github-workflows-exists: ## Make sure `.github/workflows` exists\nmigrations-php-make-sure-var-exists: ## Make sure `var/` exists\nmigrations-php-make-sure-var-gitkeep-exists: ## Make sure `var/.gitkeep` exists\nmigrations-php-migrate-composer-unused-from-extra-unused-to-etc-qa-composer-used-php: ## Migrate Compose Unused from `composer.json` extra unused to `etc/qa/composer-unused.php`\nmigrations-php-move-composer-require-checker: ## Move composer-require-checker.json to `etc/qa/composer-require-checker.json`\nmigrations-php-move-infection-config-to-etc: ## Move `infection.json.dist` to `etc/qa/infection.json5`\nmigrations-php-move-phpcs: ## Move `phpcs.xml.dist` to `etc/qa/phpcs.xml`\nmigrations-php-move-phpcs-not-dist: ## Move `phpcs.xml` to `etc/qa/phpcs.xml`\nmigrations-php-move-phpstan: ## Move `phpstan.neon` to `etc/qa/phpstan.neon`\nmigrations-php-move-psalm-xml-config-to-etc: ## Move `psalm.xml` to `etc/qa/psalm.xml`\nmigrations-php-phpcs-make-basepath-is-correct-relatively: ## Make sure PHPCS base path is has `../../` and not `.`\nmigrations-php-phpcs-make-cache-is-correct-relatively: ## Make sure PHPCS cache path is has `../../var/.phpcs.cache` and not `.phpcs.cache`\nmigrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc: ## Make sure PHPCS has `../../` prefixing `etc/` to ensure correct relative path\nmigrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src: ## Make sure PHPCS has `../../` prefixing `src/` to ensure correct relative path\nmigrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests: ## Make sure PHPCS has `../../` prefixing `tests/` to ensure correct relative path\nmigrations-php-phpcs-make-sure-etc-has-no-trailing-slash: ## Make sure PHPCS has no tailing `/` on `etc`\nmigrations-php-phpcs-make-sure-etc-is-ran-through: ## Make sure PHPCS runs through `etc`\nmigrations-php-phpcs-make-sure-src-has-no-trailing-slash: ## Make sure PHPCS has no tailing `/` on src\nmigrations-php-phpcs-make-sure-tests-has-no-trailing-slash: ## Make sure PHPCS has no tailing `/` on `tests`\nmigrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list: ## PHPStan add `../../` to anything in a list that starts with `vendor`\nmigrations-php-remove-old-appveyor-yml-config: ## Make sure we remove `appveyor.yml`\nmigrations-php-remove-old-php-cs-fiver-config: ## Make sure we remove `.php_cs`\nmigrations-php-remove-old-phpunit-xml-config: ## Make sure we remove `phpunit.xml`\nmigrations-php-remove-old-phpunit-xml-dist-config: ## Make sure we remove `phpunit.xml.dist`\nmigrations-php-remove-old-scrutinizer-yml-config: ## Make sure we remove `.scrutinizer.yml`\nmigrations-php-remove-old-travis-yml-config: ## Make sure we remove `.travis.yml`\nmigrations-php-remove-phpunit-config-dir-from-infection: ## Drop XXX from `etc/qa/infection.json5`\nmigrations-php-remove-psalm-xml-config: ## Make sure we remove `etc/qa/psalm.xml`\nmigrations-php-set-phpcs-ensure-config-file-exists: ## Make sure we have a PHPCS config file at `etc/qa/phpcs.xml`\nmigrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file: ## Add parameters to PHPStan config file at `etc/qa/phpstan.neon` if it'\''s not present\nmigrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType: ## Ensure PHPStan config doesn'\''t contain checkGenericClassInNonGenericObjectType as it'\''s no longer a valid config option\nmigrations-php-set-phpstan-drop-include-async-test-utilities-rules: ## Ensure PHPStan config doesn'\''t contain include for `wyrihaximus/async-test-utilities/rules.neon` as it'\''s now an extension\nmigrations-php-set-phpstan-drop-include-test-utilities-rules: ## Ensure PHPStan config doesn'\''t contain include for `wyrihaximus/async-utilities/rules.neon` as it'\''s now an extension\nmigrations-php-set-phpstan-ensure-config-file-exists: ## Make sure we have a PHPStan config file at `etc/qa/phpstan.neon`\nmigrations-php-set-phpstan-level-max-in-config: ## Ensure PHPStan config has level set to max in `etc/qa/phpstan.neon`\nmigrations-php-set-phpstan-paths-in-config: ## Ensure PHPStan config has the `etc`, `src`, and (optionally) `tests` paths set in `etc/qa/phpstan.neon`\nmigrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended: ## Ensure PHPStan config uses ergebnis.noExtends.classesAllowedToBeExtended not ergebnis.classesAllowedToBeExtended\nmigrations-php-set-phpstan-uncomment-parameters: ## Ensure PHPStan config as parameters not commented out in `etc/qa/phpstan.neon`\nmigrations-php-set-phpunit-ensure-config-file-exists: ## Make sure we have a PHPUnit config file at `etc/qa/phpunit.xml`\nmigrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit: ## Make sure we see all the warnings, deprecations, etc etc that will make PHPunit do a non-happy exit\nmigrations-php-set-phpunit-xsd-path-to-local: ## Ensure that the PHPUnit XDS referred in `etc/qa/phpunit.xml` points to `vendor/phpunit/phpunit/phpunit.xsd` so we don'\''t go over the network\nmigrations-php-set-rector-create-config-if-not-exists: ## Create Rector config file if it doesn'\''t exists at `etc/qa/rector.php`\nmigrations-phpcs-include-examples-directory-when-present: ## Make sure PHPCS runs through `examples` when it exists\nmigrations-renovate-create-config-if-not-exists: ## Create Renovate Config if it doesn'\''t exists at `.github/renovate.json`\nmigrations-renovate-move-config: ## Move `renovate.json` to `.github/renovate.json`\nmigrations-renovate-point-at-correct-config: ## Ensure `.github/renovate.json` points at github>WyriHaximus/renovate-config:php-package instead of local>WyriHaximus/renovate-config\nmigrations-renovate-remove-dependabot-config: ## Make sure we remove `.github/dependabot.yml`\nmigrations-renovate-set-composer-constraint: ## Always keep renovate'\''s `constraints.composer` at `2.x`\nmigrations-renovate-set-php-constraint: ## Always keep renovate'\''s constraints.php in sync with `composer.json`'\''s `config.platform.php`\nmigrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled: ## Ensure we remove the Composer Require Checker config file when composer-dependency-checkers aren'\''t enabled\nmigrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled: ## Ensure we remove the Composer Unused config file when composer-dependency-checkers aren'\''t enabled\nmigrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled: ## Ensure we remove the InfectionPHP config file when unit-tests aren'\''t enabled\nmigrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled: ## Ensure we remove the PHPCSS config file when code-style isn'\''t enabled\nmigrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled: ## Ensure we remove the PHPUnit config file when unit-tests aren'\''t enabled\nmigrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled: ## Ensure we remove the RectorPHP config file when code-style isn'\''t enabled\nmigrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled: ## Ensure we only cs check/fix tests/ if unit-tests is enabled\nmigrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled: ## Ensure we only staticly analyse tests/ with PHPStan if unit-tests is enabled' | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-32s\033[0m %s\n", $$1, $$2}' | tr -d '#' + +help-contrib: ## Show the migrations help #### + @printf "\033[33mUsage:\033[0m\n make [target]\n\n\033[33mTargets:\033[0m\n" + @printf '%b\n' 'composer-require-checker: ## Ensure we require every package used in this package directly\ncomposer-unused: ## Ensure we don'\''t require any package we don'\''t use in this package directly\ncs: ## Check the code for code style issues\ncs-fix: ## Fix any automatically fixable code style issues\nunit-testing: ## Run tests' | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-32s\033[0m %s\n", $$1, $$2}' | tr -d '#' + +task-list-ci: + @echo "[]" + +task-list-ci-all: ## CI: Generate a JSON array of jobs to run on all variations + @echo "[\"composer-validate\",\"syntax-php\",\"cs\",\"stan\",\"unit-testing\",\"mutation-testing\",\"composer-require-checker\",\"composer-unused\",\"backward-compatibility-check\"]" ## Count: 9 + +task-list-ci-dos: ## CI: Generate a JSON array of jobs to run Directly on the OS variations + @echo "[\"unit-testing-raw\"]" ## Count: 1 + +task-list-ci-low: ## CI: Generate a JSON array of jobs to run against the lowest dependencies on the primary threading target + @echo "[\"syntax-php\",\"cs\",\"stan\",\"mutation-testing\"]" ## Count: 4 + +task-list-ci-locked: ## CI: Generate a JSON array of jobs to run against the locked dependencies on the primary threading target + @echo "[\"composer-validate\",\"cs\",\"stan\",\"mutation-testing\",\"composer-require-checker\",\"composer-unused\",\"backward-compatibility-check\"]" ## Count: 7 + +task-list-ci-high: ## CI: Generate a JSON array of jobs to run against the highest dependencies on the primary threading target + @echo "[\"syntax-php\",\"cs\",\"stan\",\"mutation-testing\"]" ## Count: 4 + +supported-features: ## CI: List the features this package supports + @echo "[\"code-style\",\"composer-dependency-checkers\",\"linux\",\"macos\",\"static-analysis\",\"unit-tests\",\"windows\"]" ## Count: 7 + + +## Catch-all for targets that pass through extra arguments (e.g. `make run ls`) +%: + @: + 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..1eb1d1f 100644 --- a/composer.json +++ b/composer.json @@ -1,83 +1,92 @@ { - "name": "api-clients/openapi-client-generator", - "description": "Generate a client based on an OpenAPI spec", - "license": "MIT", - "authors": [ - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com" - } - ], - "require": { - "php": "^8.2", - "api-clients/contracts": "^0.1", - "api-clients/github": "^0.2@dev", - "api-clients/openapi-client-utils": "dev-main", - "ckr/arraymerger": "^3.0", - "codeinc/http-reason-phrase-lookup": "^1.0", - "delight-im/random": "^1.0", - "devizzent/cebe-php-openapi": "^1", - "eventsauce/object-hydrator": "^1.2", - "jawira/case-converter": "^3.5", - "kwn/number-to-words": "^2.6", - "league/openapi-psr7-validator": "^0.21", - "league/uri": "^6.8 || ^7.3", - "nikic/php-parser": "^4.15", - "nunomaduro/termwind": "^1.15", - "ondram/ci-detector": "^4.1", - "phpstan/phpdoc-parser": "^1.22", - "pointybeard/reverse-regex": "1.0.0.3", - "psr/http-message": "^1.1 || ^2 || ^3", - "react/async": "^4.0", - "react/http": "^1.8", - "reactivex/rxphp": "^2.0", - "ringcentral/psr7": "^1.3", - "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" - }, - "autoload": { - "psr-4": { - "ApiClients\\Client\\Github\\": "generated/", - "ApiClients\\Tools\\OpenApiClientGenerator\\": "src/" - } + "name": "api-clients/openapi-client-generator", + "description": "Generate a client based on an OpenAPI spec", + "license": "MIT", + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "require": { + "php": "^8.4", + "api-clients/contracts": "^0.1.0", + "api-clients/github": "^0.2@dev", + "api-clients/openapi-client-utils": "dev-main", + "ckr/arraymerger": "^3.0.0", + "codeinc/http-reason-phrase-lookup": "^1.0.0", + "delight-im/random": "^1.0.0", + "devizzent/cebe-php-openapi": "^1.1.5", + "eventsauce/object-hydrator": "^1.8.", + "jawira/case-converter": "^3.6.0", + "kwn/number-to-words": "^2.12.0", + "league/openapi-psr7-validator": "^0.21.0", + "league/uri": "^6.8 || ^7.3", + "nikic/php-parser": "^5.8.0", + "nunomaduro/termwind": "^2.4.0", + "ondram/ci-detector": "^4.2.0", + "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": "^2.3.3", + "pointybeard/reverse-regex": "1.0.0.4", + "psr/http-message": "^1.1 || ^2 || ^3", + "react/async": "^4.3.00", + "react/http": "^1.11.0", + "reactivex/rxphp": "^2.0", + "ringcentral/psr7": "^1.3", + "symfony/yaml": "^7.4.15", + "twig/twig": "^3.28.0", + "wyrihaximus/react-awaitable-observable": "^1.2.1", + "wyrihaximus/simple-twig": "^2.4.0" + }, + "require-dev": { + "wyrihaximus/async-test-utilities": "^13.5.1", + "wyrihaximus/makefiles": "^0.13.3" + }, + "autoload": { + "psr-4": { + "ApiClients\\Client\\Github\\": "generated/", + "ApiClients\\Tools\\OpenApiClientGenerator\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "ApiClients\\Tests\\Tools\\OpenApiClientGenerator\\": "tests/unit/" + } + }, + "config": { + "allow-plugins": { + "composer/package-versions-deprecated": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "drupol/composer-packages": true, + "ergebnis/composer-normalize": true, + "icanhazstring/composer-unused": true, + "infection/extension-installer": true, + "mindplay/composer-locator": true, + "phpstan/extension-installer": true, + "wyrihaximus/composer-update-bin-autoload-path": true, + "wyrihaximus/makefiles": true, + "wyrihaximus/test-utilities": true }, - "autoload-dev": { - "psr-4": { - "ApiClients\\Tests\\Tools\\OpenApiClientGenerator\\": "tests/unit/" - } + "platform": { + "php": "8.4.13" }, - "bin": [ - "bin/openapi-client-generator" + "sort-packages": true + }, + "scripts": { + "post-install-cmd": [ + "make on-install-or-update || true" ], - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, - "ergebnis/composer-normalize": true, - "infection/extension-installer": true, - "wyrihaximus/composer-update-bin-autoload-path": true - }, - "platform": { - "php": "8.2.13" - } - }, - "extra": { - "wyrihaximus": { - "bin-autoload-path-update": [ - "bin/openapi-client-generator" - ] - } - }, - "scripts": { - "post-install-cmd": [ - "composer normalize" - ], - "post-update-cmd": [ - "composer normalize" - ] - } + "post-update-cmd": [ + "make on-install-or-update || true" + ] + } } diff --git a/composer.lock b/composer.lock index efc2bfc..a61a2bf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,174 +4,8 @@ "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": "6ddee38509eb969113d11cb986e4235f", "packages": [ - { - "name": "amphp/amp", - "version": "v2.6.2", - "source": { - "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ], - "psr-4": { - "Amp\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "https://amphp.org/amp", - "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2022-02-20T17:52:18+00:00" - }, - { - "name": "amphp/byte-stream", - "version": "v1.8.1", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Amp\\ByteStream\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "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" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2021-03-30T17:13:30+00:00" - }, { "name": "api-clients/contracts", "version": "0.1.0", @@ -218,12 +52,12 @@ "source": { "type": "git", "url": "https://github.com/php-api-clients/github.git", - "reference": "13c7dcad79a4d19f8caa9b68fb375f6722a3d76f" + "reference": "f09782df8364bd688d3f1affd617b5829ea8b109" }, "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/f09782df8364bd688d3f1affd617b5829ea8b109", + "reference": "f09782df8364bd688d3f1affd617b5829ea8b109", "shasum": "" }, "require": { @@ -231,7 +65,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 +96,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": "2025-03-27T19:52:19+00:00" }, { "name": "api-clients/openapi-client-utils", @@ -270,12 +104,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 +117,7 @@ "php": "^8.2" }, "require-dev": { - "wyrihaximus/async-test-utilities": "^7.1" + "wyrihaximus/async-test-utilities": "^8" }, "default-branch": true, "type": "library", @@ -313,148 +147,7 @@ "type": "github" } ], - "time": "2023-09-27T07:38:48+00:00" - }, - { - "name": "azjezz/psl", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/azjezz/psl.git", - "reference": "cd599829541caf1bc87fa0b2a3367e050ff1f837" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/azjezz/psl/zipball/cd599829541caf1bc87fa0b2a3367e050ff1f837", - "reference": "cd599829541caf1bc87fa0b2a3367e050ff1f837", - "shasum": "" - }, - "require": { - "ext-bcmath": "*", - "ext-intl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-sodium": "*", - "php": "~8.1.0 || ~8.2.0", - "revolt/event-loop": "^1.0.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.22.0", - "php-coveralls/php-coveralls": "^2.6.0", - "php-standard-library/psalm-plugin": "^2.2.1", - "phpbench/phpbench": "^1.2.14", - "phpunit/phpunit": "^9.6.10", - "roave/infection-static-analysis-plugin": "^1.32.0", - "squizlabs/php_codesniffer": "^3.7.2", - "vimeo/psalm": "^5.13.1" - }, - "suggest": { - "php-standard-library/psalm-plugin": "Psalm integration" - }, - "type": "library", - "extra": { - "thanks": { - "name": "hhvm/hsl", - "url": "https://github.com/hhvm/hsl" - } - }, - "autoload": { - "files": [ - "src/bootstrap.php" - ], - "psr-4": { - "Psl\\": "src/Psl" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "azjezz", - "email": "azjezz@protonmail.com" - } - ], - "description": "PHP Standard Library", - "support": { - "issues": "https://github.com/azjezz/psl/issues", - "source": "https://github.com/azjezz/psl/tree/2.7.0" - }, - "funding": [ - { - "url": "https://opencollective.com/php-standard-library", - "type": "open_collective" - } - ], - "time": "2023-07-19T20:13:26+00:00" - }, - { - "name": "beberlei/assert", - "version": "v3.3.2", - "source": { - "type": "git", - "url": "https://github.com/beberlei/assert.git", - "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/cb70015c04be1baee6f5f5c953703347c0ac1655", - "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "php": "^7.0 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "*", - "phpstan/phpstan": "*", - "phpunit/phpunit": ">=6.0.0", - "yoast/phpunit-polyfills": "^0.1.0" - }, - "suggest": { - "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles" - }, - "type": "library", - "autoload": { - "files": [ - "lib/Assert/functions.php" - ], - "psr-4": { - "Assert\\": "lib/Assert" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de", - "role": "Lead Developer" - }, - { - "name": "Richard Quadling", - "email": "rquadling@gmail.com", - "role": "Collaborator" - } - ], - "description": "Thin assertion library for input validation in business models.", - "keywords": [ - "assert", - "assertion", - "validation" - ], - "support": { - "issues": "https://github.com/beberlei/assert/issues", - "source": "https://github.com/beberlei/assert/tree/v3.3.2" - }, - "time": "2021-12-16T21:41:27+00:00" + "time": "2024-04-02T09:54:21+00:00" }, { "name": "ckr/arraymerger", @@ -546,50 +239,460 @@ "time": "2018-06-12T11:08:54+00:00" }, { - "name": "colinodell/json5", - "version": "v2.3.0", + "name": "delight-im/alphabets", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/colinodell/json5.git", - "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710" + "url": "https://github.com/delight-im/PHP-Alphabets.git", + "reference": "54bbe2672875264e583414446b102a1f84bd5b9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinodell/json5/zipball/15b063f8cb5e6deb15f0cd39123264ec0d19c710", - "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710", + "url": "https://api.github.com/repos/delight-im/PHP-Alphabets/zipball/54bbe2672875264e583414446b102a1f84bd5b9e", + "reference": "54bbe2672875264e583414446b102a1f84bd5b9e", "shasum": "" }, "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "^7.1.3|^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" - }, - "require-dev": { - "mikehaertl/php-shellcommand": "^1.2.5", - "phpstan/phpstan": "^1.4", - "scrutinizer/ocular": "^1.6", - "squizlabs/php_codesniffer": "^2.3 || ^3.0", - "symfony/finder": "^4.4|^5.4|^6.0", - "symfony/phpunit-bridge": "^5.4|^6.0" + "php": ">=5.6.0" }, - "bin": [ - "bin/json5" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, "autoload": { - "files": [ - "src/global.php" - ], "psr-4": { - "ColinODell\\Json5\\": "src" + "Delight\\Alphabets\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Sets of digits or characters that may be used for base conversions, encoding and decoding tasks, and input validation", + "homepage": "https://github.com/delight-im/PHP-Alphabets", + "keywords": [ + "alpha", + "alphabet", + "alphabets", + "alphanumeric", + "ascii", + "base32", + "base58", + "base64", + "base64url", + "base85", + "binary", + "decimal", + "decode", + "decoding", + "encode", + "encoding", + "hex", + "hexadecimal", + "octal" + ], + "support": { + "issues": "https://github.com/delight-im/PHP-Alphabets/issues", + "source": "https://github.com/delight-im/PHP-Alphabets/tree/v1.0.0" + }, + "time": "2019-11-17T23:48:59+00:00" + }, + { + "name": "delight-im/random", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/delight-im/PHP-Random.git", + "reference": "133aed6cc760065c8dbfc4ae0e8bdacfbb6ce273" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/delight-im/PHP-Random/zipball/133aed6cc760065c8dbfc4ae0e8bdacfbb6ce273", + "reference": "133aed6cc760065c8dbfc4ae0e8bdacfbb6ce273", + "shasum": "" + }, + "require": { + "delight-im/alphabets": "^1.0", + "php": ">=7.0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Delight\\Random\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The most convenient way to securely generate anything random in PHP", + "homepage": "https://github.com/delight-im/PHP-Random", + "keywords": [ + "PRNG", + "cryptography", + "csprng", + "generator", + "integers", + "numbers", + "pseudo-random", + "pseudorandom", + "random", + "random-numbers", + "random-strings", + "strings" + ], + "support": { + "issues": "https://github.com/delight-im/PHP-Random/issues", + "source": "https://github.com/delight-im/PHP-Random/tree/v1.0.0" + }, + "time": "2019-11-19T23:07:00+00:00" + }, + { + "name": "devizzent/cebe-php-openapi", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/DEVizzent/cebe-php-openapi.git", + "reference": "6e5fcc8810bfe8ad55d1b40764bff6417f485984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DEVizzent/cebe-php-openapi/zipball/6e5fcc8810bfe8ad55d1b40764bff6417f485984", + "reference": "6e5fcc8810bfe8ad55d1b40764bff6417f485984", + "shasum": "" + }, + "require": { + "ext-json": "*", + "justinrainbow/json-schema": "^5.2 || ^6.0", + "php": ">=7.1.0", + "symfony/yaml": "^3.4 || ^4 || ^5 || ^6 || ^7 || ^8" + }, + "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", + "oai/openapi-specification-3.0": "3.0.3", + "phpstan/phpstan": "^0.12.0", + "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.4 || ^11.4" + }, + "bin": [ + "bin/php-openapi" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "cebe\\openapi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Carsten Brandt", + "email": "mail@cebe.cc", + "homepage": "https://cebe.cc/", + "role": "Creator" + }, + { + "name": "Vicent Valls", + "email": "vizzent@gmail.com" + } + ], + "description": "Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.", + "homepage": "https://github.com/DEVizzent/cebe-php-openapi#readme", + "keywords": [ + "openapi" + ], + "support": { + "issues": "https://github.com/DEVizzent/cebe-php-openapi/issues", + "source": "https://github.com/DEVizzent/cebe-php-openapi" + }, + "time": "2026-01-23T22:38:14+00:00" + }, + { + "name": "doctrine/collections", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/2b44dd4cbca8b5744327de78bafef5945c7e7b5e", + "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^0.5.3 || ^1", + "php": "^7.1.3 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0 || ^10.0", + "phpstan/phpstan": "^1.4.8", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", + "vimeo/psalm": "^4.22" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/collections/issues", + "source": "https://github.com/doctrine/collections/tree/1.8.0" + }, + "time": "2022-09-01T20:12:10+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=14" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^12 || ^14", + "phpstan/phpstan": "1.4.10 || 2.1.30", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.4 || ^13.0", + "psr/log": "^1 || ^2 || ^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.6" + }, + "time": "2026-02-07T07:09:04+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-02-28T11:07:21+00:00" + }, + { + "name": "evenement/evenement", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Evenement\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, + { + "name": "eventsauce/object-hydrator", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/EventSaucePHP/ObjectHydrator.git", + "reference": "29f66149d2b0c57f356ad4fa6dd5f88821d04d9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/EventSaucePHP/ObjectHydrator/zipball/29f66149d2b0c57f356ad4fa6dd5f88821d04d9f", + "reference": "29f66149d2b0c57f356ad4fa6dd5f88821d04d9f", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.4", + "league/construct-finder": "^1.6", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.7", + "phpunit/phpunit": "^9.5.11", + "ramsey/uuid": "^4.2" + }, + "suggest": { + "league/construct-finder": "Find all classes in a directory for the best dumped hydrators." + }, + "type": "library", + "autoload": { + "psr-4": { + "EventSauce\\ObjectHydrator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -598,126 +701,391 @@ ], "authors": [ { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com", - "role": "Developer" + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" } ], - "description": "UTF-8 compatible JSON5 parser for PHP", - "homepage": "https://github.com/colinodell/json5", + "description": "Converts structured data into strict objects.", "keywords": [ - "JSON5", - "json", - "json5_decode", - "json_decode" + "construction", + "constructor", + "hydration", + "mapper" ], "support": { - "issues": "https://github.com/colinodell/json5/issues", - "source": "https://github.com/colinodell/json5/tree/v2.3.0" + "issues": "https://github.com/EventSaucePHP/ObjectHydrator/issues", + "source": "https://github.com/EventSaucePHP/ObjectHydrator/tree/1.8.0" }, "funding": [ { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2026-02-13T21:06:58+00:00" + }, + { + "name": "fig/http-message-util", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message-util.git", + "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", + "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "suggest": { + "psr/http-message": "The package containing the PSR-7 interfaces" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Fig\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "issues": "https://github.com/php-fig/http-message-util/issues", + "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" + }, + "time": "2020-11-24T22:02:12+00:00" + }, + { + "name": "jawira/case-converter", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/jawira/case-converter.git", + "reference": "de9956122568743a83e0fc7e2eaa92c1b0de3f18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jawira/case-converter/zipball/de9956122568743a83e0fc7e2eaa92c1b0de3f18", + "reference": "de9956122568743a83e0fc7e2eaa92c1b0de3f18", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=7.4" + }, + "require-dev": { + "behat/behat": "^3.0", + "phpstan/phpstan": "^v2", + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "pds/skeleton": "PHP Package Development Standards", + "phing/phing": "PHP Build Tool" + }, + "type": "library", + "autoload": { + "psr-4": { + "Jawira\\CaseConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jawira Portugal", + "email": "dev@tugal.be" + } + ], + "description": "Convert strings between 13 naming conventions: Snake case, Camel case, Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Sentence case, Title case and Dot notation.", + "homepage": "https://jawira.github.io/case-converter/", + "keywords": [ + "Ada case", + "Cobol case", + "Macro case", + "Train case", + "camel case", + "dot notation", + "kebab case", + "lower case", + "pascal case", + "sentence case", + "snake case", + "title case", + "upper case" + ], + "support": { + "issues": "https://github.com/jawira/case-converter/issues", + "source": "https://github.com/jawira/case-converter/tree/v3.6.0" + }, + "time": "2025-06-13T21:12:55+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "6.10.0", + "source": { + "type": "git", + "url": "https://github.com/jsonrainbow/json-schema.git", + "reference": "8b1308a9d7bdbdb20ce87ef920f82b4564bb2d33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/8b1308a9d7bdbdb20ce87ef920f82b4564bb2d33", + "reference": "8b1308a9d7bdbdb20ce87ef920f82b4564bb2d33", + "shasum": "" + }, + "require": { + "ext-json": "*", + "marc-mabe/php-enum": "^4.4", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "3.3.0", + "json-schema/json-schema-test-suite": "dev-main", + "marc-mabe/php-enum-phpstan": "^2.0", + "phpspec/prophecy": "^1.19", + "phpstan/phpstan": "^1.12", + "phpunit/phpunit": "^8.5" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" }, { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" }, { - "url": "https://github.com/colinodell", - "type": "github" + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" }, { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" } ], - "time": "2022-12-27T16:44:40+00:00" + "description": "A library to validate a json schema.", + "homepage": "https://github.com/jsonrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/6.10.0" + }, + "time": "2026-06-16T20:50:26+00:00" }, { - "name": "composer-unused/contracts", - "version": "0.3.0", + "name": "kwn/number-to-words", + "version": "2.12.0", "source": { "type": "git", - "url": "https://github.com/composer-unused/contracts.git", - "reference": "5ec448d3ee80735dccad6a21a3266c377d0845ae" + "url": "https://github.com/kwn/number-to-words.git", + "reference": "c4e0cea84574bc0077121ac6a2331c183d6d1cc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer-unused/contracts/zipball/5ec448d3ee80735dccad6a21a3266c377d0845ae", - "reference": "5ec448d3ee80735dccad6a21a3266c377d0845ae", + "url": "https://api.github.com/repos/kwn/number-to-words/zipball/c4e0cea84574bc0077121ac6a2331c183d6d1cc0", + "reference": "c4e0cea84574bc0077121ac6a2331c183d6d1cc0", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.7.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "NumberToWords\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Karol Wnuk", + "email": "k.wnuk@ascetic.pl" + } + ], + "description": "Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.", + "keywords": [ + "currency", + "money", + "number", + "numbers", + "string", + "to", + "words" + ], + "support": { + "issues": "https://github.com/kwn/number-to-words/issues", + "source": "https://github.com/kwn/number-to-words/tree/2.12.0" + }, + "time": "2025-07-01T20:49:04+00:00" + }, + { + "name": "league/openapi-psr7-validator", + "version": "0.21", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/openapi-psr7-validator.git", + "reference": "bccdd3f5037c796fff3ef3f11dcf8c073aaa6192" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/openapi-psr7-validator/zipball/bccdd3f5037c796fff3ef3f11dcf8c073aaa6192", + "reference": "bccdd3f5037c796fff3ef3f11dcf8c073aaa6192", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "devizzent/cebe-php-openapi": "^1.0", + "ext-json": "*", + "league/uri": "^6.3", + "php": ">=7.2", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "psr/http-message": "^1.0", + "psr/http-server-middleware": "^1.0", + "respect/validation": "^1.1.3 || ^2.0", + "riverline/multipart-parser": "^2.0.3", + "symfony/polyfill-php80": "^1.27", + "webmozart/assert": "^1.4" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "guzzlehttp/psr7": "^1.5", + "hansott/psr7-cookies": "^3.0.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-webmozart-assert": "^1", + "phpunit/phpunit": "^7 || ^8 || ^9", + "symfony/cache": "^5.1" }, "type": "library", "autoload": { "psr-4": { - "ComposerUnused\\Contracts\\": "src/" + "League\\OpenAPIValidation\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Andreas Frömer", - "email": "composer-unused@icanhazstring.com" - } + "description": "Validate PSR-7 messages against OpenAPI (3.0.2) specifications expressed in YAML or JSON", + "homepage": "https://github.com/thephpleague/openapi-psr7-validator", + "keywords": [ + "http", + "openapi", + "psr7", + "validation" ], - "description": "Contract repository for composer-unused", "support": { - "issues": "https://github.com/composer-unused/contracts/issues", - "source": "https://github.com/composer-unused/contracts/tree/0.3.0" + "issues": "https://github.com/thephpleague/openapi-psr7-validator/issues", + "source": "https://github.com/thephpleague/openapi-psr7-validator/tree/0.21" }, - "funding": [ - { - "url": "https://github.com/icanhazstring", - "type": "github" - } - ], - "time": "2023-03-17T00:41:49+00:00" + "time": "2023-04-03T21:49:07+00:00" }, { - "name": "composer-unused/symbol-parser", - "version": "0.2.1", + "name": "league/uri", + "version": "6.8.0", "source": { "type": "git", - "url": "https://github.com/composer-unused/symbol-parser.git", - "reference": "a395a555aa38b63cadf9b2f396880ac86abb44a9" + "url": "https://github.com/thephpleague/uri.git", + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer-unused/symbol-parser/zipball/a395a555aa38b63cadf9b2f396880ac86abb44a9", - "reference": "a395a555aa38b63cadf9b2f396880ac86abb44a9", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", "shasum": "" }, "require": { - "composer-unused/contracts": "^0.3", - "nikic/php-parser": "^4.15", - "php": "^7.4 || ^8.0", - "phpstan/phpdoc-parser": "^1.16", - "psr/container": "^1.0 || ^2.0", - "psr/log": "^1.1 || ^2 || ^3", - "symfony/finder": "^4.4 || ^5.3 || ^6.0" + "ext-json": "*", + "league/uri-interfaces": "^2.3", + "php": "^8.1", + "psr/http-message": "^1.0.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.28", - "ext-ds": "*", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6.5", - "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.7.2", - "symfony/serializer": "^5.4" + "friendsofphp/php-cs-fixer": "^v3.9.5", + "nyholm/psr7": "^1.5.1", + "php-http/psr7-integration-tests": "^1.1.1", + "phpbench/phpbench": "^1.2.6", + "phpstan/phpstan": "^1.8.5", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-strict-rules": "^1.4.3", + "phpunit/phpunit": "^9.5.24", + "psr/http-factory": "^1.0.1" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, "autoload": { "psr-4": { - "ComposerUnused\\SymbolParser\\": "src" + "League\\Uri\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -726,67 +1094,86 @@ ], "authors": [ { - "name": "Andreas Frömer", - "email": "composer-unused@icanhazstring.com" + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" } ], - "description": "Toolkit to parse symbols from a composer package", - "homepage": "https://github.com/composer-unused/symbol-parser", + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", "keywords": [ - "composer", - "parser", - "symbol" + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" ], "support": { - "issues": "https://github.com/composer-unused/symbol-parser/issues", - "source": "https://github.com/composer-unused/symbol-parser" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.8.0" }, "funding": [ { - "url": "https://github.com/sponsors/icanhazstring", + "url": "https://github.com/sponsors/nyamsprod", "type": "github" - }, - { - "url": "https://paypal.me/icanhazstring", - "type": "other" } ], - "time": "2023-03-17T00:45:47+00:00" + "time": "2022-09-13T19:58:47+00:00" }, { - "name": "composer/ca-bundle", - "version": "1.3.7", + "name": "league/uri-interfaces", + "version": "2.3.0", "source": { "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", "shasum": "" }, "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" + "ext-json": "*", + "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" + "friendsofphp/php-cs-fixer": "^2.19", + "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan-phpunit": "^0.12.19", + "phpstan/phpstan-strict-rules": "^0.12.9", + "phpunit/phpunit": "^8.5.15 || ^9.5" + }, + "suggest": { + "ext-intl": "to use the IDNA feature", + "symfony/intl": "to use the IDNA feature via Symfony Polyfill" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { "psr-4": { - "Composer\\CaBundle\\": "src" + "League\\Uri\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -795,258 +1182,207 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" } ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" + "rfc3986", + "rfc3987", + "uri", + "url" ], "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" + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/sponsors/nyamsprod", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2023-08-30T09:31:38+00:00" + "time": "2021-06-28T04:27:21+00:00" }, { - "name": "composer/class-map-generator", - "version": "1.1.0", + "name": "marc-mabe/php-enum", + "version": "v4.7.2", "source": { "type": "git", - "url": "https://github.com/composer/class-map-generator.git", - "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9" + "url": "https://github.com/marc-mabe/php-enum.git", + "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/953cc4ea32e0c31f2185549c7d216d7921f03da9", - "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9", + "url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef", + "reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef", "shasum": "" }, "require": { - "composer/pcre": "^2.1 || ^3.1", - "php": "^7.2 || ^8.0", - "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7" + "ext-reflection": "*", + "php": "^7.1 | ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.6", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/filesystem": "^5.4 || ^6", - "symfony/phpunit-bridge": "^5" + "phpbench/phpbench": "^0.16.10 || ^1.0.4", + "phpstan/phpstan": "^1.3.1", + "phpunit/phpunit": "^7.5.20 | ^8.5.22 | ^9.5.11", + "vimeo/psalm": "^4.17.0 | ^5.26.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-3.x": "3.2-dev", + "dev-master": "4.7-dev" } }, "autoload": { "psr-4": { - "Composer\\ClassMapGenerator\\": "src" - } + "MabeEnum\\": "src/" + }, + "classmap": [ + "stubs/Stringable.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" + "name": "Marc Bennewitz", + "email": "dev@mabe.berlin", + "homepage": "https://mabe.berlin/", + "role": "Lead" } ], - "description": "Utilities to scan PHP code and generate class maps.", + "description": "Simple and fast implementation of enumerations with native PHP", + "homepage": "https://github.com/marc-mabe/php-enum", "keywords": [ - "classmap" + "enum", + "enum-map", + "enum-set", + "enumeration", + "enumerator", + "enummap", + "enumset", + "map", + "set", + "type", + "type-hint", + "typehint" ], "support": { - "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.1.0" + "issues": "https://github.com/marc-mabe/php-enum/issues", + "source": "https://github.com/marc-mabe/php-enum/tree/v4.7.2" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2023-06-30T13:58:57+00:00" + "time": "2025-09-14T11:18:39+00:00" }, { - "name": "composer/composer", - "version": "2.6.5", + "name": "nikic/php-parser", + "version": "v5.8.0", "source": { "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "4b0fe89db9e65b1e64df633a992e70a7a215ab33" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/4b0fe89db9e65b1e64df633a992e70a7a215ab33", - "reference": "4b0fe89db9e65b1e64df633a992e70a7a215ab33", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", "shasum": "" }, "require": { - "composer/ca-bundle": "^1.0", - "composer/class-map-generator": "^1.0", - "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2.1 || ^3.1", - "composer/semver": "^3.2.5", - "composer/spdx-licenses": "^1.5.7", - "composer/xdebug-handler": "^2.0.2 || ^3.0.3", - "justinrainbow/json-schema": "^5.2.11", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^2.8 || ^3", - "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/polyfill-php73": "^1.24", - "symfony/polyfill-php80": "^1.24", - "symfony/polyfill-php81": "^1.24", - "symfony/process": "^5.4 || ^6.0 || ^7" + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" }, "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" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" }, "bin": [ - "bin/composer" + "bin/php-parse" ], "type": "library", "extra": { "branch-alias": { - "dev-main": "2.6-dev" - }, - "phpstan": { - "includes": [ - "phpstan/rules.neon" - ] + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "Composer\\": "src/Composer/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" + "name": "Nikita Popov" } ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", + "description": "A PHP parser written in PHP", "keywords": [ - "autoload", - "dependency", - "package" + "parser", + "php" ], "support": { - "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" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2023-10-06T08:11:52+00:00" + "time": "2026-07-04T14:30:18+00:00" }, { - "name": "composer/metadata-minifier", - "version": "1.0.0", + "name": "nunomaduro/termwind", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + "url": "https://github.com/nunomaduro/termwind.git", + "reference": "712a31b768f5daea284c2169a7d227031001b9a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/712a31b768f5daea284c2169a7d227031001b9a8", + "reference": "712a31b768f5daea284c2169a7d227031001b9a8", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "ext-mbstring": "*", + "php": "^8.2", + "symfony/console": "^7.4.4 || ^8.0.4" }, "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "illuminate/console": "^11.47.0", + "laravel/pint": "^1.27.1", + "mockery/mockery": "^1.6.12", + "pestphp/pest": "^2.36.0 || ^3.8.4 || ^4.3.2", + "phpstan/phpstan": "^1.12.32", + "phpstan/phpstan-strict-rules": "^1.6.2", + "symfony/var-dumper": "^7.3.5 || ^8.0.4", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", "extra": { + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] + }, "branch-alias": { - "dev-main": "1.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { + "files": [ + "src/Functions.php" + ], "psr-4": { - "Composer\\MetadataMinifier\\": "src" + "Termwind\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1055,67 +1391,69 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" } ], - "description": "Small utility library that handles metadata minification and expansion.", + "description": "It's like Tailwind CSS, but for the console.", "keywords": [ - "composer", - "compression" + "cli", + "console", + "css", + "package", + "php", + "style" ], "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v2.4.0" }, "funding": [ { - "url": "https://packagist.com", + "url": "https://www.paypal.com/paypalme/enunomaduro", "type": "custom" }, { - "url": "https://github.com/composer", + "url": "https://github.com/nunomaduro", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" + "url": "https://github.com/xiCO2k", + "type": "github" } ], - "time": "2021-04-07T13:37:33+00:00" + "time": "2026-02-16T23:10:27+00:00" }, { - "name": "composer/pcre", - "version": "3.1.1", + "name": "ondram/ci-detector", + "version": "4.2.0", "source": { "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" + "url": "https://github.com/OndraM/ci-detector.git", + "reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "url": "https://api.github.com/repos/OndraM/ci-detector/zipball/8b0223b5ed235fd377c75fdd1bfcad05c0f168b8", + "reference": "8b0223b5ed235fd377c75fdd1bfcad05c0f168b8", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "ergebnis/composer-normalize": "^2.13.2", + "lmc/coding-standard": "^3.0.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.1.0", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpunit/phpunit": "^9.6.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\Pcre\\": "src" + "OndraM\\CiDetector\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1124,68 +1462,77 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Ondřej Machulda", + "email": "ondrej.machulda@gmail.com" } ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "description": "Detect continuous integration environment and provide unified access to properties of current build", "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" + "CircleCI", + "Codeship", + "Wercker", + "adapter", + "appveyor", + "aws", + "aws codebuild", + "azure", + "azure devops", + "azure pipelines", + "bamboo", + "bitbucket", + "buddy", + "ci-info", + "codebuild", + "continuous integration", + "continuousphp", + "devops", + "drone", + "github", + "gitlab", + "interface", + "jenkins", + "pipelines", + "sourcehut", + "teamcity", + "travis" ], "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.1" + "issues": "https://github.com/OndraM/ci-detector/issues", + "source": "https://github.com/OndraM/ci-detector/tree/4.2.0" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2023-10-11T07:11:09+00:00" + "time": "2024-03-12T13:22:30+00:00" }, { - "name": "composer/semver", - "version": "3.4.0", + "name": "openapi-tools/configuration", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "url": "https://github.com/php-openapi-tools/configuration.git", + "reference": "bd53eb2dedff33576dafe8eef8190d1de24aa601" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/php-openapi-tools/configuration/zipball/bd53eb2dedff33576dafe8eef8190d1de24aa601", + "reference": "bd53eb2dedff33576dafe8eef8190d1de24aa601", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "eventsauce/object-hydrator": "^1.8.0", + "jawira/case-converter": "^3.6.0", + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.4" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "wyrihaximus/async-test-utilities": "^13.5.1", + "wyrihaximus/makefiles": "^0.13.3" }, + "default-branch": true, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\Semver\\": "src" + "OpenAPITools\\Configuration\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1194,79 +1541,60 @@ ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], + "description": "Configuration for package generators", "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" + "issues": "https://github.com/php-openapi-tools/configuration/issues", + "source": "https://github.com/php-openapi-tools/configuration/tree/main" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/WyriHaximus", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2026-08-03T18:27:47+00:00" }, { - "name": "composer/spdx-licenses", - "version": "1.5.7", + "name": "openapi-tools/contract", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "c848241796da2abf65837d51dce1fae55a960149" + "url": "https://github.com/php-openapi-tools/contract.git", + "reference": "0cb65a40651a645259d0b49b0ab715f5473ba439" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", - "reference": "c848241796da2abf65837d51dce1fae55a960149", + "url": "https://api.github.com/repos/php-openapi-tools/contract/zipball/0cb65a40651a645259d0b49b0ab715f5473ba439", + "reference": "0cb65a40651a645259d0b49b0ab715f5473ba439", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "nikic/php-parser": "^5.0", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.4" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "wyrihaximus/async-test-utilities": "^13.5.0", + "wyrihaximus/makefiles": "^0.13.3" }, + "default-branch": true, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.x-dev" + "wyrihaximus": { + "supported-features": { + "code-style": false, + "unit-tests": false + } } }, "autoload": { "psr-4": { - "Composer\\Spdx\\": "src" + "OpenAPITools\\Contract\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1275,76 +1603,65 @@ ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], + "description": "Contracts for OpenAPI Tools", "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" + "issues": "https://github.com/php-openapi-tools/contract/issues", + "source": "https://github.com/php-openapi-tools/contract/tree/main" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/WyriHaximus", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2022-05-23T07:37:50+00:00" + "time": "2026-08-03T17:55:52+00:00" }, { - "name": "composer/xdebug-handler", - "version": "3.0.3", + "name": "openapi-tools/gatherer", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "url": "https://github.com/php-openapi-tools/gatherer.git", + "reference": "0e11465aed4264f97ce796c1e97872ea8b684976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/php-openapi-tools/gatherer/zipball/0e11465aed4264f97ce796c1e97872ea8b684976", + "reference": "0e11465aed4264f97ce796c1e97872ea8b684976", "shasum": "" }, "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" + "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": "^5.0", + "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.4", + "pointybeard/reverse-regex": "1.0.0.4", + "psr/http-message": "^1 || ^2 || ^3", + "symfony/yaml": "^7.0" }, "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "openapi-tools/test-data": "dev-main", + "wyrihaximus/async-test-utilities": "^13.5.1", + "wyrihaximus/makefiles": "^0.13.3" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { - "Composer\\XdebugHandler\\": "src" + "OpenAPITools\\Gatherer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1353,70 +1670,72 @@ ], "authors": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], + "description": "Utils for OpenAPI Tools", "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "issues": "https://github.com/php-openapi-tools/gatherer/issues", + "source": "https://github.com/php-openapi-tools/gatherer/tree/main" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/WyriHaximus", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2026-08-04T17:34:46+00:00" }, { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v1.0.0", + "name": "openapi-tools/generator", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/PHPCSStandards/composer-installer.git", - "reference": "4be43904336affa5c2f70744a348312336afd0da" + "url": "https://github.com/php-openapi-tools/generator.git", + "reference": "e20db4a5e2b474f5f25de2efc59f7cefe842009b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", - "reference": "4be43904336affa5c2f70744a348312336afd0da", + "url": "https://api.github.com/repos/php-openapi-tools/generator/zipball/e20db4a5e2b474f5f25de2efc59f7cefe842009b", + "reference": "e20db4a5e2b474f5f25de2efc59f7cefe842009b", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.4", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + "devizzent/cebe-php-openapi": "^1.1", + "ext-hash": "^8.4", + "nikic/php-parser": "^5.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.4" }, "require-dev": { - "composer/composer": "*", - "ext-json": "*", - "ext-zip": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0", - "yoast/phpunit-polyfills": "^1.0" + "openapi-tools/generator-hydrator": "dev-main", + "openapi-tools/generator-schema": "dev-main", + "openapi-tools/generator-templates": "dev-main", + "shipmonk/coverage-guard": "^1.1.0", + "wyrihaximus/async-test-utilities": "^13.5.1", + "wyrihaximus/makefiles": "^0.13.3" }, - "type": "composer-plugin", + "default-branch": true, + "bin": [ + "bin/openapi-generator" + ], + "type": "library", "extra": { - "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "wyrihaximus": { + "supported-features": { + "windows": false + } + } }, "autoload": { "psr-4": { - "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "OpenAPITools\\Generator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1425,193 +1744,176 @@ ], "authors": [ { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], + "description": "Package generation tool for OpenAPI Spec based packages", "support": { - "issues": "https://github.com/PHPCSStandards/composer-installer/issues", - "source": "https://github.com/PHPCSStandards/composer-installer" + "issues": "https://github.com/php-openapi-tools/generator/issues", + "source": "https://github.com/php-openapi-tools/generator/tree/main" }, - "time": "2023-01-05T11:28:13+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-08-04T18:14:27+00:00" }, { - "name": "delight-im/alphabets", - "version": "v1.0.0", + "name": "openapi-tools/generator-hydrator", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/delight-im/PHP-Alphabets.git", - "reference": "54bbe2672875264e583414446b102a1f84bd5b9e" + "url": "https://github.com/php-openapi-tools/generator-hydrator.git", + "reference": "8aec5a9193244874d1d5ba293c9094417553db9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/delight-im/PHP-Alphabets/zipball/54bbe2672875264e583414446b102a1f84bd5b9e", - "reference": "54bbe2672875264e583414446b102a1f84bd5b9e", + "url": "https://api.github.com/repos/php-openapi-tools/generator-hydrator/zipball/8aec5a9193244874d1d5ba293c9094417553db9a", + "reference": "8aec5a9193244874d1d5ba293c9094417553db9a", "shasum": "" }, "require": { - "php": ">=5.6.0" + "eventsauce/object-hydrator": "^1.5", + "nikic/php-parser": "^5.0", + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.4" + }, + "require-dev": { + "openapi-tools/configuration": "dev-main", + "openapi-tools/gatherer": "dev-main", + "openapi-tools/generator-schema": "dev-main", + "openapi-tools/test-data": "dev-main", + "wyrihaximus/async-test-utilities": "^13.5.1", + "wyrihaximus/makefiles": "^0.13.3" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { - "Delight\\Alphabets\\": "src/" + "OpenAPITools\\Generator\\Hydrator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Sets of digits or characters that may be used for base conversions, encoding and decoding tasks, and input validation", - "homepage": "https://github.com/delight-im/PHP-Alphabets", - "keywords": [ - "alpha", - "alphabet", - "alphabets", - "alphanumeric", - "ascii", - "base32", - "base58", - "base64", - "base64url", - "base85", - "binary", - "decimal", - "decode", - "decoding", - "encode", - "encoding", - "hex", - "hexadecimal", - "octal" + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } ], + "description": "Schema (+ contract + error) generator", "support": { - "issues": "https://github.com/delight-im/PHP-Alphabets/issues", - "source": "https://github.com/delight-im/PHP-Alphabets/tree/v1.0.0" + "issues": "https://github.com/php-openapi-tools/generator-hydrator/issues", + "source": "https://github.com/php-openapi-tools/generator-hydrator/tree/main" }, - "time": "2019-11-17T23:48:59+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-08-04T06:10:34+00:00" }, { - "name": "delight-im/random", - "version": "v1.0.0", + "name": "openapi-tools/generator-schema", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/delight-im/PHP-Random.git", - "reference": "133aed6cc760065c8dbfc4ae0e8bdacfbb6ce273" + "url": "https://github.com/php-openapi-tools/generator-schema.git", + "reference": "7d67b4baa6c180a76f78de2ca9b2876d8b6eb96b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/delight-im/PHP-Random/zipball/133aed6cc760065c8dbfc4ae0e8bdacfbb6ce273", - "reference": "133aed6cc760065c8dbfc4ae0e8bdacfbb6ce273", + "url": "https://api.github.com/repos/php-openapi-tools/generator-schema/zipball/7d67b4baa6c180a76f78de2ca9b2876d8b6eb96b", + "reference": "7d67b4baa6c180a76f78de2ca9b2876d8b6eb96b", "shasum": "" }, "require": { - "delight-im/alphabets": "^1.0", - "php": ">=7.0.0" + "eventsauce/object-hydrator": "^1.5", + "ext-json": "^8.4", + "nikic/php-parser": "^5.0", + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.4" }, + "require-dev": { + "openapi-tools/configuration": "dev-main", + "openapi-tools/gatherer": "dev-main", + "openapi-tools/test-data": "dev-main", + "wyrihaximus/async-test-utilities": "^13.5.1", + "wyrihaximus/makefiles": "^0.13.3" + }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { - "Delight\\Random\\": "src/" + "OpenAPITools\\Generator\\Schema\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "The most convenient way to securely generate anything random in PHP", - "homepage": "https://github.com/delight-im/PHP-Random", - "keywords": [ - "PRNG", - "cryptography", - "csprng", - "generator", - "integers", - "numbers", - "pseudo-random", - "pseudorandom", - "random", - "random-numbers", - "random-strings", - "strings" + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } ], + "description": "Schema (+ contract + error) generator", "support": { - "issues": "https://github.com/delight-im/PHP-Random/issues", - "source": "https://github.com/delight-im/PHP-Random/tree/v1.0.0" + "issues": "https://github.com/php-openapi-tools/generator-schema/issues", + "source": "https://github.com/php-openapi-tools/generator-schema/tree/main" }, - "time": "2019-11-19T23:07:00+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-08-04T05:33:39+00:00" }, { - "name": "devizzent/cebe-php-openapi", - "version": "1.0.1", + "name": "openapi-tools/generator-templates", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/DEVizzent/cebe-php-openapi.git", - "reference": "72b48264eaeb7afb01fae80e26e99243ab6d33f1" + "url": "https://github.com/php-openapi-tools/generator-templates.git", + "reference": "8bb750c99b5002af17a4cd431c0a7b2efa0b716c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DEVizzent/cebe-php-openapi/zipball/72b48264eaeb7afb01fae80e26e99243ab6d33f1", - "reference": "72b48264eaeb7afb01fae80e26e99243ab6d33f1", + "url": "https://api.github.com/repos/php-openapi-tools/generator-templates/zipball/8bb750c99b5002af17a4cd431c0a7b2efa0b716c", + "reference": "8bb750c99b5002af17a4cd431c0a7b2efa0b716c", "shasum": "" }, "require": { - "ext-json": "*", - "justinrainbow/json-schema": "^5.2", - "php": ">=7.1.0", - "symfony/yaml": "^3.4 || ^4 || ^5 || ^6" - }, - "conflict": { - "symfony/yaml": "3.4.0 - 3.4.4 || 4.0.0 - 4.4.17 || 5.0.0 - 5.1.9 || 5.2.0" + "openapi-tools/contract": "dev-main", + "openapi-tools/representation": "dev-main", + "openapi-tools/utils": "dev-main", + "php": "^8.4", + "wyrihaximus/simple-twig": "^2.1" }, "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" + "openapi-tools/configuration": "dev-main", + "openapi-tools/gatherer": "dev-main", + "openapi-tools/test-data": "dev-main", + "wyrihaximus/async-test-utilities": "^13.5.1", + "wyrihaximus/makefiles": "^0.13.3" }, - "bin": [ - "bin/php-openapi" - ], + "default-branch": true, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, "autoload": { "psr-4": { - "cebe\\openapi\\": "src/" + "OpenAPITools\\Generator\\Templates\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1620,148 +1922,160 @@ ], "authors": [ { - "name": "Carsten Brandt", - "email": "mail@cebe.cc", - "homepage": "https://cebe.cc/", - "role": "Creator" - }, - { - "name": "Vicent Valls", - "email": "vizzent@gmail.com" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.", - "homepage": "https://github.com/DEVizzent/cebe-php-openapi#readme", - "keywords": [ - "openapi" - ], + "description": "Templates generator", "support": { - "issues": "https://github.com/DEVizzent/cebe-php-openapi/issues", - "source": "https://github.com/DEVizzent/cebe-php-openapi" + "issues": "https://github.com/php-openapi-tools/generator-templates/issues", + "source": "https://github.com/php-openapi-tools/generator-templates/tree/main" }, - "time": "2023-07-12T09:00:33+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-08-03T20:27:35+00:00" }, { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", + "name": "openapi-tools/registry", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + "url": "https://github.com/php-openapi-tools/registry.git", + "reference": "c12525631e2d2ff29a43f86a4c19b491ada55c24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "url": "https://api.github.com/repos/php-openapi-tools/registry/zipball/c12525631e2d2ff29a43f86a4c19b491ada55c24", + "reference": "c12525631e2d2ff29a43f86a4c19b491ada55c24", "shasum": "" }, "require": { - "php": ">=5.3.2" + "devizzent/cebe-php-openapi": "^1", + "ext-json": "^8.4", + "openapi-tools/utils": "dev-main", + "php": "^8.4" }, "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + "wyrihaximus/makefiles": "^0.13.3", + "wyrihaximus/test-utilities": "^13.5.1" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { - "XdgBaseDir\\": "src/" + "OpenAPITools\\Registry\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "implementation of xdg base directory specification for php", + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Class Registries for OpenAPI Tools", "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + "issues": "https://github.com/php-openapi-tools/registry/issues", + "source": "https://github.com/php-openapi-tools/registry/tree/main" }, - "time": "2019-12-04T15:06:13+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-08-03T18:20:29+00:00" }, { - "name": "doctrine/coding-standard", - "version": "12.0.0", + "name": "openapi-tools/representation", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/doctrine/coding-standard.git", - "reference": "1b2b7dc58c68833af481fb9325c25abd40681c79" + "url": "https://github.com/php-openapi-tools/representation.git", + "reference": "a320cbfac31e386a60cae4ab7a7e17bb2960b0c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/1b2b7dc58c68833af481fb9325c25abd40681c79", - "reference": "1b2b7dc58c68833af481fb9325c25abd40681c79", + "url": "https://api.github.com/repos/php-openapi-tools/representation/zipball/a320cbfac31e386a60cae4ab7a7e17bb2960b0c9", + "reference": "a320cbfac31e386a60cae4ab7a7e17bb2960b0c9", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0.0", - "php": "^7.2 || ^8.0", - "slevomat/coding-standard": "^8.11", - "squizlabs/php_codesniffer": "^3.7" + "devizzent/cebe-php-openapi": "^1", + "nikic/php-parser": "^5.8", + "openapi-tools/utils": "dev-main", + "php": "^8.4" + }, + "require-dev": { + "wyrihaximus/async-test-utilities": "^13.5.0", + "wyrihaximus/makefiles": "^0.13.3" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "OpenAPITools\\Representation\\": "src/" + } }, - "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Steve Müller", - "email": "st.mueller@dzh-online.de" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.", - "homepage": "https://www.doctrine-project.org/projects/coding-standard.html", - "keywords": [ - "checks", - "code", - "coding", - "cs", - "dev", - "doctrine", - "rules", - "sniffer", - "sniffs", - "standard", - "style" - ], + "description": "User friendly OpenAPI Spec representation", "support": { - "issues": "https://github.com/doctrine/coding-standard/issues", - "source": "https://github.com/doctrine/coding-standard/tree/12.0.0" + "issues": "https://github.com/php-openapi-tools/representation/issues", + "source": "https://github.com/php-openapi-tools/representation/tree/main" }, - "time": "2023-04-24T17:43:28+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-08-03T15:18:51+00:00" }, { - "name": "doctrine/collections", - "version": "1.8.0", + "name": "openapi-tools/utils", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e" + "url": "https://github.com/php-openapi-tools/utils.git", + "reference": "e73e56b1951408d7c25269a312bceeac0f8d8a17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/2b44dd4cbca8b5744327de78bafef5945c7e7b5e", - "reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e", + "url": "https://api.github.com/repos/php-openapi-tools/utils/zipball/e73e56b1951408d7c25269a312bceeac0f8d8a17", + "reference": "e73e56b1951408d7c25269a312bceeac0f8d8a17", "shasum": "" }, "require": { - "doctrine/deprecations": "^0.5.3 || ^1", - "php": "^7.1.3 || ^8.0" + "eventsauce/object-hydrator": "^1.8.0", + "ext-json": "^8.4", + "jawira/case-converter": "^3.6.0", + "php": "^8.4" }, "require-dev": { - "doctrine/coding-standard": "^9.0 || ^10.0", - "phpstan/phpstan": "^1.4.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", - "vimeo/psalm": "^4.22" + "wyrihaximus/async-test-utilities": "^13.5.0", + "wyrihaximus/makefiles": "^0.13.3" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + "OpenAPITools\\Utils\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1770,118 +2084,102 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "keywords": [ - "array", - "collections", - "iterators", - "php" - ], + "description": "Utils for OpenAPI Tools", "support": { - "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/1.8.0" + "issues": "https://github.com/php-openapi-tools/utils/issues", + "source": "https://github.com/php-openapi-tools/utils/tree/main" }, - "time": "2022-09-01T20:12:10+00:00" + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-08-03T14:47:34+00:00" }, { - "name": "doctrine/deprecations", - "version": "1.1.2", + "name": "phpstan/phpdoc-parser", + "version": "2.3.3", "source": { "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", + "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^5.3.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "symfony/process": "^5.2" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", + "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.3" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2026-07-08T07:01:06+00:00" }, { - "name": "doctrine/instantiator", - "version": "2.0.0", + "name": "pointybeard/reverse-regex", + "version": "1.0.0.4", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + "url": "https://github.com/pointybeard-forks/reverse-regex.git", + "reference": "c3cf66460cd827c1c4814dfb4e5d6def6db438ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "url": "https://api.github.com/repos/pointybeard-forks/reverse-regex/zipball/c3cf66460cd827c1c4814dfb4e5d6def6db438ef", + "reference": "c3cf66460cd827c1c4814dfb4e5d6def6db438ef", "shasum": "" }, "require": { - "php": "^8.1" + "doctrine/collections": "^1.6", + "doctrine/lexer": "^1.2", + "php": ">=7.2", + "symfony/polyfill-mbstring": "^1.23" }, "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "damianopetrungaro/php-commitizen": "^0.1.2", + "friendsofphp/php-cs-fixer": "^3.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "^3.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "PHPStats\\": "src/PHPStats", + "ReverseRegex\\": "src/ReverseRegex" } }, "notification-url": "https://packagist.org/downloads/", @@ -1890,64 +2188,57 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Alannah Kearney", + "email": "hi@alannahkearney.com", + "homepage": "https://github.com/pointybeard" + }, + { + "name": "Lewis Dyer", + "email": "getintouch@icomefromthenet.com", + "homepage": "http://www.icomefromthenet.com" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Convert Regular Expressions into text, for testing", + "homepage": "http://github.com/pointybeard-forks/ReverseRegex", "keywords": [ - "constructor", - "instantiate" + "generator", + "regex", + "test data", + "testing" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + "issues": "https://github.com/pointybeard-forks/ReverseRegex/issues", + "source": "https://github.com/pointybeard-forks/reverse-regex/tree/1.0.0.4", + "wiki": "https://github.com/pointybeard-forks/ReverseRegex/wiki" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" + "time": "2024-04-17T03:40:03+00:00" }, { - "name": "doctrine/lexer", - "version": "1.2.3", + "name": "psr/cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "php": ">=8.0.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1956,96 +2247,100 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "description": "Common interface for caching libraries", "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" + "cache", + "psr", + "psr-6" ], "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "time": "2022-02-28T11:07:21+00:00" + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" }, { - "name": "ergebnis/composer-normalize", - "version": "2.39.0", + "name": "psr/http-message", + "version": "1.1", "source": { "type": "git", - "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "a878360bc8cb5cb440b9381f72b0aaa125f937c7" + "url": "https://github.com/php-fig/http-message.git", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/a878360bc8cb5cb440b9381f72b0aaa125f937c7", - "reference": "a878360bc8cb5cb440b9381f72b0aaa125f937c7", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "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", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "localheinz/diff": "^1.1.1", - "php": "~8.1.0 || ~8.2.0 || ~8.3.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" + "php": "^7.2 || ^8.0" }, - "type": "composer-plugin", + "type": "library", "extra": { - "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - }, - "plugin-optional": true + "branch-alias": { + "dev-master": "1.1.x-dev" + } }, "autoload": { "psr-4": { - "Ergebnis\\Composer\\Normalize\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2054,66 +2349,52 @@ ], "authors": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Provides a composer plugin for normalizing composer.json.", - "homepage": "https://github.com/ergebnis/composer-normalize", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "composer", - "normalize", - "normalizer", - "plugin" + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" ], "support": { - "issues": "https://github.com/ergebnis/composer-normalize/issues", - "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/composer-normalize" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2023-10-10T15:43:27+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { - "name": "ergebnis/json", - "version": "1.1.0", + "name": "psr/http-server-handler", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/ergebnis/json.git", - "reference": "9f2b9086c43b189d7044a5b6215a931fb6e9125d" + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json/zipball/9f2b9086c43b189d7044a5b6215a931fb6e9125d", - "reference": "9f2b9086c43b189d7044a5b6215a931fb6e9125d", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.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" + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" + "branch-alias": { + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Ergebnis\\Json\\": "src/" + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2122,68 +2403,55 @@ ], "authors": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Provides a Json value object for representing a valid JSON string.", - "homepage": "https://github.com/ergebnis/json", + "description": "Common interface for HTTP server-side request handler", "keywords": [ - "json" + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" ], "support": { - "issues": "https://github.com/ergebnis/json/issues", - "security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json" + "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" }, - "time": "2023-10-10T07:57:48+00:00" + "time": "2023-04-10T20:06:20+00:00" }, { - "name": "ergebnis/json-normalizer", - "version": "4.3.0", + "name": "psr/http-server-middleware", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd" + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", - "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", "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", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "php": "~8.1.0 || ~8.2.0 || ~8.3.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" - }, - "suggest": { - "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/http-server-handler": "^1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { - "Ergebnis\\Json\\Normalizer\\": "src/" + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2192,64 +2460,57 @@ ], "authors": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", - "homepage": "https://github.com/ergebnis/json-normalizer", + "description": "Common interface for HTTP server-side middleware", "keywords": [ - "json", - "normalizer" + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" ], "support": { - "issues": "https://github.com/ergebnis/json-normalizer/issues", - "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-normalizer" + "issues": "https://github.com/php-fig/http-server-middleware/issues", + "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" }, - "time": "2023-10-10T15:15:03+00:00" + "time": "2023-04-11T06:14:47+00:00" }, { - "name": "ergebnis/json-pointer", - "version": "3.3.0", + "name": "react/async", + "version": "v4.3.0", "source": { "type": "git", - "url": "https://github.com/ergebnis/json-pointer.git", - "reference": "8e517faefc06b7c761eaa041febef51a9375819a" + "url": "https://github.com/reactphp/async.git", + "reference": "635d50e30844a484495713e8cb8d9e079c0008a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/8e517faefc06b7c761eaa041febef51a9375819a", - "reference": "8e517faefc06b7c761eaa041febef51a9375819a", + "url": "https://api.github.com/repos/reactphp/async/zipball/635d50e30844a484495713e8cb8d9e079c0008a5", + "reference": "635d50e30844a484495713e8cb8d9e079c0008a5", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": ">=8.1", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.8 || ^1.2.1" }, "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" + "phpstan/phpstan": "1.10.39", + "phpunit/phpunit": "^9.6" }, "type": "library", - "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Ergebnis\\Json\\Pointer\\": "src/" + "React\\Async\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2258,59 +2519,68 @@ ], "authors": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Provides JSON pointer as a value object.", - "homepage": "https://github.com/ergebnis/json-pointer", + "description": "Async utilities and fibers for ReactPHP", "keywords": [ - "RFC6901", - "json", - "pointer" + "async", + "reactphp" ], "support": { - "issues": "https://github.com/ergebnis/json-pointer/issues", - "security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-pointer" + "issues": "https://github.com/reactphp/async/issues", + "source": "https://github.com/reactphp/async/tree/v4.3.0" }, - "time": "2023-10-10T14:41:06+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-04T14:40:02+00:00" }, { - "name": "ergebnis/json-printer", - "version": "3.4.0", + "name": "react/cache", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/ergebnis/json-printer.git", - "reference": "05841593d72499de4f7ce4034a237c77e470558f" + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/05841593d72499de4f7ce4034a237c77e470558f", - "reference": "05841593d72499de4f7ce4034a237c77e470558f", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", "shasum": "" }, "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" }, "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" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { "psr-4": { - "Ergebnis\\Json\\Printer\\": "src/" + "React\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2319,69 +2589,74 @@ ], "authors": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Provides a JSON printer, allowing for flexible indentation.", - "homepage": "https://github.com/ergebnis/json-printer", + "description": "Async, Promise-based cache interface for ReactPHP", "keywords": [ - "formatter", - "json", - "printer" + "cache", + "caching", + "promise", + "reactphp" ], "support": { - "issues": "https://github.com/ergebnis/json-printer/issues", - "security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-printer" + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" }, - "time": "2023-10-10T07:42:48+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" }, { - "name": "ergebnis/json-schema-validator", - "version": "4.1.0", + "name": "react/dns", + "version": "v1.14.0", "source": { "type": "git", - "url": "https://github.com/ergebnis/json-schema-validator.git", - "reference": "d568ed85d1cdc2e49d650c2fc234dc2516f3f25b" + "url": "https://github.com/reactphp/dns.git", + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/d568ed85d1cdc2e49d650c2fc234dc2516f3f25b", - "reference": "d568ed85d1cdc2e49d650c2fc234dc2516f3f25b", + "url": "https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3", + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3", "shasum": "" }, "require": { - "ergebnis/json": "^1.0.1", - "ergebnis/json-pointer": "^3.2.0", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7 || ^1.2.1" }, "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" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" }, "type": "library", - "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, "autoload": { "psr-4": { - "Ergebnis\\Json\\SchemaValidator\\": "src/" + "React\\Dns\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2390,72 +2665,72 @@ ], "authors": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", - "homepage": "https://github.com/ergebnis/json-schema-validator", + "description": "Async DNS resolver for ReactPHP", "keywords": [ - "json", - "schema", - "validator" + "async", + "dns", + "dns-resolver", + "reactphp" ], "support": { - "issues": "https://github.com/ergebnis/json-schema-validator/issues", - "security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-schema-validator" + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.14.0" }, - "time": "2023-10-10T14:16:57+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-11-18T19:34:28+00:00" }, { - "name": "ergebnis/phpstan-rules", - "version": "2.1.0", + "name": "react/event-loop", + "version": "v1.6.0", "source": { "type": "git", - "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "119e229c48688946450ccca9f1c57c9ca4fb6f02" + "url": "https://github.com/reactphp/event-loop.git", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/119e229c48688946450ccca9f1c57c9ca4fb6f02", - "reference": "119e229c48688946450ccca9f1c57c9ca4fb6f02", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a", "shasum": "" }, "require": { - "ext-mbstring": "*", - "nikic/php-parser": "^4.2.3", - "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", - "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpunit/phpunit": "^10.3.2", - "psalm/plugin-phpunit": "~0.18.4", - "psr/container": "^1.1.2", - "rector/rector": "~0.17.13", - "vimeo/psalm": "^5.14.1" + "php": ">=5.3.0" }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] - } + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" }, + "type": "library", "autoload": { "psr-4": { - "Ergebnis\\PHPStan\\Rules\\": "src/" + "React\\EventLoop\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2464,47 +2739,80 @@ ], "authors": [ { - "name": "Andreas Möller", - "email": "am@localheinz.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Provides additional rules for phpstan/phpstan.", - "homepage": "https://github.com/ergebnis/phpstan-rules", + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", "keywords": [ - "PHPStan", - "phpstan-extreme-rules", - "phpstan-rules" + "asynchronous", + "event-loop" ], "support": { - "issues": "https://github.com/ergebnis/phpstan-rules/issues", - "source": "https://github.com/ergebnis/phpstan-rules" + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.6.0" }, - "time": "2023-08-17T10:28:37+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-11-17T20:46:25+00:00" }, { - "name": "evenement/evenement", - "version": "v3.0.2", + "name": "react/http", + "version": "v1.11.0", "source": { "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + "url": "https://github.com/reactphp/http.git", + "reference": "8db02de41dcca82037367f67a2d4be365b1c4db9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "url": "https://api.github.com/repos/reactphp/http/zipball/8db02de41dcca82037367f67a2d4be365b1c4db9", + "reference": "8db02de41dcca82037367f67a2d4be365b1c4db9", "shasum": "" }, "require": { - "php": ">=7.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "fig/http-message-util": "^1.1", + "php": ">=5.3.0", + "psr/http-message": "^1.0", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.3 || ^1.2.1", + "react/socket": "^1.16", + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^9 || ^6" + "clue/http-proxy-react": "^1.8", + "clue/reactphp-ssh-proxy": "^1.4", + "clue/socks-react": "^1.4", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.2 || ^3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.11" }, "type": "library", "autoload": { "psr-4": { - "Evenement\\": "src/" + "React\\Http\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2513,54 +2821,80 @@ ], "authors": [ { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Événement is a very simple event dispatching library for PHP", + "description": "Event-driven, streaming HTTP client and server implementation for ReactPHP", "keywords": [ - "event-dispatcher", - "event-emitter" + "async", + "client", + "event-driven", + "http", + "http client", + "http server", + "https", + "psr-7", + "reactphp", + "server", + "streaming" ], "support": { - "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/v3.0.2" + "issues": "https://github.com/reactphp/http/issues", + "source": "https://github.com/reactphp/http/tree/v1.11.0" }, - "time": "2023-08-08T05:53:35+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-11-20T15:24:08+00:00" }, { - "name": "eventsauce/object-hydrator", - "version": "1.4.0", + "name": "react/promise", + "version": "v3.3.0", "source": { "type": "git", - "url": "https://github.com/EventSaucePHP/ObjectHydrator.git", - "reference": "743ee4524d1a3d7b381ef9f61afcb18e0cc81cb0" + "url": "https://github.com/reactphp/promise.git", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/EventSaucePHP/ObjectHydrator/zipball/743ee4524d1a3d7b381ef9f61afcb18e0cc81cb0", - "reference": "743ee4524d1a3d7b381ef9f61afcb18e0cc81cb0", + "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": "^8.0" + "php": ">=7.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.4", - "league/construct-finder": "^1.1", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.7", - "phpunit/phpunit": "^9.5.11", - "ramsey/uuid": "^4.2" - }, - "suggest": { - "league/construct-finder": "Find all classes in a directory for the best dumped hydrators." + "phpstan/phpstan": "1.12.28 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "EventSauce\\ObjectHydrator\\": "src/" + "React\\Promise\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2569,162 +2903,237 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Converts structured data into strict objects.", + "description": "A lightweight implementation of CommonJS Promises/A for PHP", "keywords": [ - "construction", - "constructor", - "hydration", - "mapper" + "promise", + "promises" ], "support": { - "issues": "https://github.com/EventSaucePHP/ObjectHydrator/issues", - "source": "https://github.com/EventSaucePHP/ObjectHydrator/tree/1.4.0" + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.3.0" }, "funding": [ { - "url": "https://github.com/frankdejonge", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2023-08-03T07:27:58+00:00" + "time": "2025-08-19T18:57:03+00:00" }, { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.1", + "name": "react/socket", + "version": "v1.17.0", "source": { "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + "url": "https://github.com/reactphp/socket.git", + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "url": "https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08", + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08", "shasum": "" }, "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.13", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" + "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.11" }, "type": "library", "autoload": { "psr-4": { - "AdvancedJsonRpc\\": "lib/" + "React\\Socket\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "ISC" + "MIT" ], "authors": [ { - "name": "Felix Becker", - "email": "felix.b@outlook.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "A more advanced JSONRPC implementation", + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "keywords": [ + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.17.0" }, - "time": "2021-06-11T22:34:44+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2025-11-19T20:47:34+00:00" }, { - "name": "felixfbecker/language-server-protocol", - "version": "v1.5.2", + "name": "react/stream", + "version": "v1.4.0", "source": { "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", - "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", "shasum": "" }, "require": { - "php": ">=7.1" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" }, "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { - "LanguageServerProtocol\\": "src/" + "React\\Stream\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "ISC" + "MIT" ], "authors": [ { - "name": "Felix Becker", - "email": "felix.b@outlook.com" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "PHP classes for the Language Server Protocol", + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", "keywords": [ - "language", - "microsoft", - "php", - "server" + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" ], "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" }, - "time": "2022-03-02T22:36:06+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-11T12:45:25+00:00" }, { - "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "name": "reactivex/rxphp", + "version": "2.1.0", "source": { "type": "git", - "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "url": "https://github.com/ReactiveX/RxPHP.git", + "reference": "f0a64efd0d3a70d3d8cc55396a84bc43116b7ba1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/ReactiveX/RxPHP/zipball/f0a64efd0d3a70d3d8cc55396a84bc43116b7ba1", + "reference": "f0a64efd0d3a70d3d8cc55396a84bc43116b7ba1", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=7.1.0", + "react/promise": "^3 || ~2.2" }, "require-dev": { - "fidry/makefile": "^0.2.0", - "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", - "webmozarts/strict-phpunit": "^7.5" + "phpunit/phpunit": "^8.5 || ^9", + "react/event-loop": "^1.0 || ^0.5 || ^0.4.2", + "rector/rector": "^2.0", + "satooshi/php-coveralls": "~1.0" + }, + "suggest": { + "react/event-loop": "Used for scheduling async operations" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "psr-4": { - "Fidry\\CpuCoreCounter\\": "src/" + "Rx\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2733,56 +3142,67 @@ ], "authors": [ { - "name": "Théo FIDRY", - "email": "theo.fidry@gmail.com" + "name": "Alexander", + "email": "iam.asm89@gmail.com" + }, + { + "name": "David Dan", + "email": "davidwdan@gmail.com" + }, + { + "name": "Matt Bonneau", + "email": "matt@bonneau.net" } ], - "description": "Tiny utility to get the number of CPU cores.", + "description": "Reactive extensions for php.", + "homepage": "https://github.com/ReactiveX/RxPHP", "keywords": [ - "CPU", - "core" + "extensions", + "reactive", + "rx" ], "support": { - "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "issues": "https://github.com/ReactiveX/RxPHP/issues", + "source": "https://github.com/ReactiveX/RxPHP/tree/2.1.0" }, - "funding": [ - { - "url": "https://github.com/theofidry", - "type": "github" - } - ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2025-10-27T20:55:39+00:00" }, { - "name": "fig/http-message-util", - "version": "1.1.5", + "name": "respect/stringifier", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message-util.git", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" + "url": "https://github.com/Respect/Stringifier.git", + "reference": "e88515f675b373596d5dcdd9dc6103b8504c7ca5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", + "url": "https://api.github.com/repos/Respect/Stringifier/zipball/e88515f675b373596d5dcdd9dc6103b8504c7ca5", + "reference": "e88515f675b373596d5dcdd9dc6103b8504c7ca5", "shasum": "" }, "require": { - "php": "^5.3 || ^7.0 || ^8.0" + "php": "^8.1" }, - "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" + "require-dev": { + "malukenho/docheader": "^0.1.7", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "^10.0", + "respect/coding-standard": "^4.0", + "squizlabs/php_codesniffer": "^3.7" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, "autoload": { + "files": [ + "src/stringify.php" + ], "psr-4": { - "Fig\\Http\\Message\\": "src/" + "Respect\\Stringifier\\": "src/", + "Respect\\Stringifier\\Test\\": "tests/src/", + "Respect\\Stringifier\\Test\\Unit\\": "tests/unit" } }, "notification-url": "https://packagist.org/downloads/", @@ -2791,61 +3211,65 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Respect/Stringifier Contributors", + "homepage": "https://github.com/Respect/Stringifier/graphs/contributors" } ], - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "description": "Converts any value to a string", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "respect", + "stringifier", + "stringify" ], "support": { - "issues": "https://github.com/php-fig/http-message-util/issues", - "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" + "issues": "https://github.com/Respect/Stringifier/issues", + "source": "https://github.com/Respect/Stringifier/tree/1.0.0" }, - "time": "2020-11-24T22:02:12+00:00" + "time": "2023-04-12T20:15:44+00:00" }, { - "name": "filp/whoops", - "version": "2.15.3", + "name": "respect/validation", + "version": "2.5.0", "source": { "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" + "url": "https://github.com/Respect/Validation.git", + "reference": "48254ed1079fc0879eb03fb2b600f92bb4ecb787" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", + "url": "https://api.github.com/repos/Respect/Validation/zipball/48254ed1079fc0879eb03fb2b600f92bb4ecb787", + "reference": "48254ed1079fc0879eb03fb2b600f92bb4ecb787", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" + "php": ">=8.1", + "respect/stringifier": "^0.2.0 || ^1.0", + "symfony/polyfill-mbstring": "^1.2" }, "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" + "egulias/email-validator": "^3.0 || ^4.0", + "giggsey/libphonenumber-for-php-lite": "^8.13 || ^9.0", + "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": "^4.0", + "squizlabs/php_codesniffer": "^3.7" }, "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" + "egulias/email-validator": "Improves the Email rule if available", + "ext-bcmath": "Arbitrary Precision Mathematics", + "ext-fileinfo": "File Information", + "ext-mbstring": "Multibyte String Functions", + "giggsey/libphonenumber-for-php-lite": "Enables the phone rule if available" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, "autoload": { "psr-4": { - "Whoops\\": "src/Whoops/" + "Respect\\Validation\\": "library/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2854,76 +3278,51 @@ ], "authors": [ { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" + "name": "Respect/Validation Contributors", + "homepage": "https://github.com/Respect/Validation/graphs/contributors" } ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", + "description": "The most awesome validation engine ever created for PHP", + "homepage": "http://respect.github.io/Validation/", "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" + "respect", + "validation", + "validator" ], "support": { - "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.3" + "issues": "https://github.com/Respect/Validation/issues", + "source": "https://github.com/Respect/Validation/tree/2.5.0" }, - "funding": [ - { - "url": "https://github.com/denis-sokolov", - "type": "github" - } - ], - "time": "2023-07-13T12:00:00+00:00" + "time": "2026-07-22T15:21:03+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "name": "ringcentral/psr7", + "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "url": "https://github.com/ringcentral/psr7.git", + "reference": "360faaec4b563958b673fb52bbe94e37f14bc686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/ringcentral/psr7/zipball/360faaec4b563958b673fb52bbe94e37f14bc686", + "reference": "360faaec4b563958b673fb52bbe94e37f14bc686", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" + "php": ">=5.3", + "psr/http-message": "~1.0" }, "provide": { - "psr/http-client-implementation": "1.0" + "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "branch-alias": { + "dev-master": "1.0-dev" } }, "autoload": { @@ -2931,7 +3330,7 @@ "src/functions_include.php" ], "psr-4": { - "GuzzleHttp\\": "src/" + "RingCentral\\Psr7\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2939,105 +3338,52 @@ "MIT" ], "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" } ], - "description": "Guzzle is a PHP HTTP client library", + "description": "PSR-7 message implementation", "keywords": [ - "client", - "curl", - "framework", "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } + "message", + "stream", + "uri" ], - "time": "2023-08-27T10:20:53+00:00" + "support": { + "source": "https://github.com/ringcentral/psr7/tree/master" + }, + "time": "2018-05-29T20:21:04+00:00" }, { - "name": "guzzlehttp/promises", - "version": "2.0.1", + "name": "riverline/multipart-parser", + "version": "2.2.2", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "url": "https://github.com/Riverline/multipart-parser.git", + "reference": "fadbb1c1f8e66f96eaa36ab8ed13cbc451c6ded7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/Riverline/multipart-parser/zipball/fadbb1c1f8e66f96eaa36ab8ed13cbc451c6ded7", + "reference": "fadbb1c1f8e66f96eaa36ab8ed13cbc451c6ded7", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" + "ext-mbstring": "*", + "php": ">=7.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "laminas/laminas-diactoros": "*", + "phpunit/phpunit": "*", + "psr/http-message": "*", + "symfony/psr-http-message-bridge": "*" }, "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Promise\\": "src/" + "Riverline\\MultiPartParser\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3046,93 +3392,78 @@ ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" + "name": "Romain Cambien", + "email": "romain@cambien.net" }, { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "Riverline", + "homepage": "http://www.riverline.fr" } ], - "description": "Guzzle promises library", + "description": "One class library to parse multipart content with encoding and charset support.", "keywords": [ - "promise" + "http", + "multipart", + "parser" ], "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.1" + "issues": "https://github.com/Riverline/multipart-parser/issues", + "source": "https://github.com/Riverline/multipart-parser/tree/2.2.2" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2026-01-15T11:08:16+00:00" }, { - "name": "guzzlehttp/psr7", - "version": "2.6.1", + "name": "symfony/console", + "version": "v7.4.15", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "url": "https://github.com/symfony/console.git", + "reference": "088ec6fe0ef6819cbc301174093b6bfa4ad26930" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/symfony/console/zipball/088ec6fe0ef6819cbc301174093b6bfa4ad26930", + "reference": "088ec6fe0ef6819cbc301174093b6bfa4ad26930", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2|^8.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "psr/log-implementation": "1.0|2.0|3.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" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" }, "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3140,134 +3471,76 @@ ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PSR-7 message implementation that also provides common utility methods", + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" + "cli", + "command-line", + "console", + "terminal" ], "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.1" + "source": "https://github.com/symfony/console/tree/v7.4.15" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://github.com/Nyholm", + "url": "https://github.com/nicolas-grekas", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2026-07-27T13:51:00+00:00" }, { - "name": "icanhazstring/composer-unused", - "version": "0.8.10", + "name": "symfony/deprecation-contracts", + "version": "v3.7.1", "source": { "type": "git", - "url": "https://github.com/composer-unused/composer-unused.git", - "reference": "fd2624f49de2d8925355cfb8739e2b2a57017d10" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer-unused/composer-unused/zipball/fd2624f49de2d8925355cfb8739e2b2a57017d10", - "reference": "fd2624f49de2d8925355cfb8739e2b2a57017d10", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d", "shasum": "" }, "require": { - "composer-unused/contracts": "^0.3", - "composer-unused/symbol-parser": "^0.2.1", - "ext-json": "*", - "nikic/php-parser": "^4.15", - "ondram/ci-detector": "^4.1", - "php": "^7.4 || ^8.0", - "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", - "webmozart/assert": "^1.10", - "webmozart/glob": "^4.4" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8", - "dg/bypass-finals": "^1.4", - "ergebnis/composer-normalize": "^2.28", - "ext-ds": "*", - "ext-zend-opcache": "*", - "jangregor/phpstan-prophecy": "^1.0", - "php-ds/php-ds": "^1.4", - "phpspec/prophecy-phpunit": "^2.0.2", - "phpstan/extension-installer": "^1.3", - "phpstan/phpstan": "^1.10", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.6.8", - "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.7" + "php": ">=8.1" }, - "bin": [ - "bin/composer-unused" - ], "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": true + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" } }, "autoload": { - "psr-4": { - "ComposerUnused\\ComposerUnused\\": "src" - } + "files": [ + "function.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3275,365 +3548,408 @@ ], "authors": [ { - "name": "Andreas Frömer", - "email": "composer-unused@icanhazstring.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Show unused packages by scanning your code", - "homepage": "https://github.com/composer-unused/composer-unused", - "keywords": [ - "composer", - "php-parser", - "static analysis", - "unused" - ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", "support": { - "issues": "https://github.com/composer-unused/composer-unused/issues", - "source": "https://github.com/composer-unused/composer-unused" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1" }, "funding": [ { - "url": "https://github.com/sponsors/icanhazstring", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://paypal.me/icanhazstring", - "type": "other" + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2023-07-06T05:41:37+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { - "name": "infection/abstract-testframework-adapter", - "version": "0.5.0", + "name": "symfony/polyfill-ctype", + "version": "v1.37.0", "source": { "type": "git", - "url": "https://github.com/infection/abstract-testframework-adapter.git", - "reference": "18925e20d15d1a5995bb85c9dc09e8751e1e069b" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/abstract-testframework-adapter/zipball/18925e20d15d1a5995bb85c9dc09e8751e1e069b", - "reference": "18925e20d15d1a5995bb85c9dc09e8751e1e069b", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "php": ">=7.2" }, - "require-dev": { - "ergebnis/composer-normalize": "^2.8", - "friendsofphp/php-cs-fixer": "^2.17", - "phpunit/phpunit": "^9.5" + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Infection\\AbstractTestFramework\\": "src/" + "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Maks Rafalko", - "email": "maks.rafalko@gmail.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Abstract Test Framework Adapter for Infection", + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], "support": { - "issues": "https://github.com/infection/abstract-testframework-adapter/issues", - "source": "https://github.com/infection/abstract-testframework-adapter/tree/0.5.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" }, "funding": [ { - "url": "https://github.com/infection", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://opencollective.com/infection", - "type": "open_collective" + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2021-08-17T18:49:12+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { - "name": "infection/extension-installer", - "version": "0.1.2", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.41.0", "source": { "type": "git", - "url": "https://github.com/infection/extension-installer.git", - "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "bb899c1db0aa8127dc3afe8cda4a67eb24915f8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/extension-installer/zipball/9b351d2910b9a23ab4815542e93d541e0ca0cdcf", - "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/bb899c1db0aa8127dc3afe8cda4a67eb24915f8d", + "reference": "bb899c1db0aa8127dc3afe8cda4a67eb24915f8d", "shasum": "" }, - "require": { - "composer-plugin-api": "^1.1 || ^2.0" - }, - "require-dev": { - "composer/composer": "^1.9 || ^2.0", - "friendsofphp/php-cs-fixer": "^2.18, <2.19", - "infection/infection": "^0.15.2", - "php-coveralls/php-coveralls": "^2.4", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.10", - "phpstan/phpstan-phpunit": "^0.12.6", - "phpstan/phpstan-strict-rules": "^0.12.2", - "phpstan/phpstan-webmozart-assert": "^0.12.2", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^4.8" - }, - "type": "composer-plugin", + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", "extra": { - "class": "Infection\\ExtensionInstaller\\Plugin" + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Infection\\ExtensionInstaller\\": "src/" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Maks Rafalko", - "email": "maks.rafalko@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Infection Extension Installer", + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/infection/extension-installer/issues", - "source": "https://github.com/infection/extension-installer/tree/0.1.2" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.41.0" }, "funding": [ { - "url": "https://github.com/infection", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://opencollective.com/infection", - "type": "open_collective" + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2021-10-20T22:08:34+00:00" + "time": "2026-07-28T08:25:59+00:00" }, { - "name": "infection/include-interceptor", - "version": "0.2.5", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.38.0", "source": { "type": "git", - "url": "https://github.com/infection/include-interceptor.git", - "reference": "0cc76d95a79d9832d74e74492b0a30139904bdf7" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/include-interceptor/zipball/0cc76d95a79d9832d74e74492b0a30139904bdf7", - "reference": "0cc76d95a79d9832d74e74492b0a30139904bdf7", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", "shasum": "" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "infection/infection": "^0.15.0", - "phan/phan": "^2.4 || ^3", - "php-coveralls/php-coveralls": "^2.2", - "phpstan/phpstan": "^0.12.8", - "phpunit/phpunit": "^8.5", - "vimeo/psalm": "^3.8" + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Infection\\StreamWrapper\\": "src/" - } + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Maks Rafalko", - "email": "maks.rafalko@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Stream Wrapper: Include Interceptor. Allows to replace included (autoloaded) file with another one.", + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/infection/include-interceptor/issues", - "source": "https://github.com/infection/include-interceptor/tree/0.2.5" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" }, "funding": [ { - "url": "https://github.com/infection", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://opencollective.com/infection", - "type": "open_collective" + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2021-08-09T10:03:57+00:00" + "time": "2026-05-25T13:48:31+00:00" }, { - "name": "infection/infection", - "version": "0.27.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.38.2", "source": { "type": "git", - "url": "https://github.com/infection/infection.git", - "reference": "a9ff8171577d98b887d7f16428edd81ff69ce887" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/a9ff8171577d98b887d7f16428edd81ff69ce887", - "reference": "a9ff8171577d98b887d7f16428edd81ff69ce887", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", "shasum": "" }, "require": { - "colinodell/json5": "^2.2", - "composer-runtime-api": "^2.0", - "composer/xdebug-handler": "^2.0 || ^3.0", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "fidry/cpu-core-counter": "^0.4.0 || ^0.5.0", - "infection/abstract-testframework-adapter": "^0.5.0", - "infection/extension-installer": "^0.1.0", - "infection/include-interceptor": "^0.2.5", - "justinrainbow/json-schema": "^5.2.10", - "nikic/php-parser": "^4.15.1", - "ondram/ci-detector": "^4.1.0", - "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", - "thecodingmachine/safe": "^2.1.2", - "webmozart/assert": "^1.11" + "ext-iconv": "*", + "php": ">=7.2" }, - "conflict": { - "antecedent/patchwork": "<2.1.25", - "dg/bypass-finals": "<1.4.1", - "phpunit/php-code-coverage": ">9,<9.1.4 || >9.2.17,<9.2.21" + "provide": { + "ext-mbstring": "*" }, - "require-dev": { - "brianium/paratest": "^6.3", - "ext-simplexml": "*", - "fidry/makefile": "^0.2.0", - "helmich/phpunit-json-assert": "^3.0", - "phpspec/prophecy": "^1.15", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1.1.0", - "phpstan/phpstan": "^1.10.15", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpstan/phpstan-webmozart-assert": "^1.0.2", - "phpunit/phpunit": "^9.5.5", - "rector/rector": "^0.16.0", - "sidz/phpstan-rules": "^0.2.1", - "symfony/phpunit-bridge": "^5.4 || ^6.0", - "symfony/yaml": "^5.4 || ^6.0", - "thecodingmachine/phpstan-safe-rule": "^1.2.0" + "suggest": { + "ext-mbstring": "For best performance" }, - "bin": [ - "bin/infection" - ], "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Infection\\": "src/" + "Symfony\\Polyfill\\Mbstring\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Maks Rafalko", - "email": "maks.rafalko@gmail.com", - "homepage": "https://twitter.com/maks_rafalko" - }, - { - "name": "Oleg Zhulnev", - "homepage": "https://github.com/sidz" - }, - { - "name": "Gert de Pagter", - "homepage": "https://github.com/BackEndTea" - }, - { - "name": "Théo FIDRY", - "email": "theo.fidry@gmail.com", - "homepage": "https://twitter.com/tfidry" - }, - { - "name": "Alexey Kopytko", - "email": "alexey@kopytko.com", - "homepage": "https://www.alexeykopytko.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "coverage", - "mutant", - "mutation framework", - "mutation testing", - "testing", - "unit testing" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/infection/infection/issues", - "source": "https://github.com/infection/infection/tree/0.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2" }, "funding": [ { - "url": "https://github.com/infection", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://opencollective.com/infection", - "type": "open_collective" + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2023-05-16T05:28:04+00:00" + "time": "2026-05-27T06:59:30+00:00" }, { - "name": "jakobbuis/simple-slow-test-reporter", - "version": "v1.0.0", + "name": "symfony/polyfill-php80", + "version": "v1.37.0", "source": { "type": "git", - "url": "https://github.com/jakobbuis/simple-slow-test-reporter.git", - "reference": "7111cb24f4670ca455f5578710022311f78ef1c4" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jakobbuis/simple-slow-test-reporter/zipball/7111cb24f4670ca455f5578710022311f78ef1c4", - "reference": "7111cb24f4670ca455f5578710022311f78ef1c4", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", "shasum": "" }, "require": { - "phpunit/phpunit": "^9.0" + "php": ">=7.2" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "SSTR\\": "src/" - } + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3641,58 +3957,88 @@ ], "authors": [ { - "name": "Jakob Buis", - "email": "jakob@jakobbuis.nl" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "Reports slow tests in your PHPUnit testsuite", - "support": { - "issues": "https://github.com/jakobbuis/simple-slow-test-reporter/issues", - "source": "https://github.com/jakobbuis/simple-slow-test-reporter/tree/v1.0.0" - }, - "time": "2020-12-26T16:20:53+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { - "name": "jangregor/phpstan-prophecy", - "version": "1.0.0", + "name": "symfony/service-contracts", + "version": "v3.7.1", "source": { "type": "git", - "url": "https://github.com/Jan0707/phpstan-prophecy.git", - "reference": "2bc7ca9460395690c6bf7332bdfb2f25d5cae8e0" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jan0707/phpstan-prophecy/zipball/2bc7ca9460395690c6bf7332bdfb2f25d5cae8e0", - "reference": "2bc7ca9460395690c6bf7332bdfb2f25d5cae8e0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/c0a284bab1ed8aa0417e3d69250ab437739563a0", + "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^1.0.0" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { - "phpspec/prophecy": "<1.7.0,>=2.0.0", - "phpunit/phpunit": "<6.0.0,>=10.0.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.1.1", - "ergebnis/license": "^1.0.0", - "ergebnis/php-cs-fixer-config": "~2.2.0", - "phpspec/prophecy": "^1.7.0", - "phpunit/phpunit": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" + "ext-psr": "<1.1|>=2" }, - "type": "phpstan-extension", + "type": "library", "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.7-dev" } }, "autoload": { "psr-4": { - "JanGregor\\Prophecy\\": "src/" - } + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3700,56 +4046,89 @@ ], "authors": [ { - "name": "Jan Gregor Emge-Triebel", - "email": "jan@jangregor.me" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a phpstan/phpstan extension for phpspec/prophecy", + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], "support": { - "issues": "https://github.com/Jan0707/phpstan-prophecy/issues", - "source": "https://github.com/Jan0707/phpstan-prophecy/tree/1.0.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.1" }, "funding": [ { - "url": "https://github.com/localheinz", + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "time": "2021-11-08T16:37:47+00:00" + "time": "2026-06-16T09:55:08+00:00" }, { - "name": "jawira/case-converter", - "version": "v3.5.1", + "name": "symfony/string", + "version": "v8.1.2", "source": { "type": "git", - "url": "https://github.com/jawira/case-converter.git", - "reference": "2be05b98dcb743bef60ab6f849145bd3434ed003" + "url": "https://github.com/symfony/string.git", + "reference": "286a76b7255e5cc4bf0101a0bc5388ecf1c38ccc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jawira/case-converter/zipball/2be05b98dcb743bef60ab6f849145bd3434ed003", - "reference": "2be05b98dcb743bef60ab6f849145bd3434ed003", + "url": "https://api.github.com/repos/symfony/string/zipball/286a76b7255e5cc4bf0101a0bc5388ecf1c38ccc", + "reference": "286a76b7255e5cc4bf0101a0bc5388ecf1c38ccc", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=7.4" + "php": ">=8.4.1", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-intl-grapheme": "^1.33", + "symfony/polyfill-intl-normalizer": "^1.0", + "symfony/polyfill-mbstring": "^1.0" }, - "require-dev": { - "behat/behat": "^3.0", - "phpstan/phpstan": "^1.0", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "^4.0" + "conflict": { + "symfony/translation-contracts": "<2.5" }, - "suggest": { - "pds/skeleton": "PHP Package Development Standards", - "phing/phing": "PHP Build Tool" + "require-dev": { + "symfony/emoji": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0", + "symfony/intl": "^7.4|^8.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^7.4|^8.0" }, "type": "library", "autoload": { + "files": [ + "Resources/functions.php" + ], "psr-4": { - "Jawira\\CaseConverter\\": "src/" - } + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3757,116 +4136,83 @@ ], "authors": [ { - "name": "Jawira Portugal", - "email": "dev@tugal.be" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Convert strings between 13 naming conventions: Snake case, Camel case, Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Sentence case, Title case and Dot notation.", - "homepage": "https://jawira.github.io/case-converter/", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", "keywords": [ - "Ada case", - "Cobol case", - "Macro case", - "Train case", - "camel case", - "dot notation", - "kebab case", - "lower case", - "pascal case", - "sentence case", - "snake case", - "title case", - "upper case" + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" ], "support": { - "issues": "https://github.com/jawira/case-converter/issues", - "source": "https://github.com/jawira/case-converter/tree/v3.5.1" - }, - "time": "2022-08-14T11:40:18+00:00" - }, - { - "name": "jetbrains/phpstorm-stubs", - "version": "v2023.2", - "source": { - "type": "git", - "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "3bb9c8a1050ad324c2dca7964487fa9f081f1005" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/3bb9c8a1050ad324c2dca7964487fa9f081f1005", - "reference": "3bb9c8a1050ad324c2dca7964487fa9f081f1005", - "shasum": "" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "@stable", - "nikic/php-parser": "@stable", - "php": "^8.0", - "phpdocumentor/reflection-docblock": "@stable", - "phpunit/phpunit": "^9.6" - }, - "type": "library", - "autoload": { - "files": [ - "PhpStormStubsMap.php" - ] + "source": "https://github.com/symfony/string/tree/v8.1.2" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "PHP runtime & extensions header files for PhpStorm", - "homepage": "https://www.jetbrains.com/phpstorm", - "keywords": [ - "autocomplete", - "code", - "inference", - "inspection", - "jetbrains", - "phpstorm", - "stubs", - "type" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2023.2" - }, - "time": "2023-07-14T12:50:15+00:00" + "time": "2026-07-28T07:35:25+00:00" }, { - "name": "justinrainbow/json-schema", - "version": "v5.2.13", + "name": "symfony/yaml", + "version": "v7.4.15", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" + "url": "https://github.com/symfony/yaml.git", + "reference": "e101850ded5d2c0d44bf32abb8996404afec2dec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e101850ded5d2c0d44bf32abb8996404afec2dec", + "reference": "e101850ded5d2c0d44bf32abb8996404afec2dec", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<6.4" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" + "symfony/console": "^6.4|^7.0|^8.0" }, "bin": [ - "bin/validate-json" + "Resources/bin/yaml-lint" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, "autoload": { "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3874,199 +4220,209 @@ ], "authors": [ { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v7.4.15" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" }, { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" + "url": "https://github.com/fabpot", + "type": "github" }, { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" - }, - "time": "2023-09-26T02:20:38+00:00" + "time": "2026-07-21T15:13:06+00:00" }, { - "name": "kwn/number-to-words", - "version": "2.7.2", + "name": "twig/twig", + "version": "v3.28.0", "source": { "type": "git", - "url": "https://github.com/kwn/number-to-words.git", - "reference": "6821e1f6c2195ceff1595cfba9ecb13c9b121579" + "url": "https://github.com/twigphp/Twig.git", + "reference": "597c12ed286fb9d1701a36684ce6e0cbe28ebc8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kwn/number-to-words/zipball/6821e1f6c2195ceff1595cfba9ecb13c9b121579", - "reference": "6821e1f6c2195ceff1595cfba9ecb13c9b121579", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/597c12ed286fb9d1701a36684ce6e0cbe28ebc8b", + "reference": "597c12ed286fb9d1701a36684ce6e0cbe28ebc8b", "shasum": "" }, "require": { - "php": ">=7.4" + "php": ">=8.1.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { - "phpunit/phpunit": "^9.6.7", - "squizlabs/php_codesniffer": "^3.7.2" + "php-cs-fixer/shim": "^3.0@stable", + "phpstan/phpstan": "^2.0@stable", + "psr/container": "^1.0|^2.0", + "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": { - "NumberToWords\\": "src" + "Twig\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Karol Wnuk", - "email": "k.wnuk@ascetic.pl" + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" } ], - "description": "Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.", + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", "keywords": [ - "currency", - "money", - "number", - "numbers", - "string", - "to", - "words" + "templating" ], "support": { - "issues": "https://github.com/kwn/number-to-words/issues", - "source": "https://github.com/kwn/number-to-words/tree/2.7.2" + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.28.0" }, - "time": "2023-09-16T15:30:18+00:00" + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2026-07-03T20:44:34+00:00" }, { - "name": "league/openapi-psr7-validator", - "version": "0.21", + "name": "webmozart/assert", + "version": "1.12.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/openapi-psr7-validator.git", - "reference": "bccdd3f5037c796fff3ef3f11dcf8c073aaa6192" + "url": "https://github.com/webmozarts/assert.git", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/openapi-psr7-validator/zipball/bccdd3f5037c796fff3ef3f11dcf8c073aaa6192", - "reference": "bccdd3f5037c796fff3ef3f11dcf8c073aaa6192", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", "shasum": "" }, "require": { - "devizzent/cebe-php-openapi": "^1.0", - "ext-json": "*", - "league/uri": "^6.3", - "php": ">=7.2", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "psr/http-message": "^1.0", - "psr/http-server-middleware": "^1.0", - "respect/validation": "^1.1.3 || ^2.0", - "riverline/multipart-parser": "^2.0.3", - "symfony/polyfill-php80": "^1.27", - "webmozart/assert": "^1.4" + "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", + "php": "^7.2 || ^8.0" }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "guzzlehttp/psr7": "^1.5", - "hansott/psr7-cookies": "^3.0.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-webmozart-assert": "^1", - "phpunit/phpunit": "^7 || ^8 || ^9", - "symfony/cache": "^5.1" + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { - "League\\OpenAPIValidation\\": "src/" + "Webmozart\\Assert\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Validate PSR-7 messages against OpenAPI (3.0.2) specifications expressed in YAML or JSON", - "homepage": "https://github.com/thephpleague/openapi-psr7-validator", + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", "keywords": [ - "http", - "openapi", - "psr7", - "validation" + "assert", + "check", + "validate" ], "support": { - "issues": "https://github.com/thephpleague/openapi-psr7-validator/issues", - "source": "https://github.com/thephpleague/openapi-psr7-validator/tree/0.21" + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.12.1" }, - "time": "2023-04-03T21:49:07+00:00" + "time": "2025-10-29T15:56:20+00:00" }, { - "name": "league/uri", - "version": "6.8.0", + "name": "wyrihaximus/react-awaitable-observable", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/uri.git", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" + "url": "https://github.com/WyriHaximus/reactphp-awaitable-observable.git", + "reference": "6af262ce44b657a0df9c57af4ca3798f57276cdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-awaitable-observable/zipball/6af262ce44b657a0df9c57af4ca3798f57276cdb", + "reference": "6af262ce44b657a0df9c57af4ca3798f57276cdb", "shasum": "" }, "require": { - "ext-json": "*", - "league/uri-interfaces": "^2.3", - "php": "^8.1", - "psr/http-message": "^1.0.1" - }, - "conflict": { - "league/uri-schemes": "^1.0" + "php": "^8.4", + "react/async": "^4.3.0", + "react/promise": "^3.3.0", + "reactivex/rxphp": "^2.1.0", + "wyrihaximus/react-event-loop-rx-scheduler-hook-up": "^0.1.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.9.5", - "nyholm/psr7": "^1.5.1", - "php-http/psr7-integration-tests": "^1.1.1", - "phpbench/phpbench": "^1.2.6", - "phpstan/phpstan": "^1.8.5", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.1.1", - "phpstan/phpstan-strict-rules": "^1.4.3", - "phpunit/phpunit": "^9.5.24", - "psr/http-factory": "^1.0.1" - }, - "suggest": { - "ext-fileinfo": "Needed to create Data URI from a filepath", - "ext-intl": "Needed to improve host validation", - "league/uri-components": "Needed to easily manipulate URI objects", - "psr/http-factory": "Needed to use the URI factory" + "wyrihaximus/async-test-utilities": "^12.0.0", + "wyrihaximus/makefiles": "^0.10.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - } - }, "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "League\\Uri\\": "src" + "WyriHaximus\\React\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4075,224 +4431,180 @@ ], "authors": [ { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "URI manipulation library", - "homepage": "https://uri.thephpleague.com", - "keywords": [ - "data-uri", - "file-uri", - "ftp", - "hostname", - "http", - "https", - "middleware", - "parse_str", - "parse_url", - "psr-7", - "query-string", - "querystring", - "rfc3986", - "rfc3987", - "rfc6570", - "uri", - "uri-template", - "url", - "ws" - ], + "description": "🛠️ Make observables foreachable using async & await", "support": { - "docs": "https://uri.thephpleague.com", - "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.8.0" + "issues": "https://github.com/WyriHaximus/reactphp-awaitable-observable/issues", + "source": "https://github.com/WyriHaximus/reactphp-awaitable-observable/tree/1.2.1" }, "funding": [ { - "url": "https://github.com/sponsors/nyamsprod", + "url": "https://github.com/WyriHaximus", "type": "github" } ], - "time": "2022-09-13T19:58:47+00:00" + "time": "2026-02-28T22:26:32+00:00" }, { - "name": "league/uri-interfaces", - "version": "2.3.0", + "name": "wyrihaximus/react-event-loop-rx-scheduler-hook-up", + "version": "0.1.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + "url": "https://github.com/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up.git", + "reference": "462e794cba3c810b77d1e8cb33be43a902673272" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up/zipball/462e794cba3c810b77d1e8cb33be43a902673272", + "reference": "462e794cba3c810b77d1e8cb33be43a902673272", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.2 || ^8.0" + "php": "^8.1", + "react/event-loop": "^1.3", + "reactivex/rxphp": "^2.0" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.19", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^8.5.15 || ^9.5" + "conflict": { + "azjezz/psl": "<2" }, - "suggest": { - "ext-intl": "to use the IDNA feature", - "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + "require-dev": { + "wyrihaximus/async-test-utilities": "^5.0.25" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } + "unused": [ + "wyrihaximus/react-mutex", + "wyrihaximus/react-mutex-contracts" + ] }, "autoload": { - "psr-4": { - "League\\Uri\\": "src/" - } + "files": [ + "src/bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Ignace Nyamagana Butera", - "email": "nyamsprod@gmail.com", - "homepage": "https://nyamsprod.com" - } - ], - "description": "Common interface for URI representation", - "homepage": "http://github.com/thephpleague/uri-interfaces", - "keywords": [ - "rfc3986", - "rfc3987", - "uri", - "url" - ], + "description": "🪝 Hook up ReactPHP Event Loop to the RxPHP Scheduler", "support": { - "issues": "https://github.com/thephpleague/uri-interfaces/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" + "issues": "https://github.com/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up/issues", + "source": "https://github.com/WyriHaximus/reactphp-event-loop-rx-scheduler-hook-up/tree/0.1.1" }, "funding": [ { - "url": "https://github.com/sponsors/nyamsprod", + "url": "https://github.com/WyriHaximus", "type": "github" } ], - "time": "2021-06-28T04:27:21+00:00" + "time": "2023-02-26T15:05:42+00:00" }, { - "name": "localheinz/diff", - "version": "1.1.1", + "name": "wyrihaximus/simple-twig", + "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/localheinz/diff.git", - "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" + "url": "https://github.com/WyriHaximus/php-simple-twig.git", + "reference": "187fa8fcbb4c53414d85c2b5be8fb084fbeeb779" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", - "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", + "url": "https://api.github.com/repos/WyriHaximus/php-simple-twig/zipball/187fa8fcbb4c53414d85c2b5be8fb084fbeeb779", + "reference": "187fa8fcbb4c53414d85c2b5be8fb084fbeeb779", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.4", + "twig/twig": "^3.27.0" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^4.2 || ^5" + "wyrihaximus/makefiles": "^0.10.6", + "wyrihaximus/test-utilities": "^12.2.0" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "WyriHaximus\\Twig\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" } ], - "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", - "homepage": "https://github.com/localheinz/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], + "description": "🌱 Wrapper around Twig making rendering a string template trivial", "support": { - "source": "https://github.com/localheinz/diff/tree/main" + "issues": "https://github.com/WyriHaximus/php-simple-twig/issues", + "source": "https://github.com/WyriHaximus/php-simple-twig/tree/2.4.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/WyriHaximus", "type": "github" } ], - "time": "2020-07-06T04:49:32+00:00" - }, + "time": "2026-05-29T11:21:53+00:00" + } + ], + "packages-dev": [ { - "name": "maglnet/composer-require-checker", - "version": "4.7.1", + "name": "azjezz/psl", + "version": "4.3.0", "source": { "type": "git", - "url": "https://github.com/maglnet/ComposerRequireChecker.git", - "reference": "e49c58b18fef21e37941a642c1a70d3962e86f28" + "url": "https://github.com/php-standard-library/php-standard-library.git", + "reference": "74c95be0214eb7ea39146ed00ac4eb71b45d787b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maglnet/ComposerRequireChecker/zipball/e49c58b18fef21e37941a642c1a70d3962e86f28", - "reference": "e49c58b18fef21e37941a642c1a70d3962e86f28", + "url": "https://api.github.com/repos/php-standard-library/php-standard-library/zipball/74c95be0214eb7ea39146ed00ac4eb71b45d787b", + "reference": "74c95be0214eb7ea39146ed00ac4eb71b45d787b", "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", - "webmozart/assert": "^1.11.0", - "webmozart/glob": "^4.6.0" + "ext-bcmath": "*", + "ext-intl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-sodium": "*", + "php": "~8.3.0 || ~8.4.0 || ~8.5.0", + "revolt/event-loop": "^1.0.7" }, "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" + "carthage-software/mago": "^1.6.0", + "infection/infection": "^0.31.2", + "php-coveralls/php-coveralls": "^2.7.0", + "phpbench/phpbench": "^1.4.0", + "phpunit/phpunit": "^9.6.22" + }, + "suggest": { + "php-standard-library/phpstan-extension": "PHPStan integration", + "php-standard-library/psalm-plugin": "Psalm integration" }, - "bin": [ - "bin/composer-require-checker" - ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.1-dev" + "thanks": { + "url": "https://github.com/hhvm/hsl", + "name": "hhvm/hsl" } }, "autoload": { + "files": [ + "src/bootstrap.php" + ], "psr-4": { - "ComposerRequireChecker\\": "src/ComposerRequireChecker" + "Psl\\": "src/Psl" } }, "notification-url": "https://packagist.org/downloads/", @@ -4301,233 +4613,266 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.io/" - }, - { - "name": "Matthias Glaub", - "email": "magl@magl.net", - "homepage": "http://magl.net" + "name": "azjezz", + "email": "azjezz@protonmail.com" } ], - "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" - ], + "description": "PHP Standard Library", "support": { - "issues": "https://github.com/maglnet/ComposerRequireChecker/issues", - "source": "https://github.com/maglnet/ComposerRequireChecker/tree/4.7.1" + "issues": "https://github.com/php-standard-library/php-standard-library/issues", + "source": "https://github.com/php-standard-library/php-standard-library/tree/4.3.0" }, - "time": "2023-09-27T14:57:19+00:00" + "funding": [ + { + "url": "https://github.com/azjezz", + "type": "github" + }, + { + "url": "https://github.com/veewee", + "type": "github" + } + ], + "abandoned": "php-standard-library/php-standard-library", + "time": "2026-02-24T01:58:53+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.11.1", + "name": "beberlei/assert", + "version": "v3.3.4", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "url": "https://github.com/beberlei/assert.git", + "reference": "f193f4613c7d7fbcee2c05e4daff4061d49c040e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/beberlei/assert/zipball/f193f4613c7d7fbcee2c05e4daff4061d49c040e", + "reference": "f193f4613c7d7fbcee2c05e4daff4061d49c040e", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", "php": "^7.1 || ^8.0" }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" - }, "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + "friendsofphp/php-cs-fixer": "*", + "phpstan/phpstan": "*", + "phpunit/phpunit": ">=6.0.0", + "yoast/phpunit-polyfills": "^0.1.0" + }, + "suggest": { + "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles" }, "type": "library", "autoload": { "files": [ - "src/DeepCopy/deep_copy.php" + "lib/Assert/functions.php" ], "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "Assert\\": "lib/Assert" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-2-Clause" ], - "description": "Create deep copies (clones) of your objects", + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de", + "role": "Lead Developer" + }, + { + "name": "Richard Quadling", + "email": "rquadling@gmail.com", + "role": "Collaborator" + } + ], + "description": "Thin assertion library for input validation in business models.", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "assert", + "assertion", + "validation" ], "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "issues": "https://github.com/beberlei/assert/issues", + "source": "https://github.com/beberlei/assert/tree/v3.3.4" }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2026-06-10T19:47:05+00:00" }, { - "name": "netresearch/jsonmapper", - "version": "v4.2.0", + "name": "colinodell/json5", + "version": "v3.0.0", "source": { "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + "url": "https://github.com/colinodell/json5.git", + "reference": "5724d21bc5c910c2560af1b8915f0cc0163579c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "url": "https://api.github.com/repos/colinodell/json5/zipball/5724d21bc5c910c2560af1b8915f0cc0163579c8", + "reference": "5724d21bc5c910c2560af1b8915f0cc0163579c8", "shasum": "" }, "require": { "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" + "ext-mbstring": "*", + "php": "^8.0" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", - "squizlabs/php_codesniffer": "~3.5" + "mikehaertl/php-shellcommand": "^1.7.0", + "phpstan/phpstan": "^1.10.57", + "scrutinizer/ocular": "^1.9", + "squizlabs/php_codesniffer": "^3.8.1", + "symfony/finder": "^6.0|^7.0", + "symfony/phpunit-bridge": "^7.0.3" }, + "bin": [ + "bin/json5" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, "autoload": { - "psr-0": { - "JsonMapper": "src/" + "files": [ + "src/global.php" + ], + "psr-4": { + "ColinODell\\Json5\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "OSL-3.0" + "MIT" ], "authors": [ { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", "role": "Developer" } ], - "description": "Map nested JSON structures onto PHP classes", + "description": "UTF-8 compatible JSON5 parser for PHP", + "homepage": "https://github.com/colinodell/json5", + "keywords": [ + "JSON5", + "json", + "json5_decode", + "json_decode" + ], "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + "issues": "https://github.com/colinodell/json5/issues", + "source": "https://github.com/colinodell/json5/tree/v3.0.0" }, - "time": "2023-04-09T17:37:40+00:00" + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://www.patreon.com/colinodell", + "type": "patreon" + } + ], + "time": "2024-02-09T13:06:12+00:00" }, { - "name": "nikic/php-parser", - "version": "v4.17.1", + "name": "composer-unused/contracts", + "version": "0.3.0", "source": { "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "url": "https://github.com/composer-unused/contracts.git", + "reference": "5ec448d3ee80735dccad6a21a3266c377d0845ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/composer-unused/contracts/zipball/5ec448d3ee80735dccad6a21a3266c377d0845ae", + "reference": "5ec448d3ee80735dccad6a21a3266c377d0845ae", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "php": "^7.4 || ^8.0" }, - "bin": [ - "bin/php-parse" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, "autoload": { "psr-4": { - "PhpParser\\": "lib/PhpParser" + "ComposerUnused\\Contracts\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov" + "name": "Andreas Frömer", + "email": "composer-unused@icanhazstring.com" } ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], + "description": "Contract repository for composer-unused", "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "issues": "https://github.com/composer-unused/contracts/issues", + "source": "https://github.com/composer-unused/contracts/tree/0.3.0" }, - "time": "2023-08-13T19:53:39+00:00" + "funding": [ + { + "url": "https://github.com/icanhazstring", + "type": "github" + } + ], + "time": "2023-03-17T00:41:49+00:00" }, { - "name": "nikolaposa/version", - "version": "4.1.1", + "name": "composer-unused/symbol-parser", + "version": "0.3.3", "source": { "type": "git", - "url": "https://github.com/nikolaposa/version.git", - "reference": "f6bdd64be914940529b843a67335d6386d980cec" + "url": "https://github.com/composer-unused/symbol-parser.git", + "reference": "afa62007cca768bd1ecbc0e8ed347c675c239410" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikolaposa/version/zipball/f6bdd64be914940529b843a67335d6386d980cec", - "reference": "f6bdd64be914940529b843a67335d6386d980cec", + "url": "https://api.github.com/repos/composer-unused/symbol-parser/zipball/afa62007cca768bd1ecbc0e8ed347c675c239410", + "reference": "afa62007cca768bd1ecbc0e8ed347c675c239410", "shasum": "" }, "require": { - "beberlei/assert": "^3.2", - "php": "^7.2 || ^8.0" + "composer-unused/contracts": "^0.3", + "nikic/php-parser": "^5.0", + "php": "^7.4 || ^8.0", + "phpstan/phpdoc-parser": "^1.25 || ^2", + "psr/container": "^1.0 || ^2.0", + "psr/log": "^1.1 || ^2 || ^3", + "symfony/finder": "^5.3 || ^6.0 || ^7.0 || ^8.0" }, "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" + "ergebnis/composer-normalize": "^2.49", + "ext-ds": "*", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^10.5", + "roave/security-advisories": "dev-master", + "squizlabs/php_codesniffer": "^4.0.1", + "symfony/property-access": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/serializer": "^5.4 || ^6.0 || ^7.0 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1.x-dev" - } - }, "autoload": { "psr-4": { - "Version\\": "src/" + "ComposerUnused\\SymbolParser\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4536,76 +4881,67 @@ ], "authors": [ { - "name": "Nikola Poša", - "email": "posa.nikola@gmail.com", - "homepage": "https://www.nikolaposa.in.rs" + "name": "Andreas Frömer", + "email": "composer-unused@icanhazstring.com" } ], - "description": "Value Object that represents a SemVer-compliant version number.", - "homepage": "https://github.com/nikolaposa/version", + "description": "Toolkit to parse symbols from a composer package", + "homepage": "https://github.com/composer-unused/symbol-parser", "keywords": [ - "semantic", - "semver", - "version", - "versioning" + "composer", + "parser", + "symbol" + ], + "support": { + "issues": "https://github.com/composer-unused/symbol-parser/issues", + "source": "https://github.com/composer-unused/symbol-parser" + }, + "funding": [ + { + "url": "https://github.com/sponsors/icanhazstring", + "type": "github" + }, + { + "url": "https://paypal.me/icanhazstring", + "type": "other" + } ], - "support": { - "issues": "https://github.com/nikolaposa/version/issues", - "source": "https://github.com/nikolaposa/version/tree/4.1.1" - }, - "time": "2023-08-04T17:13:40+00:00" + "time": "2026-01-29T13:38:57+00:00" }, { - "name": "nunomaduro/collision", - "version": "v7.10.0", + "name": "composer/ca-bundle", + "version": "1.5.13", "source": { "type": "git", - "url": "https://github.com/nunomaduro/collision.git", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2" + "url": "https://github.com/composer/ca-bundle.git", + "reference": "c008272789979f709f7fcb32c2ecf1d2db5e84e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/c008272789979f709f7fcb32c2ecf1d2db5e84e5", + "reference": "c008272789979f709f7fcb32c2ecf1d2db5e84e5", "shasum": "" }, "require": { - "filp/whoops": "^2.15.3", - "nunomaduro/termwind": "^1.15.1", - "php": "^8.1.0", - "symfony/console": "^6.3.4" - }, - "conflict": { - "laravel/framework": ">=11.0.0" + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^7.2 || ^8.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" + "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": { - "laravel": { - "providers": [ - "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" - ] + "branch-alias": { + "dev-main": "1.x-dev" } }, "autoload": { - "files": [ - "./src/Adapters/Phpunit/Autoload.php" - ], "psr-4": { - "NunoMaduro\\Collision\\": "src/" + "Composer\\CaBundle\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4614,88 +4950,72 @@ ], "authors": [ { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" } ], - "description": "Cli error handling for console/command-line PHP applications.", + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", "keywords": [ - "artisan", - "cli", - "command-line", - "console", - "error", - "handling", - "laravel", - "laravel-zero", - "php", - "symfony" + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" ], "support": { - "issues": "https://github.com/nunomaduro/collision/issues", - "source": "https://github.com/nunomaduro/collision" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.5.13" }, "funding": [ { - "url": "https://www.paypal.com/paypalme/enunomaduro", + "url": "https://packagist.com", "type": "custom" }, { - "url": "https://github.com/nunomaduro", + "url": "https://github.com/composer", "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" } ], - "time": "2023-10-11T15:45:01+00:00" + "time": "2026-07-18T12:35:13+00:00" }, { - "name": "nunomaduro/termwind", - "version": "v1.15.1", + "name": "composer/class-map-generator", + "version": "1.7.3", "source": { "type": "git", - "url": "https://github.com/nunomaduro/termwind.git", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" + "url": "https://github.com/composer/class-map-generator.git", + "reference": "86d8208fc3c649a3a999daf1a63c25201be2990f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/86d8208fc3c649a3a999daf1a63c25201be2990f", + "reference": "86d8208fc3c649a3a999daf1a63c25201be2990f", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": "^8.0", - "symfony/console": "^5.3.0|^6.0.0" - }, - "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", - "thecodingmachine/phpstan-strict-rules": "^1.0.0" + "composer/pcre": "^2.1 || ^3.1", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7 || ^8" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-deprecation-rules": "^1 || ^2", + "phpstan/phpstan-phpunit": "^1 || ^2", + "phpstan/phpstan-strict-rules": "^1.1 || ^2", + "phpunit/phpunit": "^8", + "symfony/filesystem": "^5.4 || ^6 || ^7 || ^8" }, "type": "library", "extra": { - "laravel": { - "providers": [ - "Termwind\\Laravel\\TermwindServiceProvider" - ] + "branch-alias": { + "dev-main": "1.x-dev" } }, "autoload": { - "files": [ - "src/Functions.php" - ], "psr-4": { - "Termwind\\": "src/" + "Composer\\ClassMapGenerator\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4704,72 +5024,101 @@ ], "authors": [ { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" } ], - "description": "Its like Tailwind CSS, but for the console.", + "description": "Utilities to scan PHP code and generate class maps.", "keywords": [ - "cli", - "console", - "css", - "package", - "php", - "style" + "classmap" ], "support": { - "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.7.3" }, "funding": [ { - "url": "https://www.paypal.com/paypalme/enunomaduro", + "url": "https://packagist.com", "type": "custom" }, { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://github.com/xiCO2k", + "url": "https://github.com/composer", "type": "github" } ], - "time": "2023-02-08T01:06:31+00:00" + "time": "2026-05-05T09:17:07+00:00" }, { - "name": "ocramius/package-versions", - "version": "2.8.0", + "name": "composer/composer", + "version": "2.10.2", "source": { "type": "git", - "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "7b5821f854cf1e6753c4ed7ceb3b11ae83bbad4e" + "url": "https://github.com/composer/composer.git", + "reference": "8d4439f572a97670a9edc039eb3b093cc976b4bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/7b5821f854cf1e6753c4ed7ceb3b11ae83bbad4e", - "reference": "7b5821f854cf1e6753c4ed7ceb3b11ae83bbad4e", + "url": "https://api.github.com/repos/composer/composer/zipball/8d4439f572a97670a9edc039eb3b093cc976b4bc", + "reference": "8d4439f572a97670a9edc039eb3b093cc976b4bc", "shasum": "" }, "require": { - "composer-runtime-api": "^2.2.0", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "replace": { - "composer/package-versions-deprecated": "*" + "composer/ca-bundle": "^1.5", + "composer/class-map-generator": "^1.4.0", + "composer/metadata-minifier": "^1.0", + "composer/pcre": "^2.3 || ^3.3", + "composer/semver": "^3.3", + "composer/spdx-licenses": "^1.5.7", + "composer/xdebug-handler": "^2.0.2 || ^3.0.3", + "ext-json": "*", + "justinrainbow/json-schema": "^6.5.1", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "react/promise": "^3.3", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.2", + "seld/signal-handler": "^2.0", + "symfony/console": "^5.4.47 || ^6.4.25 || ^7.1.10 || ^8.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.1.10 || ^8.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.1.10 || ^8.0", + "symfony/polyfill-php73": "^1.24", + "symfony/polyfill-php80": "^1.24", + "symfony/polyfill-php81": "^1.24", + "symfony/polyfill-php84": "^1.30", + "symfony/process": "^5.4.47 || ^6.4.25 || ^7.1.10 || ^8.0" }, "require-dev": { - "composer/composer": "^2.6.3", - "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" + "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.25 || ^7.3.3 || ^8.0" + }, + "suggest": { + "ext-curl": "Provides HTTP support (will fallback to PHP streams if missing)", + "ext-openssl": "Enables access to repositories and packages over HTTPS", + "ext-zip": "Allows direct extraction of ZIP archives (unzip/7z binaries will be used instead if available)", + "ext-zlib": "Enables gzip for HTTP requests" }, + "bin": [ + "bin/composer" + ], "type": "library", + "extra": { + "phpstan": { + "includes": [ + "phpstan/rules.neon" + ] + }, + "branch-alias": { + "dev-main": "2.10-dev" + } + }, "autoload": { "psr-4": { - "PackageVersions\\": "src/PackageVersions" + "Composer\\": "src/Composer/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4778,57 +5127,72 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "https://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" } ], - "description": "Provides efficient querying for installed package versions (no runtime IO)", + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], "support": { - "issues": "https://github.com/Ocramius/PackageVersions/issues", - "source": "https://github.com/Ocramius/PackageVersions/tree/2.8.0" + "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.10.2" }, "funding": [ { - "url": "https://github.com/Ocramius", - "type": "github" + "url": "https://packagist.com", + "type": "custom" }, { - "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", - "type": "tidelift" + "url": "https://github.com/composer", + "type": "github" } ], - "time": "2023-09-15T11:02:59+00:00" + "time": "2026-07-01T09:24:45+00:00" }, { - "name": "ondram/ci-detector", - "version": "4.1.0", + "name": "composer/metadata-minifier", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/OndraM/ci-detector.git", - "reference": "8a4b664e916df82ff26a44709942dfd593fa6f30" + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "8e86142e3ade750b837d55e55f0cdc786d8da006" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OndraM/ci-detector/zipball/8a4b664e916df82ff26a44709942dfd593fa6f30", - "reference": "8a4b664e916df82ff26a44709942dfd593fa6f30", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/8e86142e3ade750b837d55e55f0cdc786d8da006", + "reference": "8e86142e3ade750b837d55e55f0cdc786d8da006", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.2", - "lmc/coding-standard": "^1.3 || ^2.1", - "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" + "composer/composer": "^2", + "phpstan/phpstan": "^1", + "symfony/phpunit-bridge": "^4.2 || ^5 || ^6 || ^7" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, "autoload": { "psr-4": { - "OndraM\\CiDetector\\": "src/" + "Composer\\MetadataMinifier\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4837,82 +5201,72 @@ ], "authors": [ { - "name": "Ondřej Machulda", - "email": "ondrej.machulda@gmail.com" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" } ], - "description": "Detect continuous integration environment and provide unified access to properties of current build", + "description": "Small utility library that handles metadata minification and expansion.", "keywords": [ - "CircleCI", - "Codeship", - "Wercker", - "adapter", - "appveyor", - "aws", - "aws codebuild", - "azure", - "azure devops", - "azure pipelines", - "bamboo", - "bitbucket", - "buddy", - "ci-info", - "codebuild", - "continuous integration", - "continuousphp", - "devops", - "drone", - "github", - "gitlab", - "interface", - "jenkins", - "pipelines", - "sourcehut", - "teamcity", - "travis" + "composer", + "compression" ], "support": { - "issues": "https://github.com/OndraM/ci-detector/issues", - "source": "https://github.com/OndraM/ci-detector/tree/4.1.0" + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.1" }, - "time": "2021-04-14T09:16:52+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2026-06-30T11:34:59+00:00" }, { - "name": "orklah/psalm-insane-comparison", - "version": "v2.2.0", + "name": "composer/pcre", + "version": "3.4.0", "source": { "type": "git", - "url": "https://github.com/orklah/psalm-insane-comparison.git", - "reference": "f0e44bf31678d189c8ee4556598d0ad6e3f853c9" + "url": "https://github.com/composer/pcre.git", + "reference": "d5a341b3fb61f3001970940afb1d332968a183ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orklah/psalm-insane-comparison/zipball/f0e44bf31678d189c8ee4556598d0ad6e3f853c9", - "reference": "f0e44bf31678d189c8ee4556598d0ad6e3f853c9", + "url": "https://api.github.com/repos/composer/pcre/zipball/d5a341b3fb61f3001970940afb1d332968a183ed", + "reference": "d5a341b3fb61f3001970940afb1d332968a183ed", "shasum": "" }, "require": { - "ext-simplexml": "*", - "php": "^7.3|^8.0" + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<2.2.2" }, "require-dev": { - "nikic/php-parser": "^4.0", - "vimeo/psalm": "^4.0|^5" + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^9" }, - "type": "psalm-plugin", + "type": "library", "extra": { - "psalm": { - "pluginClass": "Orklah\\PsalmInsaneComparison\\Plugin" + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "Orklah\\PsalmInsaneComparison\\": [ - "." - ], - "Orklah\\PsalmInsaneComparison\\Hooks\\": [ - "hooks" - ] + "Composer\\Pcre\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4921,223 +5275,287 @@ ], "authors": [ { - "name": "orklah" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" } ], - "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.2.0" - }, - "time": "2023-01-06T09:06:11+00:00" + "time": "2026-06-07T11:47:49+00:00" }, { - "name": "pepakriz/phpstan-exception-rules", - "version": "v0.12.0", + "name": "composer/semver", + "version": "3.4.4", "source": { "type": "git", - "url": "https://github.com/pepakriz/phpstan-exception-rules.git", - "reference": "c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd" + "url": "https://github.com/composer/semver.git", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pepakriz/phpstan-exception-rules/zipball/c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd", - "reference": "c5f3fe501e5a6c57c33fb678ad9278131bc1b9bd", + "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", "shasum": "" }, "require": { - "nikic/php-parser": "^4.13", - "php": ">=7.1", - "phpstan/phpstan": "^1.0" + "php": "^5.3.2 || ^7.0 || ^8.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" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, - "type": "phpstan-extension", + "type": "library", "extra": { "branch-alias": { - "dev-master": "0.12-dev" - }, - "phpstan": { - "includes": [ - "extension.neon" - ] + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "Pepakriz\\PHPStanExceptionRules\\": "src" + "Composer\\Semver\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Exception rules for PHPStan", + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], "support": { - "issues": "https://github.com/pepakriz/phpstan-exception-rules/issues", - "source": "https://github.com/pepakriz/phpstan-exception-rules/tree/v0.12.0" + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.4" }, - "time": "2021-11-07T19:03:56+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2025-08-20T19:15:30+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.3", + "name": "composer/spdx-licenses", + "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "5ecd0cb4177696f9fd48f1605dda81db3dee7889" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/5ecd0cb4177696f9fd48f1605dda81db3dee7889", + "reference": "5ecd0cb4177696f9fd48f1605dda81db3dee7889", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", "php": "^7.2 || ^8.0" }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^6.4.25 || ^7.3.3 || ^8.0" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "1.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\Spdx\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.6.0" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2026-04-08T20:18:39+00:00" }, { - "name": "phar-io/version", - "version": "3.2.1", + "name": "composer/xdebug-handler", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "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.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "url": "https://github.com/composer", + "type": "github" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" } ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { - "name": "php-coveralls/php-coveralls", - "version": "v2.6.0", + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.2.1", "source": { "type": "git", - "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "9e88d7d38e9eab7c675da674481784321ea7a9bc" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "963f0c67bffde0eac41b56be71ac0e8ba132f0bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/9e88d7d38e9eab7c675da674481784321ea7a9bc", - "reference": "9e88d7d38e9eab7c675da674481784321ea7a9bc", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/963f0c67bffde0eac41b56be71ac0e8ba132f0bd", + "reference": "963f0c67bffde0eac41b56be71ac0e8ba132f0bd", "shasum": "" }, "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0 || ^7.0", - "php": "^5.5 || ^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" + "composer-plugin-api": "^2.2", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.1.0 || ^4.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", - "sanmai/phpunit-legacy-adapter": "^6.1 || ^8.0" + "composer/composer": "^2.2", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev", + "yoast/phpunit-polyfills": "^1.0" }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, - "bin": [ - "bin/php-coveralls" - ], - "type": "library", "autoload": { "psr-4": { - "PhpCoveralls\\": "src/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5146,123 +5564,172 @@ ], "authors": [ { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp", - "role": "Original creator" + "name": "Franck Nijhof", + "email": "opensource@frenck.dev", + "homepage": "https://frenck.dev", + "role": "Open source developer" }, { - "name": "Takashi Matsuo", - "email": "tmatsuo@google.com" + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "security": "https://github.com/PHPCSStandards/composer-installer/security/policy", + "source": "https://github.com/PHPCSStandards/composer-installer" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" }, { - "name": "Google Inc" + "url": "https://github.com/jrfnl", + "type": "github" }, { - "name": "Dariusz Ruminski", - "email": "dariusz.ruminski@gmail.com", - "homepage": "https://github.com/keradus" + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" }, { - "name": "Contributors", - "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/php-coveralls/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "support": { - "issues": "https://github.com/php-coveralls/php-coveralls/issues", - "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.6.0" - }, - "time": "2023-07-16T08:39:10+00:00" + "time": "2026-05-06T08:26:05+00:00" }, { - "name": "php-parallel-lint/php-console-color", - "version": "v1.0.1", + "name": "doctrine/coding-standard", + "version": "14.0.0", "source": { "type": "git", - "url": "https://github.com/php-parallel-lint/PHP-Console-Color.git", - "reference": "7adfefd530aa2d7570ba87100a99e2483a543b88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/7adfefd530aa2d7570ba87100a99e2483a543b88", - "reference": "7adfefd530aa2d7570ba87100a99e2483a543b88", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "replace": { - "jakub-onderka/php-console-color": "*" - }, - "require-dev": { - "php-parallel-lint/php-code-style": "^2.0", - "php-parallel-lint/php-parallel-lint": "^1.0", - "php-parallel-lint/php-var-dump-check": "0.*", - "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + "url": "https://github.com/doctrine/coding-standard.git", + "reference": "897a7dc209e49ee6cf04e689c41112df17967130" }, - "type": "library", - "autoload": { - "psr-4": { - "PHP_Parallel_Lint\\PhpConsoleColor\\": "src/" - } + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/897a7dc209e49ee6cf04e689c41112df17967130", + "reference": "897a7dc209e49ee6cf04e689c41112df17967130", + "shasum": "" }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0.0", + "php": "^7.4 || ^8.0", + "slevomat/coding-standard": "^8.23", + "squizlabs/php_codesniffer": "^4" + }, + "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], "authors": [ { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com" + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Steve Müller", + "email": "st.mueller@dzh-online.de" } ], - "description": "Simple library for creating colored console ouput.", + "description": "The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/coding-standard.html", + "keywords": [ + "checks", + "code", + "coding", + "cs", + "dev", + "doctrine", + "rules", + "sniffer", + "sniffs", + "standard", + "style" + ], "support": { - "issues": "https://github.com/php-parallel-lint/PHP-Console-Color/issues", - "source": "https://github.com/php-parallel-lint/PHP-Console-Color/tree/v1.0.1" + "issues": "https://github.com/doctrine/coding-standard/issues", + "source": "https://github.com/doctrine/coding-standard/tree/14.0.0" }, - "time": "2021-12-25T06:49:29+00:00" + "time": "2025-09-21T18:21:47+00:00" }, { - "name": "php-parallel-lint/php-console-highlighter", - "version": "v1.0.0", + "name": "ergebnis/composer-normalize", + "version": "2.52.0", "source": { "type": "git", - "url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git", - "reference": "5b4803384d3303cf8e84141039ef56c8a123138d" + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "988f83f5e51a42cdd2337e5fcd935432f8dfa33c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/5b4803384d3303cf8e84141039ef56c8a123138d", - "reference": "5b4803384d3303cf8e84141039ef56c8a123138d", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/988f83f5e51a42cdd2337e5fcd935432f8dfa33c", + "reference": "988f83f5e51a42cdd2337e5fcd935432f8dfa33c", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=5.3.2", - "php-parallel-lint/php-console-color": "^1.0.1" - }, - "replace": { - "jakub-onderka/php-console-highlighter": "*" + "composer-plugin-api": "^2.0.0", + "ergebnis/json": "^1.4.0", + "ergebnis/json-normalizer": "^4.9.0", + "ergebnis/json-printer": "^3.7.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12 || ^6.0.0", + "localheinz/diff": "^1.3.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + }, + "require-dev": { + "composer/composer": "^2.9.8", + "ergebnis/license": "^2.7.0", + "ergebnis/php-cs-fixer-config": "^6.62.1", + "ergebnis/phpstan-rules": "^2.13.1", + "ergebnis/phpunit-slow-test-detector": "^2.24.0", + "ergebnis/rector-rules": "^1.18.1", + "fakerphp/faker": "^1.24.1", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.54", + "phpstan/phpstan-deprecation-rules": "^2.0.4", + "phpstan/phpstan-phpunit": "^2.0.16", + "phpstan/phpstan-strict-rules": "^2.0.11", + "phpunit/phpunit": "^9.6.33", + "rector/rector": "^2.4.3", + "symfony/filesystem": "^5.4.41" }, - "require-dev": { - "php-parallel-lint/php-code-style": "^2.0", - "php-parallel-lint/php-parallel-lint": "^1.0", - "php-parallel-lint/php-var-dump-check": "0.*", - "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "branch-alias": { + "dev-main": "2.52-dev" + }, + "plugin-optional": true, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } }, - "type": "library", "autoload": { "psr-4": { - "PHP_Parallel_Lint\\PhpConsoleHighlighter\\": "src/" + "Ergebnis\\Composer\\Normalize\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5271,110 +5738,155 @@ ], "authors": [ { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Highlight PHP code in terminal", + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], "support": { - "issues": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/issues", - "source": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/tree/v1.0.0" + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/composer-normalize" }, - "time": "2022-02-18T08:23:19+00:00" + "time": "2026-05-15T15:39:24+00:00" }, { - "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.3.2", + "name": "ergebnis/json", + "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" + "url": "https://github.com/ergebnis/json.git", + "reference": "7b56d2b5d9e897e75b43e2e753075a0904c921b1" }, "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/ergebnis/json/zipball/7b56d2b5d9e897e75b43e2e753075a0904c921b1", + "reference": "7b56d2b5d9e897e75b43e2e753075a0904c921b1", "shasum": "" }, "require": { "ext-json": "*", - "php": ">=5.3.0" - }, - "replace": { - "grogy/php-parallel-lint": "*", - "jakub-onderka/php-parallel-lint": "*" - }, - "require-dev": { - "nette/tester": "^1.3 || ^2.0", - "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "suggest": { - "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.44.0", + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpstan-rules": "^2.11.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.22", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpstan/phpstan-phpunit": "^2.0.7", + "phpstan/phpstan-strict-rules": "^2.0.6", + "phpunit/phpunit": "^9.6.24", + "rector/rector": "^2.1.4" }, - "bin": [ - "parallel-lint" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.7-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, "autoload": { - "classmap": [ - "./src/" - ] + "psr-4": { + "Ergebnis\\Json\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], "authors": [ { - "name": "Jakub Onderka", - "email": "ahoj@jakubonderka.cz" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "This tool check syntax of PHP files about 20x faster than serial check.", - "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", + "description": "Provides a Json value object for representing a valid JSON string.", + "homepage": "https://github.com/ergebnis/json", + "keywords": [ + "json" + ], "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" + "issues": "https://github.com/ergebnis/json/issues", + "security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json" }, - "time": "2022-02-21T12:50:22+00:00" + "time": "2025-09-06T09:08:45+00:00" }, { - "name": "php-standard-library/psalm-plugin", - "version": "2.2.1", + "name": "ergebnis/json-normalizer", + "version": "4.10.1", "source": { "type": "git", - "url": "https://github.com/php-standard-library/psalm-plugin.git", - "reference": "068bc7a8fcbe53658c94d54eec65205eb7e6caae" + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "77961faf2c651c3f05977b53c6c68e8434febf62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-standard-library/psalm-plugin/zipball/068bc7a8fcbe53658c94d54eec65205eb7e6caae", - "reference": "068bc7a8fcbe53658c94d54eec65205eb7e6caae", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/77961faf2c651c3f05977b53c6c68e8434febf62", + "reference": "77961faf2c651c3f05977b53c6c68e8434febf62", "shasum": "" }, "require": { - "php": "^8.1", - "vimeo/psalm": "^5.0" - }, - "conflict": { - "azjezz/psl": "<2.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 || ^6.0.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + }, + "require-dev": { + "composer/semver": "^3.4.3", + "ergebnis/composer-normalize": "^2.44.0", + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.19", + "rector/rector": "^1.2.10" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", - "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.5" + "suggest": { + "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" }, - "type": "psalm-plugin", + "type": "library", "extra": { - "psalm": { - "pluginClass": "Psl\\Psalm\\Plugin" + "branch-alias": { + "dev-main": "4.11-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" } }, "autoload": { "psr-4": { - "Psl\\Psalm\\": "src/" + "Ergebnis\\Json\\Normalizer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5383,43 +5895,72 @@ ], "authors": [ { - "name": "azjezz", - "email": "azjezz@protonmail.com" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Psalm plugin for the PHP Standard Library", + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], "support": { - "issues": "https://github.com/php-standard-library/psalm-plugin/issues", - "source": "https://github.com/php-standard-library/psalm-plugin/tree/2.2.1" + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-normalizer" }, - "time": "2022-12-06T10:44:56+00:00" + "time": "2025-09-06T09:18:13+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", + "name": "ergebnis/json-pointer", + "version": "3.8.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "url": "https://github.com/ergebnis/json-pointer.git", + "reference": "b58c3c468a7ff109fdf9a255f17de29ecbe5276c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/b58c3c468a7ff109fdf9a255f17de29ecbe5276c", + "reference": "b58c3c468a7ff109fdf9a255f17de29ecbe5276c", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.50.0", + "ergebnis/data-provider": "^3.6.0", + "ergebnis/license": "^2.7.0", + "ergebnis/php-cs-fixer-config": "^6.60.2", + "ergebnis/phpstan-rules": "^2.13.1", + "ergebnis/phpunit-slow-test-detector": "^2.24.0", + "ergebnis/rector-rules": "^1.16.0", + "fakerphp/faker": "^1.24.1", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.46", + "phpstan/phpstan-deprecation-rules": "^2.0.4", + "phpstan/phpstan-phpunit": "^2.0.16", + "phpstan/phpstan-strict-rules": "^2.0.10", + "phpunit/phpunit": "^9.6.34", + "rector/rector": "^2.4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-2.x": "2.x-dev" + "dev-main": "3.8-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src/" + "Ergebnis\\Json\\Pointer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5428,59 +5969,73 @@ ], "authors": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", + "description": "Provides an abstraction of a JSON pointer.", + "homepage": "https://github.com/ergebnis/json-pointer", "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" + "RFC6901", + "json", + "pointer" ], "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + "issues": "https://github.com/ergebnis/json-pointer/issues", + "security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-pointer" }, - "time": "2020-06-27T09:03:43+00:00" + "time": "2026-04-07T14:52:13+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", + "name": "ergebnis/json-printer", + "version": "3.8.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "211d73fc7ec6daf98568ee6ed6e6d133dee8503e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/211d73fc7ec6daf98568ee6ed6e6d133dee8503e", + "reference": "211d73fc7ec6daf98568ee6ed6e6d133dee8503e", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" + "ext-json": "*", + "ext-mbstring": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" }, "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" + "ergebnis/composer-normalize": "^2.44.0", + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.1", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.21", + "rector/rector": "^1.2.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.x-dev" + "dev-main": "3.9-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "Ergebnis\\Json\\Printer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5489,60 +6044,75 @@ ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + "issues": "https://github.com/ergebnis/json-printer/issues", + "security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-printer" }, - "time": "2021-10-19T17:43:47+00:00" + "time": "2025-09-06T09:59:26+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "1.7.3", + "name": "ergebnis/json-schema-validator", + "version": "4.5.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + "url": "https://github.com/ergebnis/json-schema-validator.git", + "reference": "b739527a480a9e3651360ad351ea77e7e9019df2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/b739527a480a9e3651360ad351ea77e7e9019df2", + "reference": "b739527a480a9e3651360ad351ea77e7e9019df2", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" + "ergebnis/json": "^1.2.0", + "ergebnis/json-pointer": "^3.4.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12 || ^6.0.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.44.0", + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.20", + "rector/rector": "^1.2.10" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-main": "4.6-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "Ergebnis\\Json\\SchemaValidator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5551,52 +6121,72 @@ ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", + "homepage": "https://github.com/ergebnis/json-schema-validator", + "keywords": [ + "json", + "schema", + "validator" + ], "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-schema-validator" }, - "time": "2023-08-12T11:01:26+00:00" + "time": "2025-09-06T11:37:35+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.17.0", + "name": "ergebnis/phpstan-rules", + "version": "2.13.1", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2" + "url": "https://github.com/ergebnis/phpstan-rules.git", + "reference": "f69db86b98595c34fc1f61c89fe3b380141aa519" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/15873c65b207b07765dbc3c95d20fdf4a320cbe2", - "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/f69db86b98595c34fc1f61c89fe3b380141aa519", + "reference": "f69db86b98595c34fc1f61c89fe3b380141aa519", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^8.0 || ^9.0" + "ext-mbstring": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", + "phpstan/phpstan": "^2.1.35" + }, + "require-dev": { + "codeception/codeception": "^4.0.0 || ^5.0.0", + "doctrine/orm": "^2.20.0 || ^3.3.0", + "ergebnis/composer-normalize": "^2.49.0", + "ergebnis/license": "^2.7.0", + "ergebnis/php-cs-fixer-config": "^6.59.0", + "ergebnis/phpunit-slow-test-detector": "^2.20.0", + "fakerphp/faker": "^1.24.1", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpstan/phpstan-phpunit": "^2.0.12", + "phpstan/phpstan-strict-rules": "^2.0.8", + "phpunit/phpunit": "^9.6.21", + "psr/container": "^2.0.2", + "symfony/finder": "^5.4.45", + "symfony/process": "^5.4.47" }, - "type": "library", + "type": "phpstan-extension", "extra": { - "branch-alias": { - "dev-master": "1.x-dev" + "phpstan": { + "includes": [ + "rules.neon" + ] } }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "Ergebnis\\PHPStan\\Rules\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5605,59 +6195,68 @@ ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "description": "Provides rules for phpstan/phpstan.", + "homepage": "https://github.com/ergebnis/phpstan-rules", "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" + "PHPStan", + "phpstan-rules" ], "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.17.0" + "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-02-02T15:41:36+00:00" + "time": "2026-01-27T17:13:06+00:00" }, { - "name": "phpspec/prophecy-phpunit", - "version": "v2.0.2", + "name": "ergebnis/phpunit-slow-test-detector", + "version": "2.24.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "9f26c224a2fa335f33e6666cc078fbf388255e87" + "url": "https://github.com/ergebnis/phpunit-slow-test-detector.git", + "reference": "e713c1397b09e07892657cdf909731d29481ff4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/9f26c224a2fa335f33e6666cc078fbf388255e87", - "reference": "9f26c224a2fa335f33e6666cc078fbf388255e87", + "url": "https://api.github.com/repos/ergebnis/phpunit-slow-test-detector/zipball/e713c1397b09e07892657cdf909731d29481ff4c", + "reference": "e713c1397b09e07892657cdf909731d29481ff4c", "shasum": "" }, "require": { - "php": "^7.3 || ^8", - "phpspec/prophecy": "^1.3", - "phpunit/phpunit": "^9.1" + "php": "~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", + "phpunit/phpunit": "^6.5.0 || ^7.5.0 || ^8.5.19 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.50.0", + "ergebnis/license": "^2.7.0", + "ergebnis/php-cs-fixer-config": "^6.60.1", + "fakerphp/faker": "~1.20.0", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.11", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.1", + "phpstan/phpstan-strict-rules": "^1.6.1", + "psr/container": "~1.0.0", + "rector/rector": "^1.2.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "2.16-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" } }, "autoload": { "psr-4": { - "Prophecy\\PhpUnit\\": "src" + "Ergebnis\\PHPUnit\\SlowTestDetector\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5666,428 +6265,391 @@ ], "authors": [ { - "name": "Christophe Coevoet", - "email": "stof@notk.org" + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Integrating the Prophecy mocking library in PHPUnit test cases", - "homepage": "http://phpspec.net", + "description": "Provides facilities for detecting slow tests in phpunit/phpunit.", + "homepage": "https://github.com/ergebnis/phpunit-slow-test-detector", "keywords": [ + "detector", + "extension", "phpunit", - "prophecy" + "slow", + "test" ], "support": { - "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.2" + "issues": "https://github.com/ergebnis/phpunit-slow-test-detector/issues", + "security": "https://github.com/ergebnis/phpunit-slow-test-detector/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/phpunit-slow-test-detector" }, - "time": "2023-04-18T11:58:05+00:00" + "time": "2026-03-13T10:52:55+00:00" }, { - "name": "phpstan/phpdoc-parser", - "version": "1.24.2", + "name": "fidry/cpu-core-counter", + "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "bcad8d995980440892759db0c32acae7c8e79442" + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", - "reference": "bcad8d995980440892759db0c32acae7c8e79442", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/annotations": "^2.0", - "nikic/php-parser": "^4.15", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "symfony/process": "^5.2" + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" }, "type": "library", "autoload": { "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] + "Fidry\\CpuCoreCounter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", - "support": { - "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" - }, - "time": "2023-09-26T12:28:12+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.10.39", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d9dedb0413f678b4d03cbc2279a48f91592c97c4", - "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } ], - "description": "PHPStan - PHP Static Analysis Tool", + "description": "Tiny utility to get the number of CPU cores.", "keywords": [ - "dev", - "static analysis" + "CPU", + "core" ], "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" }, "funding": [ { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", + "url": "https://github.com/theofidry", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2023-10-17T15:46:26+00:00" + "time": "2025-08-14T07:29:31+00:00" }, { - "name": "phpstan/phpstan-deprecation-rules", - "version": "1.1.4", + "name": "hamcrest/hamcrest-php", + "version": "v2.1.1", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa" + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", - "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10.3" + "php": "^7.4|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" }, "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" + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" }, - "type": "phpstan-extension", + "type": "library", "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] + "branch-alias": { + "dev-master": "2.1-dev" } }, "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } + "classmap": [ + "hamcrest" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" ], - "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" + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" }, - "time": "2023-08-05T09:02:04+00:00" + "time": "2025-04-30T06:54:44+00:00" }, { - "name": "phpstan/phpstan-mockery", - "version": "1.1.1", + "name": "icanhazstring/composer-unused", + "version": "0.9.6", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan-mockery.git", - "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6" + "url": "https://github.com/composer-unused/composer-unused.git", + "reference": "c60030af7954a528746dd2180c10b5e0871e84c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", - "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", + "url": "https://api.github.com/repos/composer-unused/composer-unused/zipball/c60030af7954a528746dd2180c10b5e0871e84c7", + "reference": "c60030af7954a528746dd2180c10b5e0871e84c7", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "composer-runtime-api": "^2.0", + "composer-unused/contracts": "^0.3", + "composer-unused/symbol-parser": "^0.3.1", + "composer/xdebug-handler": "^3.0", + "ext-json": "*", + "nikic/php-parser": "^5.0", + "ondram/ci-detector": "^4.1", + "php": "^8.1", + "phpstan/phpdoc-parser": "^1.25 || ^2", + "psr/container": "^1.0 || ^2.0", + "psr/log": "^1.1 || ^2 || ^3", + "symfony/config": "^6.0 || ^7.0 || ^8.0", + "symfony/console": "^6.0 || ^7.0 || ^8.0", + "symfony/dependency-injection": "^6.0 || ^7.0 || ^8.0", + "symfony/property-access": "^6.0 || ^7.0 || ^8.0", + "symfony/serializer": "^6.0 || ^7.0 || ^8.0", + "webmozart/assert": "^1.10 || ^2.0", + "webmozart/glob": "^4.4" }, "require-dev": { - "mockery/mockery": "^1.2.4", - "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", - "phpunit/phpunit": "^9.5" + "bamarni/composer-bin-plugin": "^1.8", + "codeception/verify": "^3.1", + "dg/bypass-finals": "^1.6", + "ergebnis/composer-normalize": "^2.49", + "ext-ds": "*", + "ext-zend-opcache": "*", + "jangregor/phpstan-prophecy": "^2.1.1", + "mikey179/vfsstream": "^1.6.10", + "php-ds/php-ds": "^1.5", + "phpspec/prophecy-phpunit": "^2.2.0", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan": "^2.1.37", + "phpstan/phpstan-phpunit": "^2.0.12", + "phpunit/phpunit": "^9.6.34", + "roave/security-advisories": "dev-master", + "squizlabs/php_codesniffer": "^3.13" }, - "type": "phpstan-extension", + "bin": [ + "bin/composer-unused" + ], + "type": "library", "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] + "bamarni-bin": { + "bin-links": true, + "forward-command": true } }, "autoload": { "psr-4": { - "PHPStan\\": "src/" + "ComposerUnused\\ComposerUnused\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "PHPStan Mockery extension", + "authors": [ + { + "name": "Andreas Frömer", + "email": "composer-unused@icanhazstring.com" + } + ], + "description": "Show unused packages by scanning your code", + "homepage": "https://github.com/composer-unused/composer-unused", + "keywords": [ + "composer", + "php-parser", + "static analysis", + "unused" + ], "support": { - "issues": "https://github.com/phpstan/phpstan-mockery/issues", - "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.1" + "issues": "https://github.com/composer-unused/composer-unused/issues", + "source": "https://github.com/composer-unused/composer-unused" }, - "time": "2023-02-18T13:54:03+00:00" + "funding": [ + { + "url": "https://github.com/sponsors/icanhazstring", + "type": "github" + }, + { + "url": "https://paypal.me/icanhazstring", + "type": "other" + } + ], + "time": "2026-01-30T05:52:24+00:00" }, { - "name": "phpstan/phpstan-php-parser", - "version": "1.1.0", + "name": "infection/abstract-testframework-adapter", + "version": "0.5.1", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan-php-parser.git", - "reference": "1c7670dd92da864b5d019f22d9f512a6ae18b78e" + "url": "https://github.com/infection/abstract-testframework-adapter.git", + "reference": "b24bf3e850f70cd20a10621f08c3cef66f147ac8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-php-parser/zipball/1c7670dd92da864b5d019f22d9f512a6ae18b78e", - "reference": "1c7670dd92da864b5d019f22d9f512a6ae18b78e", + "url": "https://api.github.com/repos/infection/abstract-testframework-adapter/zipball/b24bf3e850f70cd20a10621f08c3cef66f147ac8", + "reference": "b24bf3e850f70cd20a10621f08c3cef66f147ac8", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^1.3" + "php": "^8.3" }, "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } + "ergebnis/composer-normalize": "^2.18", + "fidry/makefile": "^1.0", + "friendsofphp/php-cs-fixer": "^3.95.2", + "phpunit/phpunit": "^12.0 || ^13.0", + "rector/rector": "^2.4.5" }, + "type": "library", "autoload": { "psr-4": { - "PHPStan\\": "src/" + "Infection\\AbstractTestFramework\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "description": "PHP-Parser extensions for PHPStan", - "support": { - "issues": "https://github.com/phpstan/phpstan-php-parser/issues", - "source": "https://github.com/phpstan/phpstan-php-parser/tree/1.1.0" - }, - "abandoned": true, - "time": "2021-12-16T19:43:32+00:00" - }, - { - "name": "phpstan/phpstan-phpunit", - "version": "1.3.15", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", - "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" - }, - "conflict": { - "phpunit/phpunit": "<7.0" - }, - "require-dev": { - "nikic/php-parser": "^4.13.0", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-strict-rules": "^1.5.1", - "phpunit/phpunit": "^9.5" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "extension.neon", - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" + "authors": [ + { + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" ], - "description": "PHPUnit extensions and rules for PHPStan", + "description": "Abstract Test Framework Adapter for Infection", "support": { - "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.15" + "issues": "https://github.com/infection/abstract-testframework-adapter/issues", + "source": "https://github.com/infection/abstract-testframework-adapter/tree/0.5.1" }, - "time": "2023-10-09T18:58:39+00:00" + "funding": [ + { + "url": "https://github.com/infection", + "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2026-05-28T19:10:29+00:00" }, { - "name": "phpstan/phpstan-strict-rules", - "version": "1.5.1", + "name": "infection/extension-installer", + "version": "0.1.2", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6" + "url": "https://github.com/infection/extension-installer.git", + "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b21c03d4f6f3a446e4311155f4be9d65048218e6", - "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6", + "url": "https://api.github.com/repos/infection/extension-installer/zipball/9b351d2910b9a23ab4815542e93d541e0ca0cdcf", + "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "composer-plugin-api": "^1.1 || ^2.0" }, "require-dev": { - "nikic/php-parser": "^4.13.0", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "composer/composer": "^1.9 || ^2.0", + "friendsofphp/php-cs-fixer": "^2.18, <2.19", + "infection/infection": "^0.15.2", + "php-coveralls/php-coveralls": "^2.4", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.10", + "phpstan/phpstan-phpunit": "^0.12.6", + "phpstan/phpstan-strict-rules": "^0.12.2", + "phpstan/phpstan-webmozart-assert": "^0.12.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.8" }, - "type": "phpstan-extension", + "type": "composer-plugin", "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] - } + "class": "Infection\\ExtensionInstaller\\Plugin" }, "autoload": { "psr-4": { - "PHPStan\\": "src/" + "Infection\\ExtensionInstaller\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "description": "Extra strict and opinionated rules for PHPStan", + "authors": [ + { + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" + } + ], + "description": "Infection Extension Installer", "support": { - "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.1" + "issues": "https://github.com/infection/extension-installer/issues", + "source": "https://github.com/infection/extension-installer/tree/0.1.2" }, - "time": "2023-03-29T14:47:40+00:00" + "funding": [ + { + "url": "https://github.com/infection", + "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2021-10-20T22:08:34+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "name": "infection/include-interceptor", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "url": "https://github.com/infection/include-interceptor.git", + "reference": "c083331bc0cd1cd319ac1b7a08e3ad4a34aa7992" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/infection/include-interceptor/zipball/c083331bc0cd1cd319ac1b7a08e3ad4a34aa7992", + "reference": "c083331bc0cd1cd319ac1b7a08e3ad4a34aa7992", "shasum": "" }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "friendsofphp/php-cs-fixer": "^2.16", + "infection/infection": "^0.19.0", + "phan/phan": "^2.4 || ^3", + "php-coveralls/php-coveralls": "^2.2", + "phpstan/phpstan": "^0.12.8", + "phpunit/phpunit": "^8.5", + "vimeo/psalm": "^3.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Infection\\StreamWrapper\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6095,61 +6657,106 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], + "description": "Stream Wrapper: Include Interceptor. Allows to replace included (autoloaded) file with another one.", "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" + "issues": "https://github.com/infection/include-interceptor/issues", + "source": "https://github.com/infection/include-interceptor/tree/1.0.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/infection", "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2024-05-03T21:48:06+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "name": "infection/infection", + "version": "0.34.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "url": "https://github.com/infection/infection.git", + "reference": "263a6e303e343f1cdfa378d259a199c594d0731d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/infection/infection/zipball/263a6e303e343f1cdfa378d259a199c594d0731d", + "reference": "263a6e303e343f1cdfa378d259a199c594d0731d", "shasum": "" }, "require": { - "php": ">=7.3" + "colinodell/json5": "^3.0", + "composer-runtime-api": "^2.0", + "composer/xdebug-handler": "^3.0", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "fidry/cpu-core-counter": "^1.0", + "infection/abstract-testframework-adapter": "^0.5.0", + "infection/extension-installer": "^0.1.0", + "infection/include-interceptor": "^0.2.5 || ^1.0.0", + "infection/mutator": "^0.4", + "justinrainbow/json-schema": "^6.0", + "nikic/php-parser": "^5.6.2", + "ondram/ci-detector": "^4.1.0", + "php": "^8.3", + "psr/log": "^2.0 || ^3.0", + "sanmai/di-container": "^0.1.16", + "sanmai/duoclock": "^0.1.0", + "sanmai/later": "^0.1.7", + "sanmai/pipeline": "^7.2", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/filesystem": "^6.4 || ^7.4 || ^8.0", + "symfony/finder": "^6.4 || ^7.4 || ^8.0", + "symfony/polyfill-php85": "^1.33", + "symfony/process": "^6.4 || ^7.4 || ^8.0", + "thecodingmachine/safe": "^v3.0", + "webmozart/assert": "^1.11 || ^2.0" + }, + "conflict": { + "antecedent/patchwork": "<2.1.25", + "dg/bypass-finals": "<1.4.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "carthage-software/mago": "^1.20", + "ext-simplexml": "*", + "fidry/makefile": "^1.0", + "fig/log-test": "^1.2", + "phpat/phpat": "^0.12.4", + "phpbench/phpbench": "^1.4", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpstan/phpstan-webmozart-assert": "^2.0", + "phpunit/phpunit": "^12.5.29", + "rector/rector": "^2.2.4", + "shipmonk/dead-code-detector": "^1.3", + "shipmonk/name-collision-detector": "^2.1", + "sidz/phpstan-rules": "^0.5.1", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0", + "thecodingmachine/phpstan-safe-rule": "^1.4", + "webmozarts/strict-phpunit": "^7.15" }, + "bin": [ + "bin/infection" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Infection\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6157,63 +6764,84 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com", + "homepage": "https://twitter.com/maks_rafalko" + }, + { + "name": "Oleg Zhulnev", + "homepage": "https://github.com/sidz" + }, + { + "name": "Gert de Pagter", + "homepage": "https://github.com/BackEndTea" + }, + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com", + "homepage": "https://twitter.com/tfidry" + }, + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com", + "homepage": "https://www.alexeykopytko.com" + }, + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", "keywords": [ - "filesystem", - "iterator" + "coverage", + "mutant", + "mutation framework", + "mutation testing", + "testing", + "unit testing" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "issues": "https://github.com/infection/infection/issues", + "source": "https://github.com/infection/infection/tree/0.34.1" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/infection", "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2026-07-27T18:58:14+00:00" }, { - "name": "phpunit/php-invoker", - "version": "3.1.1", + "name": "infection/mutator", + "version": "0.4.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "url": "https://github.com/infection/mutator.git", + "reference": "3c976d721b02b32f851ee4e15d553ef1e9186d1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/infection/mutator/zipball/3c976d721b02b32f851ee4e15d553ef1e9186d1d", + "reference": "3c976d721b02b32f851ee4e15d553ef1e9186d1d", "shasum": "" }, "require": { - "php": ">=7.3" + "nikic/php-parser": "^5.0" }, "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" + "phpunit/phpunit": "^9.6 || ^10" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Infection\\Mutator\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6221,113 +6849,93 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" } ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], + "description": "Mutator interface to implement custom mutators (mutation operators) for Infection", "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "issues": "https://github.com/infection/mutator/issues", + "source": "https://github.com/infection/mutator/tree/0.4.1" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/infection", "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2025-04-29T08:19:52+00:00" }, { - "name": "phpunit/php-text-template", - "version": "2.0.4", + "name": "jetbrains/phpstorm-stubs", + "version": "v2026.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "url": "https://github.com/JetBrains/phpstorm-stubs", + "reference": "709e512210784a7c0a677b3a89d35def844a59b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/709e512210784a7c0a677b3a89d35def844a59b9", + "reference": "709e512210784a7c0a677b3a89d35def844a59b9", "shasum": "" }, - "require": { - "php": ">=7.3" - }, "require-dev": { - "phpunit/phpunit": "^9.3" + "friendsofphp/php-cs-fixer": "^v3.86", + "nikic/php-parser": "^v5.6", + "phpdocumentor/reflection-docblock": "^5.6", + "phpunit/phpunit": "^12.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" + "files": [ + "PhpStormStubsMap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } + "Apache-2.0" ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "PHP runtime & extensions header files for PhpStorm", + "homepage": "https://www.jetbrains.com/phpstorm", "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } + "autocomplete", + "code", + "inference", + "inspection", + "jetbrains", + "phpstorm", + "stubs", + "type" ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2026-06-12T13:19:10+00:00" }, { - "name": "phpunit/php-timer", - "version": "5.0.3", + "name": "localheinz/diff", + "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "url": "https://github.com/localheinz/diff.git", + "reference": "33bd840935970cda6691c23fc7d94ae764c0734c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/localheinz/diff/zipball/33bd840935970cda6691c23fc7d94ae764c0734c", + "reference": "33bd840935970cda6691c23fc7d94ae764c0734c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^7.5.0 || ^8.5.23", + "symfony/process": "^4.2 || ^5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, "autoload": { "classmap": [ "src/" @@ -6340,281 +6948,290 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", "keywords": [ - "timer" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "issues": "https://github.com/localheinz/diff/issues", + "source": "https://github.com/localheinz/diff/tree/1.3.0" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2025-08-30T09:44:18+00:00" }, { - "name": "phpunit/phpunit", - "version": "9.6.13", + "name": "maglnet/composer-require-checker", + "version": "4.20.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "url": "https://github.com/maglnet/ComposerRequireChecker.git", + "reference": "c62d517ef5ac2d347dd9b3d02c1cc16c0f1091e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/maglnet/ComposerRequireChecker/zipball/c62d517ef5ac2d347dd9b3d02c1cc16c0f1091e2", + "reference": "c62d517ef5ac2d347dd9b3d02c1cc16c0f1091e2", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^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", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "azjezz/psl": "^4.2.0", + "composer-runtime-api": "^2.0.0", + "ext-phar": "*", + "nikic/php-parser": "^5.7.0", + "php": "~8.3.0 || ~8.4.0 || ~8.5.0", + "symfony/console": "^7.4.1", + "webmozart/glob": "^4.7.0" }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "conflict": { + "revolt/event-loop": "< 1.0.8" + }, + "require-dev": { + "doctrine/coding-standard": "^14.0.0", + "ext-zend-opcache": "*", + "phing/phing": "^3.1.1", + "php-standard-library/phpstan-extension": "^2.0.2", + "php-standard-library/psalm-plugin": "^2.3", + "phpstan/phpstan": "^2.1.33", + "phpunit/phpunit": "^12.5.4", + "psalm/plugin-phpunit": "^0.19.5", + "roave/infection-static-analysis-plugin": "^1.42.0", + "spatie/temporary-directory": "^2.3.0", + "vimeo/psalm": "^6.14.3" }, "bin": [ - "phpunit" + "bin/composer-require-checker" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-master": "2.1-dev" } }, "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] + "psr-4": { + "ComposerRequireChecker\\": "src/ComposerRequireChecker" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.io/" + }, + { + "name": "Matthias Glaub", + "email": "magl@magl.net", + "homepage": "http://magl.net" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "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": [ - "phpunit", - "testing", - "xunit" + "cli", + "composer", + "dependency", + "imports", + "require", + "requirements", + "static analysis" ], "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" + "issues": "https://github.com/maglnet/ComposerRequireChecker/issues", + "source": "https://github.com/maglnet/ComposerRequireChecker/tree/4.20.0" }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2025-12-29T11:34:42+00:00" }, { - "name": "pointybeard/reverse-regex", - "version": "1.0.0.3", + "name": "mockery/mockery", + "version": "1.6.12", "source": { "type": "git", - "url": "https://github.com/pointybeard-forks/ReverseRegex.git", - "reference": "a842e37c4f16367ad7b294a76a5e9671042683d8" + "url": "https://github.com/mockery/mockery.git", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pointybeard-forks/ReverseRegex/zipball/a842e37c4f16367ad7b294a76a5e9671042683d8", - "reference": "a842e37c4f16367ad7b294a76a5e9671042683d8", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { - "doctrine/collections": "^1.6", - "doctrine/lexer": "^1.2", - "php": ">=7.2", - "symfony/polyfill-mbstring": "^1.23" + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "damianopetrungaro/php-commitizen": "^0.1.2", - "friendsofphp/php-cs-fixer": "^3.0", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.0" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "type": "library", "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], "psr-4": { - "PHPStats\\": "src/PHPStats", - "ReverseRegex\\": "src/ReverseRegex" + "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Alannah Kearney", - "email": "hi@alannahkearney.com", - "homepage": "https://github.com/pointybeard" + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" }, { - "name": "Lewis Dyer", - "email": "getintouch@icomefromthenet.com", - "homepage": "http://www.icomefromthenet.com" + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], - "description": "Convert Regular Expressions into text, for testing", - "homepage": "http://github.com/pointybeard-forks/ReverseRegex", + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", "keywords": [ - "generator", - "regex", - "test data", + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", "testing" ], "support": { - "issues": "https://github.com/pointybeard-forks/ReverseRegex/issues", - "source": "https://github.com/pointybeard-forks/ReverseRegex/tree/1.0.0.3", - "wiki": "https://github.com/pointybeard-forks/ReverseRegex/wiki" + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2022-04-20T04:32:05+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { - "name": "psalm/plugin-phpunit", - "version": "0.18.4", + "name": "myclabs/deep-copy", + "version": "1.13.4", "source": { "type": "git", - "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc", - "reference": "e4ab3096653d9eb6f6d0ea5f4461898d59ae4dbc", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.10", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "ext-simplexml": "*", - "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.7.1 || ^5@beta || ^5.0" + "php": "^7.1 || ^8.0" }, "conflict": { - "phpunit/phpunit": "<7.5" + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { - "codeception/codeception": "^4.0.3", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.11.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" - } + "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", "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], "psr-4": { - "Psalm\\PhpUnitPlugin\\": "src" + "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Matt Brown", - "email": "github@muglug.com" - } + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" ], - "description": "Psalm plugin for PHPUnit", "support": { - "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.18.4" + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, - "time": "2022-12-03T07:47:07+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" }, { - "name": "psr/cache", - "version": "3.0.0", + "name": "nikolaposa/version", + "version": "4.2.1", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + "url": "https://github.com/nikolaposa/version.git", + "reference": "2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "url": "https://api.github.com/repos/nikolaposa/version/zipball/2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428", + "reference": "2b9ee2f0b09333b6ce00bd6b63132cdf1d7a1428", "shasum": "" }, "require": { - "php": ">=8.0.0" + "beberlei/assert": "^3.2", + "php": "^8.1" + }, + "require-dev": { + "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": "1.0.x-dev" + "dev-master": "4.2.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Version\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -6623,47 +7240,59 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Nikola Poša", + "email": "posa.nikola@gmail.com", + "homepage": "https://www.nikolaposa.in.rs" } ], - "description": "Common interface for caching libraries", + "description": "Value Object that represents a SemVer-compliant version number.", + "homepage": "https://github.com/nikolaposa/version", "keywords": [ - "cache", - "psr", - "psr-6" + "semantic", + "semver", + "version", + "versioning" ], "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" + "issues": "https://github.com/nikolaposa/version/issues", + "source": "https://github.com/nikolaposa/version/tree/4.2.1" }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2025-03-24T19:12:02+00:00" }, { - "name": "psr/container", - "version": "2.0.2", + "name": "ocramius/package-versions", + "version": "2.12.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "url": "https://github.com/Ocramius/PackageVersions.git", + "reference": "18b02a63e837246e812cae72e211db32d7980019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/18b02a63e837246e812cae72e211db32d7980019", + "reference": "18b02a63e837246e812cae72e211db32d7980019", "shasum": "" }, "require": { - "php": ">=7.4.0" + "composer-runtime-api": "^2.2.0", + "php": "~8.4.0 || ~8.5.0" + }, + "replace": { + "composer/package-versions-deprecated": "*" + }, + "require-dev": { + "composer/composer": "^2.9.8", + "doctrine/coding-standard": "^14.0.0", + "ext-zip": "^1.15.0", + "phpunit/phpunit": "^13.1.11", + "psalm/plugin-phpunit": "^0.19.7", + "roave/infection-static-analysis-plugin": "^1.44.0", + "vimeo/psalm": "^6.16.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "PackageVersions\\": "src/PackageVersions" } }, "notification-url": "https://packagist.org/downloads/", @@ -6672,212 +7301,226 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], + "description": "Provides efficient querying for installed package versions (no runtime IO)", "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "issues": "https://github.com/Ocramius/PackageVersions/issues", + "source": "https://github.com/Ocramius/PackageVersions/tree/2.12.0" }, - "time": "2021-11-05T16:47:00+00:00" + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", + "type": "tidelift" + } + ], + "time": "2026-05-21T19:52:53+00:00" }, { - "name": "psr/http-client", - "version": "1.0.3", + "name": "phar-io/manifest", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" + "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": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "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": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "source": "https://github.com/php-fig/http-client" + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2023-09-23T14:17:50+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { - "name": "psr/http-factory", - "version": "1.0.2", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "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": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], + "description": "Library for handling version information and constraints", "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { - "name": "psr/http-message", - "version": "1.1", + "name": "php-parallel-lint/php-console-color", + "version": "v1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "url": "https://github.com/php-parallel-lint/PHP-Console-Color.git", + "reference": "7adfefd530aa2d7570ba87100a99e2483a543b88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/7adfefd530aa2d7570ba87100a99e2483a543b88", + "reference": "7adfefd530aa2d7570ba87100a99e2483a543b88", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.2" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } + "replace": { + "jakub-onderka/php-console-color": "*" + }, + "require-dev": { + "php-parallel-lint/php-code-style": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.0", + "php-parallel-lint/php-var-dump-check": "0.*", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "PHP_Parallel_Lint\\PhpConsoleColor\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-2-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], + "description": "Simple library for creating colored console ouput.", "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "issues": "https://github.com/php-parallel-lint/PHP-Console-Color/issues", + "source": "https://github.com/php-parallel-lint/PHP-Console-Color/tree/v1.0.1" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2021-12-25T06:49:29+00:00" }, { - "name": "psr/http-server-handler", - "version": "1.0.2", + "name": "php-parallel-lint/php-console-highlighter", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" + "url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git", + "reference": "5b4803384d3303cf8e84141039ef56c8a123138d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/5b4803384d3303cf8e84141039ef56c8a123138d", + "reference": "5b4803384d3303cf8e84141039ef56c8a123138d", "shasum": "" }, "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" + "ext-tokenizer": "*", + "php": ">=5.3.2", + "php-parallel-lint/php-console-color": "^1.0.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "replace": { + "jakub-onderka/php-console-highlighter": "*" + }, + "require-dev": { + "php-parallel-lint/php-code-style": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.0", + "php-parallel-lint/php-var-dump-check": "0.*", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Http\\Server\\": "src/" + "PHP_Parallel_Lint\\PhpConsoleHighlighter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -6886,159 +7529,150 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" } ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], + "description": "Highlight PHP code in terminal", "support": { - "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" + "issues": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/issues", + "source": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/tree/v1.0.0" }, - "time": "2023-04-10T20:06:20+00:00" + "time": "2022-02-18T08:23:19+00:00" }, { - "name": "psr/http-server-middleware", - "version": "1.0.2", + "name": "php-parallel-lint/php-parallel-lint", + "version": "v1.4.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" + "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", + "reference": "6db563514f27e19595a19f45a4bf757b6401194e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e", + "reference": "6db563514f27e19595a19f45a4bf757b6401194e", "shasum": "" }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" + "require": { + "ext-json": "*", + "php": ">=5.3.0" + }, + "replace": { + "grogy/php-parallel-lint": "*", + "jakub-onderka/php-parallel-lint": "*" + }, + "require-dev": { + "nette/tester": "^1.3 || ^2.0", + "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", + "squizlabs/php_codesniffer": "^3.6" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "suggest": { + "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" }, + "bin": [ + "parallel-lint" + ], + "type": "library", "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } + "classmap": [ + "./src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-2-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Jakub Onderka", + "email": "ahoj@jakubonderka.cz" } ], - "description": "Common interface for HTTP server-side middleware", + "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": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" + "lint", + "static analysis" ], "support": { - "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" + "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", + "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.4.0" }, - "time": "2023-04-11T06:14:47+00:00" + "time": "2024-03-27T12:14:49+00:00" }, { - "name": "psr/log", - "version": "2.0.0", + "name": "phpstan/extension-installer", + "version": "1.4.3", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936", "shasum": "" }, "require": { - "php": ">=8.0.0" + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0 || ^2.0" }, - "type": "library", + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "class": "PHPStan\\ExtensionInstaller\\Plugin" }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "PHPStan\\ExtensionInstaller\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Composer plugin for automatic installation of PHPStan extensions", "keywords": [ - "log", - "psr", - "psr-3" + "dev", + "static analysis" ], "support": { - "source": "https://github.com/php-fig/log/tree/2.0.0" + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" }, - "time": "2021-07-14T16:41:46+00:00" + "time": "2024-09-04T20:21:43+00:00" }, { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, + "name": "phpstan/phpstan", + "version": "2.2.7", "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/692db47b9dddb0487934e5236e77d48594aef921", + "reference": "692db47b9dddb0487934e5236e77d48594aef921", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^7.4|^8.0" }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" + "conflict": { + "phpstan/phpstan-shim": "*" }, + "bin": [ + "phpstan", + "phpstan.phar" + ], "type": "library", "autoload": { "files": [ - "src/getallheaders.php" + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -7047,798 +7681,745 @@ ], "authors": [ { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" } ], - "description": "A polyfill for getallheaders.", + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, - "time": "2019-03-08T08:55:37+00:00" + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2026-07-29T17:39:32+00:00" }, { - "name": "react/async", - "version": "v4.1.0", + "name": "phpstan/phpstan-deprecation-rules", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/reactphp/async.git", - "reference": "b9641ac600b4b144e71a87dcf1be4d41dd3a3548" + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "67bedd65c24bc72840afc45aed48b1059dd44bec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/async/zipball/b9641ac600b4b144e71a87dcf1be4d41dd3a3548", - "reference": "b9641ac600b4b144e71a87dcf1be4d41dd3a3548", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/67bedd65c24bc72840afc45aed48b1059dd44bec", + "reference": "67bedd65c24bc72840afc45aed48b1059dd44bec", "shasum": "" }, "require": { - "php": ">=8.1", - "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.8 || ^1.2.1" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.1.39" }, "require-dev": { - "phpstan/phpstan": "1.10.18", - "phpunit/phpunit": "^9.5" + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6", + "shipmonk/name-collision-detector": "^2.1" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } }, - "type": "library", "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "React\\Async\\": "src/" + "PHPStan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async utilities and fibers for ReactPHP", + "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "keywords": [ - "async", - "reactphp" + "static analysis" ], "support": { - "issues": "https://github.com/reactphp/async/issues", - "source": "https://github.com/reactphp/async/tree/v4.1.0" + "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.5" }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2023-06-22T14:10:50+00:00" + "time": "2026-07-22T06:50:43+00:00" }, { - "name": "react/cache", - "version": "v1.2.0", + "name": "phpstan/phpstan-mockery", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/reactphp/cache.git", - "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + "url": "https://github.com/phpstan/phpstan-mockery.git", + "reference": "89a949d0ac64298e88b7c7fa00caee565c198394" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", - "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/89a949d0ac64298e88b7c7fa00caee565c198394", + "reference": "89a949d0ac64298e88b7c7fa00caee565c198394", "shasum": "" }, "require": { - "php": ">=5.3.0", - "react/promise": "^3.0 || ^2.0 || ^1.1" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + "mockery/mockery": "^1.6.11", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } }, - "type": "library", "autoload": { "psr-4": { - "React\\Cache\\": "src/" + "PHPStan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async, Promise-based cache interface for ReactPHP", - "keywords": [ - "cache", - "caching", - "promise", - "reactphp" - ], + "description": "PHPStan Mockery extension", "support": { - "issues": "https://github.com/reactphp/cache/issues", - "source": "https://github.com/reactphp/cache/tree/v1.2.0" + "issues": "https://github.com/phpstan/phpstan-mockery/issues", + "source": "https://github.com/phpstan/phpstan-mockery/tree/2.0.0" }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2022-11-30T15:59:55+00:00" + "time": "2024-10-14T03:18:12+00:00" }, { - "name": "react/dns", - "version": "v1.11.0", + "name": "phpstan/phpstan-phpunit", + "version": "2.0.18", "source": { "type": "git", - "url": "https://github.com/reactphp/dns.git", - "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f" + "url": "https://github.com/phpstan/phpstan-phpunit.git", + "reference": "f5dc20ff8082d02339b60cab68ec3eb0d859fb30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", - "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/f5dc20ff8082d02339b60cab68ec3eb0d859fb30", + "reference": "f5dc20ff8082d02339b60cab68ec3eb0d859fb30", "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" + "phar-io/version": "^3.2", + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.2.3" + }, + "conflict": { + "phpunit/phpunit": "<7.0" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^4.8.35", - "react/async": "^4 || ^3 || ^2", - "react/promise-timer": "^1.9" + "nikic/php-parser": "^5", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "shipmonk/name-collision-detector": "^2.1" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } }, - "type": "library", "autoload": { "psr-4": { - "React\\Dns\\": "src/" + "PHPStan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async DNS resolver for ReactPHP", + "description": "PHPUnit extensions and rules for PHPStan", "keywords": [ - "async", - "dns", - "dns-resolver", - "reactphp" + "static analysis" ], "support": { - "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.11.0" + "issues": "https://github.com/phpstan/phpstan-phpunit/issues", + "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.18" }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2023-06-02T12:45:26+00:00" + "time": "2026-07-04T12:16:09+00:00" }, { - "name": "react/event-loop", - "version": "v1.4.0", + "name": "phpstan/phpstan-strict-rules", + "version": "2.0.12", "source": { "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05" + "url": "https://github.com/phpstan/phpstan-strict-rules.git", + "reference": "2bc5ae19ae965663b62ac907ee6342c3903ec93b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6e7e587714fff7a83dcc7025aee42ab3b265ae05", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/2bc5ae19ae965663b62ac907ee6342c3903ec93b", + "reference": "2bc5ae19ae965663b62ac907ee6342c3903ec93b", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.1.52" }, "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6", + "shipmonk/name-collision-detector": "^2.1" }, - "suggest": { - "ext-pcntl": "For signal handling support when using the StreamSelectLoop" + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } }, - "type": "library", "autoload": { "psr-4": { - "React\\EventLoop\\": "src/" + "PHPStan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "description": "Extra strict and opinionated rules for PHPStan", "keywords": [ - "asynchronous", - "event-loop" + "static analysis" ], "support": { - "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.4.0" + "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.12" }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2023-05-05T10:11:24+00:00" + "time": "2026-07-19T07:24:06+00:00" }, { - "name": "react/http", - "version": "v1.9.0", + "name": "phpunit/php-code-coverage", + "version": "14.2.4", "source": { "type": "git", - "url": "https://github.com/reactphp/http.git", - "reference": "bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "048a5c12bdb4580f4767ce2761793a16b170fbe4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/http/zipball/bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0", - "reference": "bb3154dbaf2dfe3f0467f956a05f614a69d5f1d0", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/048a5c12bdb4580f4767ce2761793a16b170fbe4", + "reference": "048a5c12bdb4580f4767ce2761793a16b170fbe4", "shasum": "" }, "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "fig/http-message-util": "^1.1", - "php": ">=5.3.0", - "psr/http-message": "^1.0", - "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" + "ext-dom": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.8.0", + "php": ">=8.4", + "phpunit/php-text-template": "^6.0", + "sebastian/complexity": "^6.0", + "sebastian/environment": "^9.3.2", + "sebastian/git-state": "^1.0", + "sebastian/lines-of-code": "^5.0.1", + "sebastian/version": "^7.0", + "theseer/tokenizer": "^2.0.1" }, "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", - "react/async": "^4 || ^3 || ^2", - "react/promise-stream": "^1.4", - "react/promise-timer": "^1.9" + "phpunit/phpunit": "^13.2.2" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", - "autoload": { - "psr-4": { - "React\\Http\\": "src/" + "extra": { + "branch-alias": { + "dev-main": "14.2.x-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Event-driven, streaming HTTP client and server implementation for ReactPHP", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ - "async", - "client", - "event-driven", - "http", - "http client", - "http server", - "https", - "psr-7", - "reactphp", - "server", - "streaming" + "coverage", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/reactphp/http/issues", - "source": "https://github.com/reactphp/http/tree/v1.9.0" + "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/14.2.4" }, "funding": [ { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2023-04-26T10:29:24+00:00" + "time": "2026-07-30T17:01:07+00:00" }, { - "name": "react/promise", - "version": "v2.10.0", + "name": "phpunit/php-file-iterator", + "version": "7.0.0", "source": { "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6e5aa1fb0a95b1703d83e721299ee18bb4e2de50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", - "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6e5aa1fb0a95b1703d83e721299ee18bb4e2de50", + "reference": "6e5aa1fb0a95b1703d83e721299ee18bb4e2de50", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^13.0" }, "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ - "promise", - "promises" + "filesystem", + "iterator" ], "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.10.0" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/7.0.0" }, "funding": [ { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator", + "type": "tidelift" } ], - "time": "2023-05-02T15:15:43+00:00" + "time": "2026-02-06T04:33:26+00:00" }, { - "name": "react/socket", - "version": "v1.14.0", + "name": "phpunit/php-invoker", + "version": "7.0.0", "source": { "type": "git", - "url": "https://github.com/reactphp/socket.git", - "reference": "21591111d3ea62e31f2254280ca0656bc2b1bda6" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/21591111d3ea62e31f2254280ca0656bc2b1bda6", - "reference": "21591111d3ea62e31f2254280ca0656bc2b1bda6", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88", + "reference": "42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88", "shasum": "" }, "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.0", - "react/dns": "^1.11", - "react/event-loop": "^1.2", - "react/promise": "^3 || ^2.6 || ^1.2.1", - "react/stream": "^1.2" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", - "react/async": "^4 || ^3 || ^2", - "react/promise-stream": "^1.4", - "react/promise-timer": "^1.10" + "ext-pcntl": "*", + "phpunit/phpunit": "^13.0" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", - "autoload": { - "psr-4": { - "React\\Socket\\": "src" + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "Connection", - "Socket", - "async", - "reactphp", - "stream" + "process" ], "support": { - "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.14.0" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/7.0.0" }, "funding": [ { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-invoker", + "type": "tidelift" } ], - "time": "2023-08-25T13:48:09+00:00" + "time": "2026-02-06T04:34:47+00:00" }, { - "name": "react/stream", - "version": "v1.3.0", + "name": "phpunit/php-text-template", + "version": "6.0.0", "source": { "type": "git", - "url": "https://github.com/reactphp/stream.git", - "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "a47af19f93f76aa3368303d752aa5272ca3299f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/6fbc9672905c7d5a885f2da2fc696f65840f4a66", - "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/a47af19f93f76aa3368303d752aa5272ca3299f4", + "reference": "a47af19f93f76aa3368303d752aa5272ca3299f4", "shasum": "" }, "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.8", - "react/event-loop": "^1.2" + "php": ">=8.4" }, "require-dev": { - "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^13.0" }, "type": "library", - "autoload": { - "psr-4": { - "React\\Stream\\": "src/" + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "event-driven", - "io", - "non-blocking", - "pipe", - "reactphp", - "readable", - "stream", - "writable" + "template" ], "support": { - "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.3.0" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/6.0.0" }, "funding": [ { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-text-template", + "type": "tidelift" } ], - "time": "2023-06-16T10:52:11+00:00" + "time": "2026-02-06T04:36:37+00:00" }, { - "name": "reactivex/rxphp", - "version": "2.0.11", + "name": "phpunit/php-timer", + "version": "9.0.0", "source": { "type": "git", - "url": "https://github.com/ReactiveX/RxPHP.git", - "reference": "dde8aec9b3a0f4913cd38203d29c6adad73194d6" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "a0e12065831f6ab0d83120dc61513eb8d9a966f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ReactiveX/RxPHP/zipball/dde8aec9b3a0f4913cd38203d29c6adad73194d6", - "reference": "dde8aec9b3a0f4913cd38203d29c6adad73194d6", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a0e12065831f6ab0d83120dc61513eb8d9a966f6", + "reference": "a0e12065831f6ab0d83120dc61513eb8d9a966f6", "shasum": "" }, "require": { - "php": ">=7.0.0", - "react/promise": "~2.2" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9", - "react/event-loop": "^1.0 || ^0.5 || ^0.4.2", - "satooshi/php-coveralls": "~1.0" - }, - "suggest": { - "react/event-loop": "Used for scheduling async operations" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "9.0-dev" } }, "autoload": { - "psr-4": { - "Rx\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Alexander", - "email": "iam.asm89@gmail.com" - }, - { - "name": "David Dan", - "email": "davidwdan@gmail.com" - }, - { - "name": "Matt Bonneau", - "email": "matt@bonneau.net" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Reactive extensions for php.", - "homepage": "https://github.com/ReactiveX/RxPHP", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "extensions", - "reactive", - "rx" + "timer" ], "support": { - "issues": "https://github.com/ReactiveX/RxPHP/issues", - "source": "https://github.com/ReactiveX/RxPHP/tree/2.0.11" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/9.0.0" }, - "time": "2022-09-10T17:05:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-timer", + "type": "tidelift" + } + ], + "time": "2026-02-06T04:37:53+00:00" }, { - "name": "respect/stringifier", - "version": "0.2.0", + "name": "phpunit/phpunit", + "version": "13.2.6", "source": { "type": "git", - "url": "https://github.com/Respect/Stringifier.git", - "reference": "e55af3c8aeaeaa2abb5fa47a58a8e9688cc23b59" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "5d2afe181339a56348ef9a80fa7eb806b7eae508" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Respect/Stringifier/zipball/e55af3c8aeaeaa2abb5fa47a58a8e9688cc23b59", - "reference": "e55af3c8aeaeaa2abb5fa47a58a8e9688cc23b59", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5d2afe181339a56348ef9a80fa7eb806b7eae508", + "reference": "5d2afe181339a56348ef9a80fa7eb806b7eae508", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.8", - "malukenho/docheader": "^0.1.7", - "phpunit/phpunit": "^6.4" + "ext-dom": "*", + "ext-filter": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.4.1", + "phpunit/php-code-coverage": "^14.2.3", + "phpunit/php-file-iterator": "^7.0.0", + "phpunit/php-invoker": "^7.0.0", + "phpunit/php-text-template": "^6.0.0", + "phpunit/php-timer": "^9.0.0", + "sebastian/cli-parser": "^5.0.0", + "sebastian/comparator": "^8.3.0", + "sebastian/diff": "^9.0", + "sebastian/environment": "^9.3.2", + "sebastian/exporter": "^8.1.1", + "sebastian/file-filter": "^1.0", + "sebastian/git-state": "^1.0", + "sebastian/global-state": "^9.0.1", + "sebastian/object-enumerator": "^8.0.0", + "sebastian/recursion-context": "^8.0.0", + "sebastian/type": "^7.0.1", + "sebastian/version": "^7.0.0", + "staabm/side-effects-detector": "^1.0.5" }, + "bin": [ + "phpunit" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "13.2-dev" + } + }, "autoload": { "files": [ - "src/stringify.php" + "src/Framework/Assert/Functions.php" ], - "psr-4": { - "Respect\\Stringifier\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Respect/Stringifier Contributors", - "homepage": "https://github.com/Respect/Stringifier/graphs/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Converts any value to a string", - "homepage": "http://respect.github.io/Stringifier/", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "respect", - "stringifier", - "stringify" + "phpunit", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/Respect/Stringifier/issues", - "source": "https://github.com/Respect/Stringifier/tree/0.2.0" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/13.2.6" }, - "time": "2017-12-29T19:39:25+00:00" + "funding": [ + { + "url": "https://phpunit.de/sponsoring.html", + "type": "other" + } + ], + "time": "2026-07-28T14:00:09+00:00" }, { - "name": "respect/validation", - "version": "2.2.4", + "name": "psr/clock", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/Respect/Validation.git", - "reference": "d304ace5325efd7180daffb1f8627bb0affd4e3a" + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Respect/Validation/zipball/d304ace5325efd7180daffb1f8627bb0affd4e3a", - "reference": "d304ace5325efd7180daffb1f8627bb0affd4e3a", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0 || ^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", - "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" - }, - "suggest": { - "egulias/email-validator": "Strict (RFC compliant) email validation", - "ext-bcmath": "Arbitrary Precision Mathematics", - "ext-fileinfo": "File Information", - "ext-mbstring": "Multibyte String Functions" + "php": "^7.0 || ^8.0" }, "type": "library", "autoload": { "psr-4": { - "Respect\\Validation\\": "library/" + "Psr\\Clock\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -7847,55 +8428,51 @@ ], "authors": [ { - "name": "Respect/Validation Contributors", - "homepage": "https://github.com/Respect/Validation/graphs/contributors" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "The most awesome validation engine ever created for PHP", - "homepage": "http://respect.github.io/Validation/", + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", "keywords": [ - "respect", - "validation", - "validator" + "clock", + "now", + "psr", + "psr-20", + "time" ], "support": { - "issues": "https://github.com/Respect/Validation/issues", - "source": "https://github.com/Respect/Validation/tree/2.2.4" + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" }, - "time": "2023-02-15T01:05:24+00:00" + "time": "2022-11-25T14:36:26+00:00" }, { - "name": "revolt/event-loop", - "version": "v1.0.3", + "name": "psr/log", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/revoltphp/event-loop.git", - "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03" + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/0fe2d31e1cddd26664e55d383d3d5da613334c03", - "reference": "0fe2d31e1cddd26664e55d383d3d5da613334c03", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=8.1" - }, - "require-dev": { - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^9", - "psalm/phar": "^4.7" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Revolt\\": "src" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -7904,127 +8481,114 @@ ], "authors": [ { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Rock-solid event loop for concurrent PHP applications.", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "async", - "asynchronous", - "concurrency", - "event", - "event-loop", - "non-blocking", - "scheduler" + "log", + "psr", + "psr-3" ], "support": { - "issues": "https://github.com/revoltphp/event-loop/issues", - "source": "https://github.com/revoltphp/event-loop/tree/v1.0.3" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2023-07-29T17:07:12+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { - "name": "ringcentral/psr7", - "version": "1.3.0", + "name": "rector/rector", + "version": "2.6.1", "source": { "type": "git", - "url": "https://github.com/ringcentral/psr7.git", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686" + "url": "https://github.com/rectorphp/rector.git", + "reference": "b8e68f058bca43e01a2e1caa51ef022d6551ed95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ringcentral/psr7/zipball/360faaec4b563958b673fb52bbe94e37f14bc686", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/b8e68f058bca43e01a2e1caa51ef022d6551ed95", + "reference": "b8e68f058bca43e01a2e1caa51ef022d6551ed95", "shasum": "" }, "require": { - "php": ">=5.3", - "psr/http-message": "~1.0" + "php": "^7.4|^8.0", + "phpstan/phpstan": "^2.2.6" }, - "provide": { - "psr/http-message-implementation": "1.0" + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" }, - "require-dev": { - "phpunit/phpunit": "~4.0" + "suggest": { + "ext-dom": "To manipulate phpunit.xml via the custom-rule command" }, + "bin": [ + "bin/rector" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "files": [ - "src/functions_include.php" - ], - "psr-4": { - "RingCentral\\Psr7\\": "src/" - } + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "PSR-7 message implementation", + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "homepage": "https://getrector.com/", "keywords": [ - "http", - "message", - "stream", - "uri" + "automation", + "dev", + "migration", + "refactoring" ], "support": { - "source": "https://github.com/ringcentral/psr7/tree/master" + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/2.6.1" }, - "time": "2018-05-29T20:21:04+00:00" + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2026-08-03T17:30:34+00:00" }, { - "name": "riverline/multipart-parser", - "version": "2.1.1", + "name": "revolt/event-loop", + "version": "v1.0.9", "source": { "type": "git", - "url": "https://github.com/Riverline/multipart-parser.git", - "reference": "2418bdfc2eab01e39bcffee808b1a365c166292a" + "url": "https://github.com/revoltphp/event-loop.git", + "reference": "44061cf513e53c6200372fc935ac42271566295d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Riverline/multipart-parser/zipball/2418bdfc2eab01e39bcffee808b1a365c166292a", - "reference": "2418bdfc2eab01e39bcffee808b1a365c166292a", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/44061cf513e53c6200372fc935ac42271566295d", + "reference": "44061cf513e53c6200372fc935ac42271566295d", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=5.6.0" + "php": ">=8.1" }, "require-dev": { - "laminas/laminas-diactoros": "^1.8.7 || ^2.11.1", - "phpunit/phpunit": "^5.7 || ^9.0", - "psr/http-message": "^1.0", - "symfony/psr-http-message-bridge": "^1.1 || ^2.0" + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^9", + "psalm/phar": "6.16.*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, "autoload": { "psr-4": { - "Riverline\\MultiPartParser\\": "src/" + "Revolt\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -8033,64 +8597,81 @@ ], "authors": [ { - "name": "Romain Cambien", - "email": "romain@cambien.net" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Riverline", - "homepage": "http://www.riverline.fr" + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "One class library to parse multipart content with encoding and charset support.", + "description": "Rock-solid event loop for concurrent PHP applications.", "keywords": [ - "http", - "multipart", - "parser" + "async", + "asynchronous", + "concurrency", + "event", + "event-loop", + "non-blocking", + "scheduler" ], "support": { - "issues": "https://github.com/Riverline/multipart-parser/issues", - "source": "https://github.com/Riverline/multipart-parser/tree/2.1.1" + "issues": "https://github.com/revoltphp/event-loop/issues", + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.9" }, - "time": "2023-04-28T18:53:59+00:00" + "time": "2026-05-16T17:55:38+00:00" }, { "name": "roave/backward-compatibility-check", - "version": "8.3.0", + "version": "8.19.0", "source": { "type": "git", "url": "https://github.com/Roave/BackwardCompatibilityCheck.git", - "reference": "40956d53832b80dd4025c87b4cf5e1756f42f43d" + "reference": "810eb88eeff37ef300653bcfb77ca51a314777a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/40956d53832b80dd4025c87b4cf5e1756f42f43d", - "reference": "40956d53832b80dd4025c87b4cf5e1756f42f43d", + "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/810eb88eeff37ef300653bcfb77ca51a314777a2", + "reference": "810eb88eeff37ef300653bcfb77ca51a314777a2", "shasum": "" }, "require": { - "azjezz/psl": "^2.3.1", - "composer/composer": "^2.5.1", + "azjezz/psl": "^4.2.1", + "composer/composer": "^2.9.5", + "ext-dom": "*", "ext-json": "*", - "nikic/php-parser": "^4.15.3", - "nikolaposa/version": "^4.1.0", - "ocramius/package-versions": "^2.7.0", - "php": "~8.1.0 || ~8.2.0", - "roave/better-reflection": "^6.5.0", - "symfony/console": "^6.2.3" + "ext-libxml": "*", + "ext-simplexml": "*", + "nikic/php-parser": "^5.7.0", + "nikolaposa/version": "^4.2.1", + "ocramius/package-versions": "^2.11.0", + "php": "~8.3.0 || ~8.4.0 || ~8.5.0", + "roave/better-reflection": "^6.69.0", + "symfony/console": "^7.4.4" }, "conflict": { + "marc-mabe/php-enum": "<4.7.2", "revolt/event-loop": "<0.2.5", "symfony/process": "<5.3.7" }, "require-dev": { - "doctrine/coding-standard": "^11.0.0", - "php-standard-library/psalm-plugin": "^2.2.1", - "phpunit/phpunit": "^9.5.27", - "psalm/plugin-phpunit": "^0.18.4", - "roave/infection-static-analysis-plugin": "^1.27.0", + "doctrine/coding-standard": "^14.0.0", + "justinrainbow/json-schema": "^6.6.4", + "php-standard-library/psalm-plugin": "^2.3.0", + "phpunit/phpunit": "^12.5.11", + "psalm/plugin-phpunit": "^0.19.5", + "roave/infection-static-analysis-plugin": "^1.43.0", "roave/security-advisories": "dev-master", - "squizlabs/php_codesniffer": "^3.7.1", - "vimeo/psalm": "^5.4.0" + "squizlabs/php_codesniffer": "^4.0.1", + "vimeo/psalm": "^6.15.1" }, "bin": [ "bin/roave-backward-compatibility-check" @@ -8118,41 +8699,36 @@ "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.19.0" }, - "time": "2023-02-11T17:26:11+00:00" + "time": "2026-02-13T19:14:25+00:00" }, { "name": "roave/better-reflection", - "version": "6.15.0", + "version": "6.72.0", "source": { "type": "git", "url": "https://github.com/Roave/BetterReflection.git", - "reference": "19b15d504ca61c5b5f10f5aafb329234c8eeaed2" + "reference": "b34deeed26ec22233b1a776591ef45abc154a17d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/19b15d504ca61c5b5f10f5aafb329234c8eeaed2", - "reference": "19b15d504ca61c5b5f10f5aafb329234c8eeaed2", + "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/b34deeed26ec22233b1a776591ef45abc154a17d", + "reference": "b34deeed26ec22233b1a776591ef45abc154a17d", "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": "2026.2", + "nikic/php-parser": "^5.8.0", + "php": "~8.4.1 || ~8.5.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" + "phpbench/phpbench": "^1.7.0", + "phpunit/phpunit": "^13.2.4" }, "suggest": { "composer/composer": "Required to use the ComposerSourceLocator" @@ -8192,150 +8768,80 @@ "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" - }, - "time": "2023-10-06T14:31:35+00:00" - }, - { - "name": "roave/infection-static-analysis-plugin", - "version": "1.33.0", - "source": { - "type": "git", - "url": "https://github.com/Roave/infection-static-analysis-plugin.git", - "reference": "3dd4ea3d5c4b380bb426c8b943328796a5664587" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Roave/infection-static-analysis-plugin/zipball/3dd4ea3d5c4b380bb426c8b943328796a5664587", - "reference": "3dd4ea3d5c4b380bb426c8b943328796a5664587", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2.2", - "infection/infection": "0.27.0", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "sanmai/later": "^0.1.2", - "vimeo/psalm": "^4.30.0 || ^5.15" + "source": "https://github.com/Roave/BetterReflection/tree/6.72.0" }, - "require-dev": { - "doctrine/coding-standard": "^12.0.0", - "phpunit/phpunit": "^10.3.4" - }, - "bin": [ - "bin/roave-infection-static-analysis-plugin" - ], - "type": "library", - "autoload": { - "psr-4": { - "Roave\\InfectionStaticAnalysis\\": "src/Roave/InfectionStaticAnalysis" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "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" - }, - "time": "2023-09-15T10:43:53+00:00" + "time": "2026-07-22T18:50:32+00:00" }, { - "name": "roave/signature", - "version": "1.7.0", + "name": "sanmai/di-container", + "version": "0.1.17", "source": { "type": "git", - "url": "https://github.com/Roave/Signature.git", - "reference": "2ab4eadcb9f9d449f673a97b67797403b35eca94" + "url": "https://github.com/sanmai/di-container.git", + "reference": "a901c4a8778c9212ef4d66607525281af2f787bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/Signature/zipball/2ab4eadcb9f9d449f673a97b67797403b35eca94", - "reference": "2ab4eadcb9f9d449f673a97b67797403b35eca94", + "url": "https://api.github.com/repos/sanmai/di-container/zipball/a901c4a8778c9212ef4d66607525281af2f787bd", + "reference": "a901c4a8778c9212ef4d66607525281af2f787bd", "shasum": "" }, "require": { - "php": "8.0.*|8.1.*|8.2.*" + "php": ">=8.2", + "psr/container": "^1.1.2 || ^2.0", + "sanmai/pipeline": "^6.17 || ^7.0" }, "require-dev": { - "doctrine/coding-standard": "^10.0.0", - "infection/infection": "^0.26.15", - "phpunit/phpunit": "^9.5.25", - "vimeo/psalm": "^4.28.0" + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^3.17", + "infection/infection": ">=0.31", + "php-coveralls/php-coveralls": "^2.4.1", + "phpbench/phpbench": "^1.4", + "phpstan/extension-installer": "^1.4", + "phpunit/phpunit": "^11.5.25", + "sanmai/phpstan-rules": "^0.3.10" }, "type": "library", - "autoload": { - "psr-4": { - "Roave\\Signature\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Sign and verify stuff", - "support": { - "issues": "https://github.com/Roave/Signature/issues", - "source": "https://github.com/Roave/Signature/tree/1.7.0" - }, - "time": "2022-10-10T08:44:53+00:00" - }, - { - "name": "sanmai/later", - "version": "0.1.2", - "source": { - "type": "git", - "url": "https://github.com/sanmai/later.git", - "reference": "9b659fecef2030193fd02402955bc39629d5606f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sanmai/later/zipball/9b659fecef2030193fd02402955bc39629d5606f", - "reference": "9b659fecef2030193fd02402955bc39629d5606f", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.13", - "infection/infection": ">=0.10.5", - "phan/phan": ">=2", - "php-coveralls/php-coveralls": "^2.0", - "phpstan/phpstan": ">=0.10", - "phpunit/phpunit": ">=7.4", - "vimeo/psalm": ">=2" + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + }, + "preferred-install": "dist" }, - "type": "library", "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Later\\": "src/" + "DIContainer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "BSD-3-Clause" ], "authors": [ { "name": "Alexey Kopytko", - "email": "alexey@kopytko.com" + "email": "alexey@kopytko.com", + "homepage": "https://github.com/sanmai" + }, + { + "name": "Maks Rafalko", + "homepage": "https://twitter.com/maks_rafalko" + }, + { + "name": "Théo FIDRY", + "homepage": "https://twitter.com/tfidry" } ], - "description": "Later: deferred wrapper object", + "description": "dependency injection container with automatic constructor dependency resolution", + "keywords": [ + "Autowiring", + "constructor di", + "di container", + "psr 11" + ], "support": { - "issues": "https://github.com/sanmai/later/issues", - "source": "https://github.com/sanmai/later/tree/0.1.2" + "issues": "https://github.com/sanmai/di-container/issues", + "source": "https://github.com/sanmai/di-container/tree/0.1.17" }, "funding": [ { @@ -8343,48 +8849,46 @@ "type": "github" } ], - "time": "2021-01-02T10:26:44+00:00" + "time": "2026-06-01T08:52:14+00:00" }, { - "name": "sanmai/pipeline", - "version": "v6.9", + "name": "sanmai/duoclock", + "version": "0.1.3", "source": { "type": "git", - "url": "https://github.com/sanmai/pipeline.git", - "reference": "c48f45c22c3ce4140d071f7658fb151df1cc08ea" + "url": "https://github.com/sanmai/DuoClock.git", + "reference": "47461e3ff65b7308635047831a55615652e7be1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sanmai/pipeline/zipball/c48f45c22c3ce4140d071f7658fb151df1cc08ea", - "reference": "c48f45c22c3ce4140d071f7658fb151df1cc08ea", + "url": "https://api.github.com/repos/sanmai/DuoClock/zipball/47461e3ff65b7308635047831a55615652e7be1a", + "reference": "47461e3ff65b7308635047831a55615652e7be1a", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "php": ">=8.2", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.8", "friendsofphp/php-cs-fixer": "^3.17", - "infection/infection": ">=0.10.5", - "league/pipeline": "^0.3 || ^1.0", - "phan/phan": ">=1.1", + "infection/infection": ">=0.29", "php-coveralls/php-coveralls": "^2.4.1", - "phpstan/phpstan": ">=0.10", - "phpunit/phpunit": ">=9.4", - "vimeo/psalm": ">=2" + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^11.5.25", + "sanmai/phpstan-rules": "^0.3.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "v6.x-dev" - } + "preferred-install": "dist" }, "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Pipeline\\": "src/" + "DuoClock\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -8397,10 +8901,10 @@ "email": "alexey@kopytko.com" } ], - "description": "General-purpose collections pipeline", + "description": "PHP time mocking for tests - PSR-20 clock with mockable sleep(), time(), and TimeSpy for PHPUnit testing", "support": { - "issues": "https://github.com/sanmai/pipeline/issues", - "source": "https://github.com/sanmai/pipeline/tree/v6.9" + "issues": "https://github.com/sanmai/DuoClock/issues", + "source": "https://github.com/sanmai/DuoClock/tree/0.1.3" }, "funding": [ { @@ -8408,144 +8912,164 @@ "type": "github" } ], - "time": "2023-10-08T11:56:54+00:00" + "time": "2025-12-26T06:12:34+00:00" }, { - "name": "sebastian/cli-parser", - "version": "1.0.1", + "name": "sanmai/later", + "version": "0.1.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "url": "https://github.com/sanmai/later.git", + "reference": "c56aeb8fa7fdf81eda2640a68b51884685963d13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sanmai/later/zipball/c56aeb8fa7fdf81eda2640a68b51884685963d13", + "reference": "c56aeb8fa7fdf81eda2640a68b51884685963d13", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "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": ">=1.4.5", + "phpunit/phpunit": ">=9.5 <10", + "vimeo/psalm": ">=2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "0.1.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions.php" + ], + "psr-4": { + "Later\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "Apache-2.0" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" } ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", + "description": "Later: deferred wrapper object", "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "issues": "https://github.com/sanmai/later/issues", + "source": "https://github.com/sanmai/later/tree/0.1.8" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/sanmai", "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2026-06-29T07:24:33+00:00" }, { - "name": "sebastian/code-unit", - "version": "1.0.8", + "name": "sanmai/pipeline", + "version": "7.10", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "url": "https://github.com/sanmai/pipeline.git", + "reference": "a8e4e57a6031efc7a92defd13fed9c1c4c73fc71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sanmai/pipeline/zipball/a8e4e57a6031efc7a92defd13fed9c1c4c73fc71", + "reference": "a8e4e57a6031efc7a92defd13fed9c1c4c73fc71", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "ergebnis/composer-normalize": "^2.8", + "esi/phpunit-coverage-check": ">2", + "friendsofphp/php-cs-fixer": "^3.17", + "infection/infection": ">=0.32.3", + "league/pipeline": "^0.3 || ^1.0", + "php-coveralls/php-coveralls": "^2.4.1", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^11 || ^12", + "sanmai/phpstan-rules": "^0.3.11", + "sanmai/phpunit-double-colon-syntax": "^0.1.1", + "vimeo/psalm": ">=2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "7.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "src/functions.php" + ], + "psr-4": { + "Pipeline\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "Apache-2.0" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" } ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", + "description": "General-purpose collections pipeline", "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "issues": "https://github.com/sanmai/pipeline/issues", + "source": "https://github.com/sanmai/pipeline/tree/7.10" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/sanmai", "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2026-08-03T04:56:22+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "name": "sebastian/cli-parser", + "version": "5.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "eeb759ad3146b7096fb59c3195d39e071cd409e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/eeb759ad3146b7096fb59c3195d39e071cd409e3", + "reference": "eeb759ad3146b7096fb59c3195d39e071cd409e3", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.2.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -8560,49 +9084,68 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/5.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/cli-parser", + "type": "tidelift" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2026-08-01T04:27:14+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "8.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "c025fc7604afab3f195fab7cdaf72327331af241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c025fc7604afab3f195fab7cdaf72327331af241", + "reference": "c025fc7604afab3f195fab7cdaf72327331af241", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.4", + "sebastian/diff": "^9.0", + "sebastian/exporter": "^8.1.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.2" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.3-dev" } }, "autoload": { @@ -8641,41 +9184,54 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/8.3.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2026-06-05T03:06:45+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "c5651c795c98093480df79350cb050813fc7a2f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c5651c795c98093480df79350cb050813fc7a2f3", + "reference": "c5651c795c98093480df79350cb050813fc7a2f3", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -8698,41 +9254,54 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/6.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/complexity", + "type": "tidelift" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2026-02-06T04:41:32+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "9.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "a3fb6a298a265ff487a91bbea46e03cd01dbb226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/a3fb6a298a265ff487a91bbea46e03cd01dbb226", + "reference": "a3fb6a298a265ff487a91bbea46e03cd01dbb226", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^13.2", + "symfony/process": "^7.4.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "9.0-dev" } }, "autoload": { @@ -8764,35 +9333,48 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/9.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/diff", + "type": "tidelift" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2026-06-05T03:04:51+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "9.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "6c9e487c9eb706a8d258102a1c0b0a3e53e86c2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6c9e487c9eb706a8d258102a1c0b0a3e53e86c2e", + "reference": "6c9e487c9eb706a8d258102a1c0b0a3e53e86c2e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.1.11" }, "suggest": { "ext-posix": "*" @@ -8800,7 +9382,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "9.3-dev" } }, "autoload": { @@ -8819,7 +9401,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -8827,42 +9409,55 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/9.3.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2026-05-25T13:41:38+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "8.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "cfaa77c750dcad6f44c9bac8f62ac486e1c82c26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/cfaa77c750dcad6f44c9bac8f62ac486e1c82c26", + "reference": "cfaa77c750dcad6f44c9bac8f62ac486e1c82c26", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.4", + "sebastian/recursion-context": "^8.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.1-dev" } }, "autoload": { @@ -8904,46 +9499,53 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/8.1.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2026-07-13T11:35:11+00:00" }, { - "name": "sebastian/global-state", - "version": "5.0.6", + "name": "sebastian/file-filter", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "url": "https://github.com/sebastianbergmann/file-filter.git", + "reference": "33a26f394330f6faa7684bb9cc73afb7727aae93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/file-filter/zipball/33a26f394330f6faa7684bb9cc73afb7727aae93", + "reference": "33a26f394330f6faa7684bb9cc73afb7727aae93", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.4" }, "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "1.0-dev" } }, "autoload": { @@ -8958,51 +9560,61 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], + "description": "Library for filtering files", + "homepage": "https://github.com/sebastianbergmann/file-filter", "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "issues": "https://github.com/sebastianbergmann/file-filter/issues", + "security": "https://github.com/sebastianbergmann/file-filter/security/policy", + "source": "https://github.com/sebastianbergmann/file-filter/tree/1.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/file-filter", + "type": "tidelift" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2026-04-22T07:20:04+00:00" }, { - "name": "sebastian/lines-of-code", - "version": "1.0.3", + "name": "sebastian/git-state", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "url": "https://github.com/sebastianbergmann/git-state.git", + "reference": "792a952e0eba55b6960a48aeceb9f371aad1f76b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/git-state/zipball/792a952e0eba55b6960a48aeceb9f371aad1f76b", + "reference": "792a952e0eba55b6960a48aeceb9f371aad1f76b", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "1.0-dev" } }, "autoload": { @@ -9021,46 +9633,60 @@ "role": "lead" } ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "description": "Library for describing the state of a Git checkout", + "homepage": "https://github.com/sebastianbergmann/git-state", "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "issues": "https://github.com/sebastianbergmann/git-state/issues", + "security": "https://github.com/sebastianbergmann/git-state/security/policy", + "source": "https://github.com/sebastianbergmann/git-state/tree/1.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/git-state", + "type": "tidelift" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2026-03-21T12:54:28+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "4.0.4", + "name": "sebastian/global-state", + "version": "9.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "ba68ba79da690cf7eddefd3ce5b78b20b9ba9945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ba68ba79da690cf7eddefd3ce5b78b20b9ba9945", + "reference": "ba68ba79da690cf7eddefd3ce5b78b20b9ba9945", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.4", + "sebastian/object-reflector": "^6.0", + "sebastian/recursion-context": "^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "ext-dom": "*", + "phpunit/phpunit": "^13.1.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "9.0-dev" } }, "autoload": { @@ -9078,44 +9704,61 @@ "email": "sebastian@phpunit.de" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/9.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", + "type": "tidelift" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2026-06-01T15:11:33+00:00" }, { - "name": "sebastian/object-reflector", - "version": "2.0.4", + "name": "sebastian/lines-of-code", + "version": "5.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d1b6f8fce682505dbd048977f1abedf1b8ad3ff8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d1b6f8fce682505dbd048977f1abedf1b8ad3ff8", + "reference": "d1b6f8fce682505dbd048977f1abedf1b8ad3ff8", "shasum": "" }, "require": { - "php": ">=7.3" + "nikic/php-parser": "^5.8.0", + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -9130,47 +9773,63 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/5.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/lines-of-code", + "type": "tidelift" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2026-07-09T08:42:34+00:00" }, { - "name": "sebastian/recursion-context", - "version": "4.0.5", + "name": "sebastian/object-enumerator", + "version": "8.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "b39ab125fd9a7434b0ecbc4202eebce11a98cfc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/b39ab125fd9a7434b0ecbc4202eebce11a98cfc5", + "reference": "b39ab125fd9a7434b0ecbc4202eebce11a98cfc5", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4", + "sebastian/object-reflector": "^6.0", + "sebastian/recursion-context": "^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -9186,54 +9845,127 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/8.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" }, { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" }, { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "url": "https://tidelift.com/funding/github/packagist/sebastian/object-enumerator", + "type": "tidelift" + } + ], + "time": "2026-02-06T04:46:36+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "3ca042c2c60b0eab094f8a1b6a7093f4d4c72200" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/3ca042c2c60b0eab094f8a1b6a7093f4d4c72200", + "reference": "3ca042c2c60b0eab094f8a1b6a7093f4d4c72200", + "shasum": "" + }, + "require": { + "php": ">=8.4" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/6.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/object-reflector", + "type": "tidelift" } ], - "time": "2023-02-03T06:07:39+00:00" + "time": "2026-02-06T04:47:13+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.3", + "name": "sebastian/recursion-context", + "version": "8.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "32dba72f2b4642d6a93db22d6c0a9280ff2e3ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/32dba72f2b4642d6a93db22d6c0a9280ff2e3ca0", + "reference": "32dba72f2b4642d6a93db22d6c0a9280ff2e3ca0", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^13.2.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -9249,46 +9981,67 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/8.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2026-08-03T05:58:12+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "fee0309275847fefd7636167085e379c1dbf6990" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fee0309275847fefd7636167085e379c1dbf6990", + "reference": "fee0309275847fefd7636167085e379c1dbf6990", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^13.1.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -9311,37 +10064,50 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/7.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2026-05-20T06:49:11+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "ad37a5552c8e2b88572249fdc19b6da7792e021b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ad37a5552c8e2b88572249fdc19b6da7792e021b", + "reference": "ad37a5552c8e2b88572249fdc19b6da7792e021b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -9364,35 +10130,48 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/7.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/version", + "type": "tidelift" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2026-02-06T04:52:52+00:00" }, { "name": "seld/jsonlint", - "version": "1.10.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" + "reference": "9a90eb5d32d5a500296bf43f946d60246444d5f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9a90eb5d32d5a500296bf43f946d60246444d5f7", + "reference": "9a90eb5d32d5a500296bf43f946d60246444d5f7", "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 +10191,7 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "JSON Linter", @@ -9424,7 +10203,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.12.1" }, "funding": [ { @@ -9436,20 +10215,20 @@ "type": "tidelift" } ], - "time": "2023-05-11T13:16:46+00:00" + "time": "2026-06-12T11:32:29+00:00" }, { "name": "seld/phar-utils", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c" + "reference": "990bbd0e92caa216d52eca0935f6e35e589bfaa5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", - "reference": "ea2f4014f163c1be4c601b9b7bd6af81ba8d701c", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/990bbd0e92caa216d52eca0935f6e35e589bfaa5", + "reference": "990bbd0e92caa216d52eca0935f6e35e589bfaa5", "shasum": "" }, "require": { @@ -9482,295 +10261,45 @@ ], "support": { "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1" - }, - "time": "2022-08-31T10:31:18+00:00" - }, - { - "name": "seld/signal-handler", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/signal-handler.git", - "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", - "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "phpstan/phpstan": "^1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^7.5.20 || ^8.5.23", - "psr/log": "^1 || ^2 || ^3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\Signal\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", - "keywords": [ - "posix", - "sigint", - "signal", - "sigterm", - "unix" - ], - "support": { - "issues": "https://github.com/Seldaek/signal-handler/issues", - "source": "https://github.com/Seldaek/signal-handler/tree/2.0.2" - }, - "time": "2023-09-03T09:24:00+00:00" - }, - { - "name": "slevomat/coding-standard", - "version": "8.14.1", - "source": { - "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926", - "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926", - "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" - }, - "require-dev": { - "phing/phing": "2.17.4", - "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.37", - "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" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "8.x-dev" - } - }, - "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", - "keywords": [ - "dev", - "phpcs" - ], - "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.14.1" - }, - "funding": [ - { - "url": "https://github.com/kukulich", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" - } - ], - "time": "2023-10-08T07:28:08+00:00" - }, - { - "name": "spatie/array-to-xml", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/array-to-xml.git", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f9ab39c808500c347d5a8b6b13310bd5221e39e7", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.2", - "pestphp/pest": "^1.21", - "spatie/pest-plugin-snapshots": "^1.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\ArrayToXml\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://freek.dev", - "role": "Developer" - } - ], - "description": "Convert an array to xml", - "homepage": "https://github.com/spatie/array-to-xml", - "keywords": [ - "array", - "convert", - "xml" - ], - "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.0" - }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2023-07-19T18:30:26+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.7.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards", - "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" + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.2" }, - "time": "2023-02-22T23:07:41+00:00" + "time": "2026-08-01T12:48:55+00:00" }, { - "name": "symfony/config", - "version": "v6.3.2", + "name": "seld/signal-handler", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467" + "url": "https://github.com/Seldaek/signal-handler.git", + "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", - "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", + "url": "https://api.github.com/repos/Seldaek/signal-handler/zipball/04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", + "reference": "04a6112e883ad76c0ada8e4a9f7520bbfdb6bb98", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^5.4|^6.0", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<5.4", - "symfony/service-contracts": "<2.5" + "php": ">=7.2.0" }, "require-dev": { - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/messenger": "^5.4|^6.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0" + "phpstan/phpstan": "^1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", + "psr/log": "^1 || ^2 || ^3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, "autoload": { "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Seld\\Signal\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -9778,519 +10307,479 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" } ], - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", + "description": "Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development", + "keywords": [ + "posix", + "sigint", + "signal", + "sigterm", + "unix" + ], "support": { - "source": "https://github.com/symfony/config/tree/v6.3.2" + "issues": "https://github.com/Seldaek/signal-handler/issues", + "source": "https://github.com/Seldaek/signal-handler/tree/2.0.2" }, - "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": "2023-07-19T20:22:16+00:00" + "time": "2023-09-03T09:24:00+00:00" }, { - "name": "symfony/console", - "version": "v6.3.4", + "name": "shipmonk/dead-code-detector", + "version": "1.3.2", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "url": "https://github.com/shipmonk-rnd/dead-code-detector.git", + "reference": "2c376b3cbcb20422c3d46bb67cdb85b68b3137f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/shipmonk-rnd/dead-code-detector/zipball/2c376b3cbcb20422c3d46bb67cdb85b68b3137f0", + "reference": "2c376b3cbcb20422c3d46bb67cdb85b68b3137f0", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" + "php": "^8.1", + "phpstan/phpstan": "^2.1.41" }, "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" + "behat/behat": "^3.14", + "composer-runtime-api": "^2.0", + "composer/semver": "^3.4", + "doctrine/orm": "^2.19 || ^3.0", + "editorconfig-checker/editorconfig-checker": "^10.7.0", + "ergebnis/composer-normalize": "^2.48.1", + "laravel/framework": "^10.0 || ^11.0 || ^12.0", + "nette/application": "^3.1", + "nette/component-model": "^3.0", + "nette/neon": "^3.4", + "nette/tester": "^2.4", + "nette/utils": "^3.0 || ^4.0", + "nikic/php-parser": "^5.4.0", + "phpat/phpat": "^0.12", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan-phpunit": "^2.0.16", + "phpstan/phpstan-strict-rules": "^2.0.10", + "phpstan/phpstan-symfony": "^2.0.15", + "phpunit/phpcov": "^9.0.2", + "phpunit/phpunit": "^10.5.46", + "shipmonk/coding-standard": "^0.3.0", + "shipmonk/composer-dependency-analyser": "^1.8.4", + "shipmonk/coverage-guard": "^1.0.2", + "shipmonk/name-collision-detector": "^2.1.1", + "shipmonk/phpstan-dev": "^0.1.6", + "shipmonk/phpstan-rules": "^4.3.6", + "symfony/contracts": "^2.5 || ^3.0 || ^4.0", + "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/doctrine-bridge": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/form": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/routing": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "symfony/scheduler": "^6.3 || ^7.0 || ^8.0", + "symfony/ux-live-component": "^2.34", + "symfony/ux-twig-component": "^2.34", + "symfony/validator": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "twig/twig": "^3.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } }, - "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "ShipMonk\\PHPStan\\DeadCode\\": "src/" + } }, "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": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", + "description": "Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.", "keywords": [ - "cli", - "command-line", - "console", - "terminal" + "PHPStan", + "dead code", + "static analysis", + "unused code" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "issues": "https://github.com/shipmonk-rnd/dead-code-detector/issues", + "source": "https://github.com/shipmonk-rnd/dead-code-detector/tree/1.3.2" }, - "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": "2023-08-16T10:10:12+00:00" + "time": "2026-07-15T12:28:33+00:00" }, { - "name": "symfony/dependency-injection", - "version": "v6.3.5", + "name": "shipmonk/phpstan-rules", + "version": "4.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "2ed62b3bf98346e1f45529a7b6be2196739bb993" + "url": "https://github.com/shipmonk-rnd/phpstan-rules.git", + "reference": "5c972b16fa6d202d0d0d2c888e29f7d9fc0a9908" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2ed62b3bf98346e1f45529a7b6be2196739bb993", - "reference": "2ed62b3bf98346e1f45529a7b6be2196739bb993", + "url": "https://api.github.com/repos/shipmonk-rnd/phpstan-rules/zipball/5c972b16fa6d202d0d0d2c888e29f7d9fc0a9908", + "reference": "5c972b16fa6d202d0d0d2c888e29f7d9fc0a9908", "shasum": "" }, "require": { - "php": ">=8.1", - "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" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<6.1", - "symfony/finder": "<5.4", - "symfony/proxy-manager-bridge": "<6.3", - "symfony/yaml": "<5.4" - }, - "provide": { - "psr/container-implementation": "1.1|2.0", - "symfony/service-implementation": "1.1|2.0|3.0" + "php": "^8.1", + "phpstan/phpstan": "^2.1.33" + }, + "require-dev": { + "editorconfig-checker/editorconfig-checker": "^10.6.0", + "ergebnis/composer-normalize": "^2.45.0", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-phpunit": "^2.0.4", + "phpstan/phpstan-strict-rules": "^2.0.3", + "phpunit/phpunit": "^10.5.46", + "shipmonk/coding-standard": "^0.2.0", + "shipmonk/composer-dependency-analyser": "^1.8.1", + "shipmonk/coverage-guard": "^1.0.0", + "shipmonk/dead-code-detector": "^1.0", + "shipmonk/name-collision-detector": "^2.1.1", + "shipmonk/phpstan-dev": "^0.1.5" }, - "require-dev": { - "symfony/config": "^6.1", - "symfony/expression-language": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } }, - "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "ShipMonk\\PHPStan\\": "src/" + } }, "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": "Various extra strict PHPStan rules we found useful in ShipMonk.", + "keywords": [ + "PHPStan", + "static analysis" ], - "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" + "issues": "https://github.com/shipmonk-rnd/phpstan-rules/issues", + "source": "https://github.com/shipmonk-rnd/phpstan-rules/tree/4.4.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": "2023-09-25T16:46:40+00:00" + "time": "2026-05-18T12:07:24+00:00" }, { - "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "name": "slevomat/coding-standard", + "version": "8.31.1", "source": { "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "0a40807a48873948bfa7ffce2a4e69ba40cf5e76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/0a40807a48873948bfa7ffce2a4e69ba40cf5e76", + "reference": "0a40807a48873948bfa7ffce2a4e69ba40cf5e76", "shasum": "" }, "require": { - "php": ">=8.1" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.2.1", + "php": "^7.4 || ^8.0", + "phpstan/phpdoc-parser": "^2.3.3", + "squizlabs/php_codesniffer": "^4.0.1" }, - "type": "library", + "require-dev": { + "phing/phing": "3.0.1|3.1.2", + "php-parallel-lint/php-parallel-lint": "1.4.0", + "phpstan/phpstan": "2.2.7", + "phpstan/phpstan-deprecation-rules": "2.0.5", + "phpstan/phpstan-phpunit": "2.0.18", + "phpstan/phpstan-strict-rules": "2.0.12", + "phpunit/phpunit": "9.6.34|10.5.63|11.4.4|11.5.56|12.5.33" + }, + "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-main": "3.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "8.x-dev" } }, "autoload": { - "files": [ - "function.php" - ] + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard/" + } }, "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": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "keywords": [ + "dev", + "phpcs" ], - "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" + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/8.31.1" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/kukulich", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2026-07-31T10:42:43+00:00" }, { - "name": "symfony/filesystem", - "version": "v6.3.1", + "name": "squizlabs/php_codesniffer", + "version": "4.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "0525c73950de35ded110cffafb9892946d7771b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0525c73950de35ded110cffafb9892946d7771b5", + "reference": "0525c73950de35ded110cffafb9892946d7771b5", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=7.2.0" }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "require-dev": { + "phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31" }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", + "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "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" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" + "url": "https://github.com/PHPCSStandards", + "type": "github" }, { - "url": "https://github.com/fabpot", + "url": "https://github.com/jrfnl", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2025-11-10T16:43:36+00:00" }, { - "name": "symfony/finder", - "version": "v6.3.5", + "name": "staabm/phpstan-psr3", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" + "url": "https://github.com/staabm/phpstan-psr3.git", + "reference": "eb28b6f4cde754a8950547d633fc983cbfc59651" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", + "url": "https://api.github.com/repos/staabm/phpstan-psr3/zipball/eb28b6f4cde754a8950547d633fc983cbfc59651", + "reference": "eb28b6f4cde754a8950547d633fc983cbfc59651", "shasum": "" }, "require": { - "php": ">=8.1" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "illuminate/log": "^8 || ^9 || ^10 || ^11 || ^12", + "illuminate/support": "^8 || ^9 || ^10 || ^11 || ^12", + "monolog/monolog": "^2 || ^3.9", + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-phpunit": "^2.0.6", + "phpstan/phpstan-strict-rules": "^2.0.4", + "phpunit/phpunit": "^9 || ^10.5.45", + "redaxo/source": "^5", + "symplify/easy-coding-standard": "^12.5.11", + "tomasvotruba/unused-public": "^2.0.1" }, - "require-dev": { - "symfony/filesystem": "^6.0" + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "config/extension.neon" + ] + } }, - "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "staabm\\PHPStanPsr3\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } + "keywords": [ + "PHPStan", + "dev", + "monolog", + "phpstan-extension", + "psr-3", + "psr-log", + "static analysis" ], - "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" + "issues": "https://github.com/staabm/phpstan-psr3/issues", + "source": "https://github.com/staabm/phpstan-psr3/tree/1.0.3" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/staabm", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2023-09-26T12:56:25+00:00" + "time": "2025-04-22T16:20:54+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "name": "staabm/side-effects-detector", + "version": "1.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } + "classmap": [ + "lib/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", + "description": "A static analysis tool to detect side effects in PHP code", "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "static analysis" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/staabm", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-10-20T05:08:20+00:00" }, { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "name": "symfony/config", + "version": "v8.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "url": "https://github.com/symfony/config.git", + "reference": "e8ee277684fa228d37795ff160b901eeda1ade5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/config/zipball/e8ee277684fa228d37795ff160b901eeda1ade5d", + "reference": "e8ee277684fa228d37795ff160b901eeda1ade5d", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^7.4|^8.0", + "symfony/polyfill-ctype": "^1.8" }, - "suggest": { - "ext-intl": "For best performance" + "conflict": { + "symfony/service-contracts": "<2.5" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } + "require-dev": { + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/finder": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^7.4|^8.0" }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -10298,26 +10787,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's grapheme_* functions", + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/config/tree/v8.1.2" }, "funding": [ { @@ -10328,52 +10809,57 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2026-07-22T15:42:13+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "name": "symfony/dependency-injection", + "version": "v8.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "9bc6af9fadb6e7a614606e82e040fd4ac95c1d42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9bc6af9fadb6e7a614606e82e040fd4ac95c1d42", + "reference": "9bc6af9fadb6e7a614606e82e040fd4ac95c1d42", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.4.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^3.6", + "symfony/var-exporter": "^8.1" }, - "suggest": { - "ext-intl": "For best performance" + "conflict": { + "ext-psr": "<1.1|>=2" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/yaml": "^7.4|^8.0" }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + "Symfony\\Component\\DependencyInjection\\": "" }, - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -10382,26 +10868,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", + "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/dependency-injection/tree/v8.1.2" }, "funding": [ { @@ -10412,53 +10890,48 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2026-07-28T13:31:46+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "name": "symfony/filesystem", + "version": "v8.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "url": "https://github.com/symfony/filesystem.git", + "reference": "17856b7a222664a26a5ea1cb06ee0721c2438217" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/17856b7a222664a26a5ea1cb06ee0721c2438217", + "reference": "17856b7a222664a26a5ea1cb06ee0721c2438217", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" }, - "suggest": { - "ext-mbstring": "For best performance" + "require-dev": { + "symfony/process": "^7.4|^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -10466,25 +10939,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" + } ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/filesystem/tree/v8.1.2" }, "funding": [ { @@ -10495,49 +10961,44 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2026-07-22T15:42:13+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "name": "symfony/finder", + "version": "v8.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "url": "https://github.com/symfony/finder.git", + "reference": "e2989e762c70f9490fa3a00a0ac0fae5aa97a531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/finder/zipball/e2989e762c70f9490fa3a00a0ac0fae5aa97a531", + "reference": "e2989e762c70f9490fa3a00a0ac0fae5aa97a531", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.4.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } + "require-dev": { + "symfony/filesystem": "^7.4|^8.0" }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Component\\Finder\\": "" }, - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -10546,24 +11007,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/finder/tree/v8.1.1" }, "funding": [ { @@ -10574,38 +11029,45 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2026-06-27T09:05:56+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "name": "symfony/polyfill-deepclone", + "version": "v1.40.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "url": "https://github.com/symfony/polyfill-deepclone.git", + "reference": "dca4ccba5f360070b574414dce4c1e7a559844fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-deepclone/zipball/dca4ccba5f360070b574414dce4c1e7a559844fa", + "reference": "dca4ccba5f360070b574414dce4c1e7a559844fa", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" + }, + "provide": { + "ext-deepclone": "*" + }, + "suggest": { + "ext-deepclone": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -10613,7 +11075,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\DeepClone\\": "" }, "classmap": [ "Resources/stubs" @@ -10624,10 +11086,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -10637,16 +11095,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill for the deepclone extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "deepclone", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-deepclone/tree/v1.40.0" }, "funding": [ { @@ -10657,38 +11116,39 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2026-06-12T07:27:17+00:00" }, { - "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "name": "symfony/polyfill-php73", + "version": "v1.37.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "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" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -10696,7 +11156,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" + "Symfony\\Polyfill\\Php73\\": "" }, "classmap": [ "Resources/stubs" @@ -10716,7 +11176,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 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -10725,7 +11185,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.37.0" }, "funding": [ { @@ -10736,37 +11196,50 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "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", + "name": "symfony/polyfill-php81", + "version": "v1.38.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "6bfb9c766cacffbc8e118cb87217d08ed84e5cd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/6bfb9c766cacffbc8e118cb87217d08ed84e5cd7", + "reference": "6bfb9c766cacffbc8e118cb87217d08ed84e5cd7", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.2" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -10775,18 +11248,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Executes commands in sub-processes", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { - "source": "https://github.com/symfony/process/tree/v6.3.4" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.38.1" }, "funding": [ { @@ -10797,42 +11276,50 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-08-07T10:39:22+00:00" + "time": "2026-05-26T12:45:58+00:00" }, { - "name": "symfony/property-access", - "version": "v6.3.2", + "name": "symfony/polyfill-php84", + "version": "v1.38.1", "source": { "type": "git", - "url": "https://github.com/symfony/property-access.git", - "reference": "2dc4f9da444b8f8ff592e95d570caad67924f1d0" + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/2dc4f9da444b8f8ff592e95d570caad67924f1d0", - "reference": "2dc4f9da444b8f8ff592e95d570caad67924f1d0", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", + "reference": "f4e1dfaee5b74aba5964fe1fd4dfc7ba5e3085fa", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/property-info": "^5.4|^6.0" - }, - "require-dev": { - "symfony/cache": "^5.4|^6.0" + "php": ">=7.2" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\PropertyAccess\\": "" + "Symfony\\Polyfill\\Php84\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -10841,29 +11328,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functions to read and write from/to an object or array using a simple string notation", + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "access", - "array", - "extraction", - "index", - "injection", - "object", - "property", - "property-path", - "reflection" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v6.3.2" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.38.1" }, "funding": [ { @@ -10874,51 +11356,50 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-07-13T15:26:11+00:00" + "time": "2026-05-26T12:51:13+00:00" }, { - "name": "symfony/property-info", - "version": "v6.3.0", + "name": "symfony/polyfill-php85", + "version": "v1.41.0", "source": { "type": "git", - "url": "https://github.com/symfony/property-info.git", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd" + "url": "https://github.com/symfony/polyfill-php85.git", + "reference": "255fab485aaa1006ed411040c42aecd7b5302d7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/7f3a03716112269741fe2a809f8f791a371d1fcd", - "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/255fab485aaa1006ed411040c42aecd7b5302d7a", + "reference": "255fab485aaa1006ed411040c42aecd7b5302d7a", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/string": "^5.4|^6.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "<5.2", - "phpdocumentor/type-resolver": "<1.5.1", - "symfony/dependency-injection": "<5.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" + "php": ">=7.2" }, "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\PropertyInfo\\": "" + "Symfony\\Polyfill\\Php85\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -10927,26 +11408,24 @@ ], "authors": [ { - "name": "Kévin Dunglas", - "email": "dunglas@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Extracts information about PHP class' properties using metadata of popular sources", + "description": "Symfony polyfill backporting some PHP 8.5+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "doctrine", - "phpdoc", - "property", - "symfony", - "type", - "validator" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v6.3.0" + "source": "https://github.com/symfony/polyfill-php85/tree/v1.41.0" }, "funding": [ { @@ -10957,67 +11436,38 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2026-07-01T12:47:55+00:00" }, { - "name": "symfony/serializer", - "version": "v6.3.5", + "name": "symfony/process", + "version": "v8.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/serializer.git", - "reference": "855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c" + "url": "https://github.com/symfony/process.git", + "reference": "c4a9e58f235a6bf7f97ffbfedae2687353ac79e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c", - "reference": "855fc058c8bdbb69f53834f2fdb3876c9bc0ab7c", + "url": "https://api.github.com/repos/symfony/process/zipball/c4a9e58f235a6bf7f97ffbfedae2687353ac79e5", + "reference": "c4a9e58f235a6bf7f97ffbfedae2687353ac79e5", "shasum": "" }, "require": { - "php": ">=8.1", - "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" - }, - "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" + "php": ">=8.4.1" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Serializer\\": "" + "Symfony\\Component\\Process\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -11037,10 +11487,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v6.3.5" + "source": "https://github.com/symfony/process/tree/v8.1.0" }, "funding": [ { @@ -11051,50 +11501,46 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-09-29T16:18:53+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { - "name": "symfony/service-contracts", - "version": "v3.3.0", + "name": "symfony/property-access", + "version": "v8.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "url": "https://github.com/symfony/property-access.git", + "reference": "9261ef060f26cc7b728f67f141ba19b98a6209a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/property-access/zipball/9261ef060f26cc7b728f67f141ba19b98a6209a9", + "reference": "9261ef060f26cc7b728f67f141ba19b98a6209a9", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/container": "^2.0" + "php": ">=8.4.1", + "symfony/property-info": "^7.4.4|^8.0.4" }, - "conflict": { - "ext-psr": "<1.1|>=2" + "require-dev": { + "symfony/cache": "^7.4|^8.0", + "symfony/var-exporter": "^7.4|^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Service\\": "" + "Symfony\\Component\\PropertyAccess\\": "" }, "exclude-from-classmap": [ - "/Test/" + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -11103,26 +11549,29 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to writing services", + "description": "Provides functions to read and write from/to an object or array using a simple string notation", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property-path", + "reflection" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/property-access/tree/v8.1.0" }, "funding": [ { @@ -11133,35 +11582,51 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { - "name": "symfony/stopwatch", - "version": "v6.3.0", + "name": "symfony/property-info", + "version": "v8.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "url": "https://github.com/symfony/property-info.git", + "reference": "289ef0d4f2b9bd5245ac2604564289a8673837b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/property-info/zipball/289ef0d4f2b9bd5245ac2604564289a8673837b9", + "reference": "289ef0d4f2b9bd5245ac2604564289a8673837b9", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/service-contracts": "^2.5|^3" + "php": ">=8.4.1", + "symfony/string": "^7.4|^8.0", + "symfony/type-info": "^7.4.7|^8.0.7" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", + "symfony/cache": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" + "Symfony\\Component\\PropertyInfo\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -11173,18 +11638,26 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a way to profile code", + "description": "Extracts information about PHP class' properties using metadata of popular sources", "homepage": "https://symfony.com", + "keywords": [ + "doctrine", + "phpdoc", + "property", + "symfony", + "type", + "validator" + ], "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + "source": "https://github.com/symfony/property-info/tree/v8.1.2" }, "funding": [ { @@ -11195,51 +11668,72 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2026-07-22T15:42:13+00:00" }, { - "name": "symfony/string", - "version": "v6.3.5", + "name": "symfony/serializer", + "version": "v8.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "url": "https://github.com/symfony/serializer.git", + "reference": "6bd396438ba6c36800224e2beaf3f8f2d7439343" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/serializer/zipball/6bd396438ba6c36800224e2beaf3f8f2d7439343", + "reference": "6bd396438ba6c36800224e2beaf3f8f2d7439343", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "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/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/property-access": "<8.1", + "symfony/property-info": "<7.4.15", + "symfony/type-info": "<7.4" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "phpstan/phpdoc-parser": "^1.0|^2.0", + "seld/jsonlint": "^1.10", + "symfony/cache": "^7.4|^8.0", + "symfony/config": "^7.4|^8.0", + "symfony/console": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/filesystem": "^7.4|^8.0", + "symfony/form": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/mime": "^7.4|^8.0", + "symfony/property-access": "^8.1", + "symfony/property-info": "^7.4.15|~8.0.15|^8.1.2", + "symfony/translation-contracts": "^2.5|^3", + "symfony/type-info": "^7.4|^8.0", + "symfony/uid": "^7.4|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0", + "symfony/var-exporter": "^7.4|^8.0", + "symfony/yaml": "^7.4|^8.0" }, "type": "library", "autoload": { - "files": [ - "Resources/functions.php" - ], "psr-4": { - "Symfony\\Component\\String\\": "" + "Symfony\\Component\\Serializer\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -11251,26 +11745,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/serializer/tree/v8.1.3" }, "funding": [ { @@ -11281,37 +11767,45 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-09-18T10:38:32+00:00" + "time": "2026-07-29T14:11:26+00:00" }, { - "name": "symfony/var-exporter", - "version": "v6.3.4", + "name": "symfony/type-info", + "version": "v8.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691" + "url": "https://github.com/symfony/type-info.git", + "reference": "9f24df8a79781b9b9f030fea7dfd2f3bd1e7e7e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df1f8aac5751871b83d30bf3e2c355770f8f0691", - "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691", + "url": "https://api.github.com/repos/symfony/type-info/zipball/9f24df8a79781b9b9f030fea7dfd2f3bd1e7e7e7", + "reference": "9f24df8a79781b9b9f030fea7dfd2f3bd1e7e7e7", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.4.1", + "psr/container": "^1.1|^2.0" + }, + "conflict": { + "phpstan/phpdoc-parser": "<1.30" }, "require-dev": { - "symfony/var-dumper": "^5.4|^6.0" + "phpstan/phpdoc-parser": "^1.30|^2.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\VarExporter\\": "" + "Symfony\\Component\\TypeInfo\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -11323,28 +11817,28 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "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": "Allows exporting any serializable PHP data structure to plain PHP code", + "description": "Extracts PHP types information.", "homepage": "https://symfony.com", "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "lazy-loading", - "proxy", - "serialize" + "PHPStan", + "phpdoc", + "symfony", + "type" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.3.4" + "source": "https://github.com/symfony/type-info/tree/v8.1.0" }, "funding": [ { @@ -11355,45 +11849,45 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-08-16T18:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { - "name": "symfony/yaml", - "version": "v6.3.3", + "name": "symfony/var-exporter", + "version": "v8.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add" + "url": "https://github.com/symfony/var-exporter.git", + "reference": "766dac532a04d8980b4d83183fd3d1ea284bac11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add", - "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/766dac532a04d8980b4d83183fd3d1ea284bac11", + "reference": "766dac532a04d8980b4d83183fd3d1ea284bac11", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.4.1", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.4" + "symfony/polyfill-deepclone": "^1.40" }, "require-dev": { - "symfony/console": "^5.4|^6.0" + "symfony/property-access": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" }, - "bin": [ - "Resources/bin/yaml-lint" - ], "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Component\\VarExporter\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -11405,18 +11899,29 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Loads and dumps YAML files", + "description": "Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects", "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "deep-clone", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.3" + "source": "https://github.com/symfony/var-exporter/tree/v8.1.3" }, "funding": [ { @@ -11427,167 +11932,101 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2026-07-29T16:43:23+00:00" }, { - "name": "thecodingmachine/phpstan-safe-rule", - "version": "v1.2.0", + "name": "symplify/phpstan-extensions", + "version": "12.0.2", "source": { "type": "git", - "url": "https://github.com/thecodingmachine/phpstan-safe-rule.git", - "reference": "8a7b88e0d54f209a488095085f183e9174c40e1e" + "url": "https://github.com/symplify/phpstan-extensions.git", + "reference": "5ce15cb084eb3bc7f92b77020c59ff3d318746d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/phpstan-safe-rule/zipball/8a7b88e0d54f209a488095085f183e9174c40e1e", - "reference": "8a7b88e0d54f209a488095085f183e9174c40e1e", + "url": "https://api.github.com/repos/symplify/phpstan-extensions/zipball/5ce15cb084eb3bc7f92b77020c59ff3d318746d5", + "reference": "5ce15cb084eb3bc7f92b77020c59ff3d318746d5", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^1.0", - "thecodingmachine/safe": "^1.0 || ^2.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^7.5.2 || ^8.0", - "squizlabs/php_codesniffer": "^3.4" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" }, "type": "phpstan-extension", "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - }, "phpstan": { "includes": [ - "phpstan-safe-rule.neon" + "config/config.neon" ] } }, "autoload": { "psr-4": { - "TheCodingMachine\\Safe\\PHPStan\\": "src/" + "Symplify\\PHPStanExtensions\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com" - } + "description": "Pre-escaped error messages in 'symplify' error format, container aware test case and other useful extensions for PHPStan", + "keywords": [ + "phpstan-extension", + "static analysis" ], - "description": "A PHPStan rule to detect safety issues. Must be used in conjunction with thecodingmachine/safe", "support": { - "issues": "https://github.com/thecodingmachine/phpstan-safe-rule/issues", - "source": "https://github.com/thecodingmachine/phpstan-safe-rule/tree/v1.2.0" - }, - "time": "2022-01-17T10:12:29+00:00" - }, - { - "name": "thecodingmachine/phpstan-strict-rules", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/phpstan-strict-rules.git", - "reference": "2ba8fa8b328c45f3b149c05def5bf96793c594b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/2ba8fa8b328c45f3b149c05def5bf96793c594b6", - "reference": "2ba8fa8b328c45f3b149c05def5bf96793c594b6", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0", - "phpstan/phpstan": "^1.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^7.1" + "issues": "https://github.com/symplify/phpstan-extensions/issues", + "source": "https://github.com/symplify/phpstan-extensions/tree/12.0.2" }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" + "funding": [ + { + "url": "https://www.paypal.me/rectorphp", + "type": "custom" }, - "phpstan": { - "includes": [ - "phpstan-strict-rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "TheCodingMachine\\PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com" + "url": "https://github.com/tomasvotruba", + "type": "github" } ], - "description": "A set of additional rules for PHPStan based on best practices followed at TheCodingMachine", - "support": { - "issues": "https://github.com/thecodingmachine/phpstan-strict-rules/issues", - "source": "https://github.com/thecodingmachine/phpstan-strict-rules/tree/v1.0.0" - }, - "time": "2021-11-08T09:10:49+00:00" + "abandoned": "symplify/phpstan-rules", + "time": "2025-11-12T16:46:04+00:00" }, { "name": "thecodingmachine/safe", - "version": "v2.5.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/thecodingmachine/safe.git", - "reference": "3115ecd6b4391662b4931daac4eba6b07a2ac1f0" + "reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/3115ecd6b4391662b4931daac4eba6b07a2ac1f0", - "reference": "3115ecd6b4391662b4931daac4eba6b07a2ac1f0", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/705683a25bacf0d4860c7dea4d7947bfd09eea19", + "reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19", "shasum": "" }, "require": { - "php": "^8.0" + "php": "^8.1" }, "require-dev": { - "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.2", - "thecodingmachine/phpstan-strict-rules": "^1.0" + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^10", + "squizlabs/php_codesniffer": "^3.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, "autoload": { "files": [ - "deprecated/apc.php", - "deprecated/array.php", - "deprecated/datetime.php", - "deprecated/libevent.php", - "deprecated/misc.php", - "deprecated/password.php", - "deprecated/mssql.php", - "deprecated/stats.php", - "deprecated/strings.php", "lib/special_cases.php", - "deprecated/mysqli.php", "generated/apache.php", "generated/apcu.php", "generated/array.php", @@ -11627,6 +12066,7 @@ "generated/mbstring.php", "generated/misc.php", "generated/mysql.php", + "generated/mysqli.php", "generated/network.php", "generated/oci8.php", "generated/opcache.php", @@ -11639,6 +12079,7 @@ "generated/ps.php", "generated/pspell.php", "generated/readline.php", + "generated/rnp.php", "generated/rpminfo.php", "generated/rrd.php", "generated/sem.php", @@ -11670,7 +12111,6 @@ "lib/DateTime.php", "lib/DateTimeImmutable.php", "lib/Exceptions/", - "deprecated/Exceptions/", "generated/Exceptions/" ] }, @@ -11681,310 +12121,160 @@ "description": "PHP core functions that throw exceptions instead of returning FALSE on error", "support": { "issues": "https://github.com/thecodingmachine/safe/issues", - "source": "https://github.com/thecodingmachine/safe/tree/v2.5.0" - }, - "time": "2023-04-05T11:54:14+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/thecodingmachine/safe/tree/v3.4.0" }, "funding": [ { - "url": "https://github.com/theseer", + "url": "https://github.com/OskarStark", "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "twig/twig", - "version": "v3.7.1", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" }, { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.7.1" - }, - "funding": [ - { - "url": "https://github.com/fabpot", + "url": "https://github.com/shish", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" + "url": "https://github.com/silasjoisten", + "type": "github" + }, + { + "url": "https://github.com/staabm", + "type": "github" } ], - "time": "2023-08-28T11:09:02+00:00" + "time": "2026-02-04T18:08:13+00:00" }, { - "name": "vimeo/psalm", - "version": "5.15.0", + "name": "theseer/tokenizer", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/vimeo/psalm.git", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "7989e43bf381af0eac72e4f0ca5bcbfa81658be4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/5c774aca4746caf3d239d9c8cadb9f882ca29352", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/7989e43bf381af0eac72e4f0ca5bcbfa81658be4", + "reference": "7989e43bf381af0eac72e4f0ca5bcbfa81658be4", "shasum": "" }, "require": { - "amphp/amp": "^2.4.2", - "amphp/byte-stream": "^1.5", - "composer-runtime-api": "^2", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^2.0 || ^3.0", - "dnoegel/php-xdg-base-dir": "^0.1.1", - "ext-ctype": "*", "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", "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", - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.16", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", - "sebastian/diff": "^4.0 || ^5.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" - }, - "conflict": { - "nikic/php-parser": "4.17.0" - }, - "provide": { - "psalm/psalm": "self.version" - }, - "require-dev": { - "amphp/phpunit-util": "^2.0", - "bamarni/composer-bin-plugin": "^1.4", - "brianium/paratest": "^6.9", - "ext-curl": "*", - "mockery/mockery": "^1.5", - "nunomaduro/mock-final-classes": "^1.1", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpdoc-parser": "^1.6", - "phpunit/phpunit": "^9.6", - "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.18", - "slevomat/coding-standard": "^8.4", - "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-curl": "In order to send data to shepherd", - "ext-igbinary": "^2.0.5 is required, used to serialize caching data" + "ext-xmlwriter": "*", + "php": "^8.1" }, - "bin": [ - "psalm", - "psalm-language-server", - "psalm-plugin", - "psalm-refactor", - "psalter" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev", - "dev-4.x": "4.x-dev", - "dev-3.x": "3.x-dev", - "dev-2.x": "2.x-dev", - "dev-1.x": "1.x-dev" - } - }, "autoload": { - "psr-4": { - "Psalm\\": "src/Psalm/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Matthew Brown" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "A static analysis tool for finding errors in PHP applications", - "keywords": [ - "code", - "inspection", - "php", - "static analysis" - ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.15.0" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/2.0.1" }, - "time": "2023-08-20T23:07:30+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2025-12-08T11:19:18+00:00" }, { - "name": "webmozart/assert", - "version": "1.11.0", + "name": "tomasvotruba/type-coverage", + "version": "2.3.0", "source": { "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + "url": "https://github.com/TomasVotruba/type-coverage.git", + "reference": "7ba48c1bf3bbb7ffe99caacc7017bae5ee72d644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/7ba48c1bf3bbb7ffe99caacc7017bae5ee72d644", + "reference": "7ba48c1bf3bbb7ffe99caacc7017bae5ee72d644", "shasum": "" }, "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" + "php": "^8.4", + "phpstan/phpstan": "^2.2", + "webmozart/assert": "^1.11 || ^2.1" }, "require-dev": { - "phpunit/phpunit": "^8.5.13" + "phpstan/extension-installer": "^1.4", + "phpunit/phpunit": "^13.2", + "rector/jack": "^1.0", + "rector/rector": "^2.5", + "shipmonk/composer-dependency-analyser": "^1.8", + "symfony/dom-crawler": "^8.1", + "symplify/easy-coding-standard": "^13.2", + "tomasvotruba/unused-public": "^2.2", + "tracy/tracy": "^2.12" }, - "type": "library", + "type": "phpstan-extension", "extra": { - "branch-alias": { - "dev-master": "1.10-dev" + "phpstan": { + "includes": [ + "config/extension.neon", + "packages/type-perfect/config/extension.neon" + ] } }, "autoload": { "psr-4": { - "Webmozart\\Assert\\": "src/" + "Rector\\TypePerfect\\": "packages/type-perfect/src", + "TomasVotruba\\TypeCoverage\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", + "description": "Measure type coverage of your project", "keywords": [ - "assert", - "check", - "validate" + "phpstan-extension", + "static analysis" ], "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "issues": "https://github.com/TomasVotruba/type-coverage/issues", + "source": "https://github.com/TomasVotruba/type-coverage/tree/2.3.0" }, - "time": "2022-06-03T18:03:27+00:00" + "funding": [ + { + "url": "https://www.paypal.me/rectorphp", + "type": "custom" + }, + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2026-07-29T20:32:37+00:00" }, { "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,40 +12308,49 @@ "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": "13.5.1", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-async-test-utilities.git", - "reference": "3cac9f58ec6674b4e30decd31958e4999cd22db7" + "reference": "3d2f7e9dab5519d8fce0b841add6e1595a34f6fe" }, "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/3d2f7e9dab5519d8fce0b841add6e1595a34f6fe", + "reference": "3d2f7e9dab5519d8fce0b841add6e1595a34f6fe", "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", - "wyrihaximus/test-utilities": "^5.5.4 || ^6" + "php": "^8.4", + "phpunit/phpunit": "^13.2.6", + "react/async": "^4.3.0", + "react/event-loop": "^1.6.0", + "react/promise": "^3.3.0", + "wyrihaximus/phpstan-react": "^2.0.0", + "wyrihaximus/react-phpunit-run-tests-in-fiber": "^4.0.0", + "wyrihaximus/test-utilities": "^13.5.1" }, "conflict": { "composer/compoer": "<2.6.0" }, "require-dev": { - "react/promise-timer": "^1.10.0", - "wyrihaximus/iterator-or-array-to-array": "^1.2" + "react/promise-timer": "^1.11.0", + "wyrihaximus/makefiles": "^0.13.3" }, "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, "autoload": { "psr-4": { "WyriHaximus\\AsyncTestUtilities\\": "src/" @@ -12070,7 +12369,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/13.5.1" }, "funding": [ { @@ -12078,30 +12377,43 @@ "type": "github" } ], - "time": "2023-09-07T13:00:15+00:00" + "time": "2026-08-03T17:02:23+00:00" }, { "name": "wyrihaximus/coding-standard", - "version": "2.14.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-coding-standard.git", - "reference": "7530678d70ced4d41540df0e60e8811d14813058" + "reference": "15de1c4e2be8857b2c086810659eac158dfe7531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-coding-standard/zipball/7530678d70ced4d41540df0e60e8811d14813058", - "reference": "7530678d70ced4d41540df0e60e8811d14813058", + "url": "https://api.github.com/repos/WyriHaximus/php-coding-standard/zipball/15de1c4e2be8857b2c086810659eac158dfe7531", + "reference": "15de1c4e2be8857b2c086810659eac158dfe7531", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", - "doctrine/coding-standard": "^12.0.0", - "php": "^8.1", - "slevomat/coding-standard": "^8.11.1", - "squizlabs/php_codesniffer": "^3.7.2" + "dealerdirect/phpcodesniffer-composer-installer": "^1.2.1", + "doctrine/coding-standard": "^14.0.0", + "php": "^8.4", + "slevomat/coding-standard": "^8.30.1", + "squizlabs/php_codesniffer": "^4.0.1" + }, + "require-dev": { + "wyrihaximus/makefiles": "^0.12.1" }, "type": "phpcodesniffer-standard", + "extra": { + "wyrihaximus": { + "supported-features": { + "code-style": false, + "unit-tests": false, + "static-analysis": false, + "composer-dependency-checkers": false + } + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -12109,7 +12421,7 @@ "description": "WyriHaximus Coding Standard", "support": { "issues": "https://github.com/WyriHaximus/php-coding-standard/issues", - "source": "https://github.com/WyriHaximus/php-coding-standard/tree/2.14.0" + "source": "https://github.com/WyriHaximus/php-coding-standard/tree/4.2.0" }, "funding": [ { @@ -12117,49 +12429,61 @@ "type": "github" } ], - "time": "2023-05-06T11:54:10+00:00" + "time": "2026-06-27T19:56:09+00:00" }, { - "name": "wyrihaximus/composer-update-bin-autoload-path", - "version": "1.1.1", + "name": "wyrihaximus/makefiles", + "version": "0.13.3", "source": { "type": "git", - "url": "https://github.com/WyriHaximus/php-composer-update-bin-autoload-path.git", - "reference": "33413e3af4f4d7ab4de3653a706aed57f51e84af" + "url": "https://github.com/WyriHaximus/Makefiles.git", + "reference": "258162a89005f0c0ff920d00e2e5cd851ebb74cf" }, "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/Makefiles/zipball/258162a89005f0c0ff920d00e2e5cd851ebb74cf", + "reference": "258162a89005f0c0ff920d00e2e5cd851ebb74cf", "shasum": "" }, "require": { "composer-plugin-api": "^2", - "php": "^8 || ^7.4" + "ext-json": "^8.4", + "php": "^8.4" + }, + "conflict": { + "infection/infection": "<0.32.0" }, "require-dev": { - "wyrihaximus/test-utilities": "^3" + "wyrihaximus/test-utilities": "^13.4.0" }, "type": "composer-plugin", "extra": { - "class": "WyriHaximus\\Composer\\BinAutoloadPathUpdater", - "unused": [ - "php" - ] + "class": "WyriHaximus\\Makefiles\\Composer\\Installer", + "wyrihaximus": { + "supported-features": { + "composer-plugin": true + } + } }, "autoload": { "psr-4": { - "WyriHaximus\\Composer\\": "src" + "WyriHaximus\\Makefiles\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "🏰 Composer plugin that fills a bin file with the absolute composer autoload path", + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "🧱 Makefile building blocks", "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/Makefiles/issues", + "source": "https://github.com/WyriHaximus/Makefiles/tree/0.13.3" }, "funding": [ { @@ -12167,50 +12491,53 @@ "type": "github" } ], - "time": "2021-03-14T20:55:38+00:00" + "time": "2026-07-29T18:27:30+00:00" }, { - "name": "wyrihaximus/phpstan-rules-wrapper", - "version": "3.3.0", + "name": "wyrihaximus/phpstan-no-safe", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper.git", - "reference": "8e65ee7749a3e10100f0abec58b7e53ee540c43d" + "url": "https://github.com/WyriHaximus/phpstan-no-safe.git", + "reference": "f9bed3bbba6cf617e25b3753ecbb09ad4d2c4813" }, "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/phpstan-no-safe/zipball/f9bed3bbba6cf617e25b3753ecbb09ad4d2c4813", + "reference": "f9bed3bbba6cf617e25b3753ecbb09ad4d2c4813", "shasum": "" }, "require": { - "ergebnis/phpstan-rules": "^2.1.0", - "jangregor/phpstan-prophecy": "^1.0", - "pepakriz/phpstan-exception-rules": "^0.12.0", - "php": "^8.2", - "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-php-parser": "^1.1", - "phpstan/phpstan-phpunit": "^1.3.14", - "phpstan/phpstan-strict-rules": "^1.5.1", - "thecodingmachine/phpstan-safe-rule": "^1.2", - "thecodingmachine/phpstan-strict-rules": "^1.0" + "php": "^8.4" + }, + "require-dev": { + "jawira/case-converter": "^3.6", + "nikic/php-parser": "^5.6.1", + "phpstan/phpdoc-parser": "^2.2.0", + "wyrihaximus/makefiles": "^0.11.1", + "wyrihaximus/test-utilities": "^13.1.0" }, "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "WyriHaximus\\PHPStan\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com" - } - ], - "description": "🌯 PHPStan rules wrapper", + "description": "⛔🔐 PHPStan extension that detects and blocks any usage of `thecodingmachine/safe`", "support": { - "issues": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/issues", - "source": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/tree/3.3.0" + "issues": "https://github.com/WyriHaximus/phpstan-no-safe/issues", + "source": "https://github.com/WyriHaximus/phpstan-no-safe/tree/1.0.0" }, "funding": [ { @@ -12218,54 +12545,53 @@ "type": "github" } ], - "time": "2023-09-26T09:07:47+00:00" + "time": "2026-06-19T23:15:39+00:00" }, { - "name": "wyrihaximus/react-awaitable-observable", - "version": "1.0.0", + "name": "wyrihaximus/phpstan-react", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/WyriHaximus/reactphp-awaitable-observable.git", - "reference": "d8423f506342f15d4c30a4da404bd25f457caddb" + "url": "https://github.com/WyriHaximus/phpstan-reactphp.git", + "reference": "1b7464948b62b569e049d576da967bd980d7d2a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/reactphp-awaitable-observable/zipball/d8423f506342f15d4c30a4da404bd25f457caddb", - "reference": "d8423f506342f15d4c30a4da404bd25f457caddb", + "url": "https://api.github.com/repos/WyriHaximus/phpstan-reactphp/zipball/1b7464948b62b569e049d576da967bd980d7d2a9", + "reference": "1b7464948b62b569e049d576da967bd980d7d2a9", "shasum": "" }, "require": { - "php": "^8.1", - "react/async": "^4", - "react/promise": "^2.9", - "reactivex/rxphp": "^2.0.10" + "php": "^8.3" }, "require-dev": { - "wyrihaximus/async-test-utilities": "^5.0.11" + "jawira/case-converter": "^3.5", + "nikic/php-parser": "^5.4.0", + "phpstan/phpdoc-parser": "^2.1.0", + "wyrihaximus/makefiles": "^0.3.0", + "wyrihaximus/test-utilities": "^7.0.0" }, "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "WyriHaximus\\React\\": "src/" + "WyriHaximus\\React\\PHPStan\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com" - } - ], - "description": "🛠️ Make observables foreachable using async & await", + "description": "👎 ReactPHP extension for PHPStan", "support": { - "issues": "https://github.com/WyriHaximus/reactphp-awaitable-observable/issues", - "source": "https://github.com/WyriHaximus/reactphp-awaitable-observable/tree/1.0.0" + "issues": "https://github.com/WyriHaximus/phpstan-reactphp/issues", + "source": "https://github.com/WyriHaximus/phpstan-reactphp/tree/2.0.0" }, "funding": [ { @@ -12273,36 +12599,45 @@ "type": "github" } ], - "time": "2022-08-11T13:15:09+00:00" + "time": "2025-04-26T22:37:11+00:00" }, { - "name": "wyrihaximus/simple-twig", - "version": "2.1.0", + "name": "wyrihaximus/phpstan-rules-wrapper", + "version": "14.2.0", "source": { "type": "git", - "url": "https://github.com/WyriHaximus/php-simple-twig.git", - "reference": "aa0d055c13a25b0318aa55edaea13fe12af15939" + "url": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper.git", + "reference": "7cd78f466177384201b551f6ade2e7bcc7f9f30a" }, "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-phpstan-rules-wrapper/zipball/7cd78f466177384201b551f6ade2e7bcc7f9f30a", + "reference": "7cd78f466177384201b551f6ade2e7bcc7f9f30a", "shasum": "" }, "require": { - "php": "^8 || ^7.4", - "twig/twig": "^3.3.2" - }, - "require-dev": { - "wyrihaximus/test-utilities": "^3.7.3" + "ergebnis/phpstan-rules": "^2.13.1", + "php": "^8.4", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.2.7", + "phpstan/phpstan-deprecation-rules": "^2.0.5", + "phpstan/phpstan-mockery": "^2.0.0", + "phpstan/phpstan-phpunit": "^2.0.18", + "phpstan/phpstan-strict-rules": "^2.0.12", + "shipmonk/dead-code-detector": "^1.3.2", + "shipmonk/phpstan-rules": "^4.4.0", + "staabm/phpstan-psr3": "^1.0.3", + "symplify/phpstan-extensions": "^12.0.2", + "tomasvotruba/type-coverage": "^2.2.2", + "wyrihaximus/phpstan-no-safe": "^1.0.0", + "yamadashy/phpstan-friendly-formatter": "^1.4.0" }, "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "WyriHaximus\\Twig\\": "src/" + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -12315,10 +12650,10 @@ "email": "ceesjank@gmail.com" } ], - "description": "🌱 Wrapper around Twig making rendering a string template trivial", + "description": "🌯 PHPStan rules wrapper", "support": { - "issues": "https://github.com/WyriHaximus/php-simple-twig/issues", - "source": "https://github.com/WyriHaximus/php-simple-twig/tree/2.1.0" + "issues": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/issues", + "source": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/tree/14.2.0" }, "funding": [ { @@ -12326,38 +12661,40 @@ "type": "github" } ], - "time": "2021-09-08T22:05:38+00:00" + "time": "2026-07-29T21:06:05+00:00" }, { - "name": "wyrihaximus/subsplit-tools", - "version": "dev-main", + "name": "wyrihaximus/react-phpunit-run-tests-in-fiber", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/WyriHaximus/php-subsplit-tools.git", - "reference": "22db9bbeced36051af9eb13f8cc4d5d6ec8c4765" + "url": "https://github.com/WyriHaximus/reactphp-phpunit-run-tests-in-fiber.git", + "reference": "9ff2c42452909ff0a19f74882c07a1833bd58941" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-subsplit-tools/zipball/22db9bbeced36051af9eb13f8cc4d5d6ec8c4765", - "reference": "22db9bbeced36051af9eb13f8cc4d5d6ec8c4765", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-phpunit-run-tests-in-fiber/zipball/9ff2c42452909ff0a19f74882c07a1833bd58941", + "reference": "9ff2c42452909ff0a19f74882c07a1833bd58941", "shasum": "" }, "require": { - "api-clients/github": "^0.2@dev", - "devizzent/cebe-php-openapi": "^1", - "php": "^8.2", - "react/http": "^1.8", - "thecodingmachine/safe": "^2.4", - "wyrihaximus/simple-twig": "^2.1" + "php": "^8.4", + "react/async": "^4.3.0", + "react/event-loop": "^1.5.0", + "react/promise": "^3.3" + }, + "conflict": { + "phpunit/phpunit": "<13" }, "require-dev": { - "wyrihaximus/test-utilities": "^5.4" + "react/promise-timer": "^1.11.0", + "wyrihaximus/makefiles": "^0.10.6", + "wyrihaximus/test-utilities": "^13.0.0" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { - "WyriHaximus\\SubSplitTools\\": "src/" + "WyriHaximus\\React\\PHPUnit\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -12370,10 +12707,10 @@ "email": "ceesjank@gmail.com" } ], - "description": "Tools to do initial code generation for sub split set up", + "description": "Trait to run all tests in a fiber", "support": { - "issues": "https://github.com/WyriHaximus/php-subsplit-tools/issues", - "source": "https://github.com/WyriHaximus/php-subsplit-tools/tree/main" + "issues": "https://github.com/WyriHaximus/reactphp-phpunit-run-tests-in-fiber/issues", + "source": "https://github.com/WyriHaximus/reactphp-phpunit-run-tests-in-fiber/tree/4.0.0" }, "funding": [ { @@ -12381,74 +12718,66 @@ "type": "github" } ], - "time": "2023-10-05T10:18:29+00:00" + "time": "2026-06-08T21:25:02+00:00" }, { "name": "wyrihaximus/test-utilities", - "version": "5.6.0", + "version": "13.5.1", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-test-utilities.git", - "reference": "5b6d2484119f72625307b096b8297c933cc765d6" + "reference": "688dcc6482e739e535e1daef11b7b689665cbf1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-test-utilities/zipball/5b6d2484119f72625307b096b8297c933cc765d6", - "reference": "5b6d2484119f72625307b096b8297c933cc765d6", + "url": "https://api.github.com/repos/WyriHaximus/php-test-utilities/zipball/688dcc6482e739e535e1daef11b7b689665cbf1a", + "reference": "688dcc6482e739e535e1daef11b7b689665cbf1a", "shasum": "" }, "require": { - "ergebnis/composer-normalize": "^2.33.0", - "icanhazstring/composer-unused": "^0.8.10", - "infection/infection": "^0.27.0", - "jakobbuis/simple-slow-test-reporter": "^1.0", - "maglnet/composer-require-checker": "^4.6.0", - "nunomaduro/collision": "^7.1.0", - "orklah/psalm-insane-comparison": "^2.2.0", - "php": "^8.2", - "php-coveralls/php-coveralls": "^2.6.0", - "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", - "php-standard-library/psalm-plugin": "^1.1.5 || ^2.2.1", - "phpspec/prophecy": "^1.17", - "phpspec/prophecy-phpunit": "^2.0.2", - "phpstan/phpstan": "^1.10.26", - "phpunit/phpunit": "^9.6.10", - "psalm/plugin-phpunit": "^0.18.4", - "roave/backward-compatibility-check": "^8.3.0", - "roave/infection-static-analysis-plugin": "^1.32.0", - "squizlabs/php_codesniffer": "^3.7.2", - "thecodingmachine/safe": "^2.5.0", - "vimeo/psalm": "^5.13.1", - "wyrihaximus/coding-standard": "^2.14.0", - "wyrihaximus/phpstan-rules-wrapper": "^3.0.0" + "composer-plugin-api": "^2", + "ergebnis/composer-normalize": "^2.52.0", + "ergebnis/phpunit-slow-test-detector": "^2.24.0", + "ext-hash": "^8.4", + "ext-json": "^8.4", + "icanhazstring/composer-unused": "^0.9.6", + "infection/infection": "^0.34.1", + "maglnet/composer-require-checker": "^4.20.0", + "mockery/mockery": "^1.6.12", + "php": "^8.4", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpstan/phpstan": "^2.2.7", + "phpunit/phpunit": "^13.2.6", + "rector/rector": "^2.6.0", + "roave/backward-compatibility-check": "^8.19.0", + "squizlabs/php_codesniffer": "^4.0.1", + "wyrihaximus/coding-standard": "^4.2.0", + "wyrihaximus/phpstan-rules-wrapper": "^14.2.0" }, "conflict": { - "symfony/dependency-injection": "<5.0.0" + "composer-unused/symbol-parser": "<0.3.3", + "composer/composer": "<2.10.2", + "composer/pcre": "<3.3.2", + "sanmai/di-container": "<0.1.17", + "sanmai/pipeline": "<7.9", + "wyrihaximus/makefiles": "<0.5.0" }, - "type": "library", + "require-dev": { + "wyrihaximus/makefiles": "^0.13.3" + }, + "suggest": { + "wyrihaximus/async-test-utilities": "The recommended addition to this package when building ReactPHP packages and projects.", + "wyrihaximus/makefiles": "Provides autogenerated Makefile utilizing all utilities provided through this package." + }, + "type": "composer-plugin", "extra": { - "unused": [ - "ergebnis/composer-normalize", - "icanhazstring/composer-unused", - "infection/infection", - "jakobbuis/simple-slow-test-reporter", - "maglnet/composer-require-checker", - "nunomaduro/collision", - "orklah/psalm-insane-comparison", - "php-coveralls/php-coveralls", - "php-parallel-lint/php-console-highlighter", - "php-parallel-lint/php-parallel-lint", - "php-standard-library/psalm-plugin", - "phpstan/phpstan", - "psalm/plugin-phpunit", - "roave/backward-compatibility-check", - "roave/infection-static-analysis-plugin", - "squizlabs/php_codesniffer", - "vimeo/psalm", - "wyrihaximus/coding-standard", - "wyrihaximus/phpstan-rules-wrapper" - ] + "class": "WyriHaximus\\TestUtilities\\Composer\\Installer", + "phpstan": { + "includes": [ + "extension.neon" + ] + } }, "autoload": { "psr-4": { @@ -12468,7 +12797,7 @@ "description": "🛠️ Test utilities for api-clients packages", "support": { "issues": "https://github.com/WyriHaximus/php-test-utilities/issues", - "source": "https://github.com/WyriHaximus/php-test-utilities/tree/5.6.0" + "source": "https://github.com/WyriHaximus/php-test-utilities/tree/13.5.1" }, "funding": [ { @@ -12476,25 +12805,93 @@ "type": "github" } ], - "time": "2023-07-26T21:51:43+00:00" + "time": "2026-08-03T15:22:38+00:00" + }, + { + "name": "yamadashy/phpstan-friendly-formatter", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/yamadashy/phpstan-friendly-formatter.git", + "reference": "cd4882c7293591c13230b5be35e742b33d2ab2ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yamadashy/phpstan-friendly-formatter/zipball/cd4882c7293591c13230b5be35e742b33d2ab2ff", + "reference": "cd4882c7293591c13230b5be35e742b33d2ab2ff", + "shasum": "" + }, + "require": { + "php": "^8.1", + "php-parallel-lint/php-console-highlighter": "^0.3 || ^0.4 || ^0.5 || ^1.0", + "phpstan/phpstan": "^1.0 || ^2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.93.0", + "phpstan/phpstan-phpunit": "^2.0.12", + "phpunit/phpunit": "^10.0 || ^11.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Yamadashy\\PhpStanFriendlyFormatter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazuki Yamada", + "email": "koukun0120@gmail.com" + } + ], + "description": "Simple error formatter for PHPStan that display code frame", + "keywords": [ + "PHPStan", + "package", + "php", + "static analysis" + ], + "support": { + "issues": "https://github.com/yamadashy/phpstan-friendly-formatter/issues", + "source": "https://github.com/yamadashy/phpstan-friendly-formatter/tree/v1.4.0" + }, + "time": "2026-01-26T15:12:47+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": { "api-clients/github": 20, "api-clients/openapi-client-utils": 20, - "wyrihaximus/subsplit-tools": 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 }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.2" + "php": "^8.4" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { - "php": "8.2.13" + "php": "8.4.13" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.9.0" } diff --git a/etc/Makefile b/etc/Makefile new file mode 100644 index 0000000..53d29c4 --- /dev/null +++ b/etc/Makefile @@ -0,0 +1,16 @@ +generate-example-clients: generate-example-client-one generate-example-client-subsplit generate-example-client-miele + +generate-example-client-one: + $(DOCKER_RUN) php ./bin/openapi-client-generator ./example/openapi-client-one.yaml + +generate-example-client-subsplit: + $(DOCKER_RUN) php ./bin/openapi-client-generator ./example/openapi-client-subsplit.yaml + +generate-example-client-miele: + $(DOCKER_RUN) php ./bin/openapi-client-generator ./example/openapi-client-miele.yaml + +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/etc/ci/markdown-link-checker.json b/etc/ci/markdown-link-checker.json index fecc007..9269e03 100644 --- a/etc/ci/markdown-link-checker.json +++ b/etc/ci/markdown-link-checker.json @@ -1,15 +1,12 @@ { - "ignorePatterns": [ - { - "pattern": "^(.*){{[^}]+([^{])*}}(.*)$" - } - ], - "httpHeaders": [ - { - "urls": ["https://docs.github.com/"], - "headers": { - "Accept-Encoding": "zstd, br, gzip, deflate" - } - } - ] + "httpHeaders": [ + { + "urls": [ + "https://docs.github.com/" + ], + "headers": { + "Accept-Encoding": "zstd, br, gzip, deflate" + } + } + ] } diff --git a/etc/qa/composer-require-checker.json b/etc/qa/composer-require-checker.json index 85b3904..5527880 100644 --- a/etc/qa/composer-require-checker.json +++ b/etc/qa/composer-require-checker.json @@ -2,9 +2,7 @@ "symbol-whitelist" : [ "null", "true", "false", "static", "self", "parent", - "array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", - "Safe\\date", "WyriHaximus\\Constants\\Boolean\\FALSE_", "WyriHaximus\\Constants\\Boolean\\TRUE_", - "WyriHaximus\\Constants\\Numeric\\ONE", "WyriHaximus\\Constants\\Numeric\\ZERO" + "array", "string", "int", "float", "bool", "iterable", "callable", "void", "object" ], "php-core-extensions" : [ "Core", diff --git a/etc/qa/composer-unused.php b/etc/qa/composer-unused.php new file mode 100644 index 0000000..09590b2 --- /dev/null +++ b/etc/qa/composer-unused.php @@ -0,0 +1,7 @@ + $config; diff --git a/etc/qa/infection.json5 b/etc/qa/infection.json5 new file mode 100644 index 0000000..3526bd0 --- /dev/null +++ b/etc/qa/infection.json5 @@ -0,0 +1,21 @@ +{ + "timeout": 120, + "source": { + "directories": [ + "../../src" + ] + }, + "logs": { + "text": "../../var/infection.log", + "summary": "../../var/infection-summary.log", + "json": "../../var/infection.json", + "perMutator": "../../var/infection-per-mutator.md", + "github": true + }, + "minMsi": 100, + "minCoveredMsi": 100, + "ignoreMsiWithNoMutations": true, + "mutators": { + "@default": true + } +} diff --git a/etc/qa/phpcs.xml b/etc/qa/phpcs.xml index 8794baf..382d598 100644 --- a/etc/qa/phpcs.xml +++ b/etc/qa/phpcs.xml @@ -3,13 +3,15 @@ - + + ../../etc ../../src ../../tests - */tests/app/* - */tests/test-app/* + + */tests/app/* + */tests/test-app/* diff --git a/etc/qa/phpstan.neon b/etc/qa/phpstan.neon index 8e45712..ffd274b 100644 --- a/etc/qa/phpstan.neon +++ b/etc/qa/phpstan.neon @@ -1,16 +1,10 @@ parameters: + level: max + paths: + - ../../etc + - ../../src + - ../../tests excludePaths: - - ../../tests/app/* - - ../../tests/test-app/* - ignoreErrors: - - '#cebe\\openapi\\spec\\Reference#' - - '#Call to function in_array\(\) requires parameter \#3 to be true.#' - - '#with a nullable type declaration.#' - - '#Casting class ReflectionType to string is deprecated.#' - ergebnis: - noExtends: - classesAllowedToBeExtended: - - ApiClients\Tools\OpenApiClientGenerator\Contract\Voter\AbstractListOperation - - PhpParser\Builder\Param -includes: - - ../../vendor/wyrihaximus/async-test-utilities/rules.neon + analyseAndScan: + - ../../tests/app + - ../../tests/test-app \ No newline at end of file diff --git a/etc/qa/phpunit.xml b/etc/qa/phpunit.xml index 8f3ceb3..dfe1d76 100644 --- a/etc/qa/phpunit.xml +++ b/etc/qa/phpunit.xml @@ -1,13 +1,27 @@ - + - ../../tests/unit/ + ../../tests/ - - + + ../../src/ - - + + + + + diff --git a/etc/qa/psalm.xml b/etc/qa/psalm.xml deleted file mode 100644 index ab7c765..0000000 --- a/etc/qa/psalm.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/etc/qa/rector.php b/etc/qa/rector.php new file mode 100644 index 0000000..ce6b5c9 --- /dev/null +++ b/etc/qa/rector.php @@ -0,0 +1,7 @@ + 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/ContentType/Json.php b/src/ContentType/Json.php index 19d08eb..0c345e3 100644 --- a/src/ContentType/Json.php +++ b/src/ContentType/Json.php @@ -8,6 +8,7 @@ use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; +use PhpParser\Node\Expr\FuncCall; final class Json implements ContentType { @@ -18,7 +19,7 @@ public static function contentType(): iterable yield 'application/scim+json'; } - public static function parse(Expr $expr): Expr + public static function parse(Expr $expr): FuncCall { return new Node\Expr\FuncCall( new Node\Name('json_decode'), 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..0cfbe56 100644 --- a/src/Contract/Voter/AbstractListOperation.php +++ b/src/Contract/Voter/AbstractListOperation.php @@ -4,11 +4,12 @@ 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; +use function in_array; abstract class AbstractListOperation implements ListOperation { @@ -41,12 +42,6 @@ final public static function list(Operation $operation): bool $match[$parameter->name] = true; } - foreach ($match as $matched) { - if ($matched === false) { - return false; - } - } - - return true; + return ! in_array(false, $match, true); } } 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..7574311 100644 --- a/src/Generator/Client.php +++ b/src/Generator/Client.php @@ -6,8 +6,6 @@ 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 +13,14 @@ 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 League\OpenAPIValidation\Schema\SchemaValidator; 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; @@ -43,55 +43,55 @@ use function explode; use function implode; use function PHPStan\Testing\assertType; -use function strlen; -use function strpos; +use function str_starts_with; use function trim; use function ucfirst; 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,14 +118,14 @@ 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_( - new Node\Name('\League\OpenAPIValidation\Schema\SchemaValidator'), + new Node\Name(SchemaValidator::class), [ new Node\Arg(new Node\Expr\ClassConstFetch( - new Node\Name('\League\OpenAPIValidation\Schema\SchemaValidator'), + new Node\Name(SchemaValidator::class), 'VALIDATE_AS_REQUEST', )), ], @@ -135,10 +135,10 @@ public static function generate(Configuration $configuration, string $pathPrefix new Node\Expr\Assign( new Node\Expr\Variable('responseSchemaValidator'), new Node\Expr\New_( - new Node\Name('\League\OpenAPIValidation\Schema\SchemaValidator'), + new Node\Name(SchemaValidator::class), [ new Node\Arg(new Node\Expr\ClassConstFetch( - new Node\Name('\League\OpenAPIValidation\Schema\SchemaValidator'), + new Node\Name(SchemaValidator::class), 'VALIDATE_AS_RESPONSE', )), ], @@ -148,12 +148,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 +164,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 +208,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 +216,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'), @@ -285,11 +257,54 @@ public static function generate(Configuration $configuration, string $pathPrefix ), ), ), - ), + )->addStmts([ + ...($representation->webHooks === [] ? [] : [ + new Node\Expr\Assign( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + 'webHooks', + ), + new Node\Expr\New_( + new Node\Name('\\' . $package->namespace->source . '\\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'), + ), + ], + ), + ), + ]), + ]), ); + if ($representation->webHooks !== []) { + $class->addStmt( + $this->builderFactory->property('webHooks')->setType('\\' . $package->namespace->source . '\\WebHooks')->makeReadonly()->makePrivate(), + )->addStmt( + $this->builderFactory->method('webHooks')->makePublic()->setReturnType('\\' . WebHooksInterface::class)->addStmt( + new Node\Stmt\Return_( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + 'webHooks', + ), + ), + ), + ); + } + $sortedOperations = []; - foreach ($client->paths as $path) { + foreach ($representation->client->paths as $path) { foreach ($path->operations as $operation) { if ($operation->path === '/') { $operationPath = ['']; @@ -314,7 +329,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 +340,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 ) { @@ -348,7 +363,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $returnTypesUnfilterred = implode( '|', array_map( - 'trim', + trim(...), array_unique( [...Types::filterDuplicatesAndIncompatibleRawTypes(...$returnTypes)], ), @@ -357,7 +372,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $returnTypes = implode( '|', array_map( - 'trim', + trim(...), array_filter( array_unique( [...Types::filterDuplicatesAndIncompatibleRawTypes(...$returnTypes)], @@ -369,7 +384,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $docBlockReturnTypes = implode( '|', array_map( - 'trim', + trim(...), array_filter( array_unique( $docBlockReturnTypes, @@ -379,12 +394,13 @@ public static function generate(Configuration $configuration, string $pathPrefix ), ); $chunkCountClasses[] = $cc = new ChunkCount( - 'Internal\\Router\\' . (new Convert($method))->toPascal() . '\\' . (new Convert(NumberToWords::transformNumber('en', $chunkCount)))->toPascal(), + 'Internal\\Router\\' . new Convert($method)->toPascal() . '\\' . new Convert(NumberToWords::transformNumber('en', $chunkCount))->toPascal(), $returnTypes, $docBlockReturnTypes, self::traverseOperations( - $moar['operations'], /** @phpstan-ignore-line */ - $moar['paths'], /** @phpstan-ignore-line */ + $package, + $moar['operations'], + $moar['paths'], 0, $routers, ), @@ -502,9 +518,9 @@ public static function generate(Configuration $configuration, string $pathPrefix $firstOperationsIfs = array_shift($operationsIfs); $operationsIf = new Node\Stmt\If_( - $firstOperationsIfs[0], /** @phpstan-ignore-line */ + $firstOperationsIfs[0], [ - 'stmts' => $firstOperationsIfs[1], /** @phpstan-ignore-line */ + 'stmts' => $firstOperationsIfs[1], 'elseifs' => (static function (array $operationsIfs): array { $elseIfs = []; @@ -518,9 +534,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 +557,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), @@ -610,18 +626,20 @@ public static function generate(Configuration $configuration, string $pathPrefix ), ), )->addStmt($operationsIf)->addStmt( - new Node\Stmt\Throw_( - new Node\Expr\New_( - new Node\Name('\InvalidArgumentException'), + new Node\Stmt\Expression( + new Node\Expr\Throw_( + new Node\Expr\New_( + new Node\Name('\InvalidArgumentException'), + ), ), ), ), ); } - 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,64 +648,50 @@ 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, ); } - /** @phpstan-ignore-next-line */ if (! isset($chunkCountClasses)) { return; } 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,10 +700,10 @@ 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 */ + $operations['operations'][] = [ 'operation' => $operation, 'path' => $path, ]; @@ -708,29 +712,29 @@ private static function traverseOperationPaths(array $operations, array &$operat } $chunk = array_shift($operationPath); - if (! array_key_exists($chunk, $operations['paths'])) { /** @phpstan-ignore-line */ - $operations['paths'][$chunk] = [ /** @phpstan-ignore-line */ + if (! array_key_exists($chunk, $operations['paths'])) { + $operations['paths'][$chunk] = [ 'operations' => [], 'paths' => [], ]; } - $operations['paths'][$chunk] = self::traverseOperationPaths($operations['paths'][$chunk], $operationPath, $operation, $path); /** @phpstan-ignore-line */ + $operations['paths'][$chunk] = self::traverseOperationPaths($operations['paths'][$chunk], $operationPath, $operation, $path); return $operations; } /** - * @param array $paths + * @param array $paths * - * @return iterable + * @return iterable */ private static function operationsInThisThree(array $paths, int $level, Routers $routers): iterable { foreach ($paths as $path) { yield from $path['operations']; yield from self::operationsInThisThree( - $path['paths'], /** @phpstan-ignore-line */ + $path['paths'], $level + 1, $routers, ); @@ -738,16 +742,16 @@ 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) { - if (strpos($pathChunk, '{') === 0) { + if (str_starts_with($pathChunk, '{')) { continue; } @@ -772,11 +776,12 @@ private static function traverseOperations(array $operations, array $paths, int $ifs[] = [ new Node\Expr\BinaryOp\Equal( new Node\Expr\Variable('call'), - new Node\Scalar\String_($operation['operation']->matchMethod . ' ' . $operation['operation']->path), /** @phpstan-ignore-line */ + new Node\Scalar\String_($operation['operation']->matchMethod . ' ' . $operation['operation']->path), ), - static::callOperation( + self::callOperation( + $package, $routers, - ...$operation, /** @phpstan-ignore-line */ + ...$operation, ), ]; } @@ -792,8 +797,9 @@ private static function traverseOperations(array $operations, array $paths, int new Node\Scalar\String_($pathChunk), ), self::traverseOperations( - $path['operations'], /** @phpstan-ignore-line */ - $path['paths'], /** @phpstan-ignore-line */ + $package, + $path['operations'], + $path['paths'], $level + 1, $routers, ), @@ -824,7 +830,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 +843,9 @@ private static function callOperation(Routers $routers, Representation\Operation ), ], ); - $router = $routers->add( + + $router = $routers->add( + $package, $operation->matchMethod, $operation->group, $operation->name, @@ -868,14 +876,16 @@ private static function callOperation(Routers $routers, Representation\Operation ), [ 'stmts' => [ - new Node\Stmt\Throw_( - new Node\Expr\New_( - new Node\Name('\InvalidArgumentException'), - [ - new Arg( - new Node\Scalar\String_('Missing mandatory field: ' . $param->targetName), - ), - ], + new Node\Stmt\Expression( + new Node\Expr\Throw_( + new Node\Expr\New_( + new Node\Name('\InvalidArgumentException'), + [ + new Arg( + new Node\Scalar\String_('Missing mandatory field: ' . $param->targetName), + ), + ], + ), ), ), ], @@ -905,15 +915,15 @@ 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( new Expr\ArrayDimFetch( new Expr\Variable('arguments'), - new Node\Scalar\String_($operation->metaData['listOperation']['key']), /** @phpstan-ignore-line */ + new Node\Scalar\String_($operation->metaData['listOperation']['key']), ), - new Node\Scalar\LNumber($operation->metaData['listOperation']['initialValue']), /** @phpstan-ignore-line */ + new Node\Scalar\LNumber($operation->metaData['listOperation']['initialValue']), ), ), new Node\Stmt\Do_( @@ -950,7 +960,7 @@ private static function callOperation(Routers $routers, Representation\Operation new Expr\PostInc( new Expr\ArrayDimFetch( new Expr\Variable('arguments'), - new Node\Scalar\String_($operation->metaData['listOperation']['key']), /** @phpstan-ignore-line */ + new Node\Scalar\String_($operation->metaData['listOperation']['key']), ), ), ), @@ -972,7 +982,7 @@ private static function callOperation(Routers $routers, Representation\Operation ), $router->loopUpMethod, ), - (new Convert(Utils::fixKeyword($router->method)))->toCamel(), + new Convert(Utils::fixKeyword($router->method))->toCamel(), [ new Arg( new Node\Expr\Variable( @@ -986,13 +996,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'), @@ -1008,8 +1018,7 @@ private static function makeCall(Representation\Operation $operation, Representa 'requestSchemaValidator', )), ] : []), - /** @phpstan-ignore-next-line */ - ...(count(array_filter((new ReflectionClass($operation->className->fullyQualified->source))->getConstructor()->getParameters(), static fn (ReflectionParameter $parameter): bool => $parameter->name === 'responseSchemaValidator' || $parameter->name === 'hydrator')) > 0 ? [ + ...(count(array_filter(new ReflectionClass($operation->className->fullyQualified->source)->getConstructor()->getParameters(), static fn (ReflectionParameter $parameter): bool => $parameter->name === 'responseSchemaValidator' || $parameter->name === 'hydrator')) > 0 ? [ new Arg(new Node\Expr\PropertyFetch( new Node\Expr\Variable('this'), 'responseSchemaValidator', @@ -1045,31 +1054,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(SchemaValidator::class), )->addParam( - (new PrivatePromotedPropertyAsParam('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $this->builderFactory->param('responseSchemaValidator')->makePrivate()->setType(SchemaValidator::class), )->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( - (new Convert($method->name))->toCamel(), + $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 +1095,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', @@ -1113,18 +1121,20 @@ private static function createRouterChunkSize(string $pathPrefix, string $namesp 'pathChunks' => 'array', ]), ])->addStmts($chunkCount->nodes)->addStmt( - new Node\Stmt\Throw_( - new Node\Expr\New_( - new Node\Name('\InvalidArgumentException'), + new Node\Stmt\Expression( + new Node\Expr\Throw_( + new Node\Expr\New_( + new Node\Name('\InvalidArgumentException'), + ), ), ), ); - if (strlen($chunkCount->returnType) > 0) { + if ($chunkCount->returnType !== '') { $callMethod->setReturnType($chunkCount->returnType); } - if (strlen($chunkCount->docBlockReturnType) > 0) { + if ($chunkCount->docBlockReturnType !== '') { $callMethod->setDocComment( new Doc( implode( @@ -1141,6 +1151,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..9d4645f 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]; @@ -38,9 +38,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $stmts[] = new Node\Stmt\If_( new Expr\BinaryOp\Identical( new Expr\Variable( - new Node\Name( - 'call', - ), + 'call', ), new Node\Scalar\String_($operation->matchMethod . ' ' . $operation->path), ), @@ -50,17 +48,11 @@ public static function generate(Configuration $configuration, string $pathPrefix new Expr\MethodCall( new Expr\PropertyFetch( new Expr\Variable( - new Node\Name( - 'this', - ), - ), - new Node\Name( - 'typeResolver', + 'this', ), + 'typeResolver', ), - new Node\Name( - 'resolve', - ), + 'resolve', [ new Arg( new Node\Scalar\String_( @@ -76,7 +68,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( @@ -89,13 +81,9 @@ public static function generate(Configuration $configuration, string $pathPrefix new Expr\Assign( new Expr\PropertyFetch( new Expr\Variable( - new Node\Name( - 'this', - ), - ), - new Node\Name( - 'printer', + 'this', ), + 'printer', ), new Expr\New_( new Node\Name( @@ -109,8 +97,8 @@ 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('class'), + new Node\Name('\\' . $package->namespace->source . '\Client'), + 'class', ), ), ), @@ -118,9 +106,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $factory->method('isMethodSupported')->makePublic()->setReturnType('bool')->addParam( new Node\Param( new Expr\Variable( - new Node\Name( - 'methodReflection', - ), + 'methodReflection', ), null, new Node\Name( @@ -132,13 +118,9 @@ public static function generate(Configuration $configuration, string $pathPrefix new Expr\BinaryOp\Identical( new Expr\MethodCall( new Expr\Variable( - new Node\Name( - 'methodReflection', - ), - ), - new Node\Name( - 'getName', + 'methodReflection', ), + 'getName', ), new Node\Scalar\String_('call'), ), @@ -153,9 +135,7 @@ public static function generate(Configuration $configuration, string $pathPrefix )->addParam( new Node\Param( new Expr\Variable( - new Node\Name( - 'methodReflection', - ), + 'methodReflection', ), null, new Node\Name( @@ -165,9 +145,7 @@ public static function generate(Configuration $configuration, string $pathPrefix )->addParam( new Node\Param( new Expr\Variable( - new Node\Name( - 'methodCall', - ), + 'methodCall', ), null, new Node\Name( @@ -177,9 +155,7 @@ public static function generate(Configuration $configuration, string $pathPrefix )->addParam( new Node\Param( new Expr\Variable( - new Node\Name( - 'scope', - ), + 'scope', ), null, new Node\Name( @@ -190,19 +166,13 @@ public static function generate(Configuration $configuration, string $pathPrefix new Node\Stmt\Expression( new Expr\Assign( new Expr\Variable( - new Node\Name( - 'args', - ), + 'args', ), new Expr\MethodCall( new Expr\Variable( - new Node\Name( - 'methodCall', - ), - ), - new Node\Name( - 'getArgs', + 'methodCall', ), + 'getArgs', ), ), ), @@ -210,15 +180,11 @@ public static function generate(Configuration $configuration, string $pathPrefix new Node\Stmt\If_( new Expr\BinaryOp\Identical( new Expr\FuncCall( - new Node\Name( - 'count', - ), + new Node\Name('count'), [ new Arg( new Expr\Variable( - new Node\Name( - 'args', - ), + 'args', ), ), ], @@ -239,44 +205,30 @@ public static function generate(Configuration $configuration, string $pathPrefix new Node\Stmt\Expression( new Expr\Assign( new Expr\Variable( - new Node\Name( - 'call', - ), + 'call', ), new Expr\FuncCall( - new Node\Name( - 'substr', - ), + new Node\Name('substr'), [ new Arg( new MethodCall( new Expr\PropertyFetch( new Expr\Variable( - new Node\Name( - 'this', - ), - ), - new Node\Name( - 'printer', + 'this', ), + 'printer', ), - new Node\Name( - 'prettyPrintExpr', - ), + 'prettyPrintExpr', [ new Arg( new Expr\PropertyFetch( new Expr\ArrayDimFetch( new Expr\Variable( - new Node\Name( - 'args', - ), + 'args', ), new Node\Scalar\LNumber(0), ), - new Node\Name( - 'value', - ), + 'value', ), ), ], @@ -301,6 +253,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..252d73a 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,19 +29,17 @@ 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( new Expr\Assign( new Expr\Variable( - new Node\Name( - 'client', - ), + 'client', ), new Expr\New_( new Node\Name( - '\\' . $configuration->namespace->source . '\\Client', + '\\' . $package->namespace->source . '\\Client', ), [ new Arg( @@ -82,9 +80,7 @@ public static function generate(Configuration $configuration, string $pathPrefix $stmt->addStmt( new Node\Stmt\Expression( new Expr\FuncCall( - new Node\Name( - '\PHPStan\Testing\assertType', - ), + new Node\Name('\PHPStan\Testing\assertType'), [ new Arg( new Node\Scalar\String_( @@ -94,13 +90,9 @@ public static function generate(Configuration $configuration, string $pathPrefix new Arg( new Expr\MethodCall( new Expr\Variable( - new Node\Name( - 'client', - ), - ), - new Node\Name( - 'call', + 'client', ), + 'call', [ new Arg( new Node\Scalar\String_($operation->matchMethod . ' ' . $operation->path), @@ -114,6 +106,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..247b67a 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,20 +59,21 @@ 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, - (new Convert($name))->toCamel(), + new Convert($name)->toCamel(), str_replace( '\\', '🔀', 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..7fa2997 100644 --- a/src/Generator/ClientInterface.php +++ b/src/Generator/ClientInterface.php @@ -5,11 +5,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 +24,27 @@ use const PHP_EOL; -final class ClientInterface +final readonly 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 +65,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 +88,18 @@ public static function generate(Configuration $configuration, string $pathPrefix ); } - if ($configuration->entryPoints->operations) { + if ($this->operations) { $class->addStmt( - $factory->method('operations')->setReturnType('OperationsInterface')->makePublic(), + $this->builderFactory->method('operations')->setReturnType('OperationsInterface')->makePublic(), ); } - if ($configuration->entryPoints->webHooks) { + if ($representation->webHooks !== []) { $class->addStmt( - $factory->method('webHooks')->setReturnType('\\' . WebHooksInterface::class)->makePublic(), + $this->builderFactory->method('webHooks')->setReturnType('\\' . WebHooksInterface::class)->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..bcec42e 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; @@ -16,6 +16,7 @@ use PHPStan\PhpDocParser\Parser\PhpDocParser; use PHPStan\PhpDocParser\Parser\TokenIterator; use PHPStan\PhpDocParser\Parser\TypeParser; +use PHPStan\PhpDocParser\ParserConfig; use ReflectionClass; use Rx\Observable; @@ -31,30 +32,30 @@ 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 { foreach ($params as $param) { - yield (new Builder\Param($param->name))->setType($param->type === '' ? 'mixed' : $param->type); + yield new Builder\Param($param->name)->setType($param->type === '' ? 'mixed' : $param->type); } })($operation->parameters), ...(count($operation->requestBody) > 0 ? [ - (new Builder\Param('params'))->setType('array'), + new Builder\Param('params')->setType('array'), ] : []), ]); } - 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'); - if ($docComment !== null) { + if ($docComment instanceof Doc) { $method = $method->setDocComment($docComment); } @@ -63,7 +64,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,10 +88,9 @@ 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(); + $returnType = new ReflectionClass($operation->className->fullyQualified->source)->getMethod('createResponse')->getReturnType(); if ($returnType === null) { return 'void'; } @@ -110,34 +110,46 @@ public static function getResultTypeFromOperation(Representation\Operation $oper ); } - public static function getDocBlockFromOperation(Representation\Operation $operation): Doc + public static function getDocBlockFromOperation(Representation\Namespaced\Operation $operation): Doc|null { + $resultType = self::getDocBlockResultTypeFromOperation($operation); + + /** + * An operation only carries an @return on createResponse() when the native + * return type cannot express the full type, such as the item type behind an + * Observable. Reflecting on the rest yields no type, and writing the tag + * anyway leaves an empty `@return` behind. + */ + if ($resultType === '') { + return null; + } + return new Doc( implode( PHP_EOL, [ '/**', - ' * @return ' . self::getDocBlockResultTypeFromOperation($operation), + ' * @return ' . $resultType, ' */', ], ), ); } - 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(); + $docComment = new ReflectionClass($operation->className->fullyQualified->source)->getMethod('createResponse')->getDocComment(); if (! is_string($docComment)) { return ''; } // basic setup - $lexer = new Lexer(); - $constExprParser = new ConstExprParser(); - $typeParser = new TypeParser($constExprParser); - $phpDocParser = new PhpDocParser($typeParser, $constExprParser); + $config = new ParserConfig([]); + $lexer = new Lexer($config); + $constExprParser = new ConstExprParser($config); + $typeParser = new TypeParser($config, $constExprParser); + $phpDocParser = new PhpDocParser($config, $typeParser, $constExprParser); // parsing and reading a PHPDoc string $tokens = new TokenIterator($lexer->tokenize($docComment)); diff --git a/src/Generator/Helper/OperationArray.php b/src/Generator/Helper/OperationArray.php index 77c8ddb..1c0e2e8 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 = []; @@ -74,7 +74,7 @@ public static function uniqueSchemas(string|Schema|PropertyType ...$propertyType } foreach ( - static::uniqueSchemas(...is_array($propertyType->payload) ? $propertyType->payload : [$propertyType->payload]) as $nestedPropertyType + self::uniqueSchemas(...is_array($propertyType->payload) ? $propertyType->payload : [$propertyType->payload]) as $nestedPropertyType ) { $schemas[$nestedPropertyType instanceof Schema ? $nestedPropertyType->className->fullyQualified->source : $nestedPropertyType] = $nestedPropertyType; } diff --git a/src/Generator/Helper/ReflectionTypes.php b/src/Generator/Helper/ReflectionTypes.php index 045a372..460b5ac 100644 --- a/src/Generator/Helper/ReflectionTypes.php +++ b/src/Generator/Helper/ReflectionTypes.php @@ -13,21 +13,21 @@ use ReflectionUnionType; use function array_map; +use function str_contains; use function str_replace; -use function strpos; final class ReflectionTypes { public static function copyReturnType(string $class, string $method): Node\ComplexType|Name|string { - $reflection = (new ReflectionClass($class))->getMethod($method)->getReturnType(); + $reflection = new ReflectionClass($class)->getMethod($method)->getReturnType(); switch ($reflection::class) { //ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType case ReflectionNamedType::class: return new Name(str_replace( 'Traversable', 'iterable', - (strpos((string) $reflection, '\\') !== false ? '\\' : '') . $reflection, + (str_contains((string) $reflection, '\\') ? '\\' : '') . $reflection, )); break; @@ -43,7 +43,7 @@ public static function copyReturnType(string $class, string $method): Node\Compl yield new Name(str_replace( 'Traversable', 'iterable', - (strpos($type, '\\') !== false ? '\\' : '') . $type, + (str_contains($type, '\\') ? '\\' : '') . $type, )); } })(...[ @@ -63,7 +63,7 @@ public static function copyReturnType(string $class, string $method): Node\Compl public static function copyDocBlock(string $class, string $method): Doc|null { - $comment = (new ReflectionClass($class))->getMethod($method)->getDocComment(); + $comment = new ReflectionClass($class)->getMethod($method)->getDocComment(); if ($comment !== null) { return new Doc($comment); } diff --git a/src/Generator/Helper/Types.php b/src/Generator/Helper/Types.php index 4fc58ea..6aa4813 100644 --- a/src/Generator/Helper/Types.php +++ b/src/Generator/Helper/Types.php @@ -9,11 +9,11 @@ use function array_key_exists; use function array_map; use function in_array; -use function substr; +use function str_starts_with; final class Types { - private const SCALARS = [ + private const array SCALARS = [ 'string', 'int', 'float', @@ -24,7 +24,7 @@ final class Types public static function normalizeDocBlock(string ...$types): array { return array_map( - static fn (string $type): string => in_array($type, self::SCALARS) || substr($type, 0, 1) === '\\' || substr($type, 0, 5) === 'array' ? $type : 'Schema\\' . $type, + static fn (string $type): string => in_array($type, self::SCALARS) || str_starts_with($type, '\\') || str_starts_with($type, 'array') ? $type : 'Schema\\' . $type, $types, ); } @@ -34,7 +34,7 @@ public static function normalizeRaw(string ...$types): array { return array_map( static function (string $type): string { - if (in_array($type, self::SCALARS) || substr($type, 0, 1) === '\\') { + if (in_array($type, self::SCALARS) || str_starts_with($type, '\\')) { return $type; } 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 87% rename from src/Generator/Operation.php rename to src/Generator/Paths/Operation.php index 97c13cd..be58743 100644 --- a/src/Generator/Operation.php +++ b/src/Generator/Paths/Operation.php @@ -2,21 +2,22 @@ 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\OpenAPIValidation\Schema\SchemaValidator; 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 +28,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; @@ -44,7 +45,6 @@ use function is_int; use function is_string; use function ksort; -use function strlen; use function strpos; use function strtolower; use function substr; @@ -53,14 +53,23 @@ final class Operation { + /** @var array */ + private array $contentTypes = []; + + public function __construct( + private readonly 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(SchemaValidator::class), )->addStmt( new Node\Expr\Assign( new Node\Expr\PropertyFetch( @@ -111,9 +114,9 @@ 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) { + if ((string) $parameter->description !== '') { $paramterStmt->setDocComment('/**' . $parameter->description . ' **/'); } @@ -178,9 +181,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ), ], ), - new Node\Name( - 'expand', - ), + 'expand', [ new Arg( new Node\Expr\Array_( @@ -202,10 +203,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 +224,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 +253,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 +265,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; @@ -287,9 +288,16 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli $isError = $contentTypeSchema->code >= 400; if ($contentTypeSchema->content->type === 'union' || $contentTypeSchema->content->type === 'array') { - $gotoLabels = (new Convert(Utils::cleanUpString('items_' . $supportedContentType . '_' . NumberToWords::transformNumber('en', $contentTypeSchema->code) . '_aaaaa')))->toSnake(); - $sTmts = []; - $types = []; + /** + * Only the suffix is incremented. The label as a whole + * contains underscores, and incrementing a string that + * is not alphanumeric is deprecated. + */ + $gotoLabelsPrefix = new Convert(Utils::cleanUpString('items_' . $supportedContentType . '_' . NumberToWords::transformNumber('en', $contentTypeSchema->code)))->toSnake(); + $gotoLabelsSuffix = 'aaaaa'; + $gotoLabels = $gotoLabelsPrefix . '_' . $gotoLabelsSuffix; + $sTmts = []; + $types = []; $sTmts[] = new Node\Stmt\Expression( new Node\Expr\Assign( @@ -305,7 +313,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 +325,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 +340,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')), @@ -348,8 +356,9 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ), ]); $sTmts[] = new Node\Stmt\Label($gotoLabels); - $gotoLabels++; - $types[] = $item->className->relative; + $gotoLabelsSuffix++; + $gotoLabels = $gotoLabelsPrefix . '_' . $gotoLabelsSuffix; + $types[] = $item->className->fullyQualified->source; } else { $sTmts[] = new Node\Stmt\If_( new Node\Expr\FuncCall( @@ -370,7 +379,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli } } - $sTmts[] = new Node\Stmt\Throw_(new Node\Expr\Variable('error')); + $sTmts[] = new Node\Stmt\Expression(new Node\Expr\Throw_(new Node\Expr\Variable('error'))); if (! $isError) { if ($contentTypeSchema->content->type === 'array') { @@ -410,24 +419,29 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli ), ] : $sTmts; } else { - $returnOrThrow = Node\Stmt\Return_::class; + /** + * A closure rather than a class string: throw is an + * expression, so it needs wrapping in a statement, while + * return already is one. + */ + $returnOrThrow = static fn (Node\Expr $expr): Node\Stmt => new Node\Stmt\Return_($expr); if ($isError) { - $returnOrThrow = Node\Stmt\Throw_::class; - $throwableSchemaRegistry->add($contentTypeSchema->content->payload->className->relative); + $returnOrThrow = static fn (Node\Expr $expr): Node\Stmt => new Node\Stmt\Expression(new Node\Expr\Throw_($expr)); +// $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), @@ -447,7 +461,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli 'stmts' => [$validate], ], ) : $validate, - new $returnOrThrow( + $returnOrThrow( $isArray ? new Node\Expr\MethodCall( new Node\Expr\StaticCall( new Node\Name('\\' . Observable::class), @@ -483,7 +497,7 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli $tmts, ); - if (strlen($contentTypeSchema->description) > 0) { + if ((string) $contentTypeSchema->description !== '') { $case->setDocComment(new Doc('/**' . PHP_EOL . ' * ' . $contentTypeSchema->description . PHP_EOL . ' **/')); } @@ -623,7 +637,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 +699,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 +715,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( @@ -764,14 +778,14 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli new Node\Scalar\LNumber($empty->code), $empties, ); - if (strlen($empty->description) > 0) { + if ((string) $empty->description !== '') { $emptyCase->setDocComment(new Doc('/**' . PHP_EOL . ' * ' . $empty->description . PHP_EOL . ' **/')); } $casesWithoutContent[] = $emptyCase; } - $createResponseMethod = $factory->method('createResponse')->makePublic(); + $createResponseMethod = $this->builderFactory->method('createResponse')->makePublic(); if (count($cases) > 0 || count($casesWithoutContent) > 0) { $createResponseMethod->addStmt( @@ -836,10 +850,12 @@ public static function generate(string $pathPrefix, \ApiClients\Tools\OpenApiCli if (count($cases) > 0 || count($casesWithoutContent) > 0) { $createResponseMethod->addStmt( - new Node\Stmt\Throw_( - new Node\Expr\New_( - new Node\Name('\\' . RuntimeException::class), - [new Arg(new Node\Scalar\String_('Unable to find matching response code and content type'))], + new Node\Stmt\Expression( + new Node\Expr\Throw_( + new Node\Expr\New_( + new Node\Name('\\' . RuntimeException::class), + [new Arg(new Node\Scalar\String_('Unable to find matching response code and content type'))], + ), ), ), ); @@ -868,18 +884,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(SchemaValidator::class), )->addStmt( new Node\Expr\Assign( new Node\Expr\PropertyFetch( @@ -889,7 +899,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 +913,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 +934,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 82% rename from src/Generator/OperationTest.php rename to src/Generator/Paths/OperationTest.php index 9393c52..42dd15c 100644 --- a/src/Generator/OperationTest.php +++ b/src/Generator/Paths/OperationTest.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\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\Representation\Namespaced\Operation\RequestBody; +use OpenAPITools\Utils\File; use PhpParser\Builder\Method; use PhpParser\Builder\Param; use PhpParser\BuilderFactory; @@ -38,19 +36,25 @@ use const PHP_EOL; -final class OperationTest +final readonly 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 +66,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 +75,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 +138,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 instanceof RequestBody ? '_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 +225,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 +242,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 +270,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', ), @@ -282,9 +284,9 @@ private static function createCallMethod(BuilderFactory $factory, Representation 'array', ), 'params' => [ - (new Param( + new Param( 'data', - ))->setType( + )->setType( new Node\Name( 'array', ), @@ -316,7 +318,7 @@ private static function createCallMethod(BuilderFactory $factory, Representation ), [ new Arg( - ($request === null ? new Node\Expr\Array_() : new Node\Expr\FuncCall( + ($request instanceof RequestBody ? new Node\Expr\FuncCall( new Node\Name( 'json_decode', ), @@ -324,7 +326,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', ), @@ -337,7 +339,7 @@ private static function createCallMethod(BuilderFactory $factory, Representation ), ), ], - )), + ) : new Node\Expr\Array_()), ), ], ), @@ -357,10 +359,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 instanceof RequestBody ? '_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 +383,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 +400,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( @@ -424,16 +432,16 @@ private static function createOperationsMethod(BuilderFactory $factory, Represen ), 'operations', ), - (new Convert($operation->group))->toCamel(), + new Convert($operation->group)->toCamel(), ), - (new Convert($operation->name))->toCamel(), + new Convert($operation->name)->toCamel(), [ ...((static function (array $parameters): iterable { foreach ($parameters as $parameter) { yield new Arg($parameter->example->node); } })($operation->parameters)), - ...($request === null ? [] : [ + ...($request instanceof RequestBody ? [ new Arg(new Node\Expr\FuncCall( new Node\Name( 'json_decode', @@ -442,7 +450,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', ), @@ -456,12 +464,12 @@ 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 +503,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 +550,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 +559,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 +579,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 +601,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 +611,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 +622,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 +660,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 +767,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( @@ -841,12 +855,7 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation ), ), new Arg( - $request === null ? new Node\Expr\StaticCall( - new Node\Name( - '\\' . Argument::class, - ), - 'any', - ) : new Node\Expr\FuncCall( + $request instanceof RequestBody ? new Node\Expr\FuncCall( new Node\Name( 'json_encode', ), @@ -860,7 +869,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', ), @@ -876,6 +885,11 @@ private static function testSetUp(Node\Expr $responseSchemaFetch, Representation ), ), ], + ) : new Node\Expr\StaticCall( + new Node\Name( + '\\' . Argument::class, + ), + 'any', ), ), ], @@ -906,7 +920,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..ce30099 --- /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..c213e9d --- /dev/null +++ b/src/Generator/Paths/OperationsInterface.php @@ -0,0 +1,56 @@ + */ + 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 ((string) $group !== '') { + $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 73% rename from src/Generator/Operator.php rename to src/Generator/Paths/Operator.php index 47f5630..00be73e 100644 --- a/src/Generator/Operator.php +++ b/src/Generator/Paths/Operator.php @@ -2,19 +2,19 @@ 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 League\OpenAPIValidation\Schema\SchemaValidator; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\File; use PhpParser\Builder\Param; use PhpParser\BuilderFactory; +use PhpParser\Comment\Doc; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; @@ -30,20 +30,24 @@ use function explode; use function strpos; -final class Operator +final readonly 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( - /** @phpstan-ignore-next-line */ - (new ReflectionClass($operation->className->fullyQualified->source))->getConstructor()->getParameters(), + new ReflectionClass($operation->className->fullyQualified->source)->getConstructor()->getParameters(), static fn (ReflectionParameter $parameter): bool => $parameter->name === 'responseSchemaValidator' || $parameter->name === 'hydrator', ), ) > 0; - $factory = new BuilderFactory(); - $stmt = $factory->namespace($operation->operatorClassName->namespace->source); + $factory = new BuilderFactory(); + $stmt = $factory->namespace($operation->operatorClassName->namespace->source); $class = $factory->class($operation->operatorClassName->className)->makeFinal()->makeReadonly()->addStmt( new Node\Stmt\ClassConst( @@ -73,23 +77,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(SchemaValidator::class), ); } if ($bringHydratorAndResponseValidator) { $constructor->addParam( - (new PrivatePromotedPropertyAsParam('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator'), + $this->builderFactory->param('responseSchemaValidator')->makePrivate()->setType(SchemaValidator::class), )->addParam( - (new PrivatePromotedPropertyAsParam('hydrator'))->setType($hydrator->className->relative), + $this->builderFactory->param('hydrator')->makePrivate()->setType($hydrator->className->fullyQualified->source), ); } @@ -114,19 +118,24 @@ 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( - new Node\UnionType( - array_map( - static fn (string $object): Node\Name => new Node\Name((strpos($object, '\\') > 0 ? '\\' : '') . $object), - [...Types::filterDuplicatesAndIncompatibleRawTypes(...explode('|', (string) $returnType))], - ), + $callMethod = $factory->method('call')->makePublic()->setReturnType( + new Node\UnionType( + array_map( + static fn (string $object): Node\Name => new Node\Name((strpos($object, '\\') > 0 ? '\\' : '') . $object), + [...Types::filterDuplicatesAndIncompatibleRawTypes(...explode('|', (string) $returnType))], ), - )->setDocComment( - \ApiClients\Tools\OpenApiClientGenerator\Generator\Helper\Operation::getDocBlockFromOperation($operation), - )->addParams($callParams)->addStmts([ + ), + ); + + $docBlock = Operation::getDocBlockFromOperation($operation); + if ($docBlock instanceof Doc) { + $callMethod->setDocComment($docBlock); + } + + $class->addStmt( + $callMethod->addParams($callParams)->addStmts([ new Node\Stmt\Expression(new Node\Expr\Assign( new Node\Expr\Variable('operation'), new Node\Expr\New_( @@ -163,16 +172,16 @@ public static function generate(string $pathPrefix, Operation $operation, Repres ), )), new Node\Stmt\Expression(new Node\Expr\Assign(new Node\Expr\Variable('request'), new Node\Expr\MethodCall(new Node\Expr\Variable('operation'), 'createRequest', count($operation->requestBody) > 0 ? [new Arg(new Node\Expr\Variable('params'))] : []))), - ...($returnType === 'void' ? [self::callOperation($returnType, $operation)] : ResultConverter::convert( - self::callOperation($returnType, $operation), + ...($returnType === 'void' ? [$this->callOperation($returnType, $operation)] : ResultConverter::convert( + $this->callOperation($returnType, $operation), )), ]), ); - 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 function callOperation(string $returnType, Namespaced\Operation $operation): Node\Expr\MethodCall { return new Node\Expr\MethodCall( new Node\Expr\MethodCall( @@ -222,9 +231,8 @@ private static function callOperation(string $returnType, Operation $operation): 'uses' => [ new Node\Expr\Variable('operation'), ], - 'returnType' => (static function (Representation\Operation $operation): Node\UnionType|Node\Name { - /** @phpstan-ignore-next-line */ - $returnType = (new ReflectionClass($operation->className->fullyQualified->source))->getMethod('createResponse')->getReturnType(); + 'returnType' => (static function (Namespaced\Operation $operation): Node\UnionType|Node\Name { + $returnType = new ReflectionClass($operation->className->fullyQualified->source)->getMethod('createResponse')->getReturnType(); if ($returnType === null || (string) $returnType === 'void') { return new Node\Name('void'); } diff --git a/src/Generator/Paths/Operators.php b/src/Generator/Paths/Operators.php new file mode 100644 index 0000000..90019a3 --- /dev/null +++ b/src/Generator/Paths/Operators.php @@ -0,0 +1,124 @@ + */ + 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(SchemaValidator::class)->makeReadonly(), + )->addParam( + $this->builderFactory->param('responseSchemaValidator')->makePrivate()->setType(SchemaValidator::class)->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..48419a0 100644 --- a/src/Generator/Routers.php +++ b/src/Generator/Routers.php @@ -5,10 +5,10 @@ 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 League\OpenAPIValidation\Schema\SchemaValidator; +use OpenAPITools\Contract\Package; +use OpenAPITools\Utils\File; use PhpParser\BuilderFactory; use PhpParser\Node; use PhpParser\Node\Arg; @@ -19,30 +19,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(SchemaValidator::class)->makeReadonly(), )->addParam( - (new PrivatePromotedPropertyAsParam('responseSchemaValidator'))->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly(), + $factory->param('responseSchemaValidator')->makePrivate()->setType(SchemaValidator::class)->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 +50,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 +63,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 +132,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 index d86f0c8..d44cbef 100644 --- a/src/Generator/WebHook.php +++ b/src/Generator/WebHook.php @@ -5,188 +5,162 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator; use ApiClients\Contracts\OpenAPI\WebHookInterface; -use ApiClients\Tools\OpenApiClientGenerator\File; -use ApiClients\Tools\OpenApiClientGenerator\Registry\Schema as SchemaRegistry; -use ApiClients\Tools\OpenApiClientGenerator\Utils; +use cebe\openapi\Reader; +use cebe\openapi\spec\Schema as BaseSchema; use League\OpenAPIValidation\Schema\SchemaValidator; -use PhpParser\Builder\Param; +use OpenAPITools\Contract\FileGenerator; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\ClassString; +use OpenAPITools\Utils\File; use PhpParser\BuilderFactory; -use PhpParser\Comment\Doc; use PhpParser\Node; use PhpParser\Node\Arg; use RuntimeException; use Throwable; -use function array_unique; -use function count; -use function implode; -use function ltrim; -use function strtolower; +use function array_map; +use function array_values; + +/** + * Emits one class per webhook event, resolving a delivery to its payload object. + * + * A spec declares a webhook per event variant, so an event covers several + * payload schemas. Each is tried in turn: validate the delivery against that + * variant's schema, and on success hand it to the event's hydrator. Hydration + * is delegated rather than inlined, so the payload schemas and their hydrators + * stay the ones already generated for every other schema in the package. + */ +final readonly class WebHook implements FileGenerator +{ + public function __construct(private BuilderFactory $builderFactory) + { + } -use const PHP_EOL; + /** @return iterable */ + public function generate(Package $package, Namespaced\Representation $representation): iterable + { + foreach ($representation->webHooks as $webHookEvent) { + yield $this->generateEvent($package, $webHookEvent); + } + } -final class WebHook -{ - /** - * @param class-string $event - * - * @return iterable - */ - public static function generate( - string $pathPrefix, - string $namespace, - string $event, - SchemaRegistry $schemaRegistry, - \ApiClients\Tools\OpenApiClientGenerator\Representation\WebHook ...$webHooks, - ): iterable { - $className = Utils::className($event); + private function generateEvent(Package $package, Namespaced\WebHookEvent $webHookEvent): File + { + $className = ClassString::factory($package->namespace, 'Internal\\WebHook\\' . $webHookEvent->event); - $factory = new BuilderFactory(); - $stmt = $factory->namespace(ltrim($namespace . 'Internal\WebHook', '\\')); + /** @var array $payloads */ + $payloads = []; + foreach ($webHookEvent->webHooks as $webHook) { + foreach ($webHook->schema as $schema) { + $payloads[$schema->className->fullyQualified->source] = $schema; + } + } - $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()); + $payloads = array_values($payloads); - $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', + $resolve = $this->builderFactory->method('resolve')->makePublic()->addParams([ + $this->builderFactory->param('headers')->setType('array'), + $this->builderFactory->param('data')->setType('array'), + ])->setReturnType( + new Node\UnionType( + array_map( + static fn (Namespaced\Schema $schema): Node\Name => new Node\Name($schema->className->fullyQualified->source), + $payloads, ), - 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')), - ], + /** + * Seeded so the method still throws something meaningful when the event + * has no variants at all; every attempt below replaces it with the + * reason that attempt was rejected. + */ + $resolve->addStmt( + new Node\Stmt\Expression( + 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 webhook 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', + foreach ($payloads as $payload) { + $resolve->addStmt( + new Node\Stmt\TryCatch( [ - 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')), - ])), + new Node\Stmt\Expression( + new Node\Expr\MethodCall( + new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), 'requestSchemaValidator'), + 'validate', + [ + new Arg(new Node\Expr\Variable('data')), + new Arg(new Node\Expr\StaticCall(new Node\Name('\\' . Reader::class), 'readFromJson', [ + new Arg(new Node\Expr\ClassConstFetch( + new Node\Name($payload->className->fullyQualified->source), + 'SCHEMA_JSON', + )), + new Arg(new Node\Expr\ClassConstFetch( + new Node\Name('\\' . BaseSchema::class), + 'class', + )), + ])), + ], + ), + ), + new Node\Stmt\Return_( + new Node\Expr\MethodCall( + new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), 'hydrator'), + 'hydrateObject', + [ + new Arg(new Node\Expr\ClassConstFetch( + new Node\Name($payload->className->fullyQualified->source), + 'class', + )), + new Arg(new Node\Expr\Variable('data')), + ], + ), + ), ], - )); - } - - 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', + new Node\Stmt\Catch_( + [new Node\Name('\\' . Throwable::class)], + new Node\Expr\Variable('throwable'), + [ + new Node\Stmt\Expression( + new Node\Expr\Assign( + new Node\Expr\Variable('error'), + new Node\Expr\Variable('throwable'), ), - '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); + $resolve->addStmt(new Node\Stmt\Expression(new Node\Expr\Throw_(new Node\Expr\Variable('error')))); - yield new File($pathPrefix, 'Internal\\WebHook\\' . $className, $stmt->addStmt($class)->getNode()); + $class = $this->builderFactory->class($className->className) + ->makeFinal() + ->implement('\\' . WebHookInterface::class) + ->addStmt( + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('requestSchemaValidator')->makePrivate()->makeReadonly()->setType('\\' . SchemaValidator::class), + )->addParam( + $this->builderFactory->param('hydrator')->makePrivate()->makeReadonly()->setType($webHookEvent->hydrator->className->fullyQualified->source), + ), + ) + ->addStmt($resolve); + + return new File( + $package->destination->source, + $className->relative, + $this->builderFactory->namespace($className->namespace->source)->addStmt($class)->getNode(), + File::DO_LOAD_ON_WRITE, + ); } } diff --git a/src/Generator/WebHooks.php b/src/Generator/WebHooks.php index 8b4dd41..c33b0e7 100644 --- a/src/Generator/WebHooks.php +++ b/src/Generator/WebHooks.php @@ -5,301 +5,247 @@ namespace ApiClients\Tools\OpenApiClientGenerator\Generator; use ApiClients\Contracts\OpenAPI\WebHooksInterface; -use ApiClients\Tools\OpenApiClientGenerator\File; -use ApiClients\Tools\OpenApiClientGenerator\Representation\Hydrator; -use ApiClients\Tools\OpenApiClientGenerator\Representation\WebHook; -use ApiClients\Tools\OpenApiClientGenerator\Utils; -use Jawira\CaseConverter\Convert; use League\OpenAPIValidation\Schema\SchemaValidator; -use PhpParser\Builder\Param; +use OpenAPITools\Contract\FileGenerator; +use OpenAPITools\Contract\Package; +use OpenAPITools\Representation\Namespaced; +use OpenAPITools\Utils\ClassString; +use OpenAPITools\Utils\File; use PhpParser\BuilderFactory; -use PhpParser\Comment\Doc; use PhpParser\Node; use PhpParser\Node\Arg; use RuntimeException; use Throwable; -use function array_unique; -use function implode; use function lcfirst; -use function trim; use function ucfirst; -use const PHP_EOL; - -final class WebHooks +/** + * Emits the package's public webhook entry point. + * + * Which event a delivery belongs to is not known up front, so resolving walks + * the event classes and returns the first that accepts the payload. Event + * classes are built on demand: a package can carry dozens of them, and a given + * delivery only ever needs one. + */ +final readonly class WebHooks implements FileGenerator { - /** - * @param array $webHooksHydrators - * @param array> $webHooks - * - * @return iterable - */ - public static function generate(string $pathPrefix, string $namespace, array $webHooksHydrators, array $webHooks): iterable + public function __construct(private BuilderFactory $builderFactory) { - $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()); + /** @return iterable */ + public function generate(Package $package, Namespaced\Representation $representation): iterable + { + if ($representation->webHooks === []) { + return; + } - $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', + $className = ClassString::factory($package->namespace, 'WebHooks'); + $hydratorsClassName = ClassString::factory($package->namespace, 'Internal\\Hydrators'); + + $class = $this->builderFactory->class($className->className) + ->makeFinal() + ->implement('\\' . WebHooksInterface::class) + ->addStmt( + $this->builderFactory->method('__construct')->makePublic()->addParam( + $this->builderFactory->param('requestSchemaValidator')->makePrivate()->makeReadonly()->setType('\\' . SchemaValidator::class), + )->addParam( + $this->builderFactory->param('hydrator')->makePrivate()->makeReadonly()->setType($hydratorsClassName->fullyQualified->source), ), - new Node\Expr\Variable('hydrator'), - ), + ); + + $resolve = $this->builderFactory->method('resolve')->makePublic()->setReturnType('object')->addParams([ + $this->builderFactory->param('headers')->setType('array'), + $this->builderFactory->param('data')->setType('array'), ]); - $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', + /** + * Header names are case insensitive over the wire, so they are lowered + * once here rather than at each comparison further down the chain. + */ + $resolve->addStmt( + new Node\Stmt\Expression( + new Node\Expr\Assign( + new Node\Expr\Variable('headers'), + new Node\Expr\FuncCall( + new Node\Expr\Closure([ + 'static' => true, + 'params' => [$this->builderFactory->param('headers')->setType('array')->getNode()], + 'returnType' => new Node\Identifier('array'), + 'stmts' => [ + new Node\Stmt\Expression( + new Node\Expr\Assign(new Node\Expr\Variable('loweredHeaders'), 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('loweredHeaders'), + 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('loweredHeaders')), + ], + ]), + [new Arg(new Node\Expr\Variable('headers'))], ), - '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'), - ), - ]), - )), + $resolve->addStmt( + new Node\Stmt\Expression( + 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 webhook matching given headers and 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; - } - } + foreach ($representation->webHooks as $webHookEvent) { + $eventClassName = ClassString::factory($package->namespace, 'Internal\\WebHook\\' . $webHookEvent->event); + $propertyName = lcfirst($eventClassName->className); - return $schemas; - })(...(static function (array $webHooks) { - $hooks = []; - foreach ($webHooks as $hook) { - $hooks = [...$hooks, ...$hook]; - } + $class->addStmt( + $this->builderFactory->property($propertyName) + ->setType('?' . $eventClassName->fullyQualified->source) + ->setDefault(null) + ->makePrivate(), + ); - 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( + $resolve->addStmt( + new Node\Stmt\TryCatch( [ - 'stmts' => [ - new Node\Stmt\Expression( - new Node\Expr\Assign( - new Node\Expr\Variable('flatHeaders'), - new Node\Expr\Array_(), + new Node\Stmt\If_( + new Node\Expr\BinaryOp\Identical( + new Node\Expr\Instanceof_( + new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), $propertyName), + new Node\Name($eventClassName->fullyQualified->source), ), + new Node\Expr\ConstFetch(new Node\Name('false')), ), - 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'), + [ + 'stmts' => [ + new Node\Stmt\Expression( + new Node\Expr\Assign( + new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), $propertyName), + new Node\Expr\New_( + new Node\Name($eventClassName->fullyQualified->source), + [ + new Arg(new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), 'requestSchemaValidator')), + new Arg(new Node\Expr\MethodCall( + new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), 'hydrator'), + 'getObjectMapper' . ucfirst($webHookEvent->hydrator->methodName), + )), + ], ), ), - ], + ), + ], + ], + ), + new Node\Stmt\Return_( + new Node\Expr\MethodCall( + new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), $propertyName), + 'resolve', + [ + new Arg(new Node\Expr\Variable('headers')), + new Arg(new Node\Expr\Variable('data')), ], ), - 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\Catch_( + [new Node\Name('\\' . Throwable::class)], + new Node\Expr\Variable('throwable'), + [ + new Node\Stmt\Expression( + new Node\Expr\Assign( + new Node\Expr\Variable('error'), + new Node\Expr\Variable('throwable'), ), ), - ), - ], + ], + ), ], ), - new Node\Stmt\Return_(new Node\Expr\MethodCall( - new Node\Expr\PropertyFetch( - new Node\Expr\Variable('this'), - $eventSanitized, + ); + } + + $resolve->addStmt(new Node\Stmt\Expression(new Node\Expr\Throw_(new Node\Expr\Variable('error')))); + + $class->addStmt( + $this->builderFactory->method('hydrateWebHook')->makePublic()->setReturnType('object')->addParams([ + $this->builderFactory->param('className')->setType('string'), + $this->builderFactory->param('data')->setType('array'), + ])->setDocComment( + '/**' . "\n" . + ' * @param class-string $className' . "\n" . + ' *' . "\n" . + ' * @return H' . "\n" . + ' *' . "\n" . + ' * @template H' . "\n" . + ' */', + )->addStmt( + new Node\Stmt\Return_( + new Node\Expr\MethodCall( + new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), 'hydrator'), + 'hydrateObject', + [ + new Arg(new Node\Expr\Variable('className')), + new Arg(new Node\Expr\Variable('data')), + ], ), - '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')); + $class->addStmt( + $this->builderFactory->method('serializeWebHook')->makePublic()->setReturnType('array')->addParam( + $this->builderFactory->param('object')->setType('object'), + )->setDocComment('/** @return array{className: class-string, data: mixed} */')->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 Arg(new Node\Expr\Variable('object'))], + ), + new Node\Scalar\String_('data'), + ), + ]), + ), + ), + ); - $method->addStmts($tmts); - $class->addStmt($method); + $class->addStmt($resolve); - yield new File($pathPrefix, 'WebHooks', $stmt->addStmt($class)->getNode()); + yield new File( + $package->destination->source, + $className->relative, + $this->builderFactory->namespace($className->namespace->source)->addStmt($class)->getNode(), + File::DO_LOAD_ON_WRITE, + ); } } diff --git a/src/Output/Error.php b/src/Output/Error.php index 9133300..fe4d2b2 100644 --- a/src/Output/Error.php +++ b/src/Output/Error.php @@ -24,7 +24,7 @@ public static function display(Throwable $throwable): void '); - if ((new CiDetector())->detect()->getCiName() !== CiDetector::CI_GITHUB_ACTIONS) { + if (new CiDetector()->detect()->getCiName() !== CiDetector::CI_GITHUB_ACTIONS) { return; } diff --git a/src/Output/Status/ANSI.php b/src/Output/Status/ANSI.php index 9f3a632..297f706 100644 --- a/src/Output/Status/ANSI.php +++ b/src/Output/Status/ANSI.php @@ -115,7 +115,6 @@ public function advanceStep(string $key): void { $this->stepProgress[$key]++; $percentage = 100 / $this->itemsCountForStep[$key] * $this->stepProgress[$key]; - /** @phpstan-ignore-next-line */ switch (true) { case $percentage <= 12.5: $this->stepsStatus[$key] = '🌑'; diff --git a/src/Output/Status/OverWritingOutPut.php b/src/Output/Status/OverWritingOutPut.php index 4e4bdb1..9e49673 100644 --- a/src/Output/Status/OverWritingOutPut.php +++ b/src/Output/Status/OverWritingOutPut.php @@ -24,21 +24,13 @@ public function __construct( ) { } - /** - * @param iterable|string $messages - * - * @phpstan-ignore-next-line - */ + /** @param iterable|string $messages */ public function write(iterable|string $messages, bool $newline = false, int $options = 0): void { $this->output->write($messages, $newline, $options); } - /** - * @param iterable|string $messages - * - * @phpstan-ignore-next-line - */ + /** @param iterable|string $messages */ public function writeln(iterable|string $messages, int $options = 0): void { if (! is_string($messages)) { diff --git a/src/Output/Status/Simple.php b/src/Output/Status/Simple.php index e36216d..a740c37 100644 --- a/src/Output/Status/Simple.php +++ b/src/Output/Status/Simple.php @@ -9,10 +9,10 @@ use const PHP_EOL; -final class Simple +final readonly class Simple { /** @var array */ - private readonly array $steps; + private array $steps; public function __construct(Step ...$steps) { 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..cb19e19 100644 --- a/src/Voter/StreamOperation/DownloadInOperationId.php +++ b/src/Voter/StreamOperation/DownloadInOperationId.php @@ -5,14 +5,14 @@ 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; +use function str_contains; final class DownloadInOperationId implements StreamOperation { public static function stream(Operation $operation): bool { - return strpos($operation->operationId, 'download') !== false; + return str_contains($operation->operationId, 'download'); } } diff --git a/src/Voter/StreamOperation/DownloadInPath.php b/src/Voter/StreamOperation/DownloadInPath.php index 175499a..519d7ee 100644 --- a/src/Voter/StreamOperation/DownloadInPath.php +++ b/src/Voter/StreamOperation/DownloadInPath.php @@ -5,14 +5,14 @@ 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; +use function str_contains; final class DownloadInPath implements StreamOperation { public static function stream(Operation $operation): bool { - return strpos($operation->path, 'download') !== false; + return str_contains($operation->path, 'download'); } } 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 { } diff --git a/tests/app/composer.json b/tests/app/composer.json index 5bea2c1..4d13501 100644 --- a/tests/app/composer.json +++ b/tests/app/composer.json @@ -1,58 +1,72 @@ { - "name": "api-clients/petsore", - "description": "Non-Blocking first PetStore client", - "license": "MIT", - "authors": [ - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com" - } - ], - "require": { - "php": "^8.2", - "api-clients/contracts": "^0.1", - "api-clients/openapi-client-utils": "dev-main", - "devizzent/cebe-php-openapi": "^1", - "eventsauce/object-hydrator": "^1.1", - "league/openapi-psr7-validator": "^0.21", - "league/uri": "^7.3", - "psr/http-message": "^1.0", - "react/http": "^1.8", - "react/async": "^4.0", - "wyrihaximus/react-awaitable-observable": "^1.0" - }, - "require-dev": { - "wyrihaximus/async-test-utilities": "^7" - }, - "autoload": { - "psr-4": { - "ApiClients\\Client\\PetStore\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "ApiClients\\Client\\PetStore\\": "src/" - } - }, - "extra": { - "phpstan": { - "includes": [ - "etc/phpstan-extension.neon" - ] - } - }, - "config": { - "sort-packages": true, - "platform": { - "php": "8.2.13" + "name": "api-clients/petsore", + "description": "Non-Blocking first PetStore client", + "license": "MIT", + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "require": { + "php": "^8.4", + "api-clients/contracts": "^0.1", + "api-clients/openapi-client-utils": "dev-main", + "devizzent/cebe-php-openapi": "^1", + "eventsauce/object-hydrator": "^1.1", + "league/openapi-psr7-validator": "^0.21", + "league/uri": "^7.3", + "psr/http-message": "^1.0", + "react/http": "^1.8", + "react/async": "^4.0", + "wyrihaximus/react-awaitable-observable": "^1.0" + }, + "require-dev": { + "wyrihaximus/async-test-utilities": "^13.4.1", + "wyrihaximus/makefiles": "^0.13.2" + }, + "autoload": { + "psr-4": { + "ApiClients\\Client\\PetStore\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "ApiClients\\Client\\PetStore\\": "src/" + } + }, + "extra": { + "phpstan": { + "includes": [ + "etc/phpstan-extension.neon" + ] + } + }, + "config": { + "sort-packages": true, + "platform": { + "php": "8.4.13" + }, + "allow-plugins": { + "composer/package-versions-deprecated": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "drupol/composer-packages": true, + "ergebnis/composer-normalize": true, + "icanhazstring/composer-unused": true, + "infection/extension-installer": true, + "mindplay/composer-locator": true, + "phpstan/extension-installer": true, + "wyrihaximus/composer-update-bin-autoload-path": true, + "wyrihaximus/makefiles": true, + "wyrihaximus/test-utilities": true + } }, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, - "composer/package-versions-deprecated": true, - "ergebnis/composer-normalize": true, - "icanhazstring/composer-unused": true, - "wyrihaximus/composer-update-bin-autoload-path": true, - "infection/extension-installer": true + "scripts": { + "post-install-cmd": [ + "make on-install-or-update || true" + ], + "post-update-cmd": [ + "make on-install-or-update || true" + ] } - } } diff --git a/tests/app/src/Client.php b/tests/app/src/Client.php index 83783ea..8ebdd26 100644 --- a/tests/app/src/Client.php +++ b/tests/app/src/Client.php @@ -1,84 +1,89 @@ withBase('http://petstore.swagger.io/v1')->withFollowRedirects(false); - $requestSchemaValidator = new \League\OpenAPIValidation\Schema\SchemaValidator(\League\OpenAPIValidation\Schema\SchemaValidator::VALIDATE_AS_REQUEST); - $responseSchemaValidator = new \League\OpenAPIValidation\Schema\SchemaValidator(\League\OpenAPIValidation\Schema\SchemaValidator::VALIDATE_AS_RESPONSE); - $hydrators = new Internal\Hydrators(); - $this->operations = new Operations(new Internal\Operators(browser: $browser, authentication: $authentication, requestSchemaValidator: $requestSchemaValidator, responseSchemaValidator: $responseSchemaValidator, hydrators: $hydrators)); - $this->routers = new Internal\Routers(browser: $browser, authentication: $authentication, requestSchemaValidator: $requestSchemaValidator, responseSchemaValidator: $responseSchemaValidator, hydrators: $hydrators); + $browser = $browser->withBase('http://petstore.swagger.io/v1')->withFollowRedirects(false); + $requestSchemaValidator = new SchemaValidator(SchemaValidator::VALIDATE_AS_REQUEST); + $responseSchemaValidator = new SchemaValidator(SchemaValidator::VALIDATE_AS_RESPONSE); + $hydrators = new Internal\Hydrators(); + $this->operations = new Operations(new Internal\Operators(authentication: $authentication, browser: $browser, requestSchemaValidator: $requestSchemaValidator, responseSchemaValidator: $responseSchemaValidator, hydrators: $hydrators)); + $this->routers = new Internal\Routers(authentication: $authentication, browser: $browser, requestSchemaValidator: $requestSchemaValidator, responseSchemaValidator: $responseSchemaValidator, hydrators: $hydrators); } + // phpcs:disable - /** - */ - // phpcs:enable - public function call(string $call, array $params = array()) : iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok|\ApiClients\Client\PetStore\Schema\Cat|\ApiClients\Client\PetStore\Schema\Dog|\ApiClients\Client\PetStore\Schema\Bird|\ApiClients\Client\PetStore\Schema\Fish|\ApiClients\Client\PetStore\Schema\Spider + public function call(string $call, array $params = []): iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok|\ApiClients\Client\PetStore\Schema\Cat|\ApiClients\Client\PetStore\Schema\Dog|\ApiClients\Client\PetStore\Schema\Bird|\ApiClients\Client\PetStore\Schema\Fish|\ApiClients\Client\PetStore\Schema\Spider { [$method, $path] = explode(' ', $call); - $pathChunks = explode('/', $path); + $pathChunks = explode('/', $path); $pathChunksCount = count($pathChunks); if ($method === 'GET') { if ($pathChunksCount === 2) { - if (\array_key_exists(Internal\Router\Get\Two::class, $this->router) == false) { + if (\array_key_exists(Internal\Router\Get\Two::class, $this->router) === false) { $this->router[Internal\Router\Get\Two::class] = new Internal\Router\Get\Two(routers: $this->routers); } + return $this->router[Internal\Router\Get\Two::class]->call($call, $params, $pathChunks); } elseif ($pathChunksCount === 3) { - if (\array_key_exists(Internal\Router\Get\Three::class, $this->router) == false) { + if (\array_key_exists(Internal\Router\Get\Three::class, $this->router) === false) { $this->router[Internal\Router\Get\Three::class] = new Internal\Router\Get\Three(routers: $this->routers); } + return $this->router[Internal\Router\Get\Three::class]->call($call, $params, $pathChunks); } elseif ($pathChunksCount === 4) { - if (\array_key_exists(Internal\Router\Get\Four::class, $this->router) == false) { + if (\array_key_exists(Internal\Router\Get\Four::class, $this->router) === false) { $this->router[Internal\Router\Get\Four::class] = new Internal\Router\Get\Four(routers: $this->routers); } + return $this->router[Internal\Router\Get\Four::class]->call($call, $params, $pathChunks); } } elseif ($method === 'LIST') { if ($pathChunksCount === 2) { - if (\array_key_exists(Internal\Router\List\Two::class, $this->router) == false) { + if (\array_key_exists(Internal\Router\List\Two::class, $this->router) === false) { $this->router[Internal\Router\List\Two::class] = new Internal\Router\List\Two(routers: $this->routers); } + return $this->router[Internal\Router\List\Two::class]->call($call, $params, $pathChunks); } elseif ($pathChunksCount === 3) { - if (\array_key_exists(Internal\Router\List\Three::class, $this->router) == false) { + if (\array_key_exists(Internal\Router\List\Three::class, $this->router) === false) { $this->router[Internal\Router\List\Three::class] = new Internal\Router\List\Three(routers: $this->routers); } + return $this->router[Internal\Router\List\Three::class]->call($call, $params, $pathChunks); } elseif ($pathChunksCount === 4) { - if (\array_key_exists(Internal\Router\List\Four::class, $this->router) == false) { + if (\array_key_exists(Internal\Router\List\Four::class, $this->router) === false) { $this->router[Internal\Router\List\Four::class] = new Internal\Router\List\Four(routers: $this->routers); } + return $this->router[Internal\Router\List\Four::class]->call($call, $params, $pathChunks); } } elseif ($method === 'POST') { if ($pathChunksCount === 2) { - if (\array_key_exists(Internal\Router\Post\Two::class, $this->router) == false) { + if (\array_key_exists(Internal\Router\Post\Two::class, $this->router) === false) { $this->router[Internal\Router\Post\Two::class] = new Internal\Router\Post\Two(routers: $this->routers); } + return $this->router[Internal\Router\Post\Two::class]->call($call, $params, $pathChunks); } } + throw new \InvalidArgumentException(); } - public function operations() : OperationsInterface + + public function operations(): OperationsInterface { return $this->operations; } diff --git a/tests/app/src/ClientInterface.php b/tests/app/src/ClientInterface.php index 6512832..f32c410 100644 --- a/tests/app/src/ClientInterface.php +++ b/tests/app/src/ClientInterface.php @@ -1,22 +1,13 @@ $eyes + * @property array $eyes */ interface Cat { diff --git a/tests/app/src/Contract/Cat/Features.php b/tests/app/src/Contract/Cat/Features.php index eb1a625..ef3e1c9 100644 --- a/tests/app/src/Contract/Cat/Features.php +++ b/tests/app/src/Contract/Cat/Features.php @@ -1,16 +1,9 @@ $eyes + * @property array $eyes */ interface Dog { diff --git a/tests/app/src/Contract/Error.php b/tests/app/src/Contract/Error.php index 97d2d7f..71c0ad7 100644 --- a/tests/app/src/Contract/Error.php +++ b/tests/app/src/Contract/Error.php @@ -1,16 +1,9 @@ $pets - */ +use ApiClients\Client\PetStore\Schema\Cat; +use ApiClients\Client\PetStore\Schema\Dog; +use ApiClients\Client\PetStore\Schema\HellHound; + +/** @property array $pets */ interface Ok { } diff --git a/tests/app/src/Contract/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php b/tests/app/src/Contract/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php index bfa4e11..e8f7f20 100644 --- a/tests/app/src/Contract/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php +++ b/tests/app/src/Contract/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php @@ -1,16 +1,9 @@ $eyes + * @property array $eyes */ interface Spider { diff --git a/tests/app/src/Contract/Tails.php b/tests/app/src/Contract/Tails.php index c1162a5..0a23abe 100644 --- a/tests/app/src/Contract/Tails.php +++ b/tests/app/src/Contract/Tails.php @@ -1,19 +1,10 @@ wrappedCaster = new \ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Single\Schema\Cat\Eyes(); } - public function cast(mixed $value, \EventSauce\ObjectHydrator\ObjectMapper $hydrator) : mixed + + public function cast(mixed $value, ObjectMapper $hydrator): mixed { - $data = array(); + $data = []; $values = $value; unset($value); foreach ($values as $value) { $values[] = $this->wrappedCaster->cast($value, $hydrator); } + return $data; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Dog/Eyes.php b/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Dog/Eyes.php index f6ecd72..1ecddbc 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Dog/Eyes.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Dog/Eyes.php @@ -1,32 +1,32 @@ wrappedCaster = new \ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Single\Schema\Dog\Eyes(); } - public function cast(mixed $value, \EventSauce\ObjectHydrator\ObjectMapper $hydrator) : mixed + + public function cast(mixed $value, ObjectMapper $hydrator): mixed { - $data = array(); + $data = []; $values = $value; unset($value); foreach ($values as $value) { $values[] = $this->wrappedCaster->cast($value, $hydrator); } + return $data; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php b/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php index c02b8a4..6605cb6 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php @@ -1,32 +1,32 @@ wrappedCaster = new \ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Single\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok\Pets(); } - public function cast(mixed $value, \EventSauce\ObjectHydrator\ObjectMapper $hydrator) : mixed + + public function cast(mixed $value, ObjectMapper $hydrator): mixed { - $data = array(); + $data = []; $values = $value; unset($value); foreach ($values as $value) { $values[] = $this->wrappedCaster->cast($value, $hydrator); } + return $data; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Spider/Eyes.php b/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Spider/Eyes.php index 8df1c15..ab931a9 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Spider/Eyes.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Multiple/Schema/Spider/Eyes.php @@ -1,32 +1,32 @@ wrappedCaster = new \ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Single\Schema\Spider\Eyes(); } - public function cast(mixed $value, \EventSauce\ObjectHydrator\ObjectMapper $hydrator) : mixed + + public function cast(mixed $value, ObjectMapper $hydrator): mixed { - $data = array(); + $data = []; $values = $value; unset($value); foreach ($values as $value) { $values[] = $this->wrappedCaster->cast($value, $hydrator); } + return $data; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Bird/Eyes.php b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Bird/Eyes.php index 2b1612f..2111eff 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Bird/Eyes.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Bird/Eyes.php @@ -1,56 +1,67 @@ hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } } + return $value; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Cat/Eyes.php b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Cat/Eyes.php index d557f8d..08f3e41 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Cat/Eyes.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Cat/Eyes.php @@ -1,86 +1,102 @@ hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } } + return $value; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Dog/Eyes.php b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Dog/Eyes.php index cab899d..7fb6174 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Dog/Eyes.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Dog/Eyes.php @@ -1,86 +1,102 @@ hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } } + return $value; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Fish/Eyes.php b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Fish/Eyes.php index 8718e33..746804e 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Fish/Eyes.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Fish/Eyes.php @@ -1,56 +1,67 @@ hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } } + return $value; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php index 4914148..2ff6194 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Operations/Pets/Grouped/By/Type/Response/ApplicationJson/Ok/Pets.php @@ -1,62 +1,73 @@ hydrateObject(Schema\Cat::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'eyes|good-boy|id|name') { try { return $hydrator->hydrateObject(Schema\Dog::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'bad-boy|eyes|id|name') { try { return $hydrator->hydrateObject(Schema\HellHound::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'eyes|features|id|indoor|name') { try { return $hydrator->hydrateObject(Schema\Cat::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'eyes|good-boy|id|name') { try { return $hydrator->hydrateObject(Schema\Dog::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'bad-boy|eyes|id|name') { try { return $hydrator->hydrateObject(Schema\HellHound::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } } + return $value; } } diff --git a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Spider/Eyes.php b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Spider/Eyes.php index 4b0ec6f..b0ab2e3 100644 --- a/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Spider/Eyes.php +++ b/tests/app/src/Internal/Attribute/CastUnionToType/Single/Schema/Spider/Eyes.php @@ -1,266 +1,312 @@ hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'blood' || $value['type'] === 'wine' || $value['type'] === 'stale')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['blood', 'wine', 'stale'], true))) { try { return $hydrator->hydrateObject(Schema\RedEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && ($value['type'] === 'sky' || $value['type'] === 'boobies')) { try { return $hydrator->hydrateObject(Schema\BlueEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } - if ($signature === 'count|type' && ($value['type'] === 'hulk' || $value['type'] === 'forest' || $value['type'] === 'feral')) { + + if ($signature === 'count|type' && (in_array($value['type'], ['hulk', 'forest', 'feral'], true))) { try { return $hydrator->hydrateObject(Schema\GreenEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'snake') { try { return $hydrator->hydrateObject(Schema\YellowEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } + if ($signature === 'count|type' && $value['type'] === 'rage') { try { return $hydrator->hydrateObject(Schema\BlackEyes::class, $value); - } catch (\Throwable) { + } catch (Throwable) { } } } + return $value; } } diff --git a/tests/app/src/Internal/Hydrator/Operation/Pets.php b/tests/app/src/Internal/Hydrator/Operation/Pets.php index 3dd8c75..2876ee2 100644 --- a/tests/app/src/Internal/Hydrator/Operation/Pets.php +++ b/tests/app/src/Internal/Hydrator/Operation/Pets.php @@ -4,34 +4,47 @@ namespace ApiClients\Client\PetStore\Internal\Hydrator\Operation; +use ApiClients\Client\PetStore\Schema\Error; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString; use EventSauce\ObjectHydrator\UnableToHydrateObject; use EventSauce\ObjectHydrator\UnableToSerializeObject; use Generator; +use LogicException; +use Throwable; + +use function assert; +use function count; class Pets implements ObjectMapper { private array $hydrationStack = []; - public function __construct() {} + + public function __construct() + { + } /** - * @template T of object * @param class-string $className + * * @return T + * + * @template T of object */ public function hydrateObject(string $className, array $payload): object { - return match($className) { - 'ApiClients\Client\PetStore\Schema\Error' => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), + return match ($className) { + Error::class => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } - - - private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): \ApiClients\Client\PetStore\Schema\Error + + private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): Error { - $properties = []; + $properties = []; $missingFields = []; try { $value = $payload['code'] ?? null; @@ -55,154 +68,138 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Er $properties['message'] = $value; after_message: - - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\PetStore\Schema\Error::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Error::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\PetStore\Schema\Error(...$properties); - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + return new Error(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } } - + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { + if ($object instanceof $valueType) { return [$accessor => $payloadType] + $this->{$method}($object); } } - throw new \LogicException('No type mapped for object of class: ' . get_class($object)); + throw new LogicException('No type mapped for object of class: ' . $object::class); } public function serializeObject(object $object): mixed { - return $this->serializeObjectOfType($object, get_class($object)); + return $this->serializeObjectOfType($object, $object::class); } /** - * @template T - * * @param T $object * @param class-string $className + * + * @template T */ public function serializeObjectOfType(object $object, string $className): mixed { try { - return match($className) { + return match ($className) { 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\PetStore\Schema\Error' => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), - default => throw new \LogicException('No serialization defined for $className'), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + Error::class => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), + default => throw new LogicException('No serialization defined for $className'), }; - } catch (\Throwable $exception) { + } catch (Throwable $exception) { throw UnableToSerializeObject::dueToError($className, $exception); } } - - + private function serializeValuearray(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems(...array ( -)); + $serializer = new SerializeArrayItems(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString(...array ( -)); + $serializer = new SerializeUuidToString(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTime(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeImmutable(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(mixed $object): mixed { - \assert($object instanceof \ApiClients\Client\PetStore\Schema\Error); + assert($object instanceof Error); $result = []; - $code = $object->code; + $code = $object->code; after_code: $result['code'] = $code; - - $message = $object->message; + $message = $object->message; after_message: $result['message'] = $message; - return $result; } - - /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToHydrateObject + * + * @template T */ public function hydrateObjects(string $className, iterable $payloads): IterableList { @@ -217,14 +214,14 @@ private function doHydrateObjects(string $className, iterable $payloads): Genera } /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToSerializeObject + * + * @template T */ public function serializeObjects(iterable $payloads): IterableList { diff --git a/tests/app/src/Internal/Hydrator/Operation/Pets/Gatos.php b/tests/app/src/Internal/Hydrator/Operation/Pets/Gatos.php index 00368b4..9622175 100644 --- a/tests/app/src/Internal/Hydrator/Operation/Pets/Gatos.php +++ b/tests/app/src/Internal/Hydrator/Operation/Pets/Gatos.php @@ -4,34 +4,47 @@ namespace ApiClients\Client\PetStore\Internal\Hydrator\Operation\Pets; +use ApiClients\Client\PetStore\Schema\Error; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString; use EventSauce\ObjectHydrator\UnableToHydrateObject; use EventSauce\ObjectHydrator\UnableToSerializeObject; use Generator; +use LogicException; +use Throwable; + +use function assert; +use function count; class Gatos implements ObjectMapper { private array $hydrationStack = []; - public function __construct() {} + + public function __construct() + { + } /** - * @template T of object * @param class-string $className + * * @return T + * + * @template T of object */ public function hydrateObject(string $className, array $payload): object { - return match($className) { - 'ApiClients\Client\PetStore\Schema\Error' => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), + return match ($className) { + Error::class => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } - - - private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): \ApiClients\Client\PetStore\Schema\Error + + private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): Error { - $properties = []; + $properties = []; $missingFields = []; try { $value = $payload['code'] ?? null; @@ -55,154 +68,138 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Er $properties['message'] = $value; after_message: - - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\PetStore\Schema\Error::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Error::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\PetStore\Schema\Error(...$properties); - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + return new Error(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } } - + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { + if ($object instanceof $valueType) { return [$accessor => $payloadType] + $this->{$method}($object); } } - throw new \LogicException('No type mapped for object of class: ' . get_class($object)); + throw new LogicException('No type mapped for object of class: ' . $object::class); } public function serializeObject(object $object): mixed { - return $this->serializeObjectOfType($object, get_class($object)); + return $this->serializeObjectOfType($object, $object::class); } /** - * @template T - * * @param T $object * @param class-string $className + * + * @template T */ public function serializeObjectOfType(object $object, string $className): mixed { try { - return match($className) { + return match ($className) { 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\PetStore\Schema\Error' => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), - default => throw new \LogicException('No serialization defined for $className'), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + Error::class => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), + default => throw new LogicException('No serialization defined for $className'), }; - } catch (\Throwable $exception) { + } catch (Throwable $exception) { throw UnableToSerializeObject::dueToError($className, $exception); } } - - + private function serializeValuearray(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems(...array ( -)); + $serializer = new SerializeArrayItems(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString(...array ( -)); + $serializer = new SerializeUuidToString(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTime(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeImmutable(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(mixed $object): mixed { - \assert($object instanceof \ApiClients\Client\PetStore\Schema\Error); + assert($object instanceof Error); $result = []; - $code = $object->code; + $code = $object->code; after_code: $result['code'] = $code; - - $message = $object->message; + $message = $object->message; after_message: $result['message'] = $message; - return $result; } - - /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToHydrateObject + * + * @template T */ public function hydrateObjects(string $className, iterable $payloads): IterableList { @@ -217,14 +214,14 @@ private function doHydrateObjects(string $className, iterable $payloads): Genera } /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToSerializeObject + * + * @template T */ public function serializeObjects(iterable $payloads): IterableList { diff --git a/tests/app/src/Internal/Hydrator/Operation/Pets/GroupedByType.php b/tests/app/src/Internal/Hydrator/Operation/Pets/GroupedByType.php index b43deee..2120eea 100644 --- a/tests/app/src/Internal/Hydrator/Operation/Pets/GroupedByType.php +++ b/tests/app/src/Internal/Hydrator/Operation/Pets/GroupedByType.php @@ -4,35 +4,50 @@ namespace ApiClients\Client\PetStore\Internal\Hydrator\Operation\Pets; +use ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Multiple\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok\Pets; +use ApiClients\Client\PetStore\Schema\Error; +use ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString; use EventSauce\ObjectHydrator\UnableToHydrateObject; use EventSauce\ObjectHydrator\UnableToSerializeObject; use Generator; +use LogicException; +use Throwable; + +use function assert; +use function count; class GroupedByType implements ObjectMapper { private array $hydrationStack = []; - public function __construct() {} + + public function __construct() + { + } /** - * @template T of object * @param class-string $className + * * @return T + * + * @template T of object */ public function hydrateObject(string $className, array $payload): object { - return match($className) { - 'ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Operations⚡️Pets⚡️Grouped⚡️By⚡️Type⚡️Response⚡️ApplicationJson⚡️Ok($payload), - 'ApiClients\Client\PetStore\Schema\Error' => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), + return match ($className) { + Ok::class => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Operations⚡️Pets⚡️Grouped⚡️By⚡️Type⚡️Response⚡️ApplicationJson⚡️Ok($payload), + Error::class => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } - - - private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Operations⚡️Pets⚡️Grouped⚡️By⚡️Type⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): \ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok + + private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Operations⚡️Pets⚡️Grouped⚡️By⚡️Type⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok { - $properties = []; + $properties = []; $missingFields = []; try { $value = $payload['pets'] ?? null; @@ -45,8 +60,7 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Op static $petsCaster1; if ($petsCaster1 === null) { - $petsCaster1 = new \ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Multiple\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok\Pets(...array ( -)); + $petsCaster1 = new Pets(...[]); } $value = $petsCaster1->cast($value, $this); @@ -59,26 +73,24 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Op $properties['pets'] = $value; after_pets: - - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Ok::class, $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok(...$properties); - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + return new Ok(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Ok::class, $exception, stack: $this->hydrationStack); } } - - private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): \ApiClients\Client\PetStore\Schema\Error + private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): Error { - $properties = []; + $properties = []; $missingFields = []; try { $value = $payload['code'] ?? null; @@ -102,176 +114,157 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Er $properties['message'] = $value; after_message: - - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\PetStore\Schema\Error::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Error::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\PetStore\Schema\Error(...$properties); - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + return new Error(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } } - + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { + if ($object instanceof $valueType) { return [$accessor => $payloadType] + $this->{$method}($object); } } - throw new \LogicException('No type mapped for object of class: ' . get_class($object)); + throw new LogicException('No type mapped for object of class: ' . $object::class); } public function serializeObject(object $object): mixed { - return $this->serializeObjectOfType($object, get_class($object)); + return $this->serializeObjectOfType($object, $object::class); } /** - * @template T - * * @param T $object * @param class-string $className + * + * @template T */ public function serializeObjectOfType(object $object, string $className): mixed { try { - return match($className) { + return match ($className) { 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Operations⚡️Pets⚡️Grouped⚡️By⚡️Type⚡️Response⚡️ApplicationJson⚡️Ok($object), - 'ApiClients\Client\PetStore\Schema\Error' => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), - default => throw new \LogicException('No serialization defined for $className'), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + Ok::class => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Operations⚡️Pets⚡️Grouped⚡️By⚡️Type⚡️Response⚡️ApplicationJson⚡️Ok($object), + Error::class => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), + default => throw new LogicException('No serialization defined for $className'), }; - } catch (\Throwable $exception) { + } catch (Throwable $exception) { throw UnableToSerializeObject::dueToError($className, $exception); } } - - + private function serializeValuearray(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems(...array ( -)); + $serializer = new SerializeArrayItems(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString(...array ( -)); + $serializer = new SerializeUuidToString(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTime(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeImmutable(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Operations⚡️Pets⚡️Grouped⚡️By⚡️Type⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed { - \assert($object instanceof \ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok); + assert($object instanceof Ok); $result = []; $pets = $object->pets; static $petsSerializer0; if ($petsSerializer0 === null) { - $petsSerializer0 = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems(...array ( -)); + $petsSerializer0 = new SerializeArrayItems(...[]); } - - $pets = $petsSerializer0->serialize($pets, $this); - after_pets: $result['pets'] = $pets; + $pets = $petsSerializer0->serialize($pets, $this); + after_pets: $result['pets'] = $pets; return $result; } - private function serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(mixed $object): mixed { - \assert($object instanceof \ApiClients\Client\PetStore\Schema\Error); + assert($object instanceof Error); $result = []; - $code = $object->code; + $code = $object->code; after_code: $result['code'] = $code; - - $message = $object->message; + $message = $object->message; after_message: $result['message'] = $message; - return $result; } - - /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToHydrateObject + * + * @template T */ public function hydrateObjects(string $className, iterable $payloads): IterableList { @@ -286,14 +279,14 @@ private function doHydrateObjects(string $className, iterable $payloads): Genera } /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToSerializeObject + * + * @template T */ public function serializeObjects(iterable $payloads): IterableList { diff --git a/tests/app/src/Internal/Hydrator/Operation/Pets/Kinds/Walking.php b/tests/app/src/Internal/Hydrator/Operation/Pets/Kinds/Walking.php index 67fde76..4de62a4 100644 --- a/tests/app/src/Internal/Hydrator/Operation/Pets/Kinds/Walking.php +++ b/tests/app/src/Internal/Hydrator/Operation/Pets/Kinds/Walking.php @@ -4,34 +4,47 @@ namespace ApiClients\Client\PetStore\Internal\Hydrator\Operation\Pets\Kinds; +use ApiClients\Client\PetStore\Schema\Error; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString; use EventSauce\ObjectHydrator\UnableToHydrateObject; use EventSauce\ObjectHydrator\UnableToSerializeObject; use Generator; +use LogicException; +use Throwable; + +use function assert; +use function count; class Walking implements ObjectMapper { private array $hydrationStack = []; - public function __construct() {} + + public function __construct() + { + } /** - * @template T of object * @param class-string $className + * * @return T + * + * @template T of object */ public function hydrateObject(string $className, array $payload): object { - return match($className) { - 'ApiClients\Client\PetStore\Schema\Error' => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), + return match ($className) { + Error::class => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } - - - private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): \ApiClients\Client\PetStore\Schema\Error + + private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): Error { - $properties = []; + $properties = []; $missingFields = []; try { $value = $payload['code'] ?? null; @@ -55,154 +68,138 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Er $properties['message'] = $value; after_message: - - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\PetStore\Schema\Error::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Error::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\PetStore\Schema\Error(...$properties); - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + return new Error(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } } - + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { + if ($object instanceof $valueType) { return [$accessor => $payloadType] + $this->{$method}($object); } } - throw new \LogicException('No type mapped for object of class: ' . get_class($object)); + throw new LogicException('No type mapped for object of class: ' . $object::class); } public function serializeObject(object $object): mixed { - return $this->serializeObjectOfType($object, get_class($object)); + return $this->serializeObjectOfType($object, $object::class); } /** - * @template T - * * @param T $object * @param class-string $className + * + * @template T */ public function serializeObjectOfType(object $object, string $className): mixed { try { - return match($className) { + return match ($className) { 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\PetStore\Schema\Error' => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), - default => throw new \LogicException('No serialization defined for $className'), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + Error::class => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), + default => throw new LogicException('No serialization defined for $className'), }; - } catch (\Throwable $exception) { + } catch (Throwable $exception) { throw UnableToSerializeObject::dueToError($className, $exception); } } - - + private function serializeValuearray(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems(...array ( -)); + $serializer = new SerializeArrayItems(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString(...array ( -)); + $serializer = new SerializeUuidToString(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTime(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeImmutable(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(mixed $object): mixed { - \assert($object instanceof \ApiClients\Client\PetStore\Schema\Error); + assert($object instanceof Error); $result = []; - $code = $object->code; + $code = $object->code; after_code: $result['code'] = $code; - - $message = $object->message; + $message = $object->message; after_message: $result['message'] = $message; - return $result; } - - /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToHydrateObject + * + * @template T */ public function hydrateObjects(string $className, iterable $payloads): IterableList { @@ -217,14 +214,14 @@ private function doHydrateObjects(string $className, iterable $payloads): Genera } /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToSerializeObject + * + * @template T */ public function serializeObjects(iterable $payloads): IterableList { diff --git a/tests/app/src/Internal/Hydrator/Operation/Pets/Names.php b/tests/app/src/Internal/Hydrator/Operation/Pets/Names.php index a462078..93a8d11 100644 --- a/tests/app/src/Internal/Hydrator/Operation/Pets/Names.php +++ b/tests/app/src/Internal/Hydrator/Operation/Pets/Names.php @@ -4,34 +4,47 @@ namespace ApiClients\Client\PetStore\Internal\Hydrator\Operation\Pets; +use ApiClients\Client\PetStore\Schema\Error; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString; use EventSauce\ObjectHydrator\UnableToHydrateObject; use EventSauce\ObjectHydrator\UnableToSerializeObject; use Generator; +use LogicException; +use Throwable; + +use function assert; +use function count; class Names implements ObjectMapper { private array $hydrationStack = []; - public function __construct() {} + + public function __construct() + { + } /** - * @template T of object * @param class-string $className + * * @return T + * + * @template T of object */ public function hydrateObject(string $className, array $payload): object { - return match($className) { - 'ApiClients\Client\PetStore\Schema\Error' => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), + return match ($className) { + Error::class => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } - - - private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): \ApiClients\Client\PetStore\Schema\Error + + private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): Error { - $properties = []; + $properties = []; $missingFields = []; try { $value = $payload['code'] ?? null; @@ -55,154 +68,138 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Er $properties['message'] = $value; after_message: - - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\PetStore\Schema\Error::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Error::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\PetStore\Schema\Error(...$properties); - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + return new Error(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } } - + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { + if ($object instanceof $valueType) { return [$accessor => $payloadType] + $this->{$method}($object); } } - throw new \LogicException('No type mapped for object of class: ' . get_class($object)); + throw new LogicException('No type mapped for object of class: ' . $object::class); } public function serializeObject(object $object): mixed { - return $this->serializeObjectOfType($object, get_class($object)); + return $this->serializeObjectOfType($object, $object::class); } /** - * @template T - * * @param T $object * @param class-string $className + * + * @template T */ public function serializeObjectOfType(object $object, string $className): mixed { try { - return match($className) { + return match ($className) { 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\PetStore\Schema\Error' => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), - default => throw new \LogicException('No serialization defined for $className'), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + Error::class => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), + default => throw new LogicException('No serialization defined for $className'), }; - } catch (\Throwable $exception) { + } catch (Throwable $exception) { throw UnableToSerializeObject::dueToError($className, $exception); } } - - + private function serializeValuearray(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems(...array ( -)); + $serializer = new SerializeArrayItems(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString(...array ( -)); + $serializer = new SerializeUuidToString(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTime(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeImmutable(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(mixed $object): mixed { - \assert($object instanceof \ApiClients\Client\PetStore\Schema\Error); + assert($object instanceof Error); $result = []; - $code = $object->code; + $code = $object->code; after_code: $result['code'] = $code; - - $message = $object->message; + $message = $object->message; after_message: $result['message'] = $message; - return $result; } - - /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToHydrateObject + * + * @template T */ public function hydrateObjects(string $className, iterable $payloads): IterableList { @@ -217,14 +214,14 @@ private function doHydrateObjects(string $className, iterable $payloads): Genera } /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToSerializeObject + * + * @template T */ public function serializeObjects(iterable $payloads): IterableList { diff --git a/tests/app/src/Internal/Hydrator/Operation/Pets/PetId.php b/tests/app/src/Internal/Hydrator/Operation/Pets/PetId.php index 76e23eb..561e964 100644 --- a/tests/app/src/Internal/Hydrator/Operation/Pets/PetId.php +++ b/tests/app/src/Internal/Hydrator/Operation/Pets/PetId.php @@ -4,34 +4,47 @@ namespace ApiClients\Client\PetStore\Internal\Hydrator\Operation\Pets; +use ApiClients\Client\PetStore\Schema\Error; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime; +use EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString; use EventSauce\ObjectHydrator\UnableToHydrateObject; use EventSauce\ObjectHydrator\UnableToSerializeObject; use Generator; +use LogicException; +use Throwable; + +use function assert; +use function count; class PetId implements ObjectMapper { private array $hydrationStack = []; - public function __construct() {} + + public function __construct() + { + } /** - * @template T of object * @param class-string $className + * * @return T + * + * @template T of object */ public function hydrateObject(string $className, array $payload): object { - return match($className) { - 'ApiClients\Client\PetStore\Schema\Error' => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), + return match ($className) { + Error::class => $this->hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } - - - private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): \ApiClients\Client\PetStore\Schema\Error + + private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(array $payload): Error { - $properties = []; + $properties = []; $missingFields = []; try { $value = $payload['code'] ?? null; @@ -55,154 +68,138 @@ private function hydrateApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Er $properties['message'] = $value; after_message: - - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\PetStore\Schema\Error::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Error::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\PetStore\Schema\Error(...$properties); - } catch (\Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\PetStore\Schema\Error', $exception, stack: $this->hydrationStack); + return new Error(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError(Error::class, $exception, stack: $this->hydrationStack); } } - + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { + if ($object instanceof $valueType) { return [$accessor => $payloadType] + $this->{$method}($object); } } - throw new \LogicException('No type mapped for object of class: ' . get_class($object)); + throw new LogicException('No type mapped for object of class: ' . $object::class); } public function serializeObject(object $object): mixed { - return $this->serializeObjectOfType($object, get_class($object)); + return $this->serializeObjectOfType($object, $object::class); } /** - * @template T - * * @param T $object * @param class-string $className + * + * @template T */ public function serializeObjectOfType(object $object, string $className): mixed { try { - return match($className) { + return match ($className) { 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\PetStore\Schema\Error' => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), - default => throw new \LogicException('No serialization defined for $className'), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + Error::class => $this->serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error($object), + default => throw new LogicException('No serialization defined for $className'), }; - } catch (\Throwable $exception) { + } catch (Throwable $exception) { throw UnableToSerializeObject::dueToError($className, $exception); } } - - + private function serializeValuearray(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems(...array ( -)); + $serializer = new SerializeArrayItems(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeUuidToString(...array ( -)); + $serializer = new SerializeUuidToString(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTime(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeImmutable(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeValueDateTimeInterface(mixed $value): mixed { static $serializer; - + if ($serializer === null) { - $serializer = new \EventSauce\ObjectHydrator\PropertySerializers\SerializeDateTime(...array ( -)); + $serializer = new SerializeDateTime(...[]); } - + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️PetStore⚡️Schema⚡️Error(mixed $object): mixed { - \assert($object instanceof \ApiClients\Client\PetStore\Schema\Error); + assert($object instanceof Error); $result = []; - $code = $object->code; + $code = $object->code; after_code: $result['code'] = $code; - - $message = $object->message; + $message = $object->message; after_message: $result['message'] = $message; - return $result; } - - /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToHydrateObject + * + * @template T */ public function hydrateObjects(string $className, iterable $payloads): IterableList { @@ -217,14 +214,14 @@ private function doHydrateObjects(string $className, iterable $payloads): Genera } /** - * @template T - * * @param class-string $className * @param iterable $payloads; * * @return IterableList * * @throws UnableToSerializeObject + * + * @template T */ public function serializeObjects(iterable $payloads): IterableList { diff --git a/tests/app/src/Internal/Hydrators.php b/tests/app/src/Internal/Hydrators.php index aebc236..90a624c 100644 --- a/tests/app/src/Internal/Hydrators.php +++ b/tests/app/src/Internal/Hydrators.php @@ -1,102 +1,121 @@ $this->getObjectMapperOperation🌀Pets()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\PetStore\\Schema\\Operations\\Pets\\Grouped\\By\\Type\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Pets🌀GroupedByType()->hydrateObject($className, $payload), + Error::class => $this->getObjectMapperOperation🌀Pets()->hydrateObject($className, $payload), + Ok::class => $this->getObjectMapperOperation🌀Pets🌀GroupedByType()->hydrateObject($className, $payload), }; } - public function hydrateObjects(string $className, iterable $payloads) : \EventSauce\ObjectHydrator\IterableList + + public function hydrateObjects(string $className, iterable $payloads): IterableList { - return new \EventSauce\ObjectHydrator\IterableList($this->doHydrateObjects($className, $payloads)); + return new IterableList($this->doHydrateObjects($className, $payloads)); } - private function doHydrateObjects(string $className, iterable $payloads) : \Generator + + private function doHydrateObjects(string $className, iterable $payloads): Generator { foreach ($payloads as $index => $payload) { (yield $index => $this->hydrateObject($className, $payload)); } } - public function serializeObject(object $object) : mixed + + public function serializeObject(object $object): mixed { return $this->serializeObjectOfType($object, $object::class); } - public function serializeObjectOfType(object $object, string $className) : mixed + + public function serializeObjectOfType(object $object, string $className): mixed { return match ($className) { - '\\ApiClients\\Client\\PetStore\\Schema\\Error' => $this->getObjectMapperOperation🌀Pets()->serializeObject($object), - '\\ApiClients\\Client\\PetStore\\Schema\\Operations\\Pets\\Grouped\\By\\Type\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Pets🌀GroupedByType()->serializeObject($object), + Error::class => $this->getObjectMapperOperation🌀Pets()->serializeObject($object), + Ok::class => $this->getObjectMapperOperation🌀Pets🌀GroupedByType()->serializeObject($object), }; } - public function serializeObjects(iterable $payloads) : \EventSauce\ObjectHydrator\IterableList + + public function serializeObjects(iterable $payloads): IterableList { - return new \EventSauce\ObjectHydrator\IterableList($this->doSerializeObjects($payloads)); + return new IterableList($this->doSerializeObjects($payloads)); } - private function doSerializeObjects(iterable $objects) : \Generator + + private function doSerializeObjects(iterable $objects): Generator { foreach ($objects as $index => $object) { (yield $index => $this->serializeObject($object)); } } - public function getObjectMapperOperation🌀Pets() : Internal\Hydrator\Operation\Pets + + public function getObjectMapperOperation🌀Pets(): Internal\Hydrator\Operation\Pets { if ($this->operation🌀Pets instanceof Internal\Hydrator\Operation\Pets === false) { $this->operation🌀Pets = new Internal\Hydrator\Operation\Pets(); } + return $this->operation🌀Pets; } - public function getObjectMapperOperation🌀Pets🌀Gatos() : Internal\Hydrator\Operation\Pets\Gatos + + public function getObjectMapperOperation🌀Pets🌀Gatos(): Internal\Hydrator\Operation\Pets\Gatos { if ($this->operation🌀Pets🌀Gatos instanceof Internal\Hydrator\Operation\Pets\Gatos === false) { $this->operation🌀Pets🌀Gatos = new Internal\Hydrator\Operation\Pets\Gatos(); } + return $this->operation🌀Pets🌀Gatos; } - public function getObjectMapperOperation🌀Pets🌀Kinds🌀Walking() : Internal\Hydrator\Operation\Pets\Kinds\Walking + + public function getObjectMapperOperation🌀Pets🌀Kinds🌀Walking(): Internal\Hydrator\Operation\Pets\Kinds\Walking { if ($this->operation🌀Pets🌀Kinds🌀Walking instanceof Internal\Hydrator\Operation\Pets\Kinds\Walking === false) { $this->operation🌀Pets🌀Kinds🌀Walking = new Internal\Hydrator\Operation\Pets\Kinds\Walking(); } + return $this->operation🌀Pets🌀Kinds🌀Walking; } - public function getObjectMapperOperation🌀Pets🌀GroupedByType() : Internal\Hydrator\Operation\Pets\GroupedByType + + public function getObjectMapperOperation🌀Pets🌀GroupedByType(): Internal\Hydrator\Operation\Pets\GroupedByType { if ($this->operation🌀Pets🌀GroupedByType instanceof Internal\Hydrator\Operation\Pets\GroupedByType === false) { $this->operation🌀Pets🌀GroupedByType = new Internal\Hydrator\Operation\Pets\GroupedByType(); } + return $this->operation🌀Pets🌀GroupedByType; } - public function getObjectMapperOperation🌀Pets🌀Names() : Internal\Hydrator\Operation\Pets\Names + + public function getObjectMapperOperation🌀Pets🌀Names(): Internal\Hydrator\Operation\Pets\Names { if ($this->operation🌀Pets🌀Names instanceof Internal\Hydrator\Operation\Pets\Names === false) { $this->operation🌀Pets🌀Names = new Internal\Hydrator\Operation\Pets\Names(); } + return $this->operation🌀Pets🌀Names; } - public function getObjectMapperOperation🌀Pets🌀PetId() : Internal\Hydrator\Operation\Pets\PetId + + public function getObjectMapperOperation🌀Pets🌀PetId(): Internal\Hydrator\Operation\Pets\PetId { if ($this->operation🌀Pets🌀PetId instanceof Internal\Hydrator\Operation\Pets\PetId === false) { $this->operation🌀Pets🌀PetId = new Internal\Hydrator\Operation\Pets\PetId(); } + return $this->operation🌀Pets🌀PetId; } } diff --git a/tests/app/src/Internal/Operation/Pets/Create.php b/tests/app/src/Internal/Operation/Pets/Create.php index 84b1ade..046785c 100644 --- a/tests/app/src/Internal/Operation/Pets/Create.php +++ b/tests/app/src/Internal/Operation/Pets/Create.php @@ -1,61 +1,55 @@ requestSchemaValidator = $requestSchemaValidator; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest(array $data) : \Psr\Http\Message\RequestInterface + + public function createRequest(array $data): RequestInterface { - $this->requestSchemaValidator->validate($data, \cebe\openapi\Reader::readFromJson(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - return new \RingCentral\Psr7\Request('POST', (string) (new \League\Uri\UriTemplate('/pets'))->expand(array()), array('Content-Type' => 'application/json'), json_encode($data)); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', (string) new UriTemplate('/pets')->expand([]), ['Content-Type' => 'application/json'], json_encode($data)); } - /** - * @return \ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody + + public function createResponse(ResponseInterface $response): WithoutBody { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; - } - switch ($code) { - /** - * Null response - **/ - case 201: - return new \ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody(201, array()); + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); } - throw new \RuntimeException('Unable to find matching response code and content type'); + + return match ($code) { + 201 => new WithoutBody(201, []), + default => throw new RuntimeException('Unable to find matching response code and content type'), + }; } } diff --git a/tests/app/src/Internal/Operation/Pets/Grouped/By/Type.php b/tests/app/src/Internal/Operation/Pets/Grouped/By/Type.php index 9fe8eca..88920ac 100644 --- a/tests/app/src/Internal/Operation/Pets/Grouped/By/Type.php +++ b/tests/app/src/Internal/Operation/Pets/Grouped/By/Type.php @@ -1,63 +1,62 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/groupedByType{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets/groupedByType{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok + + public function createResponse(ResponseInterface $response): Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A shitty design choice to test a specific situation in the generator - **/ - case 200: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - return $this->hydrator->hydrateObject(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::class, $body); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A shitty design choice to test a specific situation in the generator + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::class, $body); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/Kinds/Walking.php b/tests/app/src/Internal/Operation/Pets/Kinds/Walking.php index a641523..518e99c 100644 --- a/tests/app/src/Internal/Operation/Pets/Kinds/Walking.php +++ b/tests/app/src/Internal/Operation/Pets/Kinds/Walking.php @@ -1,86 +1,94 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/kinds/walking{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets/kinds/walking{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of cats - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : Schema\Cat|Schema\Dog|Schema\HellHound { - $error = new \RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Cat::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaa; - } - items_application_json_two_hundred_aaaaa: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Dog::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaab; - } - items_application_json_two_hundred_aaaab: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaac; - } - items_application_json_two_hundred_aaaac: - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of cats + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\Cat|Schema\Dog|Schema\HellHound { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Cat::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Dog::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaab; + } + + items_application_json_two_hundred_aaaab: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaac; + } + + items_application_json_two_hundred_aaaac: + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/Kinds/WalkingListing.php b/tests/app/src/Internal/Operation/Pets/Kinds/WalkingListing.php index bf22191..a5071cd 100644 --- a/tests/app/src/Internal/Operation/Pets/Kinds/WalkingListing.php +++ b/tests/app/src/Internal/Operation/Pets/Kinds/WalkingListing.php @@ -1,86 +1,94 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/kinds/walking{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets/kinds/walking{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of cats - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : Schema\Cat|Schema\Dog|Schema\HellHound { - $error = new \RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Cat::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaa; - } - items_application_json_two_hundred_aaaaa: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Dog::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaab; - } - items_application_json_two_hundred_aaaab: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaac; - } - items_application_json_two_hundred_aaaac: - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of cats + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\Cat|Schema\Dog|Schema\HellHound { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Cat::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Dog::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaab; + } + + items_application_json_two_hundred_aaaab: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaac; + } + + items_application_json_two_hundred_aaaac: + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/ListListing.php b/tests/app/src/Internal/Operation/Pets/ListListing.php index 71339e2..eba7a40 100644 --- a/tests/app/src/Internal/Operation/Pets/ListListing.php +++ b/tests/app/src/Internal/Operation/Pets/ListListing.php @@ -1,107 +1,121 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of pets - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : Schema\Cat|Schema\Dog|Schema\HellHound|Schema\Bird|Schema\Fish|Schema\Spider { - $error = new \RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Cat::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaa; - } - items_application_json_two_hundred_aaaaa: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Dog::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaab; - } - items_application_json_two_hundred_aaaab: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaac; - } - items_application_json_two_hundred_aaaac: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Bird::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Bird::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaad; - } - items_application_json_two_hundred_aaaad: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Fish::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Fish::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaae; - } - items_application_json_two_hundred_aaaae: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Spider::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Spider::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaf; - } - items_application_json_two_hundred_aaaaf: - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of pets + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\Cat|Schema\Dog|Schema\HellHound|Schema\Bird|Schema\Fish|Schema\Spider { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Cat::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Dog::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaab; + } + + items_application_json_two_hundred_aaaab: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaac; + } + + items_application_json_two_hundred_aaaac: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Bird::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Bird::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaad; + } + + items_application_json_two_hundred_aaaad: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Fish::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Fish::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaae; + } + + items_application_json_two_hundred_aaaae: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Spider::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Spider::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaf; + } + + items_application_json_two_hundred_aaaaf: + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/List_.php b/tests/app/src/Internal/Operation/Pets/List_.php index d729cdc..d2c9c48 100644 --- a/tests/app/src/Internal/Operation/Pets/List_.php +++ b/tests/app/src/Internal/Operation/Pets/List_.php @@ -1,107 +1,121 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of pets - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : Schema\Cat|Schema\Dog|Schema\HellHound|Schema\Bird|Schema\Fish|Schema\Spider { - $error = new \RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Cat::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaa; - } - items_application_json_two_hundred_aaaaa: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Dog::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaab; - } - items_application_json_two_hundred_aaaab: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaac; - } - items_application_json_two_hundred_aaaac: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Bird::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Bird::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaad; - } - items_application_json_two_hundred_aaaad: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Fish::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Fish::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaae; - } - items_application_json_two_hundred_aaaae: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Spider::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Spider::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaf; - } - items_application_json_two_hundred_aaaaf: - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of pets + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\Cat|Schema\Dog|Schema\HellHound|Schema\Bird|Schema\Fish|Schema\Spider { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Cat::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Dog::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaab; + } + + items_application_json_two_hundred_aaaab: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\HellHound::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\HellHound::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaac; + } + + items_application_json_two_hundred_aaaac: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Bird::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Bird::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaad; + } + + items_application_json_two_hundred_aaaad: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Fish::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Fish::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaae; + } + + items_application_json_two_hundred_aaaae: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Spider::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Spider::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaf; + } + + items_application_json_two_hundred_aaaaf: + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/List_/Gatos.php b/tests/app/src/Internal/Operation/Pets/List_/Gatos.php index b734bbb..14d8770 100644 --- a/tests/app/src/Internal/Operation/Pets/List_/Gatos.php +++ b/tests/app/src/Internal/Operation/Pets/List_/Gatos.php @@ -1,72 +1,76 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/gatos{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets/gatos{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of cats - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : Schema\Cat { - $error = new \RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Cat::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaa; - } - items_application_json_two_hundred_aaaaa: - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of cats + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\Cat { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Cat::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/List_/GatosListing.php b/tests/app/src/Internal/Operation/Pets/List_/GatosListing.php index 5414868..b9f2231 100644 --- a/tests/app/src/Internal/Operation/Pets/List_/GatosListing.php +++ b/tests/app/src/Internal/Operation/Pets/List_/GatosListing.php @@ -1,72 +1,76 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/gatos{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets/gatos{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of cats - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : Schema\Cat { - $error = new \RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Cat::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaa; - } - items_application_json_two_hundred_aaaaa: - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of cats + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\Cat { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Cat::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/Names.php b/tests/app/src/Internal/Operation/Pets/Names.php index f7a31d7..667dc74 100644 --- a/tests/app/src/Internal/Operation/Pets/Names.php +++ b/tests/app/src/Internal/Operation/Pets/Names.php @@ -1,68 +1,71 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/names{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets/names{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of cats - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : string { - $error = new \RuntimeException(); - if (\is_string($body)) { - return $body; - } - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of cats + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(static function (array $body): string { + $error = new RuntimeException(); + if (is_string($body)) { + return $body; + } + + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/Pets/NamesListing.php b/tests/app/src/Internal/Operation/Pets/NamesListing.php index a5fc250..ff796a7 100644 --- a/tests/app/src/Internal/Operation/Pets/NamesListing.php +++ b/tests/app/src/Internal/Operation/Pets/NamesListing.php @@ -1,68 +1,71 @@ perPage = $perPage; - $this->page = $page; - $this->responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/names{?page,per_page}'))->expand(array('page' => $this->page, 'per_page' => $this->perPage))); + return new Request('GET', (string) new UriTemplate('/pets/names{?page,per_page}')->expand(['page' => $this->page, 'per_page' => $this->perPage])); } - /** - * @return \Rx\Observable - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : \Rx\Observable + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * A paged array of cats - **/ - case 200: - return \Rx\Observable::fromArray($body, new \Rx\Scheduler\ImmediateScheduler())->map(function (array $body) : string { - $error = new \RuntimeException(); - if (\is_string($body)) { - return $body; - } - throw $error; - }); - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * A paged array of cats + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(static function (array $body): string { + $error = new RuntimeException(); + if (is_string($body)) { + return $body; + } + + throw $error; + }); + /** + * unexpected error + **/ + + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operation/ShowPetById.php b/tests/app/src/Internal/Operation/ShowPetById.php index 4bfd760..0bda10b 100644 --- a/tests/app/src/Internal/Operation/ShowPetById.php +++ b/tests/app/src/Internal/Operation/ShowPetById.php @@ -1,92 +1,106 @@ responseSchemaValidator = $responseSchemaValidator; - $this->hydrator = $hydrator; } - public function createRequest() : \Psr\Http\Message\RequestInterface + + public function createRequest(): RequestInterface { - return new \RingCentral\Psr7\Request('GET', (string) (new \League\Uri\UriTemplate('/pets/{petId}'))->expand(array())); + return new Request('GET', (string) new UriTemplate('/pets/{petId}')->expand([])); } - /** - * @return Schema\Cat|Schema\Dog|Schema\Bird|Schema\Fish|Schema\Spider - */ - public function createResponse(\Psr\Http\Message\ResponseInterface $response) : Schema\Cat|Schema\Dog|Schema\Bird|Schema\Fish|Schema\Spider + + public function createResponse(ResponseInterface $response): Schema\Cat|Schema\Dog|Schema\Bird|Schema\Fish|Schema\Spider { - $code = $response->getStatusCode(); + $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); - switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); - switch ($code) { - /** - * Expected response to a valid request - **/ - case 200: - $error = new \RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Cat::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaaa; - } - items_application_json_two_hundred_aaaaa: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Dog::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaab; - } - items_application_json_two_hundred_aaaab: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Bird::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Bird::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaac; - } - items_application_json_two_hundred_aaaac: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Fish::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Fish::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaad; - } - items_application_json_two_hundred_aaaad: - try { - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Spider::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\Spider::class, $body); - } catch (\Throwable $error) { - goto items_application_json_two_hundred_aaaae; - } - items_application_json_two_hundred_aaaae: - throw $error; - /** - * unexpected error - **/ - default: - $this->responseSchemaValidator->validate($body, \cebe\openapi\Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); - } - break; + if ($contentType === 'application/json') { + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Expected response to a valid request + **/ + case 200: + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Cat::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Cat::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Dog::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Dog::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaab; + } + + items_application_json_two_hundred_aaaab: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Bird::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Bird::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaac; + } + + items_application_json_two_hundred_aaaac: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Fish::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Fish::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaad; + } + + items_application_json_two_hundred_aaaad: + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Spider::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\Spider::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaae; + } + + items_application_json_two_hundred_aaaae: + throw $error; + /** + * unexpected error + **/ + default: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Error::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Error($code, $this->hydrator->hydrateObject(Schema\Error::class, $body)); + } } - throw new \RuntimeException('Unable to find matching response code and content type'); + + throw new RuntimeException('Unable to find matching response code and content type'); } } diff --git a/tests/app/src/Internal/Operator/Pets/Create.php b/tests/app/src/Internal/Operator/Pets/Create.php index 2c1e048..ba0d58c 100644 --- a/tests/app/src/Internal/Operator/Pets/Create.php +++ b/tests/app/src/Internal/Operator/Pets/Create.php @@ -1,36 +1,38 @@ requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator); - $request = $operation->createRequest($params); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest($params); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): WithoutBody => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/Grouped/By/Type.php b/tests/app/src/Internal/Operator/Pets/Grouped/By/Type.php index 7427038..d434677 100644 --- a/tests/app/src/Internal/Operator/Pets/Grouped/By/Type.php +++ b/tests/app/src/Internal/Operator/Pets/Grouped/By/Type.php @@ -1,36 +1,38 @@ responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Ok => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/Kinds/Walking.php b/tests/app/src/Internal/Operator/Pets/Kinds/Walking.php index e43326c..0f3dff6 100644 --- a/tests/app/src/Internal/Operator/Pets/Kinds/Walking.php +++ b/tests/app/src/Internal/Operator/Pets/Kinds/Walking.php @@ -1,36 +1,39 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\Kinds\Walking($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/Kinds/WalkingListing.php b/tests/app/src/Internal/Operator/Pets/Kinds/WalkingListing.php index 4d3e5c0..cae7d13 100644 --- a/tests/app/src/Internal/Operator/Pets/Kinds/WalkingListing.php +++ b/tests/app/src/Internal/Operator/Pets/Kinds/WalkingListing.php @@ -1,36 +1,39 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\Kinds\WalkingListing($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/ListListing.php b/tests/app/src/Internal/Operator/Pets/ListListing.php index a8d3390..ee32fc8 100644 --- a/tests/app/src/Internal/Operator/Pets/ListListing.php +++ b/tests/app/src/Internal/Operator/Pets/ListListing.php @@ -1,36 +1,39 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\ListListing($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/List_.php b/tests/app/src/Internal/Operator/Pets/List_.php index c59393e..975e18f 100644 --- a/tests/app/src/Internal/Operator/Pets/List_.php +++ b/tests/app/src/Internal/Operator/Pets/List_.php @@ -1,36 +1,39 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\List_($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/List_/Gatos.php b/tests/app/src/Internal/Operator/Pets/List_/Gatos.php index d0b00ad..540b736 100644 --- a/tests/app/src/Internal/Operator/Pets/List_/Gatos.php +++ b/tests/app/src/Internal/Operator/Pets/List_/Gatos.php @@ -1,36 +1,39 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\List_\Gatos($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/List_/GatosListing.php b/tests/app/src/Internal/Operator/Pets/List_/GatosListing.php index 3595e7a..9bbfdd8 100644 --- a/tests/app/src/Internal/Operator/Pets/List_/GatosListing.php +++ b/tests/app/src/Internal/Operator/Pets/List_/GatosListing.php @@ -1,36 +1,39 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\List_\GatosListing($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/Names.php b/tests/app/src/Internal/Operator/Pets/Names.php index 9769957..cafd608 100644 --- a/tests/app/src/Internal/Operator/Pets/Names.php +++ b/tests/app/src/Internal/Operator/Pets/Names.php @@ -1,36 +1,38 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\Names($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/Pets/NamesListing.php b/tests/app/src/Internal/Operator/Pets/NamesListing.php index 55f7874..7714f67 100644 --- a/tests/app/src/Internal/Operator/Pets/NamesListing.php +++ b/tests/app/src/Internal/Operator/Pets/NamesListing.php @@ -1,36 +1,38 @@ - */ - public function call(int $perPage = 30, int $page = 1) : iterable + + /** @return iterable */ + public function call(int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\PetStore\Internal\Operation\Pets\NamesListing($this->responseSchemaValidator, $this->hydrator, $perPage, $page); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Rx\Observable { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Observable => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operator/ShowPetById.php b/tests/app/src/Internal/Operator/ShowPetById.php index 5a963cb..36c78af 100644 --- a/tests/app/src/Internal/Operator/ShowPetById.php +++ b/tests/app/src/Internal/Operator/ShowPetById.php @@ -1,36 +1,42 @@ responseSchemaValidator, $this->hydrator); - $request = $operation->createRequest(); - $result = \React\Async\await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\PetStore\Schema\Cat|\ApiClients\Client\PetStore\Schema\Dog|\ApiClients\Client\PetStore\Schema\Bird|\ApiClients\Client\PetStore\Schema\Fish|\ApiClients\Client\PetStore\Schema\Spider { - return $operation->createResponse($response); - })); - if ($result instanceof \Rx\Observable) { - $result = \WyriHaximus\React\awaitObservable($result); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static fn (ResponseInterface $response): Cat|Dog|Bird|Fish|Spider => $operation->createResponse($response))); + if ($result instanceof Observable) { + $result = awaitObservable($result); } + return $result; } } diff --git a/tests/app/src/Internal/Operators.php b/tests/app/src/Internal/Operators.php index 02d04b7..3fae0fa 100644 --- a/tests/app/src/Internal/Operators.php +++ b/tests/app/src/Internal/Operators.php @@ -1,107 +1,128 @@ pets👷List_ instanceof Internal\Operator\Pets\List_ === false) { $this->pets👷List_ = new Internal\Operator\Pets\List_($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets()); } + return $this->pets👷List_; } - public function pets👷ListListing() : Internal\Operator\Pets\ListListing + + public function pets👷ListListing(): Internal\Operator\Pets\ListListing { if ($this->pets👷ListListing instanceof Internal\Operator\Pets\ListListing === false) { $this->pets👷ListListing = new Internal\Operator\Pets\ListListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets()); } + return $this->pets👷ListListing; } - public function pets👷Create() : Internal\Operator\Pets\Create + + public function pets👷Create(): Internal\Operator\Pets\Create { if ($this->pets👷Create instanceof Internal\Operator\Pets\Create === false) { $this->pets👷Create = new Internal\Operator\Pets\Create($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets()); } + return $this->pets👷Create; } - public function pets👷List_👷Gatos() : Internal\Operator\Pets\List_\Gatos + + public function pets👷List_👷Gatos(): Internal\Operator\Pets\List_\Gatos { if ($this->pets👷List_👷Gatos instanceof Internal\Operator\Pets\List_\Gatos === false) { $this->pets👷List_👷Gatos = new Internal\Operator\Pets\List_\Gatos($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Gatos()); } + return $this->pets👷List_👷Gatos; } - public function pets👷List_👷GatosListing() : Internal\Operator\Pets\List_\GatosListing + + public function pets👷List_👷GatosListing(): Internal\Operator\Pets\List_\GatosListing { if ($this->pets👷List_👷GatosListing instanceof Internal\Operator\Pets\List_\GatosListing === false) { $this->pets👷List_👷GatosListing = new Internal\Operator\Pets\List_\GatosListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Gatos()); } + return $this->pets👷List_👷GatosListing; } - public function pets👷Kinds👷Walking() : Internal\Operator\Pets\Kinds\Walking + + public function pets👷Kinds👷Walking(): Internal\Operator\Pets\Kinds\Walking { if ($this->pets👷Kinds👷Walking instanceof Internal\Operator\Pets\Kinds\Walking === false) { $this->pets👷Kinds👷Walking = new Internal\Operator\Pets\Kinds\Walking($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Kinds🌀Walking()); } + return $this->pets👷Kinds👷Walking; } - public function pets👷Kinds👷WalkingListing() : Internal\Operator\Pets\Kinds\WalkingListing + + public function pets👷Kinds👷WalkingListing(): Internal\Operator\Pets\Kinds\WalkingListing { if ($this->pets👷Kinds👷WalkingListing instanceof Internal\Operator\Pets\Kinds\WalkingListing === false) { $this->pets👷Kinds👷WalkingListing = new Internal\Operator\Pets\Kinds\WalkingListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Kinds🌀Walking()); } + return $this->pets👷Kinds👷WalkingListing; } - public function pets👷Grouped👷By👷Type() : Internal\Operator\Pets\Grouped\By\Type + + public function pets👷Grouped👷By👷Type(): Internal\Operator\Pets\Grouped\By\Type { if ($this->pets👷Grouped👷By👷Type instanceof Internal\Operator\Pets\Grouped\By\Type === false) { $this->pets👷Grouped👷By👷Type = new Internal\Operator\Pets\Grouped\By\Type($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀GroupedByType()); } + return $this->pets👷Grouped👷By👷Type; } - public function pets👷Names() : Internal\Operator\Pets\Names + + public function pets👷Names(): Internal\Operator\Pets\Names { if ($this->pets👷Names instanceof Internal\Operator\Pets\Names === false) { $this->pets👷Names = new Internal\Operator\Pets\Names($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Names()); } + return $this->pets👷Names; } - public function pets👷NamesListing() : Internal\Operator\Pets\NamesListing + + public function pets👷NamesListing(): Internal\Operator\Pets\NamesListing { if ($this->pets👷NamesListing instanceof Internal\Operator\Pets\NamesListing === false) { $this->pets👷NamesListing = new Internal\Operator\Pets\NamesListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Names()); } + return $this->pets👷NamesListing; } - public function showPetById() : Internal\Operator\ShowPetById + + public function showPetById(): Internal\Operator\ShowPetById { if ($this->showPetById instanceof Internal\Operator\ShowPetById === false) { $this->showPetById = new Internal\Operator\ShowPetById($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀PetId()); } + return $this->showPetById; } } diff --git a/tests/app/src/Internal/Router/Get.php b/tests/app/src/Internal/Router/Get.php index ccdeacb..3eb0159 100644 --- a/tests/app/src/Internal/Router/Get.php +++ b/tests/app/src/Internal/Router/Get.php @@ -1,27 +1,29 @@ browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀PetId()); + return $operator->call(); } } diff --git a/tests/app/src/Internal/Router/Get/Four.php b/tests/app/src/Internal/Router/Get/Four.php index e2c38ed..deb8fe9 100644 --- a/tests/app/src/Internal/Router/Get/Four.php +++ b/tests/app/src/Internal/Router/Get/Four.php @@ -1,37 +1,34 @@ - */ - public function call(string $call, array $params, array $pathChunks) : iterable + + /** @return iterable */ + public function call(string $call, array $params, array $pathChunks): iterable { - if ($pathChunks[0] == '') { - if ($pathChunks[1] == 'pets') { - if ($pathChunks[2] == 'kinds') { - if ($pathChunks[3] == 'walking') { - if ($call == 'GET /pets/kinds/walking') { + if ($pathChunks[0] === '') { + if ($pathChunks[1] === 'pets') { + if ($pathChunks[2] === 'kinds') { + if ($pathChunks[3] === 'walking') { + if ($call === 'GET /pets/kinds/walking') { return $this->routers->internal🔀Router🔀Get🔀PetsKinds()->walking($params); } } } } } - throw new \InvalidArgumentException(); + + throw new InvalidArgumentException(); } } diff --git a/tests/app/src/Internal/Router/Get/Pets.php b/tests/app/src/Internal/Router/Get/Pets.php index 8dd8dc7..329d7b8 100644 --- a/tests/app/src/Internal/Router/Get/Pets.php +++ b/tests/app/src/Internal/Router/Get/Pets.php @@ -1,57 +1,63 @@ - */ - public function list(array $params) : iterable + + /** @return iterable */ + public function list(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $operator = new Internal\Operator\Pets\List_($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets()); + return $operator->call($arguments['per_page'], $arguments['page']); } - /** - * @return iterable - */ - public function names(array $params) : iterable + + /** @return iterable */ + public function names(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $operator = new Internal\Operator\Pets\Names($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Names()); + return $operator->call($arguments['per_page'], $arguments['page']); } } diff --git a/tests/app/src/Internal/Router/Get/PetsGroupedBy.php b/tests/app/src/Internal/Router/Get/PetsGroupedBy.php index b143825..cb9ff68 100644 --- a/tests/app/src/Internal/Router/Get/PetsGroupedBy.php +++ b/tests/app/src/Internal/Router/Get/PetsGroupedBy.php @@ -1,38 +1,41 @@ browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀GroupedByType()); + return $operator->call($arguments['per_page'], $arguments['page']); } } diff --git a/tests/app/src/Internal/Router/Get/PetsKinds.php b/tests/app/src/Internal/Router/Get/PetsKinds.php index 7be50ed..f0b65bd 100644 --- a/tests/app/src/Internal/Router/Get/PetsKinds.php +++ b/tests/app/src/Internal/Router/Get/PetsKinds.php @@ -1,38 +1,42 @@ - */ - public function walking(array $params) : iterable + + /** @return iterable */ + public function walking(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $operator = new Internal\Operator\Pets\Kinds\Walking($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Kinds🌀Walking()); + return $operator->call($arguments['per_page'], $arguments['page']); } } diff --git a/tests/app/src/Internal/Router/Get/PetsList.php b/tests/app/src/Internal/Router/Get/PetsList.php index 41767a0..cc3d69a 100644 --- a/tests/app/src/Internal/Router/Get/PetsList.php +++ b/tests/app/src/Internal/Router/Get/PetsList.php @@ -1,38 +1,42 @@ - */ - public function gatos(array $params) : iterable + + /** @return iterable */ + public function gatos(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $operator = new Internal\Operator\Pets\List_\Gatos($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Gatos()); + return $operator->call($arguments['per_page'], $arguments['page']); } } diff --git a/tests/app/src/Internal/Router/Get/Three.php b/tests/app/src/Internal/Router/Get/Three.php index e5ed37d..7f9bf07 100644 --- a/tests/app/src/Internal/Router/Get/Three.php +++ b/tests/app/src/Internal/Router/Get/Three.php @@ -1,47 +1,50 @@ |Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok|iterable|Schema\Cat|Schema\Dog|Schema\Bird|Schema\Fish|Schema\Spider - */ - public function call(string $call, array $params, array $pathChunks) : iterable|\ApiClients\Client\PetStore\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok|\ApiClients\Client\PetStore\Schema\Cat|\ApiClients\Client\PetStore\Schema\Dog|\ApiClients\Client\PetStore\Schema\Bird|\ApiClients\Client\PetStore\Schema\Fish|\ApiClients\Client\PetStore\Schema\Spider + + /** @return iterable|Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok|iterable|Schema\Cat|Schema\Dog|Schema\Bird|Schema\Fish|Schema\Spider */ + public function call(string $call, array $params, array $pathChunks): iterable|Ok|Cat|Dog|Bird|Fish|Spider { - if ($pathChunks[0] == '') { - if ($pathChunks[1] == 'pets') { - if ($pathChunks[2] == 'gatos') { - if ($call == 'GET /pets/gatos') { + if ($pathChunks[0] === '') { + if ($pathChunks[1] === 'pets') { + if ($pathChunks[2] === 'gatos') { + if ($call === 'GET /pets/gatos') { return $this->routers->internal🔀Router🔀Get🔀PetsList()->gatos($params); } - } elseif ($pathChunks[2] == 'groupedByType') { - if ($call == 'GET /pets/groupedByType') { + } elseif ($pathChunks[2] === 'groupedByType') { + if ($call === 'GET /pets/groupedByType') { return $this->routers->internal🔀Router🔀Get🔀PetsGroupedBy()->type($params); } - } elseif ($pathChunks[2] == 'names') { - if ($call == 'GET /pets/names') { + } elseif ($pathChunks[2] === 'names') { + if ($call === 'GET /pets/names') { return $this->routers->internal🔀Router🔀Get🔀Pets()->names($params); } - } elseif ($pathChunks[2] == '{petId}') { - if ($call == 'GET /pets/{petId}') { + } elseif ($pathChunks[2] === '{petId}') { + if ($call === 'GET /pets/{petId}') { return $this->routers->internal🔀Router🔀Get()->showPetById($params); } } } } - throw new \InvalidArgumentException(); + + throw new InvalidArgumentException(); } } diff --git a/tests/app/src/Internal/Router/Get/Two.php b/tests/app/src/Internal/Router/Get/Two.php index d00168e..1372244 100644 --- a/tests/app/src/Internal/Router/Get/Two.php +++ b/tests/app/src/Internal/Router/Get/Two.php @@ -1,33 +1,30 @@ - */ - public function call(string $call, array $params, array $pathChunks) : iterable + + /** @return iterable */ + public function call(string $call, array $params, array $pathChunks): iterable { - if ($pathChunks[0] == '') { - if ($pathChunks[1] == 'pets') { - if ($call == 'GET /pets') { + if ($pathChunks[0] === '') { + if ($pathChunks[1] === 'pets') { + if ($call === 'GET /pets') { return $this->routers->internal🔀Router🔀Get🔀Pets()->list($params); } } } - throw new \InvalidArgumentException(); + + throw new InvalidArgumentException(); } } diff --git a/tests/app/src/Internal/Router/List/Four.php b/tests/app/src/Internal/Router/List/Four.php index 2e39657..6fe13ba 100644 --- a/tests/app/src/Internal/Router/List/Four.php +++ b/tests/app/src/Internal/Router/List/Four.php @@ -1,37 +1,34 @@ - */ - public function call(string $call, array $params, array $pathChunks) : iterable + + /** @return iterable */ + public function call(string $call, array $params, array $pathChunks): iterable { - if ($pathChunks[0] == '') { - if ($pathChunks[1] == 'pets') { - if ($pathChunks[2] == 'kinds') { - if ($pathChunks[3] == 'walking') { - if ($call == 'LIST /pets/kinds/walking') { + if ($pathChunks[0] === '') { + if ($pathChunks[1] === 'pets') { + if ($pathChunks[2] === 'kinds') { + if ($pathChunks[3] === 'walking') { + if ($call === 'LIST /pets/kinds/walking') { return $this->routers->internal🔀Router🔀List🔀PetsKinds()->walkingListing($params); } } } } } - throw new \InvalidArgumentException(); + + throw new InvalidArgumentException(); } } diff --git a/tests/app/src/Internal/Router/List/Pets.php b/tests/app/src/Internal/Router/List/Pets.php index 8853ce8..6daba7b 100644 --- a/tests/app/src/Internal/Router/List/Pets.php +++ b/tests/app/src/Internal/Router/List/Pets.php @@ -1,66 +1,75 @@ - */ - public function listListing(array $params) : iterable + + /** @return iterable */ + public function listListing(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $arguments['page'] = 1; do { $operator = new Internal\Operator\Pets\ListListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets()); - $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + yield from $items; + $arguments['page']++; } while (count($items) > 0); } - /** - * @return iterable - */ - public function namesListing(array $params) : iterable + + /** @return iterable */ + public function namesListing(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $arguments['page'] = 1; do { $operator = new Internal\Operator\Pets\NamesListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Names()); - $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + yield from $items; + $arguments['page']++; } while (count($items) > 0); } diff --git a/tests/app/src/Internal/Router/List/PetsKinds.php b/tests/app/src/Internal/Router/List/PetsKinds.php index 79fc13d..c0baceb 100644 --- a/tests/app/src/Internal/Router/List/PetsKinds.php +++ b/tests/app/src/Internal/Router/List/PetsKinds.php @@ -1,42 +1,48 @@ - */ - public function walkingListing(array $params) : iterable + + /** @return iterable */ + public function walkingListing(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $arguments['page'] = 1; do { $operator = new Internal\Operator\Pets\Kinds\WalkingListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Kinds🌀Walking()); - $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + yield from $items; + $arguments['page']++; } while (count($items) > 0); } diff --git a/tests/app/src/Internal/Router/List/PetsList.php b/tests/app/src/Internal/Router/List/PetsList.php index fb3f9a4..a374d6b 100644 --- a/tests/app/src/Internal/Router/List/PetsList.php +++ b/tests/app/src/Internal/Router/List/PetsList.php @@ -1,42 +1,48 @@ - */ - public function gatosListing(array $params) : iterable + + /** @return iterable */ + public function gatosListing(array $params): iterable { - $arguments = array(); + $arguments = []; if (array_key_exists('per_page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: per_page'); + throw new InvalidArgumentException('Missing mandatory field: per_page'); } + $arguments['per_page'] = $params['per_page']; unset($params['per_page']); if (array_key_exists('page', $params) === false) { - throw new \InvalidArgumentException('Missing mandatory field: page'); + throw new InvalidArgumentException('Missing mandatory field: page'); } + $arguments['page'] = $params['page']; unset($params['page']); $arguments['page'] = 1; do { $operator = new Internal\Operator\Pets\List_\GatosListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets🌀Gatos()); - $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + $items = [...$operator->call($arguments['per_page'], $arguments['page'])]; + yield from $items; + $arguments['page']++; } while (count($items) > 0); } diff --git a/tests/app/src/Internal/Router/List/Three.php b/tests/app/src/Internal/Router/List/Three.php index 05beb59..39ef51d 100644 --- a/tests/app/src/Internal/Router/List/Three.php +++ b/tests/app/src/Internal/Router/List/Three.php @@ -1,39 +1,36 @@ |iterable - */ - public function call(string $call, array $params, array $pathChunks) : iterable + + /** @return iterable|iterable */ + public function call(string $call, array $params, array $pathChunks): iterable { - if ($pathChunks[0] == '') { - if ($pathChunks[1] == 'pets') { - if ($pathChunks[2] == 'gatos') { - if ($call == 'LIST /pets/gatos') { + if ($pathChunks[0] === '') { + if ($pathChunks[1] === 'pets') { + if ($pathChunks[2] === 'gatos') { + if ($call === 'LIST /pets/gatos') { return $this->routers->internal🔀Router🔀List🔀PetsList()->gatosListing($params); } - } elseif ($pathChunks[2] == 'names') { - if ($call == 'LIST /pets/names') { + } elseif ($pathChunks[2] === 'names') { + if ($call === 'LIST /pets/names') { return $this->routers->internal🔀Router🔀List🔀Pets()->namesListing($params); } } } } - throw new \InvalidArgumentException(); + + throw new InvalidArgumentException(); } } diff --git a/tests/app/src/Internal/Router/List/Two.php b/tests/app/src/Internal/Router/List/Two.php index 5fbbb2e..e7f99b0 100644 --- a/tests/app/src/Internal/Router/List/Two.php +++ b/tests/app/src/Internal/Router/List/Two.php @@ -1,33 +1,30 @@ - */ - public function call(string $call, array $params, array $pathChunks) : iterable + + /** @return iterable */ + public function call(string $call, array $params, array $pathChunks): iterable { - if ($pathChunks[0] == '') { - if ($pathChunks[1] == 'pets') { - if ($call == 'LIST /pets') { + if ($pathChunks[0] === '') { + if ($pathChunks[1] === 'pets') { + if ($call === 'LIST /pets') { return $this->routers->internal🔀Router🔀List🔀Pets()->listListing($params); } } } - throw new \InvalidArgumentException(); + + throw new InvalidArgumentException(); } } diff --git a/tests/app/src/Internal/Router/Post/Pets.php b/tests/app/src/Internal/Router/Post/Pets.php index 6e80294..db0f26e 100644 --- a/tests/app/src/Internal/Router/Post/Pets.php +++ b/tests/app/src/Internal/Router/Post/Pets.php @@ -1,27 +1,25 @@ browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Pets()); + return $operator->call($params); } } diff --git a/tests/app/src/Internal/Router/Post/Two.php b/tests/app/src/Internal/Router/Post/Two.php index dba200b..843be52 100644 --- a/tests/app/src/Internal/Router/Post/Two.php +++ b/tests/app/src/Internal/Router/Post/Two.php @@ -1,33 +1,29 @@ routers->internal🔀Router🔀Post🔀Pets()->create($params); } } } - throw new \InvalidArgumentException(); + + throw new InvalidArgumentException(); } } diff --git a/tests/app/src/Internal/Routers.php b/tests/app/src/Internal/Routers.php index 83b01c4..77232c0 100644 --- a/tests/app/src/Internal/Routers.php +++ b/tests/app/src/Internal/Routers.php @@ -1,91 +1,108 @@ internal🔀Router🔀Get🔀Pets instanceof Internal\Router\Get\Pets === false) { - $this->internal🔀Router🔀Get🔀Pets = new Internal\Router\Get\Pets(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀Get🔀Pets = new Internal\Router\Get\Pets(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀Get🔀Pets; } - public function internal🔀Router🔀Get🔀PetsList() : Internal\Router\Get\PetsList + + public function internal🔀Router🔀Get🔀PetsList(): Internal\Router\Get\PetsList { if ($this->internal🔀Router🔀Get🔀PetsList instanceof Internal\Router\Get\PetsList === false) { - $this->internal🔀Router🔀Get🔀PetsList = new Internal\Router\Get\PetsList(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀Get🔀PetsList = new Internal\Router\Get\PetsList(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀Get🔀PetsList; } - public function internal🔀Router🔀Get🔀PetsGroupedBy() : Internal\Router\Get\PetsGroupedBy + + public function internal🔀Router🔀Get🔀PetsGroupedBy(): Internal\Router\Get\PetsGroupedBy { if ($this->internal🔀Router🔀Get🔀PetsGroupedBy instanceof Internal\Router\Get\PetsGroupedBy === false) { - $this->internal🔀Router🔀Get🔀PetsGroupedBy = new Internal\Router\Get\PetsGroupedBy(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀Get🔀PetsGroupedBy = new Internal\Router\Get\PetsGroupedBy(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀Get🔀PetsGroupedBy; } - public function internal🔀Router🔀Get() : Internal\Router\Get + + public function internal🔀Router🔀Get(): Internal\Router\Get { if ($this->internal🔀Router🔀Get instanceof Internal\Router\Get === false) { - $this->internal🔀Router🔀Get = new Internal\Router\Get(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀Get = new Internal\Router\Get(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀Get; } - public function internal🔀Router🔀Get🔀PetsKinds() : Internal\Router\Get\PetsKinds + + public function internal🔀Router🔀Get🔀PetsKinds(): Internal\Router\Get\PetsKinds { if ($this->internal🔀Router🔀Get🔀PetsKinds instanceof Internal\Router\Get\PetsKinds === false) { - $this->internal🔀Router🔀Get🔀PetsKinds = new Internal\Router\Get\PetsKinds(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀Get🔀PetsKinds = new Internal\Router\Get\PetsKinds(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀Get🔀PetsKinds; } - public function internal🔀Router🔀List🔀Pets() : Internal\Router\List\Pets + + public function internal🔀Router🔀List🔀Pets(): Internal\Router\List\Pets { if ($this->internal🔀Router🔀List🔀Pets instanceof Internal\Router\List\Pets === false) { - $this->internal🔀Router🔀List🔀Pets = new Internal\Router\List\Pets(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀List🔀Pets = new Internal\Router\List\Pets(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀List🔀Pets; } - public function internal🔀Router🔀List🔀PetsList() : Internal\Router\List\PetsList + + public function internal🔀Router🔀List🔀PetsList(): Internal\Router\List\PetsList { if ($this->internal🔀Router🔀List🔀PetsList instanceof Internal\Router\List\PetsList === false) { - $this->internal🔀Router🔀List🔀PetsList = new Internal\Router\List\PetsList(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀List🔀PetsList = new Internal\Router\List\PetsList(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀List🔀PetsList; } - public function internal🔀Router🔀List🔀PetsKinds() : Internal\Router\List\PetsKinds + + public function internal🔀Router🔀List🔀PetsKinds(): Internal\Router\List\PetsKinds { if ($this->internal🔀Router🔀List🔀PetsKinds instanceof Internal\Router\List\PetsKinds === false) { - $this->internal🔀Router🔀List🔀PetsKinds = new Internal\Router\List\PetsKinds(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀List🔀PetsKinds = new Internal\Router\List\PetsKinds(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀List🔀PetsKinds; } - public function internal🔀Router🔀Post🔀Pets() : Internal\Router\Post\Pets + + public function internal🔀Router🔀Post🔀Pets(): Internal\Router\Post\Pets { if ($this->internal🔀Router🔀Post🔀Pets instanceof Internal\Router\Post\Pets === false) { - $this->internal🔀Router🔀Post🔀Pets = new Internal\Router\Post\Pets(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + $this->internal🔀Router🔀Post🔀Pets = new Internal\Router\Post\Pets(requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators, browser: $this->browser, authentication: $this->authentication); } + return $this->internal🔀Router🔀Post🔀Pets; } } diff --git a/tests/app/src/Operation/Pets.php b/tests/app/src/Operation/Pets.php index 74fd4f0..d5570c4 100644 --- a/tests/app/src/Operation/Pets.php +++ b/tests/app/src/Operation/Pets.php @@ -1,53 +1,44 @@ - */ - public function list(int $perPage, int $page) : iterable + + /** @return iterable */ + public function list(int $perPage, int $page): iterable { return $this->operators->pets👷List_()->call($perPage, $page); } - /** - * @return iterable - */ - public function listListing(int $perPage, int $page) : iterable + + /** @return iterable */ + public function listListing(int $perPage, int $page): iterable { return $this->operators->pets👷ListListing()->call($perPage, $page); } - /** - * @return \ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody - */ - public function create(array $params) : \ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody + + public function create(array $params): WithoutBody { return $this->operators->pets👷Create()->call($params); } - /** - * @return iterable - */ - public function names(int $perPage, int $page) : iterable + + /** @return iterable */ + public function names(int $perPage, int $page): iterable { return $this->operators->pets👷Names()->call($perPage, $page); } - /** - * @return iterable - */ - public function namesListing(int $perPage, int $page) : iterable + + /** @return iterable */ + public function namesListing(int $perPage, int $page): iterable { return $this->operators->pets👷NamesListing()->call($perPage, $page); } diff --git a/tests/app/src/Operation/PetsGroupedBy.php b/tests/app/src/Operation/PetsGroupedBy.php index a03c06e..1127c0a 100644 --- a/tests/app/src/Operation/PetsGroupedBy.php +++ b/tests/app/src/Operation/PetsGroupedBy.php @@ -1,25 +1,19 @@ operators->pets👷Grouped👷By👷Type()->call($perPage, $page); } diff --git a/tests/app/src/Operation/PetsKinds.php b/tests/app/src/Operation/PetsKinds.php index e100f3a..eff3936 100644 --- a/tests/app/src/Operation/PetsKinds.php +++ b/tests/app/src/Operation/PetsKinds.php @@ -1,32 +1,26 @@ - */ - public function walking(int $perPage, int $page) : iterable + + /** @return iterable */ + public function walking(int $perPage, int $page): iterable { return $this->operators->pets👷Kinds👷Walking()->call($perPage, $page); } - /** - * @return iterable - */ - public function walkingListing(int $perPage, int $page) : iterable + + /** @return iterable */ + public function walkingListing(int $perPage, int $page): iterable { return $this->operators->pets👷Kinds👷WalkingListing()->call($perPage, $page); } diff --git a/tests/app/src/Operation/PetsList.php b/tests/app/src/Operation/PetsList.php index 2094acc..822b732 100644 --- a/tests/app/src/Operation/PetsList.php +++ b/tests/app/src/Operation/PetsList.php @@ -1,32 +1,26 @@ - */ - public function gatos(int $perPage, int $page) : iterable + + /** @return iterable */ + public function gatos(int $perPage, int $page): iterable { return $this->operators->pets👷List_👷Gatos()->call($perPage, $page); } - /** - * @return iterable - */ - public function gatosListing(int $perPage, int $page) : iterable + + /** @return iterable */ + public function gatosListing(int $perPage, int $page): iterable { return $this->operators->pets👷List_👷GatosListing()->call($perPage, $page); } diff --git a/tests/app/src/Operations.php b/tests/app/src/Operations.php index 6be9f6f..a290379 100644 --- a/tests/app/src/Operations.php +++ b/tests/app/src/Operations.php @@ -1,41 +1,42 @@ operators); } - public function petsList() : Operation\PetsList + + public function petsList(): Operation\PetsList { return new Operation\PetsList($this->operators); } - public function petsKinds() : Operation\PetsKinds + + public function petsKinds(): Operation\PetsKinds { return new Operation\PetsKinds($this->operators); } - public function petsGroupedBy() : Operation\PetsGroupedBy + + public function petsGroupedBy(): Operation\PetsGroupedBy { return new Operation\PetsGroupedBy($this->operators); } - /** - * @return Schema\Cat|Schema\Dog|Schema\Bird|Schema\Fish|Schema\Spider - */ - public function showPetById() : \ApiClients\Client\PetStore\Schema\Cat|\ApiClients\Client\PetStore\Schema\Dog|\ApiClients\Client\PetStore\Schema\Bird|\ApiClients\Client\PetStore\Schema\Fish|\ApiClients\Client\PetStore\Schema\Spider + + public function showPetById(): Cat|Dog|Bird|Fish|Spider { return $this->operators->showPetById()->call(); } diff --git a/tests/app/src/OperationsInterface.php b/tests/app/src/OperationsInterface.php index 569628f..2da39bd 100644 --- a/tests/app/src/OperationsInterface.php +++ b/tests/app/src/OperationsInterface.php @@ -1,24 +1,24 @@ printer = new \PhpParser\PrettyPrinter\Standard(); + $this->printer = new Standard(); } - public function getClass() : string + + public function getClass(): string { - return \ApiClients\Client\PetStore\Client::class; + return Client::class; } - public function isMethodSupported(\PHPStan\Reflection\MethodReflection $methodReflection) : bool + + public function isMethodSupported(MethodReflection $methodReflection): bool { return $methodReflection->getName() === 'call'; } - public function getTypeFromMethodCall(\PHPStan\Reflection\MethodReflection $methodReflection, \PhpParser\Node\Expr\MethodCall $methodCall, \PHPStan\Analyser\Scope $scope) : null|\PHPStan\Type\Type + + public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type|null { $args = $methodCall->getArgs(); if (count($args) === 0) { return null; } + $call = substr($this->printer->prettyPrintExpr($args[0]->value), 1, -1); if ($call === 'GET /pets') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'LIST /pets') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'POST /pets') { - return $this->typeResolver->resolve('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve(WithoutBody::class); } + if ($call === 'GET /pets/gatos') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'LIST /pets/gatos') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'GET /pets/kinds/walking') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'LIST /pets/kinds/walking') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'GET /pets/groupedByType') { return $this->typeResolver->resolve('Schema\\Operations\\Pets\\Grouped\\By\\Type\\Response\\ApplicationJson\\Ok'); } + if ($call === 'GET /pets/names') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'LIST /pets/names') { return $this->typeResolver->resolve('iterable'); } + if ($call === 'GET /pets/{petId}') { return $this->typeResolver->resolve('Schema\\Cat|Schema\\Dog|Schema\\Bird|Schema\\Fish|Schema\\Spider'); } + return null; } } diff --git a/tests/app/src/Schema/Bird.php b/tests/app/src/Schema/Bird.php index 5a03f4f..87bf819 100644 --- a/tests/app/src/Schema/Bird.php +++ b/tests/app/src/Schema/Bird.php @@ -1,19 +1,16 @@ $eyes - */ - public function __construct(public string $id, public string $name, public bool $indoor, public Schema\Cat\Features $features, #[\ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Multiple\Schema\Cat\Eyes] public array $eyes) + + /** @param array $eyes */ + public function __construct(public string $id, public string $name, public bool $indoor, public Schema\Cat\Features $features, #[Eyes] + public array $eyes,) { } } diff --git a/tests/app/src/Schema/Cat/Features.php b/tests/app/src/Schema/Cat/Features.php index f4599db..b557ee7 100644 --- a/tests/app/src/Schema/Cat/Features.php +++ b/tests/app/src/Schema/Cat/Features.php @@ -1,24 +1,20 @@ $eyes - */ - public function __construct(public string $id, public string $name, #[\EventSauce\ObjectHydrator\MapFrom('good-boy')] public bool $goodMinBoy, #[\ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Multiple\Schema\Dog\Eyes] public array $eyes) + + /** @param array $eyes */ + public function __construct(public string $id, public string $name, #[MapFrom('good-boy')] + public bool $goodMinBoy, #[Eyes] + public array $eyes,) { } } diff --git a/tests/app/src/Schema/Error.php b/tests/app/src/Schema/Error.php index 25f47fc..062bce6 100644 --- a/tests/app/src/Schema/Error.php +++ b/tests/app/src/Schema/Error.php @@ -1,19 +1,14 @@ $pets - */ - public function __construct(#[\ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Multiple\Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok\Pets] public array $pets) + + /** @param array $pets */ + public function __construct(#[Pets] + public array $pets,) { } } diff --git a/tests/app/src/Schema/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php b/tests/app/src/Schema/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php index 6a69c47..3f0b557 100644 --- a/tests/app/src/Schema/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php +++ b/tests/app/src/Schema/Operations/Pets/Kinds/Walking/Response/ApplicationJson/Ok.php @@ -1,19 +1,14 @@ $eyes - */ - public function __construct(public string $id, public string $name, public array $legs, #[\ApiClients\Client\PetStore\Internal\Attribute\CastUnionToType\Multiple\Schema\Spider\Eyes] public array $eyes) + + /** @param array $eyes */ + public function __construct(public string $id, public string $name, public array $legs, #[Eyes] + public array $eyes,) { } } diff --git a/tests/app/src/Schema/Tails.php b/tests/app/src/Schema/Tails.php index 459318c..6139205 100644 --- a/tests/app/src/Schema/Tails.php +++ b/tests/app/src/Schema/Tails.php @@ -1,19 +1,14 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/pets', \Prophecy\Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\Create::OPERATION_MATCH, (static function (array $data) : array { - return $data; - })(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/pets', Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\Create::OPERATION_MATCH, (static fn (array $data): array => $data)(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); } - /** - * @test - */ - public function operations_httpCode_default_requestContentType_application_json_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_requestContentType_application_json_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/pets', \Prophecy\Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/pets', Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->pets()->create(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); } - /** - * @test - */ - public function call_httpCode_201_requestContentType_application_json_empty() + + #[Test] + public function call_httpCode_201_requestContentType_application_json_empty(): void { - $response = new \React\Http\Message\Response(201, array()); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/pets', \Prophecy\Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\Create::OPERATION_MATCH, (static function (array $data) : array { - return $data; - })(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + $response = new Response(201, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/pets', Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\Create::OPERATION_MATCH, (static fn (array $data): array => $data)(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); } - /** - * @test - */ - public function operations_httpCode_201_requestContentType_application_json_empty() + + #[Test] + public function operations_httpCode_201_requestContentType_application_json_empty(): void { - $response = new \React\Http\Message\Response(201, array()); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/pets', \Prophecy\Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(201, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/pets', Argument::type('array'), json_encode(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->pets()->create(json_decode(Schema\Pets\Create\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); self::assertArrayHasKey('code', $result); self::assertSame(201, $result['code']); diff --git a/tests/app/tests/Internal/Operation/Pets/Grouped/By/TypeTest.php b/tests/app/tests/Internal/Operation/Pets/Grouped/By/TypeTest.php index bc013ee..c032fd6 100644 --- a/tests/app/tests/Internal/Operation/Pets/Grouped/By/TypeTest.php +++ b/tests/app/tests/Internal/Operation/Pets/Grouped/By/TypeTest.php @@ -1,87 +1,91 @@ 'application/json'), json_encode(json_decode(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\Grouped\By\Type::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\Grouped\By\Type::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); } - /** - * @test - */ - public function operations_httpCode_200_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_200_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(200, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Pets\Grouped\By\Type\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->petsGroupedBy()->type(8, 1); } - /** - * @test - */ - public function call_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function call_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\Grouped\By\Type::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\Grouped\By\Type::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/groupedByType?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->petsGroupedBy()->type(8, 1); } } diff --git a/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingListingTest.php b/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingListingTest.php index e43ab64..74fe9fd 100644 --- a/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingListingTest.php +++ b/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingListingTest.php @@ -1,55 +1,60 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\Kinds\WalkingListing::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\Kinds\WalkingListing::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); foreach ($result as $item) { } } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->petsKinds()->walkingListing(8, 1); foreach ($result as $item) { } diff --git a/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingTest.php b/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingTest.php index 54a7dce..f7001ee 100644 --- a/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingTest.php +++ b/tests/app/tests/Internal/Operation/Pets/Kinds/WalkingTest.php @@ -1,53 +1,58 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\Kinds\Walking::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\Kinds\Walking::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/kinds/walking?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->petsKinds()->walking(8, 1); } } diff --git a/tests/app/tests/Internal/Operation/Pets/ListListingTest.php b/tests/app/tests/Internal/Operation/Pets/ListListingTest.php index 22eeed4..b72063b 100644 --- a/tests/app/tests/Internal/Operation/Pets/ListListingTest.php +++ b/tests/app/tests/Internal/Operation/Pets/ListListingTest.php @@ -1,55 +1,60 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\ListListing::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\ListListing::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); foreach ($result as $item) { } } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->pets()->listListing(8, 1); foreach ($result as $item) { } diff --git a/tests/app/tests/Internal/Operation/Pets/List_/GatosListingTest.php b/tests/app/tests/Internal/Operation/Pets/List_/GatosListingTest.php index a100ada..ca91fa3 100644 --- a/tests/app/tests/Internal/Operation/Pets/List_/GatosListingTest.php +++ b/tests/app/tests/Internal/Operation/Pets/List_/GatosListingTest.php @@ -1,55 +1,60 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/gatos?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\List_\GatosListing::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/gatos?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\List_\GatosListing::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); foreach ($result as $item) { } } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/gatos?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/gatos?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->petsList()->gatosListing(8, 1); foreach ($result as $item) { } diff --git a/tests/app/tests/Internal/Operation/Pets/List_/GatosTest.php b/tests/app/tests/Internal/Operation/Pets/List_/GatosTest.php index ff4d3a5..67332d0 100644 --- a/tests/app/tests/Internal/Operation/Pets/List_/GatosTest.php +++ b/tests/app/tests/Internal/Operation/Pets/List_/GatosTest.php @@ -1,53 +1,58 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/gatos?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\List_\Gatos::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/gatos?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\List_\Gatos::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/gatos?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/gatos?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->petsList()->gatos(8, 1); } } diff --git a/tests/app/tests/Internal/Operation/Pets/List_Test.php b/tests/app/tests/Internal/Operation/Pets/List_Test.php index 03ebd92..ebd37d5 100644 --- a/tests/app/tests/Internal/Operation/Pets/List_Test.php +++ b/tests/app/tests/Internal/Operation/Pets/List_Test.php @@ -1,53 +1,58 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\List_::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\List_::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->pets()->list(8, 1); } } diff --git a/tests/app/tests/Internal/Operation/Pets/NamesListingTest.php b/tests/app/tests/Internal/Operation/Pets/NamesListingTest.php index ad41249..b0cd886 100644 --- a/tests/app/tests/Internal/Operation/Pets/NamesListingTest.php +++ b/tests/app/tests/Internal/Operation/Pets/NamesListingTest.php @@ -1,55 +1,60 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/names?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\NamesListing::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/names?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\NamesListing::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); foreach ($result as $item) { } } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/names?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/names?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->pets()->namesListing(8, 1); foreach ($result as $item) { } diff --git a/tests/app/tests/Internal/Operation/Pets/NamesTest.php b/tests/app/tests/Internal/Operation/Pets/NamesTest.php index 97ad505..e3d2ad7 100644 --- a/tests/app/tests/Internal/Operation/Pets/NamesTest.php +++ b/tests/app/tests/Internal/Operation/Pets/NamesTest.php @@ -1,53 +1,58 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/names?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Pets\Names::OPERATION_MATCH, (static function (array $data) : array { + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/names?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Pets\Names::OPERATION_MATCH, (static function (array $data): array { $data['per_page'] = 8; - $data['page'] = 1; + $data['page'] = 1; + return $data; - })(array())); + })([])); } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/names?page=1&per_page=8', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/names?page=1&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->pets()->names(8, 1); } } diff --git a/tests/app/tests/Internal/Operation/ShowPetByIdTest.php b/tests/app/tests/Internal/Operation/ShowPetByIdTest.php index 8b0424d..df8b4a4 100644 --- a/tests/app/tests/Internal/Operation/ShowPetByIdTest.php +++ b/tests/app/tests/Internal/Operation/ShowPetByIdTest.php @@ -1,51 +1,53 @@ 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/{petId}', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\ShowPetById::OPERATION_MATCH, (static function (array $data) : array { - return $data; - })(array())); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/{petId}', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\ShowPetById::OPERATION_MATCH, (static fn (array $data): array => $data)([])); } - /** - * @test - */ - public function operations_httpCode_default_responseContentType_application_json_zero() + + #[Test] + public function operations_httpCode_default_responseContentType_application_json_zero(): void { - $response = new \React\Http\Message\Response(999, array('Content-Type' => 'application/json'), json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(\ApiClients\Contracts\HTTP\Headers\AuthenticationInterface::class); - $auth->authHeader(\Prophecy\Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(\React\Http\Browser::class); - $browser->withBase(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(\Prophecy\Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/pets/{petId}', \Prophecy\Argument::type('array'), \Prophecy\Argument::any())->willReturn(\React\Promise\resolve($response))->shouldBeCalled(); - $client = new \ApiClients\Client\PetStore\Client($auth->reveal(), $browser->reveal()); + $response = new Response(999, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Error::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/pets/{petId}', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->showPetById(); } } diff --git a/tests/app/tests/Types/ClientCallReturnTypes.php b/tests/app/tests/Types/ClientCallReturnTypes.php index d3236cf..2da33d1 100644 --- a/tests/app/tests/Types/ClientCallReturnTypes.php +++ b/tests/app/tests/Types/ClientCallReturnTypes.php @@ -1,31 +1,31 @@ ', $client->call('GET /pets')); -\PHPStan\Testing\assertType('iterable', $client->call('LIST /pets')); -\PHPStan\Testing\assertType('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('POST /pets')); -\PHPStan\Testing\assertType('iterable', $client->call('GET /pets/gatos')); -\PHPStan\Testing\assertType('iterable', $client->call('LIST /pets/gatos')); -\PHPStan\Testing\assertType('iterable', $client->call('GET /pets/kinds/walking')); -\PHPStan\Testing\assertType('iterable', $client->call('LIST /pets/kinds/walking')); -\PHPStan\Testing\assertType('Schema\\Operations\\Pets\\Grouped\\By\\Type\\Response\\ApplicationJson\\Ok', $client->call('GET /pets/groupedByType')); -\PHPStan\Testing\assertType('iterable', $client->call('GET /pets/names')); -\PHPStan\Testing\assertType('iterable', $client->call('LIST /pets/names')); -\PHPStan\Testing\assertType('Schema\\Cat|Schema\\Dog|Schema\\Bird|Schema\\Fish|Schema\\Spider', $client->call('GET /pets/{petId}')); +}, new Browser()); +assertType('iterable', $client->call('GET /pets')); +assertType('iterable', $client->call('LIST /pets')); +assertType(WithoutBody::class, $client->call('POST /pets')); +assertType('iterable', $client->call('GET /pets/gatos')); +assertType('iterable', $client->call('LIST /pets/gatos')); +assertType('iterable', $client->call('GET /pets/kinds/walking')); +assertType('iterable', $client->call('LIST /pets/kinds/walking')); +assertType('Schema\\Operations\\Pets\\Grouped\\By\\Type\\Response\\ApplicationJson\\Ok', $client->call('GET /pets/groupedByType')); +assertType('iterable', $client->call('GET /pets/names')); +assertType('iterable', $client->call('LIST /pets/names')); +assertType('Schema\\Cat|Schema\\Dog|Schema\\Bird|Schema\\Fish|Schema\\Spider', $client->call('GET /pets/{petId}')); diff --git a/tests/unit/GenerateTest.php b/tests/unit/GenerateTest.php index 11d5fac..44c183a 100644 --- a/tests/unit/GenerateTest.php +++ b/tests/unit/GenerateTest.php @@ -8,6 +8,7 @@ use ApiClients\Tools\OpenApiClientGenerator\Generator; use EventSauce\ObjectHydrator\ObjectMapperUsingReflection; use IteratorIterator; +use PHPUnit\Framework\Attributes\Test; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; use Symfony\Component\Yaml\Yaml; @@ -28,16 +29,16 @@ final class GenerateTest extends TestCase { - /** @test */ + #[Test] public function generateAndCompare(): void { $yaml = Yaml::parseFile(dirname(__DIR__) . '/openapi-client-petstore.yaml'); $yaml['destination']['root'] = 'test-app'; - $configuration = (new ObjectMapperUsingReflection())->hydrateObject(Configuration::class, $yaml); - (new Generator( + $configuration = new ObjectMapperUsingReflection()->hydrateObject(Configuration::class, $yaml); + new Generator( $configuration, dirname(dirname(__DIR__) . '/openapi-client-petstore.yaml') . DIRECTORY_SEPARATOR, - ))->generate( + )->generate( $configuration->namespace->source . '\\', $configuration->namespace->test . '\\', dirname(dirname(__DIR__) . '/openapi-client-petstore.yaml') . DIRECTORY_SEPARATOR, diff --git a/tests/unit/Generator/Helper/TypesTest.php b/tests/unit/Generator/Helper/TypesTest.php index 979f367..e012925 100644 --- a/tests/unit/Generator/Helper/TypesTest.php +++ b/tests/unit/Generator/Helper/TypesTest.php @@ -6,13 +6,15 @@ use ApiClients\Tools\OpenApiClientGenerator\Generator; use PhpParser\Node; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use WyriHaximus\TestUtilities\TestCase; use function array_map; final class TypesTest extends TestCase { - private const SCALARS = [ + private const array SCALARS = [ 'string', 'int', 'float', @@ -52,10 +54,9 @@ public function types(): iterable /** * @param array $input * @param array{docBlock: array} $output - * - * @test - * @dataProvider types */ + #[Test] + #[DataProvider('types')] public function normalizeDocBlock(array $input, array $output): void { self::assertEquals( @@ -67,10 +68,9 @@ public function normalizeDocBlock(array $input, array $output): void /** * @param array $input * @param array{raw: array} $output - * - * @test - * @dataProvider types */ + #[Test] + #[DataProvider('types')] public function normalizeRaw(array $input, array $output): void { self::assertEquals( @@ -82,10 +82,9 @@ public function normalizeRaw(array $input, array $output): void /** * @param array $input * @param array{raw: array} $output - * - * @test - * @dataProvider types */ + #[Test] + #[DataProvider('types')] public function normalizeNodeName(array $input, array $output): void { self::assertEquals(