overtrue/phplint
PHPLint is a fast PHP syntax linter that runs multiple lint processes in parallel to speed up checking large codebases. Supports modern PHP versions, with easy installation via Composer, PHAR, Docker, or Phive, and configurable rules and paths.
Quick start, if your PHP runtime set up is not important for you.
jobs:
php-lint:
name: "PHPLint v9"
runs-on: ubuntu-latest
steps:
- name: Lint PHP files
uses: overtrue/phplint@main
with:
path: .
options: --exclude=vendor
Otherwise, if you want to detect specific PHP features used by scripts depending on your PHP runtime, then use this case.
jobs:
php-lint:
name: "PHPLint v9"
runs-on: "${{ matrix.operating-system }}"
strategy:
fail-fast: false
matrix:
operating-system:
- "ubuntu-22.04"
php-version:
- "8.2"
- "8.3"
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: sebastianbergmann/phpunit
- name: Setup PHP runtime
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: "none"
- name: Lint PHP files
run: |
curl -Ls https://github.com/overtrue/phplint/releases/latest/download/phplint.phar -o /usr/local/bin/phplint
chmod +x /usr/local/bin/phplint
/usr/local/bin/phplint --no-cache --no-progress -v
Follows steps:
How can I help you explore Laravel packages today?