- Does lint-pack work with Laravel 10.x or newer versions?
- No, lint-pack was last updated for Laravel 4.x/5.0 and is incompatible with modern Laravel versions (10.x+). The package relies on outdated APIs and PHP versions (5.5–5.6), which won’t work with current Laravel’s Symfony/Console dependencies or PHP 8.x. You’d need to fork and rewrite it for compatibility.
- What kind of linting does this package actually perform?
- lint-pack focuses on validating Artisan CLI command syntax, such as catching typos, invalid characters, or malformed command structures. It doesn’t enforce broader code style rules (like PSR-12) or analyze PHP logic—just the raw CLI input. Think of it as a lightweight command-line validator for artisan calls.
- Can I use this in CI/CD pipelines for Laravel projects?
- Technically yes, but it’s risky due to the package’s age. If you’re using Laravel 10.x+, the package may fail entirely or produce false positives/negatives. For CI, consider modern alternatives like custom Git hooks, PHPStan, or IDE-based linting tools that integrate better with contemporary Laravel workflows.
- How do I install lint-pack in a Laravel 5.x project?
- Run `composer require jakub-szajna/lint-pack` in your Laravel 5.x project. The package registers an Artisan command (`artisan:lint` or similar) automatically. However, note that even Laravel 5.x may have compatibility issues due to the package’s outdated dependencies. Test thoroughly in a staging environment first.
- Are there alternatives to lint-pack for Laravel 10.x?
- Yes. For Artisan command validation, use custom Artisan commands with regex or whitelists, or leverage IDE plugins (PHPStorm/VSCode) for real-time CLI linting. For broader code quality, tools like PHPStan, Psalm, or Laravel Pint (for formatting) are better suited. Avoid monolithic packages like this one for modern Laravel.
- Will lint-pack slow down my Artisan commands in production?
- The package is lightweight, but its overhead depends on how you configure it. If it runs pre-command (e.g., via a Git hook or custom wrapper), it could add minor latency. For production, disable it or use a targeted approach (e.g., linting only during development or CI). Modern alternatives like IDE plugins run asynchronously and won’t block execution.
- Can I extend lint-pack to add custom linting rules?
- The package’s monolithic design makes extension difficult, especially for Laravel 10.x. The linting logic isn’t modular, so adding rules would require deep forking. For custom rules, consider building a standalone Artisan command using Symfony/Console components or a composer script instead.
- Does lint-pack support PHP 8.x or modern PHP features?
- No, lint-pack is built for PHP 5.5–5.6 and lacks support for PHP 8.x features like named arguments, union types, or attributes. Attempting to use it with PHP 8.x will likely trigger deprecation warnings or errors. Rewrite it as a modern Laravel service provider if you need PHP 8.x compatibility.
- How do I configure lint-pack to ignore specific Artisan commands?
- The package’s documentation doesn’t mention configurable ignore lists, and its outdated architecture lacks built-in support for this. You’d need to fork the package and modify the linting logic to exclude commands manually. For modern Laravel, use a custom Artisan command with a whitelist or regex exclusions instead.
- Is lint-pack maintained or actively updated?
- No, the package hasn’t been updated since 2015 and targets Laravel 4.x/5.0. There’s no evidence of maintenance, issue tracking, or community support. For production use, prioritize actively maintained alternatives or rewrite the functionality yourself to avoid technical debt.