From c298c22f9999057e38ccd09d0dc0945bfa3ea524 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Sat, 3 Oct 2026 22:59:20 +0200 Subject: [PATCH] chore(deps): upgrade swagger-php to v6 --- app/Console/Commands/Generate/OpenApi.php | 13 +-- composer.json | 2 +- composer.lock | 97 ++++++++++++++++++----- vet.json | 8 +- 4 files changed, 91 insertions(+), 29 deletions(-) diff --git a/app/Console/Commands/Generate/OpenApi.php b/app/Console/Commands/Generate/OpenApi.php index d1e018b0c4..64d83e1bf9 100644 --- a/app/Console/Commands/Generate/OpenApi.php +++ b/app/Console/Commands/Generate/OpenApi.php @@ -17,7 +17,8 @@ class OpenApi extends Command // Generate OpenAPI documentation echo "Generating OpenAPI documentation.\n"; // https://github.com/OAI/OpenAPI-Specification/releases - $process = Process::run([ + // swagger-php 6 leaves PHP warnings to PHP itself; with Xdebug each one carries a stack trace and exhausts memory. + $process = Process::env(['XDEBUG_MODE' => 'off'])->run([ './vendor/bin/openapi', 'app', // Server transfer endpoints are development-only (isDev()), so they stay out of the public docs. @@ -28,11 +29,11 @@ class OpenApi extends Command '--version', '3.1.0', ]); - $error = $process->errorOutput(); - $error = preg_replace('/^.*an object literal,.*$/m', '', $error); - $error = preg_replace('/^\h*\v+/m', '', $error); - echo $error; - echo $process->output(); + foreach ([$process->errorOutput(), $process->output()] as $output) { + $output = preg_replace('/^.*an object literal,.*$/m', '', $output); + $output = preg_replace('/^\h*\v+/m', '', $output); + echo $output; + } $yaml = file_get_contents('openapi.yaml'); diff --git a/composer.json b/composer.json index 63607eb98b..7e92f92cb3 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,7 @@ "symfony/yaml": "^8.1.8", "visus/cuid2": "^7.0.0", "yosymfony/toml": "^1.0.4", - "zircote/swagger-php": "^5.8.3" + "zircote/swagger-php": "^6.11.0" }, "require-dev": { "driftingly/rector-laravel": "^2.6.2", diff --git a/composer.lock b/composer.lock index 43ded925a9..43835e7622 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": "5a92d3a9cc7cdaa3fc2598841619ec11", + "content-hash": "664589c32e86e8e6fc2a0fb17feab410", "packages": [ { "name": "aws/aws-crt-php", @@ -6184,6 +6184,68 @@ }, "time": "2026-08-07T12:47:11+00:00" }, + { + "name": "radebatz/type-info-extras", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/DerManoMann/type-info-extras.git", + "reference": "2d9f01d60d642f890d9f170c0d8fde1f75ab17fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DerManoMann/type-info-extras/zipball/2d9f01d60d642f890d9f170c0d8fde1f75ab17fb", + "reference": "2d9f01d60d642f890d9f170c0d8fde1f75ab17fb", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "phpstan/phpdoc-parser": "^2.0", + "symfony/type-info": "^7.3.8 || ^7.4.1 || ^8.0 || ^8.1-@dev" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.70", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Radebatz\\TypeInfoExtras\\": "src" + }, + "exclude-from-classmap": [ + "/tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Martin Rademacher", + "email": "mano@radebatz.org" + } + ], + "description": "Extras for symfony/type-info", + "homepage": "http://radebatz.net/mano/", + "keywords": [ + "component", + "symfony", + "type-info", + "types" + ], + "support": { + "issues": "https://github.com/DerManoMann/type-info-extras/issues", + "source": "https://github.com/DerManoMann/type-info-extras/tree/1.0.9" + }, + "time": "2026-09-29T22:04:31+00:00" + }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -12570,24 +12632,25 @@ }, { "name": "zircote/swagger-php", - "version": "5.8.3", + "version": "6.11.0", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "098223019f764a16715f64089a58606096719c98" + "reference": "f998f7e712658fba61f86fccbdcf8e301a982175" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/098223019f764a16715f64089a58606096719c98", - "reference": "098223019f764a16715f64089a58606096719c98", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/f998f7e712658fba61f86fccbdcf8e301a982175", + "reference": "f998f7e712658fba61f86fccbdcf8e301a982175", "shasum": "" }, "require": { - "ext-json": "*", "nikic/php-parser": "^4.19 || ^5.0", - "php": ">=7.4", + "php": ">=8.2", "phpstan/phpdoc-parser": "^2.0", "psr/log": "^1.1 || ^2.0 || ^3.0", + "radebatz/type-info-extras": "^1.0.2", + "symfony/console": "^6.4 || ^7.0 || ^8.0", "symfony/deprecation-contracts": "^2 || ^3", "symfony/finder": "^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/yaml": "^5.4 || ^6.0 || ^7.0 || ^8.0" @@ -12596,17 +12659,11 @@ "symfony/process": ">=6, <6.4.14" }, "require-dev": { - "composer/package-versions-deprecated": "^1.11", "doctrine/annotations": "^2.0", - "friendsofphp/php-cs-fixer": "^3.62.0", - "phpstan/phpstan": "^1.6 || ^2.0", - "phpunit/phpunit": "^9.0", - "rector/rector": "^1.0 || ^2.3.1", - "vimeo/psalm": "^4.30 || ^5.0" - }, - "suggest": { - "doctrine/annotations": "^2.0", - "radebatz/type-info-extras": "^1.0.2" + "friendsofphp/php-cs-fixer": "3.95.23", + "phpstan/phpstan": "2.2.12", + "phpunit/phpunit": "^11.5 || >=12.5.22", + "rector/rector": "2.6.5" }, "bin": [ "bin/openapi" @@ -12614,7 +12671,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.x-dev" + "dev-master": "6.x-dev" } }, "autoload": { @@ -12652,7 +12709,7 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/5.8.3" + "source": "https://github.com/zircote/swagger-php/tree/6.11.0" }, "funding": [ { @@ -12660,7 +12717,7 @@ "type": "github" } ], - "time": "2026-03-02T00:47:18+00:00" + "time": "2026-09-26T07:11:30+00:00" } ], "packages-dev": [ diff --git a/vet.json b/vet.json index c697711495..a6e2e321e4 100644 --- a/vet.json +++ b/vet.json @@ -348,6 +348,10 @@ "version": "7.3.0", "hash": "tree-v2:c7713b62c33d0f6504f5226e33be144a1255125ec013abfe5ee06fa619c4a340" }, + "radebatz/type-info-extras": { + "version": "1.0.9", + "hash": "tree-v2:8922f01f69a848e5332fe1e16033223e9afd552039df344b851fd2e2644488ca" + }, "ralouphie/getallheaders": { "version": "3.0.3", "hash": "tree-v2:db666a4e690725b904b5de22a95b230e08ba09f45559a03b32ffb933b0abb75f" @@ -689,8 +693,8 @@ "hash": "tree-v2:06d6d20af34021a04bb906b2f8b28a82dc986db7e17234bbae7074b1235e7119" }, "zircote/swagger-php": { - "version": "5.8.3", - "hash": "tree-v2:82ab08143346378ab92441f4372cb4ff75439fc9164d53dc79e155d03d12d5a8" + "version": "6.11.0", + "hash": "tree-v2:d6535e60c5f64c53eba5cfe4f8729ae437b0007f2a0d67d2a2daeae3bf01f79f" } }, "require-dev": {