Skip to content

Uncaught assertions causing fatal errors on PHP 8+ #50

Uncaught assertions causing fatal errors on PHP 8+

Uncaught assertions causing fatal errors on PHP 8+ #50

Workflow file for this run

name: CI
on:
workflow_dispatch: # Can manually run from any branch
push:
branches:
- main
pull_request:
# Cancel previous jobs before starting this one. Works on pull_request event only due to use of head_ref.
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
php-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- php: '8.3'
os: 'ubuntu-24.04'
- php: '8.2'
os: 'ubuntu-20.04'
- php: '8.1'
os: 'ubuntu-latest'
- php: '8.0'
os: 'ubuntu-20.04'
- php: '7.4'
os: 'ubuntu-20.04'
fail-fast: false
env:
COVERAGE_CACHE_PATH: phpunit-coverage-cache
PHP_VERSION: ${{ matrix.php }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Switch to PHP ${{ env.PHP_VERSION }}
run: |
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
sudo update-alternatives --set phar /usr/bin/phar$PHP_VERSION
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$PHP_VERSION
sudo update-alternatives --set phpize /usr/bin/phpize$PHP_VERSION
sudo update-alternatives --set php-config /usr/bin/php-config$PHP_VERSION
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Dependencies
run: |
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Check platform requirements on PHP ${{ env.PHP_VERSION }}
run: |
composer check-platform-reqs --no-dev --no-interaction --no-scripts
- name: Setup INI file
run: |
echo "zend.assertions=1" > php.ini
export PHP_INI_SCAN_DIR="$(pwd)"
- name: Execute tests via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
vendor/bin/phpunit --order-by="random" --coverage-text