name: Samples PHP Syntax Checker on: push: paths: - samples/client/petstore/php/OpenAPIClient-php/** - samples/client/petstore/php-nextgen/OpenAPIClient-php/** pull_request: paths: - samples/client/petstore/php/OpenAPIClient-php/** - samples/client/petstore/php-nextgen/OpenAPIClient-php/** jobs: build: name: Build PHP projects runs-on: ubuntu-latest strategy: fail-fast: false matrix: php: - "8.1" - "8.2" - "8.3" - "8.4" sample: # clients - samples/client/petstore/php/OpenAPIClient-php/ - samples/client/petstore/php-nextgen/OpenAPIClient-php/ steps: - uses: actions/checkout@v5 - name: Setup PHP with tools uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" - name: php -l working-directory: ${{ matrix.sample }} run: find . -name "*.php" -exec php -l {} +