Skip to content

Commit 106364b

Browse files
committed
Add support for Laravel 10
1 parent 58ad83b commit 106364b

File tree

6 files changed

+59
-69
lines changed

6 files changed

+59
-69
lines changed

.github/workflows/run-tests.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,15 @@ jobs:
1414
php: [8.1, 8.0, 7.4, 7.3, 7.2]
1515
laravel: [9.*, 8.*, 7.*, 6.*]
1616
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
17+
payload:
18+
- { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.2', 'testbench': '8.*' }
19+
- { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.1', 'testbench': '8.*' }
20+
- { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.2', 'testbench': '7.*' }
21+
- { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.1', 'testbench': '7.*' }
22+
- { queue: 'github-actions-laravel9-php80', laravel: '9.*', php: '8.0', 'testbench': '7.*' }
23+
- { queue: 'github-actions-laravel8-php81', laravel: '8.*', php: '8.1', 'testbench': '6.*' }
24+
- { queue: 'github-actions-laravel8-php80', laravel: '8.*', php: '8.0', 'testbench': '6.*' }
25+
- { queue: 'github-actions-laravel8-php74', laravel: '8.*', php: '7.4', 'testbench': '6.*' }
3926

4027
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
4128

@@ -54,7 +41,7 @@ jobs:
5441

5542
steps:
5643
- name: Checkout code
57-
uses: actions/checkout@v1
44+
uses: actions/checkout@v3
5845

5946
- name: Setup PHP
6047
uses: shivammathur/setup-php@v2
@@ -66,7 +53,7 @@ jobs:
6653
- name: Install dependencies
6754
run: |
6855
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
56+
composer update --prefer-stable --prefer-dist --no-interaction
7057
- name: Execute tests
7158
env:
7259
CI_DB_DRIVER: mysql

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ 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+
- Dropped support for Laravel 6 and 7
13+
714
## 6.0.0 - 2022-02-10
815

916
**Added**

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,9 @@ We feel the package is currently feature complete, but feel free to send a pull
1919

2020
# Requirements
2121

22-
This package requires Laravel 6.0 or higher.
22+
This package requires Laravel 8.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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,27 @@
2626
}
2727
},
2828
"require": {
29-
"ext-json": "*"
29+
"ext-json": "*",
30+
"illuminate/support": "^8.0|^9.0|^10.0"
3031
},
3132
"require-dev": {
3233
"mockery/mockery": "^1.2",
33-
"orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0 || ^5.0"
34+
"orchestra/testbench": "^6.0 || ^7.0 || ^8.0"
35+
},
36+
"minimum-stability": "dev",
37+
"prefer-stable": true,
38+
"scripts": {
39+
"l10": [
40+
"composer require laravel/framework:10.* orchestra/testbench:8.* --no-interaction --no-update",
41+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
42+
],
43+
"l9": [
44+
"composer require laravel/framework:9.* orchestra/testbench:7.* --no-interaction --no-update",
45+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
46+
],
47+
"l8": [
48+
"composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update",
49+
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
50+
]
3451
}
3552
}

phpunit.xml

Lines changed: 20 additions & 30 deletions
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

Lines changed: 0 additions & 4 deletions
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)