Skip to content

Commit 7fe8d44

Browse files
author
smoench
committed
add PHP 8 support
1 parent 45a6ea7 commit 7fe8d44

6 files changed

Lines changed: 85 additions & 21 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
tools: "composer:v2"
3434
coverage: "none"
3535
git-fetch-depth: 1
36+
- php: 8.0
37+
tools: "composer:v2"
38+
coverage: "pcov"
39+
git-fetch-depth: 1
3640

3741
steps:
3842
- uses: actions/checkout@v2

.github/workflows/e2e.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: e2e
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
jobs:
9+
10+
e2e:
11+
runs-on: ubuntu-latest
12+
name: ${{ matrix.e2e }} - ${{ matrix.php }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
e2e:
17+
- 'e2e_php_settings_checker'
18+
- 'e2e_scoper_alias'
19+
- 'e2e_scoper_whitelist'
20+
- 'e2e_check_requirements'
21+
- 'e2e_symfony'
22+
- 'e2e_composer_installed_versions'
23+
php: [ '7.3', '8.0' ]
24+
tools: [ 'composer:v2' ]
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
ini-values: "phar.readonly=0"
36+
tools: ${{ matrix.tools }}
37+
coverage: pcov
38+
39+
- name: Get composer cache directory
40+
id: composercache
41+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
42+
43+
- name: Cache composer dependencies
44+
uses: actions/cache@v2
45+
with:
46+
path: ${{ steps.composercache.outputs.dir }}
47+
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('composer.*') }}
48+
restore-keys: |
49+
composer-${{ runner.os }}-${{ matrix.php }}-
50+
composer-${{ runner.os }}-
51+
composer-
52+
53+
- name: Install dependencies
54+
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
55+
56+
- name: Install requirement-checker dependencies
57+
run: composer install --no-interaction --no-progress --prefer-dist --working-dir requirement-checker
58+
59+
- name: Run e2e ${{ matrix.e2e }}
60+
run: make ${{ matrix.e2e }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"minimum-stability": "dev",
4242
"prefer-stable": true,
4343
"require": {
44-
"php": "^7.3",
44+
"php": "^7.3 || ^8.0",
4545
"ext-phar": "*",
4646
"amphp/parallel-functions": "^0.1.3",
4747
"beberlei/assert": "^3.2",

composer.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/build/dir011/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"src/functions.php"
88
]
99
},
10-
"bin": "index.php"
10+
"bin": ["index.php"]
1111
}

fixtures/build/dir012/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"php": "7.2.9"
2121
}
2222
},
23-
"bin": "bin/console",
23+
"bin": ["bin/console"],
2424
"autoload": {
2525
"psr-4": {
2626
"App\\": "src/"

0 commit comments

Comments
 (0)