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.
Strengths:
--using flag.duster.json, enabling integration with additional tools without forking the package.--dirty flag restricts operations to uncommitted changes, reducing noise in CI/CD pipelines.Potential Misalignments:
Tighten PHPCS ruleset, custom Pint/PHP CS Fixer rules). Teams with divergent coding standards may need to override defaults, increasing maintenance overhead.duster fix) may disrupt other workflows, requiring careful sequencing (as noted in the docs).composer require.duster.json can mitigate this, but testing is required.--dirty mode first or phasing adoption incrementally.| Risk Area | Severity | Mitigation |
|---|---|---|
| Tool Version Conflicts | High | Pin dependencies in composer.json or use platform-check in CI. |
| Performance Overhead | Medium | Parallelize PHP CS Fixer (supported) and limit scope with include/exclude. |
| False Positives/Negatives | Medium | Customize duster.json or tool configs (e.g., PHPCS rules) to match standards. |
| CI/CD Flakiness | High | Test workflows locally with act or GitHub Actions self-hosted runners. |
| Developer Adoption | Medium | Pair with educational resources (e.g., Tighten’s style guide). |
duster fix (which commits changes) interact with existing workflows? Will it require workflow sequencing?--dirty mode be sufficient, or are optimizations needed?duster.json.duster lint --dirty to identify gaps.duster.json to exclude non-PHP files/directories (e.g., vendor/, node_modules/).duster fix in a feature branch, focusing on new code or low-risk areas.duster fix to main branch, phasing in tool-by-tool (e.g., start with Pint, then PHPCS).duster lint on PRs and duster fix on protected branches (with approval gates).processTimeout in duster.json if scripts time out.| Component | Compatibility | Notes |
|---|---|---|
| Laravel Version | 8.0+ (tested with 9.x/10.x) | v3.x requires Laravel Zero 11 (PHP 8.1+). |
| PHP Version | 8.1+ | Align with Laravel’s minimum requirements. |
| CI Systems | GitHub Actions (native), GitLab CI, Bitbucket Pipelines (custom config needed) | GitHub Action provided; others require manual setup. |
| Local Dev Tools | Husky, Pre-commit, Overcommit | Husky hooks supported; others need custom scripts. |
| Containers | Sail, DDEV, Lando, Warden | Explicit support; other containers may need manual path adjustments. |
| Monorepos | Partial | Glob patterns may need refinement to avoid scanning unrelated projects. |
composer require tightenco/duster --dev../vendor/bin/duster github-actions or ./vendor/bin/duster husky-hooks.duster lint to CI linting stage (e.g., GitHub Actions pull_request).duster fix to CI/CD merge stage (e.g., push to main), with approval gates.duster.json post-adoption.duster.json file manages tooling, reducing duplication.--dirty mode reduces noise for large teams.How can I help you explore Laravel packages today?