From 9dd06dd4430384802d60eb5ee09d80517d202e75 Mon Sep 17 00:00:00 2001 From: Mladen Jablanovic Date: Mon, 24 Aug 2026 10:46:35 +0200 Subject: [PATCH] fix(php): drop unused/vulnerable dev tooling from client template 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 --- .../templates/php/.gitattributes | 1 - openapi-generator/templates/php/.php_cs | 23 ------------------- .../templates/php/composer.mustache | 4 +--- 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 openapi-generator/templates/php/.php_cs diff --git a/openapi-generator/templates/php/.gitattributes b/openapi-generator/templates/php/.gitattributes index ad8db7363..321917627 100644 --- a/openapi-generator/templates/php/.gitattributes +++ b/openapi-generator/templates/php/.gitattributes @@ -4,6 +4,5 @@ .gitattributes export-ignore .gitignore export-ignore .openapi-generator-ignore export-ignore -.php_cs export-ignore git_push.sh export-ignore phpunit.xml.dist export-ignore diff --git a/openapi-generator/templates/php/.php_cs b/openapi-generator/templates/php/.php_cs deleted file mode 100644 index 4fbe53ec5..000000000 --- a/openapi-generator/templates/php/.php_cs +++ /dev/null @@ -1,23 +0,0 @@ -setUsingCache(true) - ->setRules([ - '@PSR2' => true, - 'ordered_imports' => true, - 'phpdoc_order' => true, - 'array_syntax' => [ 'syntax' => 'short' ], - 'strict_comparison' => true, - 'strict_param' => true, - 'no_trailing_whitespace' => false, - 'no_trailing_whitespace_in_comment' => false, - 'braces' => false, - 'single_blank_line_at_eof' => false, - 'blank_line_after_namespace' => false, - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->exclude('test') - ->exclude('tests') - ->in(__DIR__) - ); diff --git a/openapi-generator/templates/php/composer.mustache b/openapi-generator/templates/php/composer.mustache index efa407b58..fa82e16f0 100644 --- a/openapi-generator/templates/php/composer.mustache +++ b/openapi-generator/templates/php/composer.mustache @@ -30,9 +30,7 @@ "guzzlehttp/guzzle": "^7.9" }, "require-dev": { - "phpunit/phpunit": "^12.1", - "squizlabs/php_codesniffer": "~2.6", - "friendsofphp/php-cs-fixer": "~2.12" + "phpunit/phpunit": "^12.1" }, "autoload": { "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" }