Skip to content

Commit 2deeb96

Browse files
Merge pull request #19 from laravel-notification-channels/laravel11
Upgrade for Laravel 11
2 parents 152014c + ef9bac6 commit 2deeb96

File tree

4 files changed

+55
-53
lines changed

4 files changed

+55
-53
lines changed

.github/workflows/run-tests.yml

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
11
name: run-tests
22

3-
on: [ push, pull_request ]
3+
on:
4+
push:
5+
pull_request:
46

57
jobs:
6-
test:
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
fail-fast: true
10-
matrix:
11-
os: [ ubuntu-latest ]
12-
php: [ 8.1 ]
13-
laravel: [ 9.*, 10.* ]
14-
dependency-version: [ prefer-lowest, prefer-stable ]
15-
include:
16-
- laravel: 9.*
17-
testbench: 7.*
18-
- laravel: 10.*
19-
testbench: 8.*
20-
21-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
22-
23-
steps:
24-
- name: Checkout code
25-
uses: actions/checkout@v2
26-
27-
- name: Cache dependencies
28-
uses: actions/cache@v2
29-
with:
30-
path: ~/.composer/cache/files
31-
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
32-
33-
- name: Setup PHP
34-
uses: shivammathur/setup-php@v2
35-
with:
36-
php-version: ${{ matrix.php }}
37-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
38-
coverage: none
39-
40-
- name: Install dependencies
41-
run: |
42-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
43-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
44-
45-
- name: Execute tests
46-
run: vendor/bin/phpunit
8+
test:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: true
12+
matrix:
13+
os: [ubuntu-latest]
14+
php: [ 8.3, 8.2 ]
15+
laravel: [ '10.*', '11.*' ]
16+
stability: [prefer-lowest, prefer-stable]
17+
include:
18+
- laravel: 11.*
19+
testbench: 9.*
20+
- laravel: 10.*
21+
testbench: 8.*
22+
23+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
34+
coverage: none
35+
36+
- name: Setup problem matchers
37+
run: |
38+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
39+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
40+
41+
- name: Install dependencies
42+
run: |
43+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
44+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
45+
46+
- name: Execute tests
47+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ build
33
composer.phar
44
composer.lock
55
.phpunit.result.cache
6+
.phpunit.cache
67
.php-cs-fixer.cache

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^8.1",
15+
"php": "^8.2",
1616
"ext-simplexml": "*",
1717
"guzzlehttp/guzzle": "^7.1",
18-
"illuminate/notifications": "9.0 || ^10.0",
19-
"illuminate/support": "^9.0 || ^10.0"
18+
"illuminate/notifications": "^10.0||^11.0",
19+
"illuminate/support": "^10.0|^11.0"
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "^3.6",
2323
"mockery/mockery": "^1.5",
24-
"orchestra/testbench": "^8.0",
25-
"phpunit/phpunit": "^9.6"
24+
"orchestra/testbench": "^8.0|^9.0",
25+
"phpunit/phpunit": "^10.5|^11.0"
2626
},
2727
"config": {
2828
"sort-packages": true

phpunit.xml.dist

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
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-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
83
<testsuites>
94
<testsuite name="CmsmsChannel Test Suite">
105
<directory>tests</directory>
116
</testsuite>
127
</testsuites>
8+
<source>
9+
<include>
10+
<directory suffix=".php">src/</directory>
11+
</include>
12+
</source>
1313
</phpunit>

0 commit comments

Comments
 (0)