From 106364b96fa7eac127d4ebe631984861d9c7025d Mon Sep 17 00:00:00 2001 From: Marick van Tuil Date: Wed, 8 Feb 2023 21:05:43 +0100 Subject: [PATCH 1/4] Add support for Laravel 10 --- .github/workflows/run-tests.yml | 35 ++++++++--------------- CHANGELOG.md | 7 +++++ README.md | 11 ++------ composer.json | 21 ++++++++++++-- phpunit.xml | 50 +++++++++++++-------------------- src/MailableReader.php | 4 --- 6 files changed, 59 insertions(+), 69 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 063463c..5474c95 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,28 +14,15 @@ jobs: php: [8.1, 8.0, 7.4, 7.3, 7.2] laravel: [9.*, 8.*, 7.*, 6.*] os: [ubuntu-latest] - include: - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: 6.* - - laravel: 7.* - testbench: 5.* - - laravel: 6.* - testbench: 4.* - exclude: - - laravel: 9.* - php: 7.2 - - laravel: 9.* - php: 7.3 - - laravel: 9.* - php: 7.4 - - laravel: 8.* - php: 7.2 - - laravel: 6.* - php: 8.1 - - laravel: 7.* - php: 8.1 + payload: + - { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.2', 'testbench': '8.*' } + - { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.1', 'testbench': '8.*' } + - { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.2', 'testbench': '7.*' } + - { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.1', 'testbench': '7.*' } + - { queue: 'github-actions-laravel9-php80', laravel: '9.*', php: '8.0', 'testbench': '7.*' } + - { queue: 'github-actions-laravel8-php81', laravel: '8.*', php: '8.1', 'testbench': '6.*' } + - { queue: 'github-actions-laravel8-php80', laravel: '8.*', php: '8.0', 'testbench': '6.*' } + - { queue: 'github-actions-laravel8-php74', laravel: '8.*', php: '7.4', 'testbench': '6.*' } name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} @@ -54,7 +41,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -66,7 +53,7 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --prefer-stable --prefer-dist --no-interaction --no-suggest + composer update --prefer-stable --prefer-dist --no-interaction - name: Execute tests env: CI_DB_DRIVER: mysql diff --git a/CHANGELOG.md b/CHANGELOG.md index e0b0367..407cef6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 6.1.0 - 2023-02-08 + +**Changed** + +- Added support for Laravel 10 +- Dropped support for Laravel 6 and 7 + ## 6.0.0 - 2022-02-10 **Added** diff --git a/README.md b/README.md index 457a323..bf3db92 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,9 @@ We feel the package is currently feature complete, but feel free to send a pull # Requirements -This package requires Laravel 6.0 or higher. +This package requires Laravel 8.0 or higher. -Please check the table below for supported Laravel and PHP versions: - -|Laravel Version| PHP Version | -|---|---| -| 6.x | 7.2 or 7.3 or 7.4 or 8.0 -| 7.x | 7.2 or 7.3 or 7.4 or 8.0 -| 8.x | 7.3 or 7.4 or 8.0 or 8.1 -| 9.x | 8.0 or 8.1 +Please check the [Laravel support policy](https://laravel.com/docs/master/releases#support-policy) table for supported Laravel and PHP versions. # Installation diff --git a/composer.json b/composer.json index 583fb0d..eb56e5a 100644 --- a/composer.json +++ b/composer.json @@ -26,10 +26,27 @@ } }, "require": { - "ext-json": "*" + "ext-json": "*", + "illuminate/support": "^8.0|^9.0|^10.0" }, "require-dev": { "mockery/mockery": "^1.2", - "orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0 || ^5.0" + "orchestra/testbench": "^6.0 || ^7.0 || ^8.0" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "scripts": { + "l10": [ + "composer require laravel/framework:10.* orchestra/testbench:8.* --no-interaction --no-update", + "composer update --prefer-stable --prefer-dist --no-interaction --no-suggest" + ], + "l9": [ + "composer require laravel/framework:9.* orchestra/testbench:7.* --no-interaction --no-update", + "composer update --prefer-stable --prefer-dist --no-interaction --no-suggest" + ], + "l8": [ + "composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update", + "composer update --prefer-stable --prefer-dist --no-interaction --no-suggest" + ] } } diff --git a/phpunit.xml b/phpunit.xml index 24fb777..eb3301d 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,32 +1,22 @@ - - - - - ./tests/ - - - - - - - - - - - - - - - src/ - - + + + + src/ + + + + + ./tests/ + + + + + + + + + + + diff --git a/src/MailableReader.php b/src/MailableReader.php index f926540..f1307d6 100644 --- a/src/MailableReader.php +++ b/src/MailableReader.php @@ -125,10 +125,6 @@ private function readSubject(EmailComposer $composer): void */ private function readBody(EmailComposer $composer): void { - if (app()->version() < '5.5') { - throw new Exception('Mailables cannot be read by Laravel 5.4 and below. Sorry.'); - } - $composer->setData('view', ''); $mailable = $composer->getData('mailable'); From 9c8db84b4422f3aa02ca3706a7e5dc955c6a609f Mon Sep 17 00:00:00 2001 From: Marick van Tuil Date: Wed, 8 Feb 2023 21:09:59 +0100 Subject: [PATCH 2/4] Fix Github Actions yml --- .github/workflows/run-tests.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5474c95..682bc76 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -7,12 +7,10 @@ on: jobs: php-tests: - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.payload.os }} strategy: matrix: - php: [8.1, 8.0, 7.4, 7.3, 7.2] - laravel: [9.*, 8.*, 7.*, 6.*] os: [ubuntu-latest] payload: - { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.2', 'testbench': '8.*' } @@ -24,7 +22,7 @@ jobs: - { queue: 'github-actions-laravel8-php80', laravel: '8.*', php: '8.0', 'testbench': '6.*' } - { queue: 'github-actions-laravel8-php74', laravel: '8.*', php: '7.4', 'testbench': '6.*' } - name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} + name: PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }} services: mysql: @@ -46,13 +44,13 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} + php-version: ${{ matrix.payload.php }} extensions: mbstring, dom, fileinfo, mysql coverage: none - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.payload.laravel }}" "orchestra/testbench:${{ matrix.payload.testbench }}" --no-interaction --no-update composer update --prefer-stable --prefer-dist --no-interaction - name: Execute tests env: From add50fd5290485faf98916bd2484a2b4b6bf8d18 Mon Sep 17 00:00:00 2001 From: Marick van Tuil Date: Wed, 8 Feb 2023 21:13:53 +0100 Subject: [PATCH 3/4] Fix Github Actions yml --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 682bc76..c939408 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -7,7 +7,7 @@ on: jobs: php-tests: - runs-on: ${{ matrix.payload.os }} + runs-on: ${{ matrix.os }} strategy: matrix: From 1aa5c20ede0e36baec3b3971bb415692fcfe35a1 Mon Sep 17 00:00:00 2001 From: Marick van Tuil Date: Wed, 8 Feb 2023 21:38:52 +0100 Subject: [PATCH 4/4] Bring back support for Laravel 6 and 7 --- .github/workflows/run-tests.yml | 20 ++++++++++++-------- CHANGELOG.md | 1 - README.md | 2 +- composer.json | 13 ++++++++++--- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c939408..a74f70f 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,14 +13,18 @@ jobs: matrix: os: [ubuntu-latest] payload: - - { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.2', 'testbench': '8.*' } - - { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.1', 'testbench': '8.*' } - - { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.2', 'testbench': '7.*' } - - { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.1', 'testbench': '7.*' } - - { queue: 'github-actions-laravel9-php80', laravel: '9.*', php: '8.0', 'testbench': '7.*' } - - { queue: 'github-actions-laravel8-php81', laravel: '8.*', php: '8.1', 'testbench': '6.*' } - - { queue: 'github-actions-laravel8-php80', laravel: '8.*', php: '8.0', 'testbench': '6.*' } - - { queue: 'github-actions-laravel8-php74', laravel: '8.*', php: '7.4', 'testbench': '6.*' } + - { laravel: '10.*', php: '8.2', 'testbench': '8.*'} + - { laravel: '10.*', php: '8.1', 'testbench': '8.*'} + - { laravel: '9.*', php: '8.2', 'testbench': '7.*'} + - { laravel: '9.*', php: '8.1', 'testbench': '7.*'} + - { laravel: '9.*', php: '8.0', 'testbench': '7.*'} + - { laravel: '8.*', php: '8.1', 'testbench': '6.*'} + - { laravel: '8.*', php: '8.0', 'testbench': '6.*'} + - { laravel: '8.*', php: '7.4', 'testbench': '6.*'} + - { laravel: '7.*', php: '8.0', 'testbench': '5.*' } + - { laravel: '7.*', php: '7.4', 'testbench': '5.*' } + - { laravel: '6.*', php: '8.0', 'testbench': '4.*' } + - { laravel: '6.*', php: '7.4', 'testbench': '4.*' } name: PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 407cef6..0b0cc84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. **Changed** - Added support for Laravel 10 -- Dropped support for Laravel 6 and 7 ## 6.0.0 - 2022-02-10 diff --git a/README.md b/README.md index bf3db92..7d08266 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ We feel the package is currently feature complete, but feel free to send a pull # Requirements -This package requires Laravel 8.0 or higher. +This package requires Laravel 6.0 or higher. Please check the [Laravel support policy](https://laravel.com/docs/master/releases#support-policy) table for supported Laravel and PHP versions. diff --git a/composer.json b/composer.json index eb56e5a..48ff446 100644 --- a/composer.json +++ b/composer.json @@ -26,12 +26,11 @@ } }, "require": { - "ext-json": "*", - "illuminate/support": "^8.0|^9.0|^10.0" + "ext-json": "*" }, "require-dev": { "mockery/mockery": "^1.2", - "orchestra/testbench": "^6.0 || ^7.0 || ^8.0" + "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0" }, "minimum-stability": "dev", "prefer-stable": true, @@ -47,6 +46,14 @@ "l8": [ "composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update", "composer update --prefer-stable --prefer-dist --no-interaction --no-suggest" + ], + "l7": [ + "composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update", + "composer update --prefer-stable --prefer-dist --no-interaction --no-suggest" + ], + "l6": [ + "composer require laravel/framework:8.* orchestra/testbench:6.* --no-interaction --no-update", + "composer update --prefer-stable --prefer-dist --no-interaction --no-suggest" ] } }