Skip to content

Fix deprecation error Using null as an array offset is deprecated, use an empty string instead #414

Fix deprecation error Using null as an array offset is deprecated, use an empty string instead

Fix deprecation error Using null as an array offset is deprecated, use an empty string instead #414

Workflow file for this run

name: build
on: [push, pull_request]
env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
jobs:
phpunit:
name: PHP ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update $DEFAULT_COMPOSER_FLAGS
- name: Run unit tests PHP 7.x.
run: vendor/bin/phpunit -c phpunit-7x.xml.dist
if: matrix.php == '7.4'
- name: Run unit tests PHP 8.x.
run: vendor/bin/phpunit
if: matrix.php != '7.4'
- name: Run PHPStan
run: vendor/bin/phpstan