Skip to content

Commit 1b06063

Browse files
committed
Upgrade for Laravel 11
1 parent 152014c commit 1b06063

File tree

4 files changed

+54
-52
lines changed

4 files changed

+54
-52
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

.phpunit.cache/test-results

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":[],"times":{"NotificationChannels\\Cmsms\\Test\\CmsmsChannelTest::it_can_be_instantiated":0.001,"NotificationChannels\\Cmsms\\Test\\CmsmsChannelTest::it_shares_message":0.002,"NotificationChannels\\Cmsms\\Test\\CmsmsClientTest::it_can_be_instantiated":0.009,"NotificationChannels\\Cmsms\\Test\\CmsmsClientTest::it_can_send_message":0.002,"NotificationChannels\\Cmsms\\Test\\CmsmsClientTest::it_sets_a_default_originator_if_none_is_set":0.002,"NotificationChannels\\Cmsms\\Test\\CmsmsClientTest::it_throws_exception_on_error_response":0,"NotificationChannels\\Cmsms\\Test\\CmsmsClientTest::it_includes_tariff_in_xml":0.001,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_can_be_instantiated":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_can_accept_body_content_when_created":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_supports_create_method":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_can_set_body":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_can_set_originator":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_cannot_set_an_empty_originator":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_cannot_set_an_originator_thats_too_long":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_can_set_reference":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_cannot_set_an_empty_reference":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_cannot_set_a_reference_thats_too_long":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_cannot_set_a_reference_that_contains_non_alpha_numeric_values":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_can_set_tariff":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_can_set_an_empty_tariff":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_cannot_have_a_higher_minimum_than_maximum_for_multipart":0,"NotificationChannels\\Cmsms\\Test\\CmsmsMessageTest::it_xml_contains_only_filled_parameters":0}}

composer.json

Lines changed: 4 additions & 4 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",
1818
"illuminate/notifications": "9.0 || ^10.0",
19-
"illuminate/support": "^9.0 || ^10.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)