Skip to content

Commit dcc6fad

Browse files
authored
Merge pull request #19 from GrahamCampbell/patch-2
Allow PHP 8
2 parents c24dd04 + 9a91404 commit dcc6fad

File tree

5 files changed

+68
-44
lines changed

5 files changed

+68
-44
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
spec/ export-ignore
22
tests/ export-ignore
3+
.github/ export-ignore
34
.editorconfig export-ignore
45
.gitattributes export-ignore
56
.gitignore export-ignore
67
.php_cs export-ignore
78
.scrutinizer.yml export-ignore
89
.styleci.yml export-ignore
9-
.travis.yml export-ignore
1010
CONTRIBUTING export-ignore
1111
phpspec.yml.ci export-ignore
1212
phpspec.yml.dist export-ignore
13-
phpunit.xml.dist export-ignore

.github/workflows/tests.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
name: PHP ${{ matrix.php }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
php: ['7.1', '7.2', '7.3', '7.4', '8.0']
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php }}
23+
extensions: curl
24+
tools: composer:v2
25+
coverage: none
26+
27+
- name: Install PHP 7 dependencies
28+
run: composer update --prefer-dist --no-interaction --no-progress
29+
if: "matrix.php != '8.0'"
30+
31+
- name: Install PHP 8 dependencies
32+
run: composer update --prefer-dist --no-interaction --no-progress --ignore-platform-reqs
33+
if: "matrix.php == '8.0'"
34+
35+
- name: Execute tests
36+
run: composer test
37+
38+
coverage:
39+
name: Code Coverage
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v2
45+
46+
- name: Setup PHP
47+
uses: shivammathur/setup-php@v2
48+
with:
49+
php-version: 7.4
50+
extensions: curl
51+
tools: composer:v2
52+
coverage: xdebug
53+
54+
- name: Install dependencies
55+
run: composer update --prefer-dist --no-interaction --no-progress
56+
57+
- name: Execute tests
58+
run: composer test-ci
59+
60+
- name: Upload coverage
61+
run: |
62+
wget https://scrutinizer-ci.com/ocular.phar
63+
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml

.travis.yml

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

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
}
1616
],
1717
"require": {
18-
"php" : "^7.1"
18+
"php" : "^7.1 || ^8.0"
1919
},
2020
"require-dev": {
21-
"phpspec/phpspec": "^2.4",
22-
"henrikbjorn/phpspec-code-coverage" : "^1.0"
21+
"friends-of-phpspec/phpspec-code-coverage" : "^4.3.2",
22+
"phpspec/phpspec": "^5.1.2 || ^6.2"
2323
},
2424
"autoload": {
2525
"psr-4": {

phpspec.yml.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ suites:
44
psr4_prefix: Http\Promise
55
formatter.name: pretty
66
extensions:
7-
- PhpSpec\Extension\CodeCoverageExtension
7+
FriendsOfPhpSpec\PhpSpec\CodeCoverage\CodeCoverageExtension: ~
88
code_coverage:
99
format: clover
1010
output: build/coverage.xml

0 commit comments

Comments
 (0)