openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[php] PHP 8.0 end of life

Open ybelenko opened this issue 2 years ago • 1 comments

Here we go again PHP 8.0 reached end of life at 26 Nov 2023

End of life - A release that is no longer supported. Users of this release should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities.

PHP: Supported Versions:

  • ~8.0 until 26 Nov 2023~
  • 8.1 until 26 Nov 2024
  • 8.2 until 8 Dec 2025

It seems that we need to change minimum PHP version to php: ^8.1 in all php generators. We should not only change composer requirement, but check with extra caution that Composer actually can resolve all the deps under PHP 8.1. In other words check that generator builds and actually works.

Current Requirements:

Generator PHP version
php client ^7.4 || ^8.0
Laravel server >= 7.2.5
Lumen server >= 7.2.5
Slim4 server ^7.4 || ^8.0
Symfony server >=7.4.0|>=8.0.2
php-mezzio-ph server ^ 7.3 || ^8.0
php-mezzio-ph-modern server ^8.0
php-dt client ^7.3 || ^8.0
php-dt-modern client ^8.0

cc @jebentier @dkarlovi @mandrean @jfastnacht @renepardon cc @Articus as author of php-mezzio-ph, php-mezzio-ph-modern, php-dt client, php-dt-modern client

ybelenko avatar Jan 02 '24 06:01 ybelenko

Done on Symfony server : https://github.com/OpenAPITools/openapi-generator/pull/18357

loicconan avatar Jun 20 '24 09:06 loicconan

Is this issue still open? I need to generate a client library with PHP ^8.1 and I'm getting on composer version ^7.4 || ^8.0. I'm using the docker version of the generator V 7.12.0

ninniks avatar Mar 04 '25 10:03 ninniks

@ninniks ^8.0 should match any minor version: 8.0, 8.1, 8.2, etc.

jtreminio avatar Mar 14 '25 16:03 jtreminio

one way is to use customized templates, e.g. -t via CLI to completely remove 7.x support.

wing328 avatar Mar 14 '25 16:03 wing328