fix(php): drop unused/vulnerable dev tooling from client template - #1236
Merged
Conversation
squizlabs/php_codesniffer ~2.6 only resolves to versions flagged by Composer's security-advisory audit, breaking `composer install` in CI. Neither it nor friendsofphp/php-cs-fixer is invoked anywhere in the PHP client's CI pipeline, and the .php_cs config that would have driven the fixer was already orphaned (wrong filename to be picked up by the generator, and using a Config::create() API removed in php-cs-fixer 3.x). Remove both as dead weight. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
API changelog (oasdiff)Doc-only edits (descriptions, examples) do not appear here. |
jablan
requested review from
Sönke Behrendt (theSoenke)
and
a lite review from Copilot
August 24, 2026 08:56
Contributor
There was a problem hiding this comment.
Pull request overview
Removes unused and security-advisory-flagged PHP dev tooling from the PHP client template so composer install succeeds in CI and generated clients don’t carry dead dev-dependency weight.
Changes:
- Drop
squizlabs/php_codesnifferandfriendsofphp/php-cs-fixerfrom the PHP template’srequire-dev. - Remove the orphaned
.php_csconfig file from the PHP template. - Remove the
.php_csexport-ignore entry from the PHP template.gitattributes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| openapi-generator/templates/php/composer.mustache | Removes unused/vulnerable dev dependencies from generated PHP client composer config. |
| openapi-generator/templates/php/.php_cs | Deletes an orphaned php-cs-fixer config that wasn’t being used/copied. |
| openapi-generator/templates/php/.gitattributes | Removes export-ignore entry for the deleted .php_cs file. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jablan
requested review from
Sven Dunemann (forelabs) and
Łukasz Ciesielski (lookasc)
and removed request for
Sönke Behrendt (theSoenke)
August 24, 2026 09:01
Łukasz Ciesielski (lookasc)
approved these changes
Aug 24, 2026
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.
Summary
phpunitwas failingcomposer installbecausesquizlabs/php_codesniffer: ~2.6only resolves to versions 2.6.0–2.9.2, all flagged by Composer's built-in security-advisory audit (PKSA-rdkp-vv9z-mjkg, PKSA-6vdd-n4sx-knhy). See failing run: https://github.com/phrase/strings-openapi/actions/runs/32706151798/job/97367588315squizlabs/php_codesniffernorfriendsofphp/php-cs-fixeris invoked anywhere in the PHP client's CI pipeline (.github/workflows/test-php.ymlonly runscomposer install+phpunit), so both are dead dev-dependency weight..php_csconfig file that would have drivenphp-cs-fixerwas already orphaned: its filename doesn't match the generator's actual supporting-file name (.php-cs-fixer.dist.php), so it was never copied into the generated client, and it usesPhpCsFixer\Config::create(), a static factory removed in php-cs-fixer 3.x..gitattributesreference fromopenapi-generator/templates/php/composer.mustache.Test plan
phpunitjob on this PR passescomposer install+phpunit