Skip to content

Commit bba9fa9

Browse files
committed
php 8
1 parent ef06f6c commit bba9fa9

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,36 @@ on: [push, pull_request]
44

55
jobs:
66
tests:
7-
8-
name: PHP ${{ matrix.php }}
7+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}
98

109
runs-on: ubuntu-latest
1110

1211
strategy:
1312
matrix:
14-
php: ['7.3', '7.4', '8.0', '8.1']
13+
php: ['8.0', '8.1']
14+
laravel: [8.*, 9.*]
15+
stability: [prefer-lowest, prefer-stable]
16+
include:
17+
- laravel: 8.*
18+
testbench: ^6.6
19+
- laravel: 9.*
20+
testbench: 7.*
1521

1622
steps:
1723
- name: Checkout code
1824
uses: actions/checkout@v2
1925

20-
- name: Cache composer
21-
uses: actions/cache@v1
22-
with:
23-
path: ~/.composer/cache/files
24-
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
25-
2626
- name: Setup PHP
2727
uses: shivammathur/setup-php@v2
2828
with:
2929
php-version: ${{ matrix.php }}
30-
extension-csv: bcmath, ctype, dom, fileinfo, intl, gd, json, mbstring, pdo, pdo_sqlite, openssl, sqlite, xml, zip
30+
extensions: bcmath, ctype, dom, fileinfo, intl, gd, json, mbstring, pdo, pdo_sqlite, openssl, sqlite, xml, zip
3131
coverage: none
3232

33-
- name: Install composer
34-
run: composer install --no-interaction --no-scripts --no-suggest --prefer-source
33+
- name: Install dependencies
34+
run: |
35+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
36+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
3537
3638
- name: Execute tests
3739
run: vendor/bin/phpunit

composer.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
}
2323
],
2424
"require": {
25-
"php": ">=7.3",
26-
"laravel/framework": ">=5.5",
27-
"guzzlehttp/guzzle": ">=6.0",
25+
"php": "^8.0",
26+
"laravel/framework": "^8.67|^9.0",
27+
"guzzlehttp/guzzle": "^7.4",
2828
"jenssegers/agent": "2.6.*"
2929
},
3030
"require-dev": {
31-
"phpunit/phpunit": ">=5.7",
32-
"orchestra/testbench": ">=3.4"
31+
"phpunit/phpunit": "^9.5",
32+
"orchestra/testbench": "^6.23|^7.4"
3333
},
3434
"autoload": {
3535
"psr-4": {
@@ -47,5 +47,13 @@
4747
"Akaunting\\Firewall\\Provider"
4848
]
4949
}
50+
},
51+
"scripts": {
52+
"test": "vendor/bin/phpunit"
53+
},
54+
"config": {
55+
"allow-plugins": {
56+
"composer/package-versions-deprecated": true
57+
}
5058
}
5159
}

0 commit comments

Comments
 (0)