Skip to content

Commit b7171bc

Browse files
authored
Merge pull request #168 from joostdebruijn/chore-supported-versions
chore: change supported versions
2 parents c8778df + d3814d8 commit b7171bc

File tree

4 files changed

+43
-46
lines changed

4 files changed

+43
-46
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ jobs:
1111
strategy:
1212
fail-fast: true
1313
matrix:
14-
php: [7.3, 7.4, 8.0]
14+
php: [8.1, 8.0]
15+
laravel: [9.*, 8.*]
16+
stability: [prefer-lowest, prefer-stable]
17+
include:
18+
- laravel: 9.*
19+
testbench: 7.*
20+
- laravel: 8.*
21+
testbench: ^6.23
1522

16-
name: PHP ${{ matrix.php }}
23+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
1724

1825
steps:
1926
- name: Checkout code
@@ -29,7 +36,7 @@ jobs:
2936
path: ${{ steps.composer-cache.outputs.dir }}
3037
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
3138
restore-keys: |
32-
${{ runner.os }}-${{ matrix.php }}-composer-
39+
${{ runner.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-
3340
3441
- name: Setup PHP
3542
uses: shivammathur/setup-php@v2
@@ -39,11 +46,9 @@ jobs:
3946
coverage: none
4047

4148
- name: Install dependencies
42-
uses: nick-invision/retry@v1
43-
with:
44-
timeout_minutes: 2
45-
max_attempts: 2
46-
command: composer install --prefer-dist --no-interaction --no-progress --ignore-platform-reqs
49+
run: |
50+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
51+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4752
4853
- name: Run tests
4954
run: vendor/bin/phpunit

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^7.2|^8.0",
16-
"illuminate/notifications": "^5.3|^6.0|^7.0|^8.0",
17-
"illuminate/support": "^5.1|^6.0|^7.0|^8.0",
15+
"php": "^8.0",
16+
"illuminate/notifications": "^8.0|^9.0",
17+
"illuminate/support": "^8.0|^9.0",
1818
"minishlink/web-push": "^6.0"
1919
},
2020
"require-dev": {
2121
"mockery/mockery": "~1.0",
22-
"orchestra/testbench": "^4.0",
23-
"phpunit/phpunit": "^8.5"
22+
"orchestra/testbench": "^6.0|^7.0",
23+
"phpunit/phpunit": "^9.0"
2424
},
2525
"autoload": {
2626
"psr-4": {

phpunit.xml.dist

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
verbose="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnFailure="false">
12-
<testsuites>
13-
<testsuite name="Test Suite">
14-
<directory>tests</directory>
15-
</testsuite>
16-
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">src/</directory>
20-
</whitelist>
21-
</filter>
22-
<logging>
23-
<log type="tap" target="build/report.tap"/>
24-
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage" />
26-
<log type="coverage-text" target="build/coverage.txt"/>
27-
<log type="coverage-clover" target="build/logs/clover.xml"/>
28-
</logging>
29-
<php>
30-
<env name="DB_CONNECTION" value="sqlite"/>
31-
<env name="DB_DATABASE" value=":memory:"/>
32-
</php>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">src/</directory>
6+
</include>
7+
<report>
8+
<clover outputFile="build/logs/clover.xml"/>
9+
<html outputDirectory="build/coverage"/>
10+
<text outputFile="build/coverage.txt"/>
11+
</report>
12+
</coverage>
13+
<testsuites>
14+
<testsuite name="Test Suite">
15+
<directory>tests</directory>
16+
</testsuite>
17+
</testsuites>
18+
<logging>
19+
<junit outputFile="build/report.junit.xml"/>
20+
</logging>
21+
<php>
22+
<env name="DB_CONNECTION" value="sqlite"/>
23+
<env name="DB_DATABASE" value=":memory:"/>
24+
</php>
3325
</phpunit>

tests/VapidKeysGenerateCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function it_can_generate_and_set_vapid_keys()
4646

4747
$envContents = file_get_contents($envPath);
4848

49-
$this->assertRegExp('/^VAPID_PUBLIC_KEY=/m', $envContents);
50-
$this->assertRegExp('/^VAPID_PRIVATE_KEY=/m', $envContents);
49+
$this->assertMatchesRegularExpression('/^VAPID_PUBLIC_KEY=/m', $envContents);
50+
$this->assertMatchesRegularExpression('/^VAPID_PRIVATE_KEY=/m', $envContents);
5151
}
5252
}

0 commit comments

Comments
 (0)