Weave Code
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

Duster Laravel Package

tightenco/duster

Duster automatically applies Tighten’s Laravel code style by running TLint, PHP_CodeSniffer, PHP CS Fixer, and Laravel Pint. Lint or fix the whole project (or only dirty files), and generate GitHub Actions or Husky hooks with optional container env support.

View on GitHub
Deep Wiki
Context7

Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.

Frequently asked questions about Duster
How do I enforce Tighten’s Laravel code standards in CI without breaking builds?
Use Duster’s GitHub Actions integration (`./vendor/bin/duster github-actions`) to auto-fix issues pre-commit or in CI. Start with `--dirty` to target only uncommitted changes, then adjust timeouts in the workflow if needed. For strict enforcement, combine with `fix` commands in a separate workflow step.
Can Duster replace PHPStan or custom linters in my Laravel project?
Duster focuses on linting/formatting (Pint, TLint, PHP_CodeSniffer, CS Fixer) and doesn’t replace static analysis tools like PHPStan. Use it alongside PHPStan for broader coverage. Customize `duster.json` to exclude files already handled by other tools to avoid redundancy.
What Laravel versions does Duster support, and does it work with older projects?
Duster targets modern Laravel (8.x+) due to its Pint dependency, but you can manually install Pint v1.0+ for older versions. Test compatibility by running `./vendor/bin/duster lint` on a subset of legacy code. For pre-8.x, consider alternatives like PHP CS Fixer alone.
How do I customize Duster’s PHP_CodeSniffer or Pint rules beyond the Tighten preset?
Extend the Tighten preset by publishing custom configs (e.g., `.phpcs.xml.dist`) and referencing them in `duster.json`. Override Pint rules via `pint.json` or use `--using` flags to exclude tools. For advanced cases, add custom scripts in `duster.json` using Symfony Process.
Will Duster slow down my CI pipeline for large Laravel codebases?
Duster parallelizes PHP CS Fixer (v3.1+) but TLint/PHP_CodeSniffer may still be slow. Mitigate this by: 1) Using `--dirty` to limit scope, 2) Adjusting GitHub Actions timeouts, or 3) Running heavy tools (e.g., PHPStan) in separate jobs. Profile with `duster lint --verbose` to identify bottlenecks.
How do I integrate Duster with Laravel Sail or Docker environments?
Run Duster directly in Sail via `./vendor/bin/sail bin duster` or use the `--env` flag for containerized setups (e.g., `--env=sail`). For Docker (DDEV/Lando), ensure PHP and dependencies are installed in the container. Avoid running Duster locally if your container lacks Git history for `--dirty` to work.
What happens if my team’s coding standards differ from Tighten’s presets?
Duster’s flexibility lets you override defaults: Publish custom `.phpcs.xml`, `pint.json`, or `duster.json` files. Start by comparing Tighten’s rules to your style guide, then adjust include/exclude patterns or tool ordering. Document changes in your team’s README to maintain consistency.
Can I use Duster for Blade templates or migrations without conflicts?
Duster processes Blade files by default, but migrations may need exclusion if they violate Tighten’s rules. Use `duster.json` to exclude `database/migrations` or adjust Pint’s `blade` rules. Test with `./vendor/bin/duster lint --path=database/migrations` to preview conflicts before enforcing.
How do I debug Duster failures or tool compatibility issues?
Start with `--verbose` to log tool outputs. Check for conflicts between Duster’s configs and existing `.phpcs.xml`/`pint.json`. Isolate issues by running tools individually (e.g., `./vendor/bin/php-cs-fixer fix`). For Pint/TLint errors, consult their docs or open issues on their repos.
Are there alternatives to Duster for Laravel code quality?
For linting/formatting, consider standalone tools like Pint (Laravel’s formatter), PHP CS Fixer, or TLint alone. For broader quality checks, combine Duster with PHPStan, Pest, or Laravel’s built-in tools. Alternatives like `laravel-shift/blueprint` offer opinionated setups but lack Duster’s Git-aware workflows.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope