Skip to content

Update tomasvotruba/unused-public requirement from ^0.1.10 to ^0.2.0 … #2372

Update tomasvotruba/unused-public requirement from ^0.1.10 to ^0.2.0 …

Update tomasvotruba/unused-public requirement from ^0.1.10 to ^0.2.0 … #2372

Workflow file for this run

name: Static analysis
on:
push:
branches:
- main
pull_request:
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: "8.0"
db-image: 'mysql:8.0'
reflector: "pdo-mysql"
mode: "recording"
phpstan-version: "phpstan@dev"
- php-version: "8.0"
db-image: 'mysql:8.0'
reflector: "pdo-mysql"
mode: "recording"
- php-version: "8.0"
db-image: 'mysql:8.0'
reflector: "mysqli"
mode: "recording"
- php-version: "8.1"
db-image: 'mysql:8.0'
reflector: "mysqli"
mode: "recording"
- php-version: '8.1'
db-image: 'mariadb:latest'
reflector: "mysqli"
mode: "recording"
- php-version: "8.2"
db-image: 'mysql:8.0'
reflector: "mysqli"
mode: "recording"
- php-version: '8.2'
db-image: 'mariadb:latest'
reflector: "mysqli"
mode: "recording"
- php-version: "8.1"
db-image: 'mysql:8.0'
reflector: "mysqli"
mode: "replay-and-recording"
env:
DBA_REFLECTOR: ${{ matrix.reflector }}
DBA_MODE: ${{ matrix.mode }}
# https://docs.github.com/en/free-pro-team@latest/actions/guides/about-service-containers
services:
mysql:
image: ${{ matrix.db-image }}
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: "ramsey/composer-install@v2"
with:
composer-options: "--prefer-dist --no-progress"
- name: Install sqlftw/sqlftw (optional dependency)
run: composer require sqlftw/sqlftw --ignore-platform-req=php+
if: "${{matrix.php-version != '7.2' && matrix.php-version != '7.3'}}"
- name: Install doctrine/dbal (optional dependency)
run: composer require doctrine/dbal --ignore-platform-req=php+
if: "${{matrix.php-version != '7.2'}}"
- name: Enable phpstan@dev
if: "${{matrix.phpstan-version != ''}}"
run: |
composer update phpstan/phpstan:@dev
- name: Setup mysql
run: |
mysql -uroot -h127.0.0.1 -proot < tests/schema.sql
- run: composer phpstan
replay:
name: PHPStan (reflection replay)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: "8.1"
reflector: "mysqli"
mode: "replay"
- php-version: "8.1"
reflector: "pdo-mysql"
mode: "replay"
env:
DBA_REFLECTOR: ${{ matrix.reflector }}
DBA_MODE: ${{ matrix.mode }}
steps:
- uses: actions/checkout@v2
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: "ramsey/composer-install@v2"
with:
composer-options: "--prefer-dist --no-progress"
- name: Install sqlftw/sqlftw (optional dependency)
run: composer require sqlftw/sqlftw --ignore-platform-req=php+
if: "${{matrix.php-version != '7.2' && matrix.php-version != '7.3'}}"
- name: Install doctrine/dbal (optional dependency)
run: composer require doctrine/dbal --ignore-platform-req=php+
if: "${{matrix.php-version != '7.2'}}"
- run: composer phpstan