Skip to content

Commit 19c5d79

Browse files
authored
Merge pull request #2 from dcsg/upgrade-php-versions
upgrade php versions
2 parents f785ec9 + 3772e98 commit 19c5d79

File tree

3 files changed

+71
-1
lines changed

3 files changed

+71
-1
lines changed

.github/workflows/phpunit.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "PHPUnit"
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'examples/**'
7+
pull_request:
8+
paths-ignore:
9+
- 'examples/**'
10+
11+
env:
12+
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
13+
SYMFONY_PHPUNIT_VERSION: ""
14+
15+
jobs:
16+
tests:
17+
name: "PHPUnit"
18+
19+
runs-on: ubuntu-latest
20+
continue-on-error: ${{ matrix.experimental }}
21+
22+
strategy:
23+
matrix:
24+
include:
25+
- php-version: "7.2"
26+
experimental: false
27+
- php-version: "7.4"
28+
experimental: false
29+
- php-version: "8.0"
30+
experimental: false
31+
- php-version: "8.1"
32+
experimental: false
33+
fail-fast: false
34+
35+
steps:
36+
- name: "Checkout"
37+
uses: "actions/checkout@v3"
38+
39+
- name: "Install PHP"
40+
uses: "shivammathur/setup-php@v2"
41+
with:
42+
coverage: "none"
43+
extensions: "intl, zip"
44+
ini-values: "memory_limit=-1"
45+
php-version: "${{ matrix.php-version }}"
46+
47+
- name: "Determine composer cache directory"
48+
id: "determine-composer-cache-directory"
49+
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
50+
51+
- name: "Cache dependencies installed with composer"
52+
uses: "actions/cache@v2"
53+
with:
54+
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
55+
key: "php-${{ matrix.php-version }}-symfony-php-unit-version-${{ env.SYMFONY_PHPUNIT_VERSION }}-${{ hashFiles('**/composer.lock') }}"
56+
restore-keys: "php-${{ matrix.php-version }}-symfony-php-unit-version-${{ env.SYMFONY_PHPUNIT_VERSION }}"
57+
58+
- name: "Install highest dependencies"
59+
if: "matrix.experimental == true"
60+
run: "composer config platform --unset && composer update ${{ env.COMPOSER_FLAGS }}"
61+
62+
- name: "Install locked dependencies"
63+
if: "matrix.experimental == false"
64+
run: "composer config platform --unset && composer update ${{ env.COMPOSER_FLAGS }}"
65+
66+
- name: "Run PHPUnit"
67+
run: "vendor/bin/phpunit"

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ sudo: false
88
php:
99
- 7.2
1010
- 7.3
11+
- 7.4
12+
- 8.0
13+
- 8.1
1114

1215
matrix:
1316

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^7.2"
20+
"php": "^7.2|^7.4|^8.0|^8.1"
2121
},
2222
"require-dev": {
2323
"phpunit/phpunit": "^8",

0 commit comments

Comments
 (0)