jakub-onderka/php-parallel-lint
Abandoned PHP tool for fast parallel linting (syntax checking) of PHP files with colored output and formats like Checkstyle/JSON. Install via Composer and run on directories with options for excludes, jobs, stdin, and git blame. Suggested alternative: php-parallel-lint/PHP-Parallel-Lint
Strengths:
--checkstyle, --json, colored/short output), enabling integration with static analysis tools (e.g., SonarQube, GitHub Actions) or IDEs.ext-json for JSON output.vendor/, app/).Weaknesses:
nette/tester is outdated).Key Use Cases:
php -l) are too slow.composer require --dev integration.vendor/bin/parallel-lint .).vendor/, node_modules/), filter extensions, or parallel job counts (-j).php-console-highlighter (for colors) and nette/tester (dev-only) could clash with existing tooling.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Abandoned Maintenance | High | Use the fork (php-parallel-lint/PHP-Parallel-Lint) or evaluate alternatives like php-parallel-lint or roave/security-advisories. |
| PHP Version Compatibility | Medium | Test with PHP 8.0+; use Docker for isolation. |
| Security Risks | Medium | Avoid passing untrusted paths to -p (PHP-CGI) flag; sanitize inputs. |
| Performance Overhead | Low | Benchmark against php -l and parallel --jobs wrappers. |
| Dependency Rot | Medium | Pin versions in composer.json or use --ignore-platform-reqs. |
Why Parallel Lint?
php -l + parallel), or are there specific features (e.g., Git blame, Checkstyle) needed?Maintenance Plan
Integration Scope
php -l, ESLint for JS), or supplement them?Performance Tradeoffs
-j (parallel jobs)?Failure Modes
php -l as a backup)?Best For:
php -l is prohibitively slow.vendor/ and node_modules/ via --exclude.Poor Fit:
Pilot Phase:
src/ directory).php -l for accuracy.Gradual Rollout:
php -l in CI/CD with parallel-lint (e.g., in .github/workflows/lint.yml).--json output to integrate with existing tools (e.g., Slack notifications, Jira tickets).- name: Lint PHP
run: vendor/bin/parallel-lint --exclude vendor/ --json --no-progress . > lint-results.json
Fallback Strategy:
php -l:
#!/bin/bash
vendor/bin/parallel-lint . || php -l $(find . -name "*.php" | head -n 100)
| Component | Compatibility Notes |
|---|---|
| PHP Versions | Tested on PHP ≥5.4.0; may need adjustments for PHP 8.0+ (e.g., named arguments). |
| Operating Systems | Works on Linux/Windows (CI tested); macOS untested. |
| CI Systems | Compatible with GitHub Actions, GitLab CI, Jenkins (via custom scripts). |
| IDE Integration | Output can be parsed for IDE warnings (e.g., via --checkstyle for IntelliJ). |
| Dependencies | Avoid conflicts with jakub-onderka/php-console-highlighter (dev-only). |
Pre-requisites:
composer require --dev jakub-onderka/php-parallel-lint.Configuration:
composer.json under require-dev:
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9.2"
}
bin/lint) to wrap usage:
#!/bin/bash
vendor/bin/parallel-lint --exclude vendor/ --exclude node_modules/ --json --no-progress .
CI Integration:
.github/workflows/lint.yml):
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run parallel lint
run: bin/lint
Local Development:
package.json scripts (if using npm):
"scripts": {
"lint": "parallel-lint --exclude vendor/ ."
}
How can I help you explore Laravel packages today?