dragon-code/codestyler
Codestyler by The Dragon Code automatically fixes coding style issues in PHP/Laravel projects using Rector and Laravel Pint. Installs via Composer and can publish pint.json and .editorconfig via CLI for consistent formatting and linting.
laravel, 8.5) reduce configuration overhead, which is critical for scalable Laravel monorepos or multi-team environments.composer.json scripting. No Laravel service provider or Facade integration needed.code-style.yml) enables CI/CD integration with minimal setup.composer update (parallel execution mitigates this).laravel) may limit flexibility if future Laravel versions diverge..editorconfig may conflict with existing IDE settings (e.g., PhpStorm’s built-in rules).php-cs-fixer, will Codestyler’s pint.json override it?post-update-cmd execution time scale with large codebases (e.g., 10K+ PHP files)?vendor/ from linting)?feature/codestyler).app/Http/ only).composer update.composer.json (dev dependency) + post-update-cmd.composer style into PR templates or pre-commit hooks.| Component | Compatibility Notes |
|---|---|
| Laravel | Tested with Laravel 10/11; presets assume modern Laravel conventions. |
| PHP Versions | Supports 8.2–8.5 (via Pint presets). PHP 8.1 may need custom configs. |
| Node.js | Requires Node 18+ for Biome. Version must be pinned in CI. |
| IDE Support | Works with PhpStorm, VSCode, but may need IDE-specific .editorconfig tweaks. |
| CI Systems | GitHub Actions template provided; adaptable to GitLab CI, CircleCI. |
| Monorepos | Supports multi-package setups but may need custom exclusions (e.g., analytics/*). |
composer require dragon-code/codestyler --dev
npm install -D @biomejs/biome # Only if using JS/JSON
post-update-cmd to composer.json (see README).pint.json/biome.json if needed.composer style locally to catch issues early.composer.json to avoid surprises:
"require-dev": {
"dragon-code/codestyler": "^6.7",
"laravel/pint": "^1.0",
"@biomejs/biome": "^2.2"
}
pint.json:
{
"preset": "laravel",
"rules": {
"@PHPStan": false // Disable if conflicting
}
}
.editorconfig if IDE settings drift.composer style fails: Check PHP version and tool versions.biome.json excludes non-JS files (e.g., analytics/*).--dry-run to preview changes.vendor/bin/codestyle pint 8.5 --dry-run
vendor/bin/codestyle rector laravel --dry-run
pint.json:
{
"paths": ["app", "config"],
"exclude": ["tests/", "storage/"]
}
# GitHub Actions example
jobs:
lint-php:
runs-on: ubuntu-latest
steps:
- run: composer style
lint-js:
runs-on: ubuntu-latest
steps:
- run: npm run style
How can I help you explore Laravel packages today?