Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Commit 33f104d

Browse files
Support PHP 8.1 and Laravel 9 (#37)
* Update composer.json * Update test matrix * Wip * Wip * Wip * Wip * Caching
1 parent 3a527fc commit 33f104d

File tree

4 files changed

+50
-68
lines changed

4 files changed

+50
-68
lines changed

.github/workflows/run-tests.yml

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,48 @@
11
name: Tests
2-
32
on:
43
pull_request:
54
push:
65
branches: [main]
7-
86
jobs:
97
test:
10-
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}
8+
name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}, ${{ matrix.dependencies }}
119
runs-on: ubuntu-latest
12-
1310
strategy:
11+
fail-fast: false
1412
matrix:
15-
php: [8.0, 7.4, 7.3]
16-
laravel: [8.*, 7.*, 6.*]
17-
dependency-version: [prefer-lowest, prefer-stable]
13+
php: ['7.3', '7.4', '8.0', '8.1']
14+
laravel: [6.*, 7.*, 8.*, 'dev-master as 9.0']
15+
dependencies: [prefer-lowest, prefer-stable]
16+
exclude:
17+
- php: '7.3'
18+
laravel: 'dev-master as 9.0'
19+
- php: '7.4'
20+
laravel: 'dev-master as 9.0'
21+
- php: '8.1'
22+
laravel: 6.*
23+
- php: '8.1'
24+
laravel: 7.*
25+
- php: '8.1'
26+
laravel: 8.*
27+
dependencies: prefer-lowest
1828
include:
19-
- laravel: 8.*
20-
testbench: 6.*
21-
- laravel: 7.*
22-
testbench: 5.*
23-
- laravel: 6.*
24-
testbench: 4.*
25-
29+
- php: '8.1'
30+
laravel: ^8.65
31+
dependencies: prefer-lowest
2632
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v2
29-
30-
- name: Cache dependencies
31-
uses: actions/cache@v2
33+
- uses: actions/checkout@v2
34+
- uses: actions/cache@v2
3235
with:
3336
path: ~/.composer/cache/files
34-
key: php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-composer-${{ hashFiles('composer.lock') }}
35-
36-
- name: Set up PHP
37-
uses: shivammathur/setup-php@v2
37+
key: php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
38+
restore-keys: |
39+
php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-composer-${{ matrix.dependencies }}-
40+
php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-
41+
php-${{ matrix.php }}-
42+
- uses: shivammathur/setup-php@v2
3843
with:
3944
php-version: ${{ matrix.php }}
40-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
41-
coverage: none
42-
43-
- name: Install dependencies
44-
run: |
45-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
46-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
47-
48-
- name: Run tests
49-
run: vendor/bin/phpunit --testdox --colors=always
45+
- run: |
46+
composer require laravel/framework:"${{ matrix.laravel }}" --no-update --no-interaction
47+
composer update --${{ matrix.dependencies }} --prefer-dist --no-interaction
48+
- run: vendor/bin/phpunit --testdox --colors=always

.gitignore

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
11
vendor/
2-
node_modules/
32
.phpunit.result.cache
4-
5-
# Laravel 4 specific
6-
bootstrap/compiled.php
7-
app/storage/
8-
9-
# Laravel 5 & Lumen specific
10-
bootstrap/cache/
11-
.env.*.php
12-
.env.php
13-
.env
14-
15-
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
16-
.rocketeer/
17-
/_ide_helper.php
18-
.idea/
193
composer.lock

composer.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@
2222
}
2323
],
2424
"require": {
25-
"php": "^7.1.3|^8.0",
26-
"illuminate/config": "~5.6|~5.7|~5.8|~6.0|~7.0|~8.0",
27-
"illuminate/console": "~5.6|~5.7|~5.8|~6.0|~7.0|~8.0",
28-
"illuminate/log": "~5.6|~5.7|~5.8|~6.0|~7.0|~8.0",
29-
"illuminate/support": "~5.6|~5.7|~5.8|~6.0|~7.0|~8.0"
25+
"php": "^7.1.3 || ~8.0.0 || ~8.1.0",
26+
"illuminate/config": "~5.6 || ~5.7 || ~5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
27+
"illuminate/console": "~5.6 || ~5.7 || ~5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
28+
"illuminate/log": "~5.6 || ~5.7 || ~5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
29+
"illuminate/support": "~5.6 || ~5.7 || ~5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
3030
},
3131
"require-dev": {
3232
"fakerphp/faker": "^1.9.1",
3333
"laravel/legacy-factories": "^1.0.4",
3434
"mockery/mockery": "^1.3.2",
35-
"orchestra/testbench": "~3.0|~4.0|~5.0|~6.0",
36-
"phpunit/phpunit": "~9.3"
35+
"orchestra/testbench": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
36+
"phpunit/phpunit": "^8.5.21 || ^9.0"
3737
},
3838
"autoload": {
3939
"psr-4": {
@@ -52,5 +52,12 @@
5252
"Tightenco\\Quicksand\\QuicksandServiceProvider"
5353
]
5454
}
55-
}
55+
},
56+
"config": {
57+
"optimize-autoloader": true,
58+
"preferred-install": "dist",
59+
"sort-packages": true
60+
},
61+
"minimum-stability": "dev",
62+
"prefer-stable": true
5663
}

phpunit.xml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage includeUncoveredFiles="false">
4-
<include>
5-
<directory suffix=".php">./src</directory>
6-
</include>
7-
<exclude>
8-
<file>./src/QuicksandServiceProvider.php</file>
9-
</exclude>
10-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
113
<testsuites>
12-
<testsuite name="Package Test Suite">
13-
<directory suffix="Test.php">./tests/</directory>
4+
<testsuite name="Quicksand Tests">
5+
<directory suffix="Test.php">./tests</directory>
146
</testsuite>
157
</testsuites>
168
</phpunit>

0 commit comments

Comments
 (0)