Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Codestyler Laravel Package

dragon-code/codestyler

Codestyler is a Composer dev tool that automatically fixes coding style standards in Laravel and PHP projects. It copies preset pint.json and .editorconfig files via the vendor/bin/codestyle command, supporting PHP 8.2–8.5 presets plus Rector and npm/Biome configuration.

View on GitHub
Deep Wiki
Context7

A tool to automatically fix PHP Coding Standards issues by Dragon Code.

Frequently asked questions about Codestyler
What is dragon-code/codestyler and what does it actually do?
Codestyler is a dev-only Composer package that publishes coding-standard configuration files into your project, including pint.json, .editorconfig, Rector presets, and Biome configs. Pint and Rector do the real formatting and refactoring work; Codestyler is essentially a curated config distributor with opinionated defaults. It has no runtime coupling to your Laravel application, so it belongs in require-dev and CI rather than production dependencies.
How do I install Codestyler in a Laravel project?
Install it as a dev dependency with composer require dragon-code/codestyler --dev. Then add a style script such as composer config scripts.style "vendor/bin/rector && vendor/bin/pint --parallel". Optionally add the publish commands to scripts.post-update-cmd so config files are copied automatically after Composer updates.
Which PHP and Laravel versions does Codestyler support?
Codestyler documents PHP presets for 8.2, 8.3, 8.4, and 8.5, selected via the pint command, for example vendor/bin/codestyle pint 8.5. Rector presets include laravel and default, with the Laravel preset aimed at Laravel-style codebases. Because it is a dev-only config publisher, it is not tightly bound to a specific Laravel release, but you should replace 8.5 with the minimum PHP version your application actually targets.
What changed in Codestyler 6 compared to version 5?
Version 5 ran on its own code and published files through command parameters, and it was the last version installed globally via Composer. Starting with version 6, the package ships pint.json and .editorconfig files and copies them into your project when you call a console command. The supported approach is now a local require-dev install, so older global-install v5 workflows should not be carried forward.
Which console commands does Codestyler provide to publish configs?
Typical commands include vendor/bin/codestyle pint 8.5, vendor/bin/codestyle rector laravel, vendor/bin/codestyle editorconfig, and vendor/bin/codestyle npm for the Biome config. You can also run composer normalize if the ergebnis/composer-normalize plugin is allowed. These commands are usually wired into scripts.post-update-cmd or run manually during a pilot.
Will Codestyler overwrite my existing pint.json or .editorconfig?
Yes, the publish commands copy files to the project root, and adding them to post-update-cmd means generated configs can replace project-specific ones, especially .editorconfig. Before wiring anything into post-update-cmd, run the commands manually and diff the generated files against your existing Pint and Rector rules. If the defaults conflict with your custom rules, either reconcile them or copy the generated files once and drop the dependency.
Can I use Codestyler in CI without relying on a floating @main workflow?
Codestyler documentation references a shared code-style workflow from TheDragonCode/.github pinned to @main, which is a supply-chain concern for CI. Prefer pinning a specific commit SHA or replicating the steps yourself, for example composer install followed by vendor/bin/pint --test and vendor/bin/rector --dry-run. That keeps your pipeline independent of a floating branch you do not control.
Do I need composer-normalize and Node.js for all Codestyler commands?
The composer normalize step requires explicitly allowing the ergebnis/composer-normalize plugin in your Composer configuration. The npm command only publishes a Biome config, so Biome itself must be installed separately via npm along with package.json scripts. If you skip the npm step, your PHP tooling still works, you just do not get frontend formatting.
Is Codestyler safe to add as a production dependency?
No, it is a development tool and should stay in require-dev and CI only, since it has no runtime role in a Laravel application. Technical risk is low, but governance risk is moderate: the package has around 29 stars, zero dependents, and is maintained by a single author under Dragon Code. Pin an exact version and treat it as a convenience layer rather than critical infrastructure.
Should I use Codestyler or just commit pint.json and rector.php myself?
Because Codestyler mainly distributes curated config files, many teams copy the generated pint.json, rector.php, .editorconfig, and biome.json into the repository and remove the dependency. That reduces supply-chain and maintenance exposure at the cost of updating configs manually. Keep the dependency only if you want opinionated defaults kept current for you and are comfortable pinning a single-maintainer tool and reassessing it each quarter.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc