Formatter
Shopware CLI includes a built-in code formatter for PHP, JavaScript, CSS, SCSS, and Admin Twig files. Use it to apply the Shopware Coding Standard automatically and keep your project consistent. You can format individual extensions or entire projects.
A --dry-run mode is also available to preview changes without modifying files.
Formatting an extension
Formatting an entire project
Configuration
By default, the formatting is done by Shopware Coding Standard. You can configure the formatting by creating a .php-cs-fixer.dist.php in your extension root or a .prettierrc file for JavaScript, CSS, and SCSS files.