# DressCode > PHP code style checker and fixer that also upgrades code to newer PHP and new library versions in the same run. - [DressCode: PHP Code Style Checker, Fixer and Code Upgrader](https://dresscode.run/en/): PHP code style checker and fixer that also upgrades your code to newer PHP and new library versions in the same run. PER Coding Style, PSR-12, Nette, Symfony. - [Getting Started: Install DressCode and Check Your PHP Code](https://dresscode.run/en/getting-started): Install DressCode, the PHP code style checker and fixer, then check your code and preview the fix and a PHP upgrade, all without changing a file. - [Adopt a PHP Coding Standard Step by Step](https://dresscode.run/en/php-code-style): Adopt a PHP coding standard in an existing project: DressCode measures your code style, keeps the first fix small, and CI keeps it that way. - [Generate a PHP Code Style Configuration from Your Code](https://dresscode.run/en/generate-configuration): dresscode init measures your PHP code and writes a made-to-measure dresscode.neon: the nearest coding standard, the values your code follows, and a small first fix. - [Configure Your PHP Code Style: dresscode.neon](https://dresscode.run/en/configuration): Configure the DressCode PHP code style fixer: each key in dresscode.neon names a thing in your code and its value says how it is written. Standards, sets, overrides and paths. - [PHP Coding Standards: PER Coding Style, PSR-12, Nette, Symfony and Laravel](https://dresscode.run/en/php-coding-standards): Exactly what the PSR-12, PER Coding Style 3.1, Nette, Symfony and Laravel coding standards and the DressCode sets decide, each preset as its whole file. - [Ignore a PHP Code Style Finding or Add a Baseline](https://dresscode.run/en/suppressions-and-baseline): Sometimes code has a good reason to break a decision, and sometimes you cannot fix a finding today. For the first case, a suppression silences the decision on a line, in a block, in a file or for a whole path, and stops its fix too. For the second, a baseline lets you turn the decision on now, even… - [All PHP Code Style Rules of DressCode](https://dresscode.run/en/decisions): Every PHP code style rule of DressCode as a decision, with values and examples: braces, blank lines, spacing, imports, naming, PHPDoc and code upgrades. - [PHP Functions in Namespaces: Certain Names and Faster Calls](https://dresscode.run/en/php-functions-in-namespaces): An unqualified strlen() inside a namespace can mean two different functions, and the code does not tell you which one. So for a whole range of fixes, PHP code style tools have to guess, and PHP itself cannot take the shortcuts that make such a call two to three times faster. Usually one line of… - [PHPStan Types for Safer PHP Code Fixes and Upgrades](https://dresscode.run/en/phpstan-types): With PHPStan in your project, DressCode knows the types of your code: it rewrites deprecated library API, adds #[\Override] and spots class names in strings. One line of configuration. - [Upgrade Your PHP Code and Libraries Step by Step](https://dresscode.run/en/upgrade): How much work does it take to move to a newer Nette, Symfony, Laravel or PHP? DressCode measures it, makes a plan and carries it out with Composer and your tests. - [Upgrade PHP Code from 8.0 to 8.6 Automatically](https://dresscode.run/en/upgrading-php): DressCode rewrites PHP code from 8.0 up to 8.6 to the syntax of each newer version and formats it in the same run. Pipe operator, array_any(), match, clamp() and more. - [Upgrade Your Code to PHP 8.6 Automatically](https://dresscode.run/en/upgrade-to-php-8-6): Upgrade to PHP 8.6 before it is released: DressCode rewrites your code to clamp() and partial function application, and fixes or reports what PHP 8.6 deprecated. - [Upgrade Your Code to PHP 8.5 Automatically](https://dresscode.run/en/upgrade-to-php-8-5): Upgrade to PHP 8.5: DressCode rewrites your code to the pipe operator, array_last() and clone() with properties, and fixes or reports what PHP 8.5 deprecated. - [Upgrade Your Code to PHP 8.4 Automatically](https://dresscode.run/en/upgrade-to-php-8-4): PHP 8.4 migration: DressCode rewrites code to array_find(), array_any() and RoundingMode, and fixes or reports PHP 8.4 deprecations such as int $x = null. - [Upgrade Nette Code Automatically](https://dresscode.run/en/upgrading-nette): Upgrade Nette automatically: dresscode/upgrade-nette holds more than 900 renames and changed calls since Nette 3.0, which DressCode rewrites or reports. - [Upgrade to Nette 4 Automatically](https://dresscode.run/en/upgrade-to-nette-4): Upgrade to nette/utils 4 and the other Nette 4 libraries: what DressCode rewrites, what it reports, and how to measure, plan and run the upgrade step by step. - [Upgrade to Nette 3 Automatically](https://dresscode.run/en/upgrade-to-nette-3): Upgrade Nette 2.4 to 3: DressCode rewrites deprecated API, such as Context to Explorer and Cache::EXPIRE to Cache::Expire, and reports the rest. - [Upgrade Symfony Code Automatically](https://dresscode.run/en/upgrading-symfony): Upgrade Symfony automatically: dresscode/upgrade-symfony holds more than 650 changes to its components since Symfony 6.0, annotations included, which DressCode rewrites or reports. - [Upgrade Symfony 7.4 to 8 Automatically](https://dresscode.run/en/upgrade-to-symfony-8): Upgrade Symfony 7.4 to 8: while still on 7.4, DressCode rewrites Application::add() to addCommand(), constraint options to named arguments and more. - [Upgrade Symfony 6 to 7 Automatically](https://dresscode.run/en/upgrade-to-symfony-7): Upgrade Symfony 6 to 7: DressCode does most of the work on 6.4, turns annotations into attributes and $defaultName into #[AsCommand], and reports the rest. - [Upgrade Laravel Code Automatically](https://dresscode.run/en/upgrading-laravel): Upgrade Laravel automatically: dresscode/upgrade-laravel holds the changes of the framework since Laravel 6 and the Laravel 13 attributes, which DressCode rewrites or reports. - [Upgrade Laravel 12 to 13 Automatically](https://dresscode.run/en/upgrade-to-laravel-13): Upgrade Laravel 12 to 13: what DressCode rewrites by itself, which properties it replaces with attributes like #[Tries], and what is left to you. - [Upgrade Dibi and Texy Code Automatically](https://dresscode.run/en/upgrading-dibi-and-texy): Upgrade Dibi and Texy automatically: dresscode/upgrade-deegee holds the changes to Dibi since 4.1 and to Texy since 3.0, which DressCode rewrites or reports. - [Upgrade Packages: How DressCode Upgrades PHP Libraries](https://dresscode.run/en/upgrading-libraries): When a library renames a class, method or constant, DressCode rewrites your PHP code using the data from upgrade packages for Nette, Symfony or Laravel. - [Replacement Maps: Describe an API Change for PHP Upgrades](https://dresscode.run/en/replacement-maps): Reference for the maps DressCode uses to rewrite PHP code to a new API: members and argument shapes, PHP expressions as replacements, data files and upgrade packages. - [Migrate to DressCode from PHP CS Fixer, PHP_CodeSniffer or Pint](https://dresscode.run/en/migration): Switch to DressCode from PHP CS Fixer, PHP_CodeSniffer or Laravel Pint: your suppression comments keep working, and one command converts the configuration. - [PHP CS Fixer Alternative: Migrate to DressCode](https://dresscode.run/en/from-php-cs-fixer): A PHP CS Fixer alternative: @PSR12, @PER-CS and @Symfony have matching standards, one command converts .php-cs-fixer.dist.php, and you describe the code instead of fixers. - [PHP_CodeSniffer Alternative: Migrate to DressCode](https://dresscode.run/en/from-phpcs): A PHP_CodeSniffer and Slevomat alternative: one command converts phpcs.xml, your phpcs:ignore comments keep working, and sections take the place of sniffs. - [Laravel Pint Alternative: Migrate to DressCode](https://dresscode.run/en/from-laravel-pint): Migrate from Laravel Pint in one line of configuration: the laravel standard of DressCode has Pint's style, and the same run upgrades code to newer PHP and Laravel. - [Migrate from Nette Coding Standard to DressCode](https://dresscode.run/en/from-nette-coding-standard): Move from Nette Coding Standard to DressCode: the nette standard has a direct counterpart, the configuration converts in a few lines, and the first fix reformats more than you expect. - [PHP CS Fixer Rules and Their DressCode Equivalents](https://dresscode.run/en/php-cs-fixer-rules): Find a PHP CS Fixer rule by its name and see which DressCode decision does the same job. Laravel Pint uses the same rule names. - [PHP_CodeSniffer Sniffs and Their DressCode Equivalents](https://dresscode.run/en/phpcs-sniffs): Find a PHP_CodeSniffer sniff by its name and see which DressCode decision checks the same thing, from Generic and Squiz to PSR-12. - [Slevomat Coding Standard Sniffs and Their DressCode Equivalents](https://dresscode.run/en/slevomat-sniffs): Find a Slevomat Coding Standard sniff by its name and see which DressCode decision checks the same thing, from unused imports to strict types. - [PHP Code Style in CI, Git Hooks, Editors and AI Agents](https://dresscode.run/en/integrations): Check PHP code style after every AI agent edit, on save in PhpStorm or VS Code, in a pre-commit hook and in GitHub Actions or GitLab CI, all from one dresscode.neon. - [PHP Code Style for AI Agents: Claude Code and Codex](https://dresscode.run/en/ai-agents): An AI coding agent writes PHP code fast and in its own way. After each of its edits, DressCode fixes the file to match your project's coding standard and, like a good tailor, tells the agent right away what it altered: a diff of the rewrite, the imports it removed, and the findings that remain,… - [PHP Code Style in CI: GitHub Actions and GitLab](https://dresscode.run/en/continuous-integration): In continuous integration (CI), run dresscode check, and GitHub shows every PHP code style violation right at its line in the pull request. For GitLab and Jenkins there is the checkstyle format, a cache limits later runs to the changed files, and the exit code distinguishes a violation from a check… - [PHP Code Style in a Git Pre-commit Hook](https://dresscode.run/en/git-hooks): A six-line pre-commit hook checks the PHP code style of exactly what goes into the commit, and stays silent while everything is clean. Hooks that fix an AI agent's code after every edit are described on the page AI Agents. - [Format PHP on Save in PhpStorm and VS Code](https://dresscode.run/en/editors): Formatting PHP code on save works today in PhpStorm, VS Code, Zed, Helix, Neovim and Emacs, with no extension written for DressCode. A few lines of settings are enough. Just turn off the built-in formatter, or the two will fight over every file. - [How DressCode Works: A Syntax Tree Instead of Tokens](https://dresscode.run/en/how-it-works): Checking and fixing PHP code style in DressCode rests on one idea: the tool sees not a flat array of tokens but a syntax tree in which not even a space is missing. That explains why a fix changes only what it should, why the configuration names things in your code instead of rules, and why the… - [Command Line Reference](https://dresscode.run/en/cli): The DressCode command line reference: check, fix, baseline, init, upgrade, config, explain, catalogue and migrate with all their options, output formats for CI and editors, exit codes, cache and parallel runs. - [DressCode Troubleshooting: Messages and Fixes](https://dresscode.run/en/troubleshooting): Why a DressCode check reports nothing, what the messages about rules that never settle mean, and how to make it agree with your editor's formatter and line endings. - [DressCode Backward Compatibility](https://dresscode.run/en/compatibility): What you can rely on between DressCode versions: what a minor version may change in standards and sets, in the output for tools and in the public API. - [Extending DressCode](https://dresscode.run/en/extending): A custom rule for your team, a preset for all your projects, a plugin that shares them as a package, an analysis shared by several rules, or upgrade data that moves the users of your library to its new version: when to choose each of the five ways to extend DressCode, and which of its classes you… - [Write Your Own PHP Code Style Rule](https://dresscode.run/en/custom-rule): From the first test to a custom rule running in your project, in one afternoon: you name the decision the rule enforces, say which nodes you care about, write down the conditions with the fix, and RuleTester takes care of the rest. - [A Rule in Detail](https://dresscode.run/en/rule-contract): What every custom rule must do: declare its decisions, fix only after reporting, be stateless and idempotent, and fill in the RuleInfo attribute correctly. The engine or RuleTester checks most of it, and that is what lets rules run side by side without priorities. - [Whitespace Rules](https://dresscode.run/en/whitespace-rules): Rules that check spaces, line breaks and blank lines work differently from all other rules: they never touch the code. They only say what should be between two tokens, and the engine does the rest. - [Test a Custom PHP Code Style Rule with RuleTester](https://dresscode.run/en/testing-rules): A rule test is a set of fixtures (files with the code before the fix, the code after it and the findings the rule should report) plus one line that calls RuleTester. Besides the output and the findings, the tester checks that the rule is idempotent, that comments survive, that suppression works,… - [Share Your PHP Coding Standard as a Preset or Plugin](https://dresscode.run/en/presets-and-plugins): Package the style you want on all your projects as a preset and your own rules as a plugin with a section of decisions, then share both through Composer. A project turns them on with a single line in the key use, for all of its code or just a part of it. - [Port Rules from PHP_CodeSniffer and PHP CS Fixer to DressCode](https://dresscode.run/en/porting-rules): You can port a sniff from PHP_CodeSniffer or a fixer from PHP CS Fixer to DressCode in six steps. You take the specification from the tests, not from the source, translate questions about tokens into questions about the tree, and drop the defensive code, because on a tree there is nothing left for…