diff --git a/composer.json b/composer.json index 9b00044..b823e10 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "symfony/yaml": "^5.2", "wyrihaximus/composer-update-bin-autoload-path": "^1 || ^1.0.1", "wyrihaximus/hydrator": "dev-master", - "league/openapi-psr7-validator": "^0.16" + "league/openapi-psr7-validator": "^0.16", + "react/http": "^1.8" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 004cd50..f42d33a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aedb2808eccc2db66a2cbbe20f66f0a5", + "content-hash": "d5a07c5e8c1457d1f1a0ce7732628e50", "packages": [ { "name": "cebe/php-openapi", @@ -78,32 +78,35 @@ }, { "name": "doctrine/annotations", - "version": "1.13.3", + "version": "1.14.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0" + "reference": "9e034d7a70032d422169f27d8759e8d84abb4f51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/9e034d7a70032d422169f27d8759e8d84abb4f51", + "reference": "9e034d7a70032d422169f27d8759e8d84abb4f51", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", + "doctrine/lexer": "^1 || ^2", "ext-tokenizer": "*", "php": "^7.1 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", "vimeo/psalm": "^4.10" }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, "type": "library", "autoload": { "psr-4": { @@ -145,37 +148,82 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.3" + "source": "https://github.com/doctrine/annotations/tree/1.14.1" + }, + "time": "2022-12-12T12:46:12+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" }, - "time": "2022-07-02T10:48:51+00:00" + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "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/v1.0.0" + }, + "time": "2022-05-02T15:47:09+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "3cf140b81e55d5d640f73367d829db7e3023ef69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/3cf140b81e55d5d640f73367d829db7e3023ef69", + "reference": "3cf140b81e55d5d640f73367d829db7e3023ef69", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -207,7 +255,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.0.0" }, "funding": [ { @@ -223,25 +271,128 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2022-12-11T10:51:23+00:00" + }, + { + "name": "evenement/evenement", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "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/master" + }, + "time": "2017-07-23T21:35:13+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.5.1", + "version": "v3.4.6", "source": { "type": "git", "url": "https://github.com/jawira/case-converter.git", - "reference": "2be05b98dcb743bef60ab6f849145bd3434ed003" + "reference": "2f284c0760ee8085ab463f57275cf1f887fb78ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jawira/case-converter/zipball/2be05b98dcb743bef60ab6f849145bd3434ed003", - "reference": "2be05b98dcb743bef60ab6f849145bd3434ed003", + "url": "https://api.github.com/repos/jawira/case-converter/zipball/2f284c0760ee8085ab463f57275cf1f887fb78ae", + "reference": "2f284c0760ee8085ab463f57275cf1f887fb78ae", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=7.4" + "php": "^7.1 || ^8.0" }, "require-dev": { "behat/behat": "^3.0", @@ -288,9 +439,9 @@ ], "support": { "issues": "https://github.com/jawira/case-converter/issues", - "source": "https://github.com/jawira/case-converter/tree/v3.5.1" + "source": "https://github.com/jawira/case-converter/tree/v3.4.6" }, - "time": "2022-08-14T11:40:18+00:00" + "time": "2021-11-21T19:52:51+00:00" }, { "name": "justinrainbow/json-schema", @@ -441,7 +592,6 @@ }, { "name": "laminas/laminas-stdlib", -<<<<<<< HEAD "version": "3.16.1", "source": { "type": "git", @@ -452,18 +602,6 @@ "type": "zip", "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/f4f773641807c7ccee59b758bfe4ac4ba33ecb17", "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17", -======= - "version": "3.9.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "1df1cc0b9c2b8c7d1e322da1669a576386b5da46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/1df1cc0b9c2b8c7d1e322da1669a576386b5da46", - "reference": "1df1cc0b9c2b8c7d1e322da1669a576386b5da46", ->>>>>>> b9f023e... Responses "shasum": "" }, "require": { @@ -509,11 +647,7 @@ "type": "community_bridge" } ], -<<<<<<< HEAD "time": "2022-12-03T18:48:01+00:00" -======= - "time": "2022-06-08T11:33:13+00:00" ->>>>>>> b9f023e... Responses }, { "name": "league/openapi-psr7-validator", @@ -578,38 +712,36 @@ }, { "name": "league/uri", - "version": "6.8.0", + "version": "6.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" + "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/4147f19b9de3b5af6a258f35d7a0efbbf9963298", + "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298", "shasum": "" }, "require": { "ext-json": "*", "league/uri-interfaces": "^2.3", - "php": "^8.1", - "psr/http-message": "^1.0.1" + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0" }, "conflict": { "league/uri-schemes": "^1.0" }, "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", + "friendsofphp/php-cs-fixer": "^v3.3.2", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", "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" + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", + "psr/http-factory": "^1.0" }, "suggest": { "ext-fileinfo": "Needed to create Data URI from a filepath", @@ -666,7 +798,7 @@ "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" + "source": "https://github.com/thephpleague/uri/tree/6.6.0" }, "funding": [ { @@ -674,7 +806,7 @@ "type": "github" } ], - "time": "2022-09-13T19:58:47+00:00" + "time": "2022-05-28T05:44:35+00:00" }, { "name": "league/uri-interfaces", @@ -805,28 +937,28 @@ }, { "name": "ocramius/code-generator-utils", - "version": "1.6.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/Ocramius/CodeGenerationUtils.git", - "reference": "6c12bc604278932a82138e37aa699ba57a476735" + "reference": "766904643c1b142599d6246342f1b348b40f89b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/CodeGenerationUtils/zipball/6c12bc604278932a82138e37aa699ba57a476735", - "reference": "6c12bc604278932a82138e37aa699ba57a476735", + "url": "https://api.github.com/repos/Ocramius/CodeGenerationUtils/zipball/766904643c1b142599d6246342f1b348b40f89b4", + "reference": "766904643c1b142599d6246342f1b348b40f89b4", "shasum": "" }, "require": { - "nikic/php-parser": "^4.15.2", - "php": "~8.1.0 || ~8.2.0" + "nikic/php-parser": "^4.13.2", + "php": "~8.0.0 || ~8.1.0" }, "require-dev": { - "doctrine/coding-standard": "^10.0.0", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.3", - "roave/infection-static-analysis-plugin": "^1.26.0", - "vimeo/psalm": "^5.0.0" + "doctrine/coding-standard": "^9.0.0", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "^0.16.1", + "roave/infection-static-analysis-plugin": "^1.14.0", + "vimeo/psalm": "^4.18" }, "type": "library", "extra": { @@ -861,7 +993,7 @@ ], "support": { "issues": "https://github.com/Ocramius/CodeGenerationUtils/issues", - "source": "https://github.com/Ocramius/CodeGenerationUtils/tree/1.6.0" + "source": "https://github.com/Ocramius/CodeGenerationUtils/tree/1.4.0" }, "funding": [ { @@ -869,35 +1001,37 @@ "type": "github" } ], - "time": "2022-12-01T14:52:22+00:00" + "time": "2022-01-11T09:52:57+00:00" }, { "name": "ocramius/generated-hydrator", - "version": "4.5.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/Ocramius/GeneratedHydrator.git", - "reference": "9537dff80a2c0d99eee4d45dacf4cb5ddf30f82a" + "reference": "aff251ceebb89406d2434f95b8de180935d48c4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/GeneratedHydrator/zipball/9537dff80a2c0d99eee4d45dacf4cb5ddf30f82a", - "reference": "9537dff80a2c0d99eee4d45dacf4cb5ddf30f82a", + "url": "https://api.github.com/repos/Ocramius/GeneratedHydrator/zipball/aff251ceebb89406d2434f95b8de180935d48c4e", + "reference": "aff251ceebb89406d2434f95b8de180935d48c4e", "shasum": "" }, "require": { - "laminas/laminas-hydrator": "^4.8.0", - "nikic/php-parser": "^4.15.2", - "ocramius/code-generator-utils": "^1.6.0", - "php": "~8.1.0 || ~8.2.0" + "laminas/laminas-hydrator": "^4.2.0", + "nikic/php-parser": "^4.13.2", + "ocramius/code-generator-utils": "^1.3.0", + "php": "~8.0.0 || ~8.1.0" }, "require-dev": { - "doctrine/coding-standard": "^10.0.0", - "phpbench/phpbench": "^1.2.7", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.3", - "roave/infection-static-analysis-plugin": "^1.26.0", - "vimeo/psalm": "^5.0.0" + "doctrine/coding-standard": "^9.0.0", + "laminas/laminas-servicemanager": "^3.8.0", + "laminas/laminas-stdlib": "^3.6.0", + "phpbench/phpbench": "^1.2.3", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "^0.16.1", + "roave/infection-static-analysis-plugin": "^1.14.0", + "vimeo/psalm": "^4.18.1" }, "type": "library", "autoload": { @@ -927,7 +1061,7 @@ ], "support": { "issues": "https://github.com/Ocramius/GeneratedHydrator/issues", - "source": "https://github.com/Ocramius/GeneratedHydrator/tree/4.5.0" + "source": "https://github.com/Ocramius/GeneratedHydrator/tree/4.3.0" }, "funding": [ { @@ -939,7 +1073,7 @@ "type": "tidelift" } ], - "time": "2022-12-01T16:00:51+00:00" + "time": "2022-01-11T10:30:57+00:00" }, { "name": "psr/cache", @@ -1157,6 +1291,740 @@ }, "time": "2018-10-30T17:12:04+00:00" }, + { + "name": "react/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "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" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" + }, + { + "name": "react/dns", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "a5427e7dfa47713e438016905605819d101f238c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/a5427e7dfa47713e438016905605819d101f238c", + "reference": "a5427e7dfa47713e438016905605819d101f238c", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.0 || ^2.7 || ^1.2.1", + "react/promise-timer": "^1.9" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^4.8.35", + "react/async": "^4 || ^3 || ^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "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", + "keywords": [ + "async", + "dns", + "dns-resolver", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.10.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-08T12:22:46+00:00" + }, + { + "name": "react/event-loop", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/187fb56f46d424afb6ec4ad089269c72eec2e137", + "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + }, + "suggest": { + "ext-event": "~1.0 for ExtEventLoop", + "ext-pcntl": "For signal handling support when using the StreamSelectLoop", + "ext-uv": "* for ExtUvLoop" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "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.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-03-17T11:10:22+00:00" + }, + { + "name": "react/http", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/http.git", + "reference": "aa7512ee17258c88466de30f9cb44ec5f9df3ff3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/http/zipball/aa7512ee17258c88466de30f9cb44ec5f9df3ff3", + "reference": "aa7512ee17258c88466de30f9cb44ec5f9df3ff3", + "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/promise-stream": "^1.4", + "react/socket": "^1.12", + "react/stream": "^1.2", + "ringcentral/psr7": "^1.2" + }, + "require-dev": { + "clue/http-proxy-react": "^1.8", + "clue/reactphp-ssh-proxy": "^1.4", + "clue/socks-react": "^1.4", + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/async": "^4 || ^3 || ^2", + "react/promise-timer": "^1.9" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Http\\": "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": "Event-driven, streaming HTTP client and server implementation for ReactPHP", + "keywords": [ + "async", + "client", + "event-driven", + "http", + "http client", + "http server", + "https", + "psr-7", + "reactphp", + "server", + "streaming" + ], + "support": { + "issues": "https://github.com/reactphp/http/issues", + "source": "https://github.com/reactphp/http/tree/v1.8.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-29T12:55:52+00:00" + }, + { + "name": "react/promise", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "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/" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.9.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-02-11T10:27:51+00:00" + }, + { + "name": "react/promise-stream", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise-stream.git", + "reference": "e6d2805e09ad50c4896f65f5e8705fe4ee7731a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise-stream/zipball/e6d2805e09ad50c4896f65f5e8705fe4ee7731a3", + "reference": "e6d2805e09ad50c4896f65f5e8705fe4ee7731a3", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/promise": "^3 || ^2.1 || ^1.2", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\Stream\\": "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": "The missing link between Promise-land and Stream-land for ReactPHP", + "homepage": "https://github.com/reactphp/promise-stream", + "keywords": [ + "Buffer", + "async", + "promise", + "reactphp", + "stream", + "unwrap" + ], + "support": { + "issues": "https://github.com/reactphp/promise-stream/issues", + "source": "https://github.com/reactphp/promise-stream/tree/v1.5.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-09T11:42:18+00:00" + }, + { + "name": "react/promise-timer", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise-timer.git", + "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", + "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/event-loop": "^1.2", + "react/promise": "^3.0 || ^2.7.0 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\Timer\\": "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": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", + "homepage": "https://github.com/reactphp/promise-timer", + "keywords": [ + "async", + "event-loop", + "promise", + "reactphp", + "timeout", + "timer" + ], + "support": { + "issues": "https://github.com/reactphp/promise-timer/issues", + "source": "https://github.com/reactphp/promise-timer/tree/v1.9.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-06-13T13:41:03+00:00" + }, + { + "name": "react/socket", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/socket.git", + "reference": "81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/socket/zipball/81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b", + "reference": "81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.8", + "react/event-loop": "^1.2", + "react/promise": "^3 || ^2.6 || ^1.2.1", + "react/promise-timer": "^1.9", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/async": "^4 || ^3 || ^2", + "react/promise-stream": "^1.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Socket\\": "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, 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/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.12.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-08-25T12:32:25+00:00" + }, + { + "name": "react/stream", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "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": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2021-07-11T12:37:55+00:00" + }, { "name": "respect/stringifier", "version": "0.2.0", @@ -1895,12 +2763,12 @@ "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-hydrator.git", - "reference": "9548bf4685e4b44504af0890262390d775e66063" + "reference": "1a02769dfa26f2e7c196ca1d2fbd82cc580ad394" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-hydrator/zipball/9548bf4685e4b44504af0890262390d775e66063", - "reference": "9548bf4685e4b44504af0890262390d775e66063", + "url": "https://api.github.com/repos/WyriHaximus/php-hydrator/zipball/1a02769dfa26f2e7c196ca1d2fbd82cc580ad394", + "reference": "1a02769dfa26f2e7c196ca1d2fbd82cc580ad394", "shasum": "" }, "require": { @@ -1940,7 +2808,7 @@ "type": "github" } ], - "time": "2022-08-07T12:37:28+00:00" + "time": "2021-11-16T08:00:53+00:00" } ], "packages-dev": [], @@ -1966,5 +2834,5 @@ "platform-overrides": { "php": "8.1.99" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/src/Generator.php b/src/Generator.php index 393eb10..a88103d 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -128,7 +128,7 @@ private function all(string $namespace): iterable } } - yield from (function (array $clients, string $namespace): \Generator { + yield from (function (array $clients, string $namespace, array $schemaClassNameMap): \Generator { foreach ($clients as $operationGroup => $operations) { yield from Client::generate( $operationGroup, @@ -141,8 +141,9 @@ private function all(string $namespace): iterable yield from Clients::generate( $namespace, $clients, + $schemaClassNameMap, ); - })($clients, $namespace); + })($clients, $namespace, $schemaClassNameMap); if (count($this->spec->webhooks ?? []) > 0) { $pathClassNameMapping = []; diff --git a/src/Generator/Clients.php b/src/Generator/Clients.php index fe922a0..992bcca 100644 --- a/src/Generator/Clients.php +++ b/src/Generator/Clients.php @@ -9,10 +9,15 @@ use League\OpenAPIValidation\Schema\Exception\SchemaMismatch; use PhpParser\Builder\Param; use PhpParser\BuilderFactory; +use PhpParser\Comment\Doc; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Stmt\Class_; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; +use React\Http\Browser; +use React\Promise\PromiseInterface; use RingCentral\Psr7\Request; final class Clients @@ -21,17 +26,30 @@ final class Clients * @return iterable * @throws \Jawira\CaseConverter\CaseConverterException */ - public static function generate(string $namespace, array $clients): iterable + public static function generate(string $namespace, array $clients, array $schemaClassNameMap): iterable { $factory = new BuilderFactory(); $stmt = $factory->namespace(rtrim($namespace, '\\')); $class = $factory->class('Client')->makeFinal()->addStmt( + $factory->property('browser')->setType('\\' . Browser::class)->makeReadonly()->makePrivate() + )->addStmt( $factory->property('requestSchemaValidator')->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly()->makePrivate() )->addStmt( $factory->property('responseSchemaValidator')->setType('\League\OpenAPIValidation\Schema\SchemaValidator')->makeReadonly()->makePrivate() )->addStmt( $factory->method('__construct')->makePublic()->addStmt( + new Node\Expr\Assign( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + 'browser' + ), + new Node\Expr\New_( + new Node\Name('\\' . Browser::class), + [] + ), + ) + )->addStmt( new Node\Expr\Assign( new Node\Expr\PropertyFetch( new Node\Expr\Variable('this'), @@ -66,11 +84,33 @@ public static function generate(string $namespace, array $clients): iterable ) ); + $operationCalls = []; + $callReturnTypes = []; foreach ($clients as $operationGroup => $operations) { $cn = str_replace('/', '\\', '\\' . $namespace . 'Operation/' . $operationGroup); + $casedOperationgroup = lcfirst($operationGroup); + foreach ($operations as $operationOperation => $operationDetails) { + $returnType = []; + foreach ($operationDetails['operation']->responses as $spec) { + foreach ($spec->content as $contentTypeSchema) { + $callReturnTypes[] = $returnType[] = '\\' . $namespace . 'Schema\\' . $schemaClassNameMap[spl_object_hash($contentTypeSchema->schema)]; + } + } + $operationCalls[] = [ + 'operationGroupMethod' => $casedOperationgroup, + 'operationMethod' => lcfirst($operationOperation), + 'className' => str_replace('/', '\\', '\\' . $namespace . 'Operation\\' . $operationDetails['class']), + 'params' => iterator_to_array((function (array $operationDetails): iterable { + foreach ($operationDetails['operation']->parameters as $parameter) { + yield $parameter->name; + } + })($operationDetails)), + 'returnType' => $returnType, + ]; + } $class->addStmt( - $factory->method(lcfirst($operationGroup))->setReturnType($cn)->addStmt( + $factory->method($casedOperationgroup)->setReturnType($cn)->addStmt( new Node\Stmt\Return_( new Node\Expr\New_( new Node\Name( @@ -92,6 +132,77 @@ public static function generate(string $namespace, array $clients): iterable ); } + $class->addStmt( + $factory->method('call')->makePublic()->setDocComment( + new Doc(implode(PHP_EOL, [ + '/**', + ' * @return \\' . PromiseInterface::class . '<' . implode('|', array_unique($callReturnTypes)) . '>', + ' */', + ])) + )->addParam((new Param('call'))->setType('string'))->addParam((new Param('params'))->setType('array')->setDefault([]))->addStmt(new Node\Stmt\Switch_( + new Node\Expr\Variable('call'), + iterator_to_array((function (iterable $operationCalls) use ($factory): iterable { + foreach ($operationCalls as $operationCall) { + yield new Node\Stmt\Case_( + new Node\Expr\ClassConstFetch(new Node\Name($operationCall['className']), 'OPERATION_MATCH'), + [ + new Node\Stmt\Expression(new Node\Expr\Assign( + new Node\Expr\Variable('operation'), + new Node\Expr\MethodCall( + new Node\Expr\MethodCall( + new Node\Expr\Variable('this'), + $operationCall['operationGroupMethod'], + [], + ), + $operationCall['operationMethod'], + iterator_to_array((function (array $params): iterable { + foreach ($params as $param) { + yield new Arg(new Node\Expr\ArrayDimFetch(new Node\Expr\Variable(new Node\Name('params')), new Node\Scalar\String_($param))); + } + })($operationCall['params'])), + ) + )), + new Node\Stmt\Expression(new Node\Expr\Assign(new Node\Expr\Variable('request'), new Node\Expr\MethodCall(new Node\Expr\Variable('operation'), 'createRequest', []))), + new Node\Stmt\Return_(new Node\Expr\MethodCall( + new Node\Expr\MethodCall( + new Node\Expr\PropertyFetch( + new Node\Expr\Variable('this'), + 'browser' + ), + 'request', + [ + new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\Variable('request'), 'getMethod'),), + new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\Variable('request'), 'getUri'),), + new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\Variable('request'), 'getHeaders'),), + new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\Variable('request'), 'getBody'),), + ] + ), + 'then', + [ + new Arg(new Node\Expr\Closure([ + 'stmts' => [ + new Node\Stmt\Return_(new Node\Expr\MethodCall(new Node\Expr\Variable('operation'), 'createResponse', [ + new Node\Expr\Variable('response') + ])), + ], + 'params' => [ + new Node\Param(new Node\Expr\Variable('response'), null, new Node\Name('\\' . ResponseInterface::class)) + ], + 'uses' => [ + new Node\Expr\Variable('operation'), + ], + 'returnType' => count($operationCall['returnType']) > 0 ? new Node\UnionType(array_map(static fn (string $object): Node\Name => new Node\Name($object), array_unique($operationCall['returnType']))) : null, + ])) + ] + )), + new Node\Stmt\Break_(), + ] + ); +// yield new Node\Stmt\Echo_([new Node\Scalar\String_('/**' . @var_export($operationCall, true) . '*/')]); + } + })($operationCalls)) + )) + ); yield new File($namespace . '\\' . 'Client', $stmt->addStmt($class)->getNode()); } diff --git a/src/Generator/Operation.php b/src/Generator/Operation.php index 3b57ada..b3f1be5 100644 --- a/src/Generator/Operation.php +++ b/src/Generator/Operation.php @@ -42,6 +42,18 @@ public static function generate(string $path, string $method, string $namespace, ], Class_::MODIFIER_PRIVATE ) + )->addStmt( + new Node\Stmt\ClassConst( + [ + new Node\Const_( + 'OPERATION_MATCH', + new Node\Scalar\String_( + strtoupper($method) . ' ' . $path, // Deal with the query + ) + ), + ], + Class_::MODIFIER_PUBLIC + ) )->addStmt( $factory->method('operationId')->makePublic()->setReturnType('string')->addStmt( new Node\Stmt\Return_( @@ -218,11 +230,9 @@ public static function generate(string $path, string $method, string $namespace, new Node\Arg(new Node\Expr\Variable('body')), ] )), -// new Node\Stmt\Break_() ] ); $contentTypeCases[] = $ctc; -// $ctc->setDocComment(new Doc('/**' . @var_export($contentTypeSchema->getSerializableData(), true) . '**/')); } $case = new Node\Stmt\Case_( new Node\Scalar\LNumber($code), @@ -236,7 +246,6 @@ public static function generate(string $path, string $method, string $namespace, ); $cases[] = $case; $case->setDocComment(new Doc('/**' . $spec->description . '**/')); -// $case->setDocComment(new Doc('/**' . @var_export($spec->getSerializableData(), true) . '**/')); } $class->addStmt( $factory->method('createResponse')->addParam(