Tool category

PHP fixers and refactoring

Tools that automatically correct coding-standard violations, upgrade PHP syntax, or refactor existing code.

Tools in this category

6 tools. Editor picks appear first; review the requirements and trade-offs of each tool.

Fixers and refactoring

PHP CS Fixer

Active

A tool to automatically fix PHP Coding Standards issues

  • PHP
  • Static Analysis
Type
Fixer
PHP
^7.4 || ^8.0
License
MIT
Install
composer require --dev friendsofphp/php-cs-fixer
Stars
13,579
Latest
v3.95.30
Last commit
Last release
Quick pros & cons for PHP CS Fixer

ProOffers a broad catalog of automatic coding-standard fixes.

ConBroad rule changes can create large review diffs.

Editorially reviewed

Fixers and refactoring

Rector

Active

Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

  • PHP
Type
Fixer
PHP
^7.4|^8.0
License
MIT
Install
composer require --dev rector/rector
Stars
10,509
Latest
2.8.5
Last commit
Last release
Quick pros & cons for Rector

ProAutomates PHP upgrades and repeatable AST refactoring.

ConGenerated refactors still require tests and code review.

Editorially reviewed

Fixers and refactoring

Laravel Pint

Active

Laravel projects that want a low-configuration formatter with framework-oriented defaults.

  • Code Quality
  • Laravel
  • PHP
Type
Fixer
PHP
^8.2.0
License
MIT
Pricing
Free and open source
Install
composer require laravel/pint --dev
Stars
3,175
Latest
v1.32.3
Last commit
Last release
Quick pros & cons for Laravel Pint

ProProvides Laravel-oriented formatting defaults with minimal configuration.

ConIts opinionated defaults offer less control than configuring PHP-CS-Fixer directly.

Editorially reviewed

Fixers and refactoring

Phpactor

Active

Mainly a PHP Language Server with more features than you can shake a stick at

  • PHP
Type
Extension
PHP
^8.2
License
MIT
Install
composer require --dev phpactor/phpactor
Stars
1,934
Latest
2026.10.07.0
Last commit
Last release
Quick pros & cons for Phpactor

ProCombines a PHP language server with refactoring tools.

ConIts editor-focused setup can feel heavy for CI-only use.

Editorially reviewed

Fixers and refactoring

php-scoper

Active

🔨 Prefixes all PHP namespaces in a file/directory to isolate the code bundled in PHARs.

  • PHP
Type
Fixer
PHP
^8.2
License
MIT
Install
composer require --dev humbug/php-scoper
Stars
812
Latest
0.18.20
Last commit
Last release
Quick pros & cons for php-scoper

ProIsolates bundled PHP code by prefixing namespaces.

ConDynamic names and bundled resources still need testing.

Editorially reviewed

Fixers and refactoring

PHP Weaver

Inactive

A combined runtime/static code-analysis tool, that can trace parameter types

Type
Analyzer
License
MIT
Stars
85
Latest
-
Last commit
Last release
Unknown
Quick pros & cons for PHP Weaver

ProCombines runtime traces with static type information.

ConRuntime traces only cover executed paths.

Editorially reviewed