jakub-szajna/lint-pack
Laravel package that adds a linter command to the Artisan CLI, helping you run code style and lint checks from the command line during development and CI. Designed to integrate into typical Laravel workflows for quick, repeatable quality checks.
php artisan autocompletion.artisan wrapper tools.illuminate/console or symfony/console versions.Symfony/Console) with updated APIs.Illuminate\Console\Command (v5+) vs. v4’s Artisan::add().Artisan::starting, Artisan::terminating), which the package may not leverage.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Breaking Changes | Critical | Fork and rewrite for Laravel 10.x; replace with custom logic. |
| Dependency Rot | High | Isolate in a micro-service or drop-in script. |
| False Positives | Medium | Validate linting rules against real-world commands. |
| Maintenance Burden | High | Deprecate in favor of native/IDE solutions. |
Why lint Artisan CLI?
artisan calls) or security (e.g., blocking dangerous commands)?Modernization Path
Symfony/Console integration?Performance Impact
artisan execution?Security Implications
ReflectionClass::export()).pre-commit).Symfony/Console components.artisan usage (e.g., via stderr logs or tartan).Artisan::add() with app()->make(Command::class).Symfony/Console’s Input/Output components.// app/Console/Commands/LintArtisan.php
protected function handle() {
$input = $this->input->getArguments();
if (!preg_match('/^[a-zA-Z0-9_:.-]+$/', $input[0])) {
$this->error("Invalid Artisan command: {$input[0]}");
return 1;
}
}
# .git/hooks/pre-commit
#!/bin/bash
grep -E "\bartisan [^a-zA-Z0-9_:.-]" **/*.php || exit 1
Symfony/Console.artisan usage.composer.json snippet (if forced to use):
"require": {
"jakub-szajna/lint-pack": "dev-master",
"illuminate/console": "5.0.*",
"symfony/console": "2.8.*"
},
"conflict": {
"laravel/framework": ">=6.0"
}
Undefined class: Artisan).php artisan --help and compare against package’s expected output.artisan call could add 50–200ms latency (negligible for CLI, but noticeable in CI).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package breaks on Laravel upgrade | Artisan commands fail silently. |
How can I help you explore Laravel packages today?