Skip to content

Add classes with prefix "default" for backward compatibility #31

Add classes with prefix "default" for backward compatibility

Add classes with prefix "default" for backward compatibility #31

name: Automated Testing
on:
push:
permissions:
contents: read
jobs:
composer:
name: Validate composer files
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- lock-version: '5.4'
- lock-version: '6.0'
- lock-version: '6.4'
- lock-version: '7.0'
- lock-version: '7.1'
- lock-version: '7.2'
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer
coverage: none
- uses: actions/checkout@v4
- name: Set versions
run: cp 'composer.${{ matrix.lock-version }}.lock' composer.lock
- name: Validate composer.json and composer.lock
run: composer validate --strict
composer-require-checker:
name: Check composer requirements
runs-on: ubuntu-22.04
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer
coverage: none
- uses: actions/checkout@v4
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-composer-"
- name: Install packages by Composer
uses: ramsey/composer-install@v3
- name: Cache tools installed with PHIVE
uses: actions/cache@v4
with:
path: "${{ runner.temp }}/.phive"
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-${{ hashFiles('**/.phive/phars.xml', '**/.phive/trust-gpg-keys.txt') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-"
- name: Install PHIVE
uses: szepeviktor/phive@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"
- name: Install PHP tools by PHIVE
uses: szepeviktor/phive-install@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"
trustGpgKeys: '$(cat ./.phive/trust-gpg-keys.txt)'
- name: Check composer requirements
run: composer require-check
composer-unused:
name: Check unused composer requirements
runs-on: ubuntu-22.04
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer
coverage: none
- uses: actions/checkout@v4
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-composer-"
- name: Install packages by Composer
uses: ramsey/composer-install@v3
- name: Cache tools installed with PHIVE
uses: actions/cache@v4
with:
path: "${{ runner.temp }}/.phive"
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-${{ hashFiles('**/.phive/phars.xml', '**/.phive/trust-gpg-keys.txt') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-"
- name: Install PHIVE
uses: szepeviktor/phive@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"
- name: Install PHP tools by PHIVE
uses: szepeviktor/phive-install@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"
trustGpgKeys: '$(cat ./.phive/trust-gpg-keys.txt)'
- name: Check unused composer requirements
run: composer unused
cs-fixer:
name: Check code style with CS Fixer
runs-on: ubuntu-22.04
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer
coverage: none
- uses: actions/checkout@v4
- name: Set versions
run: cp composer.6.4.lock composer.lock
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-composer-"
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: Cache tools installed with PHIVE
uses: actions/cache@v4
with:
path: "${{ runner.temp }}/.phive"
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-${{ hashFiles('**/.phive/phars.xml', '**/.phive/trust-gpg-keys.txt') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-"
- name: Install PHIVE
uses: szepeviktor/phive@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"
- name: Install PHP tools by PHIVE
uses: szepeviktor/phive-install@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"
trustGpgKeys: '$(cat ./.phive/trust-gpg-keys.txt)'
- name: Check code style
run: composer cs-fixer-check -- --show-progress=none
phpstan:
name: Static analyze with PHPStan
runs-on: ubuntu-22.04
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer
coverage: none
- uses: actions/checkout@v4
- name: Set versions
run: cp composer.6.4.lock composer.lock
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: "${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: Static analyze with PHPStan
run: |
composer run phpstan-clear && \
composer run phpstan-analyse -- --no-progress
test-unit:
name: 'Tests: Unit'
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- lock-version: '5.4'
- lock-version: '6.0'
- lock-version: '6.4'
- lock-version: '7.0'
- lock-version: '7.1'
- lock-version: '7.2'
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer
coverage: none
- uses: actions/checkout@v4
- name: Set versions
run: cp 'composer.${{ matrix.lock-version }}.lock' composer.lock
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: "${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: 'Run testsuite: Unit'
run: composer run test-unit
yamllint:
name: 'Yamllint'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Yamllint Action
uses: bewuethr/yamllint-action@v1.3.0
with:
config-file: scripts/yamllint.yaml