Skip to content

[1.x] Upgrade to PHP 8.1.26 and 8.2.13 #2537

[1.x] Upgrade to PHP 8.1.26 and 8.2.13

[1.x] Upgrade to PHP 8.1.26 and 8.2.13 #2537

Workflow file for this run

name: CI
on:
push:
branches: ['master']
pull_request:
branches: ['*']
schedule:
- cron: '0 0 * * *'
jobs:
php-tests:
name: Tests - PHP ${{ matrix.php }} ${{ matrix.dependency-version }}
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
php: [ '8.2', '8.1', '8.0', '7.4', '7.3' ]
dependency-version: [ '' ]
platform-reqs: [ '' ]
include:
- php: '7.3'
dependency-version: '--prefer-lowest'
steps:
- name: Checkout
uses: actions/checkout@v4
# Node is required by some tests
- uses: actions/setup-node@v3
with:
node-version: 12
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
ini-values: expose_php=1
# See https://github.com/shivammathur/setup-php/issues/280
- name: Setup php-fpm
env:
version: ${{ matrix.php }}
run: |
sudo apt-get install -y php$version-fpm
sudo cp /usr/sbin/php-fpm$version /usr/bin/php-fpm # copy to /usr/bin
echo 'expose_php=1' | sudo tee -a /etc/php/$version/fpm/php.ini
- name: Install dependencies
run: 'composer update ${{ matrix.dependency-version }} --no-interaction --prefer-dist --no-progress ${{ matrix.platform-reqs }}'
- name: Execute Unit Tests
run: 'vendor/bin/phpunit --testsuite small'
phpstan:
runs-on: ubuntu-22.04
name: PHPStan
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2, cs2pr
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: php-composer-locked-${{ hashFiles('composer.lock') }}
restore-keys: php-composer-locked-
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: PHPStan
run: vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr
phpcs:
runs-on: ubuntu-22.04
name: PHP CodeSniffer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer:v2, cs2pr
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: php-composer-locked-${{ hashFiles('composer.lock') }}
restore-keys: php-composer-locked-
- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: PHP CS
run: vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr