Skip to content

PHP Syntax

PHP Syntax #1

Workflow file for this run

name: PHP Syntax
on:
# Run automatically every Monday on midnight.
schedule:
- cron: '0 0 * * 1'
workflow_call:
# Allow manually triggering the workflow.
workflow_dispatch:
jobs:
syntax_php:
runs-on: [ubuntu-latest]
strategy:
matrix:
php: ['7.4', '8.4']
name: PHP Syntax ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring #optional, setup extensions
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver
- name: Check .php files
run: '! find . -not \( -path ./.phpstorm.meta.php -prune \) -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 1> /dev/null | grep "^"'
- name: Check .phtml files
run: '! find app/design -type f -name "*.phtml" -exec php -d error_reporting=32767 -l {} \; 2>&1 1> /dev/null | grep "^"'