Skip to content

Commit a43fad5

Browse files
Add PHP 8 compatibility and Use github actions as test CI
1 parent 469af9d commit a43fad5

File tree

3 files changed

+70
-67
lines changed

3 files changed

+70
-67
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Test application
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'master'
8+
- '[0-9]+.x'
9+
- '[0-9]+.[0-9]+'
10+
- '[0-9]+.[0-9]+.x'
11+
12+
jobs:
13+
test:
14+
name: 'PHP ${{ matrix.php-version }}, Symfony ${{ matrix.symfony-version }}'
15+
runs-on: ubuntu-latest
16+
17+
env:
18+
SYMFONY_PHPUNIT_VERSION: 8
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- php-version: '7.1'
25+
composer-flags: '--prefer-lowest'
26+
symfony-version: '^3.4'
27+
env:
28+
SYMFONY_DEPRECATIONS_HELPER: 'weak'
29+
- php-version: '7.2'
30+
- php-version: '7.3'
31+
- php-version: '7.4'
32+
symfony-version: '^4.4'
33+
- php-version: '7.4'
34+
symfony-version: '5.0.*'
35+
- php-version: '8.0'
36+
37+
steps:
38+
- name: Checkout project
39+
uses: actions/checkout@v2
40+
41+
- name: Install and configure PHP
42+
uses: shivammathur/setup-php@v2
43+
with:
44+
php-version: ${{ matrix.php-version }}
45+
tools: 'composer:v2'
46+
47+
- name: Get composer cache directory
48+
id: composer-cache-dir
49+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
50+
51+
- name: Cache dependencies
52+
uses: actions/cache@v2
53+
with:
54+
path: ${{ steps.composer-cache-dir.outputs.dir }}
55+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json', 'composer.lock') }}
56+
restore-keys: |
57+
${{ runner.os }}-composer-
58+
59+
- name: Require Specific Symfony Version
60+
if: ${{ matrix.symfony-version }}
61+
run: composer require --no-update symfony/symfony:${{ matrix.symfony-version }}
62+
63+
- name: Install dependencies
64+
run: |
65+
composer validate --strict
66+
composer update ${{ matrix.composer-flags }}
67+
68+
- name: Execute test cases
69+
run: make test

.travis.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.1",
12+
"php": "^7.1|^8.0",
1313
"doctrine/data-fixtures": "^1.2",
1414
"symfony/browser-kit": "^3.4.26 || ^4.3.8 || ^5.0"
1515
},

0 commit comments

Comments
 (0)