feat!: PHP client requires PHP >=7.2.5 and Guzzle ^7.4 - #12768
Open
ewaostrowska wants to merge 2 commits into
Open
ewaostrowska wants to merge 2 commits into
ewaostrowska wants to merge 2 commits into
Conversation
ewaostrowska
force-pushed
the
fix-ci
branch
from
September 29, 2026 08:29
4da4410 to
43dc2a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: PHP client now requires PHP >=7.2.5 and Guzzle ^7.4
Breaking change for users
Regenerating a PHP client with this version produces a
composer.jsonwith new minimum requirements:php>=5.5>=7.2.5guzzlehttp/guzzle^6.2^7.4squizlabs/php_codesniffer(dev)~2.6^3.0Who is affected
Anyone who regenerates a PHP client (
-l php) with this version of Swagger Codegen. Clients that were already generated are not affected until they are regenerated.What can break
composer installrefuses to install the regenerated client. The PHP runtime must be upgraded first.guzzlehttp/guzzle ^6(directly or through another package) cannot install a client that requires^7.4.Configuration/Apiclasses,ClientInterfacefakes in tests),php_codesniffer2.x may need updates for 3.x.Migration
guzzlehttp/guzzleto^7.4in the consuming application.composer update.Users who must stay on PHP < 7.2.5 or Guzzle 6 should keep using their already generated client, or pin the previous Swagger Codegen version.
What changed
php/composer.mustache: PHP>=7.2.5, Guzzle^7.4, codesniffer^3.0.php-symfony/composer.mustache: codesniffer^3.0. The PHP constraint is unchanged because this generator does not use Guzzle.The generator Java code and the
api.mustachetemplate are unchanged. The deprecated Guzzle helpers used there (\GuzzleHttp\json_encode,Psr7\try_fopen) still work in Guzzle 7 and are not part of this change.Why
CI for the PHP samples needs current dependencies. Guzzle 6 and codesniffer 2.x are unmaintained, and Guzzle 7 is the supported line. Guzzle 7 requires PHP >=7.2.5, so the
phpconstraint is raised to match. Otherwise the constraint would be wrong.