From 62b176e95ddb8ffc8ab2b0eaf42786925eab6a10 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Mon, 24 Mar 2025 06:59:01 +0100 Subject: [PATCH] feat(php): drop support for EOLed PHP versions and unify min required version (#17826) --- .../src/main/resources/php-dt/README.md.mustache | 2 +- .../src/main/resources/php-dt/composer.json.mustache | 4 ++-- .../src/main/resources/php-flight/composer.mustache | 2 +- .../src/main/resources/php-laravel/composer.mustache | 2 +- .../src/main/resources/php-lumen/composer.mustache | 2 +- .../main/resources/php-mezzio-ph-modern/README.md.mustache | 2 +- .../resources/php-mezzio-ph-modern/composer.json.mustache | 4 ++-- .../src/main/resources/php-mezzio-ph/README.md.mustache | 2 +- .../src/main/resources/php-mezzio-ph/composer.json.mustache | 4 ++-- .../src/main/resources/php-slim4-server/README.mustache | 2 +- .../src/main/resources/php-slim4-server/composer.mustache | 2 +- .../resources/php-slim4-server/github_action.yml.mustache | 2 +- .../main/resources/php-slim4-server/licenseInfo.mustache | 4 ++-- .../src/main/resources/php-symfony/composer.mustache | 2 +- .../src/main/resources/php/ApiException.mustache | 2 +- .../src/main/resources/php/Configuration.mustache | 4 ++-- .../src/main/resources/php/HeaderSelector.mustache | 2 +- .../src/main/resources/php/ModelInterface.mustache | 2 +- .../src/main/resources/php/ObjectSerializer.mustache | 2 +- .../src/main/resources/php/README.mustache | 3 +-- .../openapi-generator/src/main/resources/php/api.mustache | 2 +- .../src/main/resources/php/api_test.mustache | 2 +- .../src/main/resources/php/composer.mustache | 2 +- .../main/resources/php/libraries/psr-18/composer.mustache | 2 +- .../openapi-generator/src/main/resources/php/model.mustache | 2 +- .../src/main/resources/php/model_test.mustache | 2 +- samples/client/petstore/php-dt/README.md | 2 +- samples/client/petstore/php-dt/composer.json | 4 ++-- samples/client/petstore/php/OpenAPIClient-php/README.md | 3 +-- samples/client/petstore/php/OpenAPIClient-php/composer.json | 2 +- .../php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Configuration.php | 4 ++-- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/AdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/DeprecatedObject.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../lib/Model/EnumWithNameAndDescription.php | 2 +- .../lib/Model/FakeBigDecimalMap200Response.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../lib/Model/ObjectWithDeprecatedFields.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 2 +- .../lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../lib/Model/OuterObjectWithEnumProperty.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../php/OpenAPIClient-php/lib/Model/PropertyNameMapping.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SingleRefType.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../Model/TestInlineFreeformAdditionalPropertiesRequest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/php/psr-18/composer.json | 2 +- samples/client/petstore/php/psr-18/composer.lock | 6 +++--- samples/client/petstore/php/psr-18/lib/Configuration.php | 4 ++-- samples/client/petstore/php/psr-18/lib/HeaderSelector.php | 2 +- .../php/psr-18/lib/Model/AdditionalPropertiesClass.php | 2 +- .../petstore/php/psr-18/lib/Model/AllOfWithSingleRef.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Animal.php | 2 +- .../client/petstore/php/psr-18/lib/Model/ApiResponse.php | 2 +- .../php/psr-18/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../petstore/php/psr-18/lib/Model/ArrayOfNumberOnly.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ArrayTest.php | 2 +- .../client/petstore/php/psr-18/lib/Model/Capitalization.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Cat.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Category.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ClassModel.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Client.php | 2 +- .../petstore/php/psr-18/lib/Model/DeprecatedObject.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Dog.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/EnumArrays.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/EnumClass.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/EnumTest.php | 2 +- .../php/psr-18/lib/Model/EnumWithNameAndDescription.php | 2 +- .../php/psr-18/lib/Model/FakeBigDecimalMap200Response.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/File.php | 2 +- .../petstore/php/psr-18/lib/Model/FileSchemaTestClass.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Foo.php | 2 +- .../petstore/php/psr-18/lib/Model/FooGetDefaultResponse.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/FormatTest.php | 2 +- .../petstore/php/psr-18/lib/Model/HasOnlyReadOnly.php | 2 +- .../petstore/php/psr-18/lib/Model/HealthCheckResult.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/MapTest.php | 2 +- .../Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../petstore/php/psr-18/lib/Model/Model200Response.php | 2 +- .../client/petstore/php/psr-18/lib/Model/ModelInterface.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ModelList.php | 2 +- .../client/petstore/php/psr-18/lib/Model/ModelReturn.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Name.php | 2 +- .../client/petstore/php/psr-18/lib/Model/NullableClass.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/NumberOnly.php | 2 +- .../php/psr-18/lib/Model/ObjectWithDeprecatedFields.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Order.php | 2 +- .../client/petstore/php/psr-18/lib/Model/OuterComposite.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/OuterEnum.php | 2 +- .../petstore/php/psr-18/lib/Model/OuterEnumDefaultValue.php | 2 +- .../petstore/php/psr-18/lib/Model/OuterEnumInteger.php | 2 +- .../php/psr-18/lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../php/psr-18/lib/Model/OuterObjectWithEnumProperty.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Pet.php | 2 +- .../petstore/php/psr-18/lib/Model/PropertyNameMapping.php | 2 +- .../client/petstore/php/psr-18/lib/Model/ReadOnlyFirst.php | 2 +- .../client/petstore/php/psr-18/lib/Model/SingleRefType.php | 2 +- .../petstore/php/psr-18/lib/Model/SpecialModelName.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Tag.php | 2 +- .../Model/TestInlineFreeformAdditionalPropertiesRequest.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/User.php | 2 +- samples/client/petstore/php/psr-18/lib/ObjectSerializer.php | 2 +- .../petstore/php-symfony/SymfonyBundle-php/composer.json | 2 +- samples/server/petstore/php-flight/composer.json | 2 +- samples/server/petstore/php-laravel/composer.json | 2 +- samples/server/petstore/php-lumen/lib/composer.json | 2 +- samples/server/petstore/php-mezzio-ph-modern/README.md | 2 +- samples/server/petstore/php-mezzio-ph-modern/composer.json | 4 ++-- samples/server/petstore/php-mezzio-ph/README.md | 2 +- samples/server/petstore/php-mezzio-ph/composer.json | 4 ++-- .../server/petstore/php-slim4/.github/workflows/main.yml | 2 +- samples/server/petstore/php-slim4/README.md | 2 +- samples/server/petstore/php-slim4/composer.json | 2 +- .../server/petstore/php-slim4/lib/Api/AbstractPetApi.php | 3 ++- .../server/petstore/php-slim4/lib/Api/AbstractStoreApi.php | 3 ++- .../server/petstore/php-slim4/lib/Api/AbstractUserApi.php | 3 ++- .../petstore/php-slim4/lib/App/RegisterDependencies.php | 3 ++- .../petstore/php-slim4/lib/App/RegisterMiddlewares.php | 3 ++- .../server/petstore/php-slim4/lib/App/RegisterRoutes.php | 3 ++- .../server/petstore/php-slim4/lib/App/ResponseEmitter.php | 3 ++- .../petstore/php-slim4/lib/Auth/AbstractAuthenticator.php | 3 ++- samples/server/petstore/php-slim4/lib/BaseModel.php | 3 ++- samples/server/petstore/php-slim4/lib/Model/ApiResponse.php | 3 ++- samples/server/petstore/php-slim4/lib/Model/Category.php | 3 ++- samples/server/petstore/php-slim4/lib/Model/Order.php | 3 ++- samples/server/petstore/php-slim4/lib/Model/Pet.php | 3 ++- samples/server/petstore/php-slim4/lib/Model/Tag.php | 3 ++- samples/server/petstore/php-slim4/lib/Model/User.php | 3 ++- samples/server/petstore/php-slim4/public/index.php | 3 ++- samples/server/petstore/php-slim4/tests/BaseModelTest.php | 3 ++- .../petstore/php-symfony/SymfonyBundle-php/composer.json | 2 +- 177 files changed, 206 insertions(+), 191 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache b/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache index 605c5d461c8..7c2a3ef3df2 100644 --- a/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This lightweight extensible client library is [PSR-7](https://www.php-fig.org/psr/psr-7), [PSR-11](https://www.php-fig.org/psr/psr-11), [PSR-17](https://www.php-fig.org/psr/psr-17) and [PSR-18](https://www.php-fig.org/psr/psr-18) complaint and relies on: -- PHP: >=7.4 +- PHP: >=8.1 - [Data Transfer](https://github.com/Articus/DataTransfer): >=0.6 diff --git a/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache b/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache index 6a08a9cb800..8a2c932cf48 100644 --- a/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache +++ b/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache @@ -18,7 +18,7 @@ "version": "{{artifactVersion}}", "type": "library", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "articus/data-transfer": "^0.6", "articus/openapi-generator-common": "^0.3", "articus/openapi-generator-apiclient": "^0.2", @@ -36,4 +36,4 @@ "nyholm/psr7": "^1.8", "symfony/http-client": "^5.4" } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/php-flight/composer.mustache b/modules/openapi-generator/src/main/resources/php-flight/composer.mustache index d922daab923..fdbe33b8e34 100644 --- a/modules/openapi-generator/src/main/resources/php-flight/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-flight/composer.mustache @@ -17,7 +17,7 @@ ], "type": "library", "require": { - "php": "^8.1.0", + "php": "^8.1", "flightphp/core": "^3.5.1", "ext-json": "*" }, diff --git a/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache b/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache index 82bac49894c..0592ec1a424 100644 --- a/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache @@ -24,7 +24,7 @@ } ], "require": { - "php": ">=8.1", + "php": "^8.1", "laravel/framework": "^10.0", "crell/serde": "^1.0" }, diff --git a/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache b/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache index e6835f69222..ea6c3f4a678 100644 --- a/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache @@ -24,7 +24,7 @@ ], "type": "project", "require": { - "php": "^7.2.5", + "php": "^8.1", "laravel/lumen-framework": "^7.2" }, "require-dev": { diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache index fd66369b261..ea26b0bac4a 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=8.0 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.3 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache index aff61e1f25c..f7dd2832b42 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache @@ -18,7 +18,7 @@ "version": "{{artifactVersion}}", "type": "project", "require": { - "php": "^8.0", + "php": "^8.1", "ext-yaml": "^2.2", "mezzio/mezzio": "^3.3", "laminas/laminas-diactoros": "^2.5", @@ -36,4 +36,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache index a8047005901..d0fb8aebf1f 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=7.3 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.2 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache index b7c25a283ce..c4202b14876 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^8.1", "ext-yaml": "^2.0", "mezzio/mezzio": "^3.2", "laminas/laminas-diactoros": "^2.1", @@ -37,4 +37,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache index dd5fb253184..58312402e3e 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache @@ -20,7 +20,7 @@ This server has been generated with [Laminas (Zend) PSR-7 implementation](https: ## Requirements * Web server with URL rewriting -* PHP 7.4 or newer +* PHP 8.1 or newer This package contains `.htaccess` for Apache configuration. If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc. diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache index c2825b4f8d0..75ae6d6dac7 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache @@ -22,7 +22,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "dyorg/slim-token-authentication": "dev-slim4", {{#isGuzzlePsr7}} "guzzlehttp/psr7": "^1.6.1", diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache index d75108d3a36..6709f78fcfa 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache @@ -10,7 +10,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1'] runs-on: ${{ matrix.operating-system }} steps: - name: Checkout diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache index 8a61a5402ff..a2ecb44c36c 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache @@ -2,7 +2,7 @@ {{#appName}} * {{{.}}} {{/appName}} - * PHP version 7.4 + * PHP version 8.1 * * @package {{invokerPackage}} * @author OpenAPI Generator team @@ -20,4 +20,4 @@ * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git - */ \ No newline at end of file + */ diff --git a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache index 3a061043642..c51a6854d9b 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache @@ -24,7 +24,7 @@ } ], "require": { - "php": ">=8.1", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/modules/openapi-generator/src/main/resources/php/ApiException.mustache b/modules/openapi-generator/src/main/resources/php/ApiException.mustache index c5c3995dd54..285839e2ded 100644 --- a/modules/openapi-generator/src/main/resources/php/ApiException.mustache +++ b/modules/openapi-generator/src/main/resources/php/ApiException.mustache @@ -1,7 +1,7 @@ =7.4 +- PHP: >=8.1 - [Data Transfer](https://github.com/Articus/DataTransfer): >=0.6 diff --git a/samples/client/petstore/php-dt/composer.json b/samples/client/petstore/php-dt/composer.json index 63ce6fcc64d..fe01b484dd6 100644 --- a/samples/client/petstore/php-dt/composer.json +++ b/samples/client/petstore/php-dt/composer.json @@ -18,7 +18,7 @@ "version": "1.0.0", "type": "library", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "articus/data-transfer": "^0.6", "articus/openapi-generator-common": "^0.3", "articus/openapi-generator-apiclient": "^0.2", @@ -36,4 +36,4 @@ "nyholm/psr7": "^1.8", "symfony/http-client": "^5.4" } -} \ No newline at end of file +} diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index d6f67751a75..81f5c4bf363 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -7,8 +7,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod ### Requirements -PHP 7.4 and later. -Should also work with PHP 8.0. +PHP 8.1 and later. ### Composer diff --git a/samples/client/petstore/php/OpenAPIClient-php/composer.json b/samples/client/petstore/php/OpenAPIClient-php/composer.json index fa431b54085..f700934f401 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/composer.json +++ b/samples/client/petstore/php/OpenAPIClient-php/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 4d359a63b34..d97d060f866 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -1,7 +1,7 @@ =7.2", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.6.0" } diff --git a/samples/client/petstore/php/psr-18/lib/Configuration.php b/samples/client/petstore/php/psr-18/lib/Configuration.php index 98176a868f2..5a12a331ea8 100644 --- a/samples/client/petstore/php/psr-18/lib/Configuration.php +++ b/samples/client/petstore/php/psr-18/lib/Configuration.php @@ -1,7 +1,7 @@ =8.1", + "php": "^8.1", "laravel/framework": "^10.0", "crell/serde": "^1.0" }, diff --git a/samples/server/petstore/php-lumen/lib/composer.json b/samples/server/petstore/php-lumen/lib/composer.json index 4ef01d3f3ce..646b2235270 100644 --- a/samples/server/petstore/php-lumen/lib/composer.json +++ b/samples/server/petstore/php-lumen/lib/composer.json @@ -21,7 +21,7 @@ ], "type": "project", "require": { - "php": "^7.2.5", + "php": "^8.1", "laravel/lumen-framework": "^7.2" }, "require-dev": { diff --git a/samples/server/petstore/php-mezzio-ph-modern/README.md b/samples/server/petstore/php-mezzio-ph-modern/README.md index fd66369b261..ea26b0bac4a 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/README.md +++ b/samples/server/petstore/php-mezzio-ph-modern/README.md @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=8.0 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.3 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/samples/server/petstore/php-mezzio-ph-modern/composer.json b/samples/server/petstore/php-mezzio-ph-modern/composer.json index c40d77b6e18..56f655eda67 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/composer.json +++ b/samples/server/petstore/php-mezzio-ph-modern/composer.json @@ -18,7 +18,7 @@ "version": "1.0.0", "type": "project", "require": { - "php": "^8.0", + "php": "^8.1", "ext-yaml": "^2.2", "mezzio/mezzio": "^3.3", "laminas/laminas-diactoros": "^2.5", @@ -36,4 +36,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/samples/server/petstore/php-mezzio-ph/README.md b/samples/server/petstore/php-mezzio-ph/README.md index a8047005901..d0fb8aebf1f 100644 --- a/samples/server/petstore/php-mezzio-ph/README.md +++ b/samples/server/petstore/php-mezzio-ph/README.md @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=7.3 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.2 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/samples/server/petstore/php-mezzio-ph/composer.json b/samples/server/petstore/php-mezzio-ph/composer.json index d335e88d260..66a930db32f 100644 --- a/samples/server/petstore/php-mezzio-ph/composer.json +++ b/samples/server/petstore/php-mezzio-ph/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^8.1", "ext-yaml": "^2.0", "mezzio/mezzio": "^3.2", "laminas/laminas-diactoros": "^2.1", @@ -37,4 +37,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/samples/server/petstore/php-slim4/.github/workflows/main.yml b/samples/server/petstore/php-slim4/.github/workflows/main.yml index feda9a5f8f7..92860737863 100644 --- a/samples/server/petstore/php-slim4/.github/workflows/main.yml +++ b/samples/server/petstore/php-slim4/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1'] runs-on: ${{ matrix.operating-system }} steps: - name: Checkout diff --git a/samples/server/petstore/php-slim4/README.md b/samples/server/petstore/php-slim4/README.md index f1d568cc757..08938e454b6 100644 --- a/samples/server/petstore/php-slim4/README.md +++ b/samples/server/petstore/php-slim4/README.md @@ -9,7 +9,7 @@ This server has been generated with [Slim PSR-7](https://github.com/slimphp/Slim ## Requirements * Web server with URL rewriting -* PHP 7.4 or newer +* PHP 8.1 or newer This package contains `.htaccess` for Apache configuration. If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc. diff --git a/samples/server/petstore/php-slim4/composer.json b/samples/server/petstore/php-slim4/composer.json index 2cd44b3ef38..12f60680271 100644 --- a/samples/server/petstore/php-slim4/composer.json +++ b/samples/server/petstore/php-slim4/composer.json @@ -22,7 +22,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "dyorg/slim-token-authentication": "dev-slim4", "monolog/monolog": "^2.4", "neomerx/cors-psr7": "^2.0", diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php index f7d620141c5..4aa9e5b6b7e 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php index 2bac5b6b2ba..093a41836f8 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php index 461df869062..a3d104a0306 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php index 83b8452fad8..bd7550d68ed 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php b/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php index 120d91dede9..d7629a54f38 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php index 9bb34597286..1503d7ff1a6 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php b/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php index 3923fef3153..2faeeafd805 100644 --- a/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php +++ b/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php b/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php index b253a0f84bb..3d01e2694c1 100644 --- a/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php +++ b/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/BaseModel.php b/samples/server/petstore/php-slim4/lib/BaseModel.php index b0040c1a557..0cd93c9fe7d 100644 --- a/samples/server/petstore/php-slim4/lib/BaseModel.php +++ b/samples/server/petstore/php-slim4/lib/BaseModel.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php b/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php index bd0edc18f10..5f276ae63f8 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php +++ b/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Category.php b/samples/server/petstore/php-slim4/lib/Model/Category.php index 584fe5d7d3b..bbeec5bdc2f 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Category.php +++ b/samples/server/petstore/php-slim4/lib/Model/Category.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Order.php b/samples/server/petstore/php-slim4/lib/Model/Order.php index 1422e6efcf4..eec2342062f 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Order.php +++ b/samples/server/petstore/php-slim4/lib/Model/Order.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Pet.php b/samples/server/petstore/php-slim4/lib/Model/Pet.php index f249c10dfac..3bbe551628d 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Pet.php +++ b/samples/server/petstore/php-slim4/lib/Model/Pet.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Tag.php b/samples/server/petstore/php-slim4/lib/Model/Tag.php index 81d7a6e26a6..5d315a9ae39 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Tag.php +++ b/samples/server/petstore/php-slim4/lib/Model/Tag.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/User.php b/samples/server/petstore/php-slim4/lib/Model/User.php index 68494ec67b5..bae01519f9e 100644 --- a/samples/server/petstore/php-slim4/lib/Model/User.php +++ b/samples/server/petstore/php-slim4/lib/Model/User.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/public/index.php b/samples/server/petstore/php-slim4/public/index.php index 1868cac9576..fa9c9777716 100644 --- a/samples/server/petstore/php-slim4/public/index.php +++ b/samples/server/petstore/php-slim4/public/index.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/tests/BaseModelTest.php b/samples/server/petstore/php-slim4/tests/BaseModelTest.php index 33325cc198c..75fb916cb84 100644 --- a/samples/server/petstore/php-slim4/tests/BaseModelTest.php +++ b/samples/server/petstore/php-slim4/tests/BaseModelTest.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json b/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json index fdce9d5c69c..42cd7134c0b 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.1", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*",