From a0b69e0cde6ce2fde9e0b4daba0677dbdfbfe74e Mon Sep 17 00:00:00 2001 From: Oleksii Prudkyi Date: Sat, 23 Apr 2022 01:03:49 +0300 Subject: [PATCH] [php] support guzzlehttp/guzzle ^7.0 --- src/main/resources/handlebars/php/api.mustache | 4 ++-- src/main/resources/handlebars/php/composer.mustache | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/handlebars/php/api.mustache b/src/main/resources/handlebars/php/api.mustache index 0b1cfddc1f..428a38677e 100644 --- a/src/main/resources/handlebars/php/api.mustache +++ b/src/main/resources/handlebars/php/api.mustache @@ -448,7 +448,7 @@ use {{invokerPackage}}\ObjectSerializer; } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -491,7 +491,7 @@ use {{invokerPackage}}\ObjectSerializer; $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( '{{httpMethod}}', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/main/resources/handlebars/php/composer.mustache b/src/main/resources/handlebars/php/composer.mustache index 0a7732fafe..0408255dab 100644 --- a/src/main/resources/handlebars/php/composer.mustache +++ b/src/main/resources/handlebars/php/composer.mustache @@ -23,7 +23,7 @@ "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "guzzlehttp/guzzle": "^6.2" + "guzzlehttp/guzzle": "^6.2|^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8",