Skip to content

Add Polyfill for Time\Duration class #1472

Add Polyfill for Time\Duration class

Add Polyfill for Time\Duration class #1472

Workflow file for this run

name: Tests
on:
push:
pull_request:
jobs:
test:
name: PHPUnit Tests
runs-on: ubuntu-latest
env:
COMPOSER_ROOT_VERSION: 1.x-dev
strategy:
matrix:
php: [
'7.2',
'7.3',
'7.4',
'8.0',
'8.1',
'8.2',
'8.3',
'8.4',
'8.5',
'8.6',
]
extensions: [
"none, iconv, json, dom, mbstring, xml, xmlwriter, tokenizer, pdo_sqlite",
"apc, apcu, bcmath, curl, ctype, dom, iconv, intl-73.2, json, ldap, mbstring, mongodb, mysqli, pdo_dblib, pdo_firebird, pdo_mysql, pdo_odbc, pdo_pgsql, pdo_sqlite, odbc, tidy, tokenizer, uuid, xml, xmlwriter",
]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
extensions: "${{ matrix.extensions }}"
ini-values: "memory_limit=-1, session.gc_probability=0, apc.enable_cli=1"
php-version: "${{ matrix.php }}"
tools: "composer:v2, pie"
- name: Install ext-deepclone via PIE
if: ${{ !startsWith(matrix.extensions, 'none') && matrix.php >= '8.2' }}
run: |
sudo BOX_REQUIREMENT_CHECKER=0 pie install symfony/deepclone
php --ri deepclone || echo "extension=deepclone" | sudo tee "$(php -r 'echo PHP_CONFIG_FILE_SCAN_DIR;')/99-deepclone.ini"
php -m | grep -q deepclone && echo "deepclone loaded" || echo "deepclone NOT loaded"
- name: Drop symfony/intl on PHP < 8.1
if: matrix.php < '8.1'
run: composer remove --dev --no-update symfony/intl
- name: Install dependencies
run: |
composer --prefer-source --no-progress --ansi install
./phpunit install
- name: Run tests
run: |
ok=0
./phpunit || ok=1
[[ "${{ matrix.mode }}" = experimental ]] || (exit $ok)