Skip to content

CI should fail on PHP deprecated errors and report errors for deprecated implicit float to int precision loss #3525

CI should fail on PHP deprecated errors and report errors for deprecated implicit float to int precision loss

CI should fail on PHP deprecated errors and report errors for deprecated implicit float to int precision loss #3525

Workflow file for this run

name: Check backward compatibility
on: pull_request
jobs:
bcc:
name: Check backward compatibility
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
ini-values: zend.assertions=1, assert.exception=1, opcache.enable_cli=1, opcache.jit=function, opcache.jit_buffer_size=512M, error_reporting=E_ALL
tools: composer:v2
coverage: none
env:
fail-fast: true
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
- name: Generate composer.lock
run: |
composer update --no-install
- name: Cache composer cache
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Run composer install
run: |
composer install -o
composer bin bcc install
env:
COMPOSER_ROOT_VERSION: dev-master
- name: Run BCC
run: vendor/bin/roave-backward-compatibility-check --from="origin/$GITHUB_BASE_REF" --format=github-actions
env:
COMPOSER_ROOT_VERSION: dev-master