Skip to content

Fixed a bug with swatches shown even for out-of-stock variants #31

Fixed a bug with swatches shown even for out-of-stock variants

Fixed a bug with swatches shown even for out-of-stock variants #31

Workflow file for this run

name: PHP Syntax
on:
push:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
syntax_php:
runs-on: [ubuntu-latest]
strategy:
matrix:
php: ['8.2', '8.3']
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 }}
- name: Get list of modified PHP files
id: modified_files
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
MODIFIED_FILES=$(git diff --name-only --diff-filter=AMR ${{ github.base_ref }}..${{ github.head_ref }} | grep -E '\.php$|\.phtml$' || true)
else
MODIFIED_FILES=$(find . -type f \( -name "*.php" -o -name "*.phtml" \) || true)
fi
echo "files=$MODIFIED_FILES" >> $GITHUB_ENV
- name: Check .php and .phtml files
if: env.files != ''
run: |
for file in ${{ env.files }}; do
php -d error_reporting=32767 -l "$file"
done