Skip to content

transpile v4 unreleased changes onto the v3.5 line #46

transpile v4 unreleased changes onto the v3.5 line

transpile v4 unreleased changes onto the v3.5 line #46

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: PHP Compatibility
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'src/**'
- 'includes/**'
- 'tests/**'
- 'composer.json'
- '.github/workflows/test.yaml'
push:
paths:
- 'src/**'
- 'includes/**'
- 'tests/**'
- 'composer.json'
- '.github/workflows/test.yaml'
branches:
- "v3.5"
workflow_dispatch: # yamllint disable-line rule:truthy
permissions:
contents: "read"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
php-compatibility:
name: "PHP 7.1-7.4 compatibility"
runs-on: "ubuntu-22.04"
timeout-minutes: 10
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
coverage: "none"
# phpcs only parses source, so skip plugins/scripts (chromedriver download etc.).
- name: "Install dependencies"
run: composer install --no-interaction --no-progress --no-plugins --no-scripts
- name: "Register PHPCompatibility standard"
run: vendor/bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility
- name: "Analyze for PHP 7.1-7.4 compatibility"
run: vendor/bin/phpcs -p --standard=config/php-compat.xml src