Skip to content

Commit 51bef22

Browse files
Added support for PHP 8.0 (#8)
* Added support for PHP 8.0 * Updated tests * Added phpunit 9 test workflow
1 parent 9f6b3e9 commit 51bef22

File tree

5 files changed

+357
-116
lines changed

5 files changed

+357
-116
lines changed

.github/workflows/tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,35 @@ jobs:
1919
- name: Install dependencies
2020
run: composer update --dev --no-interaction --prefer-dist --no-progress --no-suggest --ansi
2121

22+
- name: Run phpunit
23+
run: |
24+
./vendor/bin/phpunit --testsuite "Functional Tests"
25+
26+
27+
testsPhp8:
28+
name: Run PHP Unit tests (>= 7.3)
29+
runs-on: ubuntu-20.04
30+
strategy:
31+
matrix:
32+
php: ['7.3', '7.4', '8.0']
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
37+
- name: Install mupdf and imagemagick
38+
run: sudo apt-get install mupdf-tools imagemagick
39+
40+
- name: Install php
41+
uses: shivammathur/setup-php@v2
42+
with:
43+
php-version: "${{ matrix.php }}"
44+
45+
- name: Upgrade phpunit
46+
run: composer require --dev --with-all-dependencies "phpunit/phpunit=^9.0"
47+
48+
- name: Install dependencies
49+
run: composer update --dev --no-interaction --prefer-dist --no-progress --no-suggest --ansi
50+
2251
- name: Run phpunit
2352
run: |
2453
./vendor/bin/phpunit --testsuite "Functional Tests"

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": "^5.6 || ^7.0",
20+
"php": "^5.6 || ^7.0 || ^8.0",
2121
"ext-openssl": "*",
2222
"setasign/fpdi": "^2.0"
2323
},

0 commit comments

Comments
 (0)