From 45b1bf7499e504991c7a2d69b6233490628e02bf Mon Sep 17 00:00:00 2001 From: Ewa Ostrowska Date: Thu, 12 Mar 2026 10:37:27 +0100 Subject: [PATCH] chore: update phpunit/phpunit 8.5.52 --- .../src/main/resources/php/README.mustache | 2 ++ .../src/main/resources/php/api_test.mustache | 10 +++++----- .../src/main/resources/php/composer.mustache | 2 +- .../src/main/resources/php/model_test.mustache | 10 +++++----- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/php/README.mustache b/modules/swagger-codegen/src/main/resources/php/README.mustache index a444e6c4adc..18bb80f7ce0 100644 --- a/modules/swagger-codegen/src/main/resources/php/README.mustache +++ b/modules/swagger-codegen/src/main/resources/php/README.mustache @@ -59,6 +59,8 @@ composer install ./vendor/bin/phpunit ``` +**Note:** Running tests requires PHP 7.2 or later, while the runtime library supports PHP 5.5 and later. + ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: diff --git a/modules/swagger-codegen/src/main/resources/php/api_test.mustache b/modules/swagger-codegen/src/main/resources/php/api_test.mustache index af93752482d..02acf45678c 100644 --- a/modules/swagger-codegen/src/main/resources/php/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api_test.mustache @@ -30,34 +30,34 @@ use \{{invokerPackage}}\ObjectSerializer; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -{{#operations}}class {{classname}}Test extends \PHPUnit_Framework_TestCase +{{#operations}}class {{classname}}Test extends \PHPUnit\Framework\TestCase { /** * Setup before running any test cases */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { } /** * Setup before running each test case */ - public function setUp() + public function setUp(): void { } /** * Clean up after running each test case */ - public function tearDown() + public function tearDown(): void { } /** * Clean up after running all test cases */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { } {{#operation}} diff --git a/modules/swagger-codegen/src/main/resources/php/composer.mustache b/modules/swagger-codegen/src/main/resources/php/composer.mustache index 5147268142f..6f745a2c80d 100644 --- a/modules/swagger-codegen/src/main/resources/php/composer.mustache +++ b/modules/swagger-codegen/src/main/resources/php/composer.mustache @@ -26,7 +26,7 @@ "guzzlehttp/guzzle": "^6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8", + "phpunit/phpunit": "^8.5.52", "squizlabs/php_codesniffer": "~2.6", "friendsofphp/php-cs-fixer": "~2.12" }, diff --git a/modules/swagger-codegen/src/main/resources/php/model_test.mustache b/modules/swagger-codegen/src/main/resources/php/model_test.mustache index 99064308f5f..059d3f992ae 100644 --- a/modules/swagger-codegen/src/main/resources/php/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/php/model_test.mustache @@ -30,34 +30,34 @@ namespace {{invokerPackage}}; * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ -class {{classname}}Test extends \PHPUnit_Framework_TestCase +class {{classname}}Test extends \PHPUnit\Framework\TestCase { /** * Setup before running any test case */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { } /** * Setup before running each test case */ - public function setUp() + public function setUp(): void { } /** * Clean up after running each test case */ - public function tearDown() + public function tearDown(): void { } /** * Clean up after running all test cases */ - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { }