Skip to content

Commit ef36731

Browse files
authoredFeb 8, 2023
Merge pull request #46 from stackkit/feature/laravel-10
Add support for Laravel 10
2 parents 58ad83b + 1aa5c20 commit ef36731

File tree

6 files changed

+70
-72
lines changed

6 files changed

+70
-72
lines changed
 

‎.github/workflows/run-tests.yml

+18-29
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,22 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php: [8.1, 8.0, 7.4, 7.3, 7.2]
15-
laravel: [9.*, 8.*, 7.*, 6.*]
1614
os: [ubuntu-latest]
17-
include:
18-
- laravel: 9.*
19-
testbench: 7.*
20-
- laravel: 8.*
21-
testbench: 6.*
22-
- laravel: 7.*
23-
testbench: 5.*
24-
- laravel: 6.*
25-
testbench: 4.*
26-
exclude:
27-
- laravel: 9.*
28-
php: 7.2
29-
- laravel: 9.*
30-
php: 7.3
31-
- laravel: 9.*
32-
php: 7.4
33-
- laravel: 8.*
34-
php: 7.2
35-
- laravel: 6.*
36-
php: 8.1
37-
- laravel: 7.*
38-
php: 8.1
15+
payload:
16+
- { laravel: '10.*', php: '8.2', 'testbench': '8.*'}
17+
- { laravel: '10.*', php: '8.1', 'testbench': '8.*'}
18+
- { laravel: '9.*', php: '8.2', 'testbench': '7.*'}
19+
- { laravel: '9.*', php: '8.1', 'testbench': '7.*'}
20+
- { laravel: '9.*', php: '8.0', 'testbench': '7.*'}
21+
- { laravel: '8.*', php: '8.1', 'testbench': '6.*'}
22+
- { laravel: '8.*', php: '8.0', 'testbench': '6.*'}
23+
- { laravel: '8.*', php: '7.4', 'testbench': '6.*'}
24+
- { laravel: '7.*', php: '8.0', 'testbench': '5.*' }
25+
- { laravel: '7.*', php: '7.4', 'testbench': '5.*' }
26+
- { laravel: '6.*', php: '8.0', 'testbench': '4.*' }
27+
- { laravel: '6.*', php: '7.4', 'testbench': '4.*' }
3928

40-
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
29+
name: PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }}
4130

4231
services:
4332
mysql:
@@ -54,19 +43,19 @@ jobs:
5443

5544
steps:
5645
- name: Checkout code
57-
uses: actions/checkout@v1
46+
uses: actions/checkout@v3
5847

5948
- name: Setup PHP
6049
uses: shivammathur/setup-php@v2
6150
with:
62-
php-version: ${{ matrix.php }}
51+
php-version: ${{ matrix.payload.php }}
6352
extensions: mbstring, dom, fileinfo, mysql
6453
coverage: none
6554

6655
- name: Install dependencies
6756
run: |
68-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
69-
composer update --prefer-stable --prefer-dist --no-interaction --no-suggest
57+
composer require "laravel/framework:${{ matrix.payload.laravel }}" "orchestra/testbench:${{ matrix.payload.testbench }}" --no-interaction --no-update
58+
composer update --prefer-stable --prefer-dist --no-interaction
7059
- name: Execute tests
7160
env:
7261
CI_DB_DRIVER: mysql

‎CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## 6.1.0 - 2023-02-08
8+
9+
**Changed**
10+
11+
- Added support for Laravel 10
12+
713
## 6.0.0 - 2022-02-10
814

915
**Added**

‎README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,7 @@ We feel the package is currently feature complete, but feel free to send a pull
2121

2222
This package requires Laravel 6.0 or higher.
2323

24-
Please check the table below for supported Laravel and PHP versions:
25-
26-
|Laravel Version| PHP Version |
27-
|---|---|
28-
| 6.x | 7.2 or 7.3 or 7.4 or 8.0
29-
| 7.x | 7.2 or 7.3 or 7.4 or 8.0
30-
| 8.x | 7.3 or 7.4 or 8.0 or 8.1
31-
| 9.x | 8.0 or 8.1
24+
Please check the [Laravel support policy](https://laravel.com/docs/master/releases#support-policy) table for supported Laravel and PHP versions.
3225

3326
# Installation
3427

‎composer.json

+25-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@
3030
},
3131
"require-dev": {
3232
"mockery/mockery": "^1.2",
33-
"orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0 || ^5.0"
33+
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0"
34+
},
35+
"minimum-stability": "dev",
36+
"prefer-stable": true,
37+
"scripts": {
38+
"l10": [
39+
"composer require laravel/framework:10.* orchestra/testbench:8.* --no-interaction --no-update",
40+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
41+
],
42+
"l9": [
43+
"composer require laravel/framework:9.* orchestra/testbench:7.* --no-interaction --no-update",
44+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
45+
],
46+
"l8": [
47+
"composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update",
48+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
49+
],
50+
"l7": [
51+
"composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update",
52+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
53+
],
54+
"l6": [
55+
"composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update",
56+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
57+
]
3458
}
3559
}

‎phpunit.xml

+20-30
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
11-
12-
<testsuites>
13-
<testsuite name="Orchestra\Testbench Test Suite">
14-
<directory suffix="Test.php">./tests/</directory>
15-
</testsuite>
16-
</testsuites>
17-
<php>
18-
<env name="APP_ENV" value="testing"/>
19-
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
20-
<env name="CACHE_DRIVER" value="array"/>
21-
<env name="SESSION_DRIVER" value="array"/>
22-
<env name="QUEUE_DRIVER" value="sync"/>
23-
<env name="MAIL_DRIVER" value="log"/>
24-
<env name="DB_CONNECTION" value="testbench"/>
25-
</php>
26-
27-
<filter>
28-
<whitelist addUncoveredFilesFromWhitelist="false">
29-
<directory suffix=".php">src/</directory>
30-
</whitelist>
31-
</filter>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<coverage includeUncoveredFiles="false">
4+
<include>
5+
<directory suffix=".php">src/</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="Orchestra\Testbench Test Suite">
10+
<directory suffix="Test.php">./tests/</directory>
11+
</testsuite>
12+
</testsuites>
13+
<php>
14+
<env name="APP_ENV" value="testing"/>
15+
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
16+
<env name="CACHE_DRIVER" value="array"/>
17+
<env name="SESSION_DRIVER" value="array"/>
18+
<env name="QUEUE_DRIVER" value="sync"/>
19+
<env name="MAIL_DRIVER" value="log"/>
20+
<env name="DB_CONNECTION" value="testbench"/>
21+
</php>
3222
</phpunit>

‎src/MailableReader.php

-4
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ private function readSubject(EmailComposer $composer): void
125125
*/
126126
private function readBody(EmailComposer $composer): void
127127
{
128-
if (app()->version() < '5.5') {
129-
throw new Exception('Mailables cannot be read by Laravel 5.4 and below. Sorry.');
130-
}
131-
132128
$composer->setData('view', '');
133129

134130
$mailable = $composer->getData('mailable');

0 commit comments

Comments
 (0)
Please sign in to comment.