Skip to content

Merge pull request #97 from akunzai/dependabot/composer/friendsofphp/… #32

Merge pull request #97 from akunzai/dependabot/composer/friendsofphp/…

Merge pull request #97 from akunzai/dependabot/composer/friendsofphp/… #32

Workflow file for this run

name: 'Linting PHP'
on:
push:
branches:
- main
paths:
- '**.php'
- '**.phtml'
pull_request:
branches:
- main
paths:
- '**.php'
- '**.phtml'
# Allow manually triggering the workflow.
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.2', '8.3']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Linting PHP files
run: '! find . -type f -name "*.php" -exec php -d display_errors=1 -d error_reporting=-1 -l {} \; 2>&1 | grep -v ^"No syntax errors"'
- name: Linting PHTML files
run: '! find ./magento/app/design -type f -name "*.phtml" -exec php -d display_errors=1 -d error_reporting=-1 -l {} \; 2>&1 | grep -v ^"No syntax errors"'