Skip to content

Commit ae8c0fc

Browse files
authored
Merge pull request #47 from GrahamCampbell/php8
PHP 8.0 support
2 parents 9baa0fb + 71e30e0 commit ae8c0fc

File tree

5 files changed

+92
-78
lines changed

5 files changed

+92
-78
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +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
CONDUCT.md export-ignore
1111
CONTRIBUTING.md export-ignore
1212
phpspec.yml.ci export-ignore

.github/workflows/tests.yml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
latest:
9+
name: PHP ${{ matrix.php }} Latest
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+
tools: composer:v2
24+
coverage: none
25+
26+
- name: Install PHP 7 dependencies
27+
run: composer update --prefer-dist --no-interaction --no-progress
28+
if: "matrix.php != '8.0'"
29+
30+
- name: Install PHP 8 dependencies
31+
run: |
32+
composer require "phpunit/phpunit:^9.3@dev" "phpunit/php-code-coverage:^9.0@dev" "sebastian/global-state:^5.0@dev" "phpdocumentor/reflection-docblock:^5.2@dev" --no-interaction --no-update
33+
composer update --prefer-dist --no-interaction --no-progress --ignore-platform-req=php
34+
if: "matrix.php == '8.0'"
35+
36+
- name: Execute tests
37+
run: composer test
38+
39+
lowest:
40+
name: PHP ${{ matrix.php }} Lowest
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
php: ['7.1', '7.2', '7.3', '7.4']
45+
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v2
49+
50+
- name: Setup PHP
51+
uses: shivammathur/setup-php@v2
52+
with:
53+
php-version: ${{ matrix.php }}
54+
tools: composer:v2
55+
coverage: none
56+
57+
- name: Install dependencies
58+
run: |
59+
composer require "sebastian/comparator:^3.0.2" --no-interaction --no-update
60+
composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress
61+
62+
- name: Execute tests
63+
run: composer test
64+
65+
coverage:
66+
name: Code Coverage
67+
runs-on: ubuntu-latest
68+
69+
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@v2
72+
73+
- name: Setup PHP
74+
uses: shivammathur/setup-php@v2
75+
with:
76+
php-version: 7.4
77+
tools: composer:v2
78+
coverage: xdebug
79+
80+
- name: Install dependencies
81+
run: composer update --prefer-dist --no-interaction --no-progress
82+
83+
- name: Execute tests
84+
run: composer test-ci
85+
86+
- name: Upload coverage
87+
run: |
88+
wget https://scrutinizer-ci.com/ocular.phar
89+
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml

.travis.yml

-36
This file was deleted.

appveyor.yml

-39
This file was deleted.

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.1",
14+
"php": "^7.1 || ^8.0",
1515
"psr/http-message": "^1.0",
1616
"psr/http-factory": "^1.0",
1717
"php-http/message-factory": "^1.0.2",
1818
"php-http/discovery": "^1.7"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "^7.5 || ^8.3",
21+
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3",
2222
"php-http/message": "^1.5",
2323
"nyholm/psr7": "^1.0"
2424
},

0 commit comments

Comments
 (0)