Skip to content
This repository was archived by the owner on Apr 5, 2026. It is now read-only.

PHP Composer

PHP Composer #739

Workflow file for this run

name: PHP Composer
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '3 14 * * *'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.4, 8.5]
stability: [prefer-lowest, prefer-stable]
name: PHP ${{ matrix.php }} ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
with:
php-version: ${{ matrix.php }}
extensions: curl
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Get Composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.stability }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.stability }}-
- name: Install dependencies
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
- name: Run tests
run: ./vendor/bin/phpunit --display-all-issues