From 0fa8b5b336d01bf0bd285e00ed72cd84968f8d14 Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 13 Jul 2017 22:39:41 -0400 Subject: [PATCH 01/16] update branch alias --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6af4b58..9846d83 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" } }, "minimum-stability": "dev", From 97db8581d317df6e3a1a460f86a675fb984611ac Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 20 Jul 2017 08:08:52 -0400 Subject: [PATCH 02/16] fix the intro/outro lines --- resources/views/templates/invoice.blade.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/views/templates/invoice.blade.php b/resources/views/templates/invoice.blade.php index b7997f8..abe6642 100644 --- a/resources/views/templates/invoice.blade.php +++ b/resources/views/templates/invoice.blade.php @@ -3,7 +3,8 @@ # {{ $greeting }} @foreach($introLines as $line) - {{ $line }} +{{ $line }} + @endforeach @component('mail::invoice.attributes', ['total' => $tableData['total'], 'dueDate' => $dueDate]) @@ -31,7 +32,8 @@ @endcomponent @foreach($outroLines as $line) - {{ $line }} +{{ $line }} + @endforeach @if($salutation) From 9cb3ef8b856ca8a8f09f46c4ea100991ba544941 Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 20 Jul 2017 08:09:18 -0400 Subject: [PATCH 03/16] make sure each line only gets added once --- src/Traits/HasLine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/HasLine.php b/src/Traits/HasLine.php index 61b84e2..04feea3 100644 --- a/src/Traits/HasLine.php +++ b/src/Traits/HasLine.php @@ -29,10 +29,10 @@ public function line($line) { if (trait_exists(HasAction::class) && property_exists($this, 'actionText') && !$this->actionText) { $this->introLines[] = $this->formatLine($line); + } else { + $this->outroLines[] = $this->formatLine($line); } - $this->outroLines[] = $this->formatLine($line); - return $this; } From 33699399d34bcc56ca5f098bbb0afc848d76e3b8 Mon Sep 17 00:00:00 2001 From: Andreas Elia Date: Wed, 18 Oct 2017 09:08:58 +0100 Subject: [PATCH 04/16] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index a50e7d6..6ca9e7f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Tom Irons +Copyright (c) 2017 Tom Irons Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 6b7a742ac7fd14a3de519a31eabbf38d2f7ca509 Mon Sep 17 00:00:00 2001 From: Wouter van Marrum Date: Thu, 25 Jan 2018 21:14:48 +0100 Subject: [PATCH 05/16] Update table.blade.php Place `` on correct line. --- resources/views/html/invoice/table.blade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/views/html/invoice/table.blade.php b/resources/views/html/invoice/table.blade.php index 6e873b6..2c31855 100644 --- a/resources/views/html/invoice/table.blade.php +++ b/resources/views/html/invoice/table.blade.php @@ -3,7 +3,8 @@

{{ $data['id'] }}

-

{{ $data['date'] }}

+

{{ $data['date'] }}

+ @@ -53,4 +54,4 @@ - \ No newline at end of file + From 887dd4450f21f98b42498f1467ca736c2932b456 Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 18 Feb 2021 19:36:54 -0500 Subject: [PATCH 06/16] upgrade dependencies --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 9846d83..47e62ee 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,14 @@ } ], "require": { - "php": ">=5.6.4", - "illuminate/database": "5.4.*", - "illuminate/mail": "5.4.*", - "illuminate/support": "5.4.*" + "php": "^7.3", + "illuminate/database": "^6.0|^7.0|^8.0", + "illuminate/mail": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0" }, "require-dev": { - "mockery/mockery": "~0.9.4", - "phpunit/phpunit": "~5.7" + "mockery/mockery": "^1.4", + "phpunit/phpunit": "^9.2" }, "autoload": { "psr-4": { From 4dbfea31e98597dd1f2f26f1b082f7be815a5716 Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 18 Feb 2021 19:37:09 -0500 Subject: [PATCH 07/16] update branch alias and set laravel provider --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 47e62ee..8ca25ae 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,12 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "TomIrons\\Tuxedo\\TuxedoServiceProvider" + ] } }, "minimum-stability": "dev", From b2bd253382172031c4f33bd361943bb9e04e5762 Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 18 Feb 2021 19:50:44 -0500 Subject: [PATCH 08/16] update phpunit xml --- phpunit.xml.dist | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index de8d5bc..612d0a3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,19 +7,16 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnError="false" stopOnFailure="false" - syntaxCheck="true" - verbose="true" > + + + src/ + + - - ./tests + + ./tests/Unit - - - src/ - - From ccbf5c7a32b418cd835a3c57bd20e4a4b528d033 Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 18 Feb 2021 19:51:14 -0500 Subject: [PATCH 09/16] upgrade tests for phpunit 9 --- tests/{ => Unit}/ActionMailableTest.php | 7 ++++--- tests/{ => Unit}/AlertMailableTest.php | 7 ++++--- tests/{ => Unit}/InvoiceMailableTest.php | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) rename tests/{ => Unit}/ActionMailableTest.php (90%) rename tests/{ => Unit}/AlertMailableTest.php (91%) rename tests/{ => Unit}/InvoiceMailableTest.php (91%) diff --git a/tests/ActionMailableTest.php b/tests/Unit/ActionMailableTest.php similarity index 90% rename from tests/ActionMailableTest.php rename to tests/Unit/ActionMailableTest.php index f0d0504..c8bf8f2 100644 --- a/tests/ActionMailableTest.php +++ b/tests/Unit/ActionMailableTest.php @@ -1,14 +1,15 @@ Date: Thu, 18 Feb 2021 19:51:37 -0500 Subject: [PATCH 10/16] ignore phpunit cache --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dfd6caa..5a22558 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vendor -composer.lock \ No newline at end of file +composer.lock +.phpunit.result.cache \ No newline at end of file From d3372a999d6b859ba7518fffa036761af3baa05a Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 18 Feb 2021 19:58:26 -0500 Subject: [PATCH 11/16] set theme in the base class --- src/TuxedoMessage.php | 7 +++++++ src/TuxedoServiceProvider.php | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TuxedoMessage.php b/src/TuxedoMessage.php index 12c6887..4a841a0 100644 --- a/src/TuxedoMessage.php +++ b/src/TuxedoMessage.php @@ -6,6 +6,13 @@ class TuxedoMessage extends Mailable { + /** + * The theme for the mailable. + * + * @var string + */ + public $theme = 'tuxedo'; + /** * The message's greeting. * diff --git a/src/TuxedoServiceProvider.php b/src/TuxedoServiceProvider.php index 3ba229e..48649f8 100644 --- a/src/TuxedoServiceProvider.php +++ b/src/TuxedoServiceProvider.php @@ -32,7 +32,6 @@ public function boot() */ public function alterConfiguration() { - config()->set('mail.markdown.theme', 'tuxedo'); config()->set('mail.markdown.paths', array_merge([__DIR__.'/../resources/views'], config('mail.markdown.paths'))); } } From 8e6e94a05e28cbadc2ee52fcbd8bb4c93456b9d6 Mon Sep 17 00:00:00 2001 From: tomirons Date: Sat, 20 Feb 2021 18:40:30 -0500 Subject: [PATCH 12/16] add register method --- src/TuxedoServiceProvider.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/TuxedoServiceProvider.php b/src/TuxedoServiceProvider.php index 48649f8..ca913b3 100644 --- a/src/TuxedoServiceProvider.php +++ b/src/TuxedoServiceProvider.php @@ -2,7 +2,6 @@ namespace TomIrons\Tuxedo; -use Illuminate\Mail\Markdown; use Illuminate\Support\ServiceProvider; class TuxedoServiceProvider extends ServiceProvider @@ -16,13 +15,21 @@ public function boot() { $this->loadViewsFrom(__DIR__.'/../resources/views', 'tuxedo'); + $this->alterConfiguration(); + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { if ($this->app->runningInConsole()) { $this->publishes([ - __DIR__.'/../resources/views' => resource_path('views/vendor/tuxedo'), - ], 'tuxedo'); + __DIR__.'/../resources/views' => $this->app->resourcePath('views/vendor/tuxedo'), + ], 'tuxedo-mail'); } - - $this->alterConfiguration(); } /** From d16b1975319fa6bd8d1073f7e583a09f9f16dea2 Mon Sep 17 00:00:00 2001 From: Tom Irons Date: Sat, 20 Feb 2021 23:41:00 +0000 Subject: [PATCH 13/16] Apply fixes from StyleCI [ci skip] [skip ci] --- src/Mailables/ActionMailable.php | 4 ++-- src/Mailables/InvoiceMailable.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mailables/ActionMailable.php b/src/Mailables/ActionMailable.php index 3b2e73d..f3179f3 100644 --- a/src/Mailables/ActionMailable.php +++ b/src/Mailables/ActionMailable.php @@ -9,8 +9,8 @@ class ActionMailable extends TuxedoMessage { - use HasAction, - HasLine; + use HasAction; + use HasLine; /** * The Markdown template for the message (if applicable). diff --git a/src/Mailables/InvoiceMailable.php b/src/Mailables/InvoiceMailable.php index 3a11664..2187d61 100644 --- a/src/Mailables/InvoiceMailable.php +++ b/src/Mailables/InvoiceMailable.php @@ -9,8 +9,8 @@ class InvoiceMailable extends TuxedoMessage { - use HasAction, - HasLine; + use HasAction; + use HasLine; /** * The Markdown template for the message (if applicable). From 081fb1fe7f025857b52df9424232a221168644ac Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 25 Feb 2021 19:32:49 -0500 Subject: [PATCH 14/16] remove unnecessary imports --- src/Mailables/ActionMailable.php | 1 - src/Mailables/AlertMailable.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Mailables/ActionMailable.php b/src/Mailables/ActionMailable.php index 3b2e73d..211c70d 100644 --- a/src/Mailables/ActionMailable.php +++ b/src/Mailables/ActionMailable.php @@ -2,7 +2,6 @@ namespace TomIrons\Tuxedo\Mailables; -use TomIrons\Tuxedo\Message; use TomIrons\Tuxedo\Traits\HasAction; use TomIrons\Tuxedo\Traits\HasLine; use TomIrons\Tuxedo\TuxedoMessage; diff --git a/src/Mailables/AlertMailable.php b/src/Mailables/AlertMailable.php index 6f1ff57..ce23c04 100644 --- a/src/Mailables/AlertMailable.php +++ b/src/Mailables/AlertMailable.php @@ -2,7 +2,6 @@ namespace TomIrons\Tuxedo\Mailables; -use TomIrons\Tuxedo\Message; use TomIrons\Tuxedo\Traits\HasLine; use TomIrons\Tuxedo\TuxedoMessage; From cff921c04d0780540e9bb7e96893aecdb3b0ce53 Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 25 Feb 2021 19:33:27 -0500 Subject: [PATCH 15/16] rename 'markdown' folder to 'text' --- resources/views/markdown/alert/box.blade.php | 1 - resources/views/text/alert/box.blade.php | 1 + resources/views/{markdown => text}/invoice/attributes.blade.php | 0 resources/views/{markdown => text}/invoice/table.blade.php | 0 4 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 resources/views/markdown/alert/box.blade.php create mode 100644 resources/views/text/alert/box.blade.php rename resources/views/{markdown => text}/invoice/attributes.blade.php (100%) rename resources/views/{markdown => text}/invoice/table.blade.php (100%) diff --git a/resources/views/markdown/alert/box.blade.php b/resources/views/markdown/alert/box.blade.php deleted file mode 100644 index 1ccc692..0000000 --- a/resources/views/markdown/alert/box.blade.php +++ /dev/null @@ -1 +0,0 @@ -{{ $slot }} \ No newline at end of file diff --git a/resources/views/text/alert/box.blade.php b/resources/views/text/alert/box.blade.php new file mode 100644 index 0000000..1910281 --- /dev/null +++ b/resources/views/text/alert/box.blade.php @@ -0,0 +1 @@ +foo \ No newline at end of file diff --git a/resources/views/markdown/invoice/attributes.blade.php b/resources/views/text/invoice/attributes.blade.php similarity index 100% rename from resources/views/markdown/invoice/attributes.blade.php rename to resources/views/text/invoice/attributes.blade.php diff --git a/resources/views/markdown/invoice/table.blade.php b/resources/views/text/invoice/table.blade.php similarity index 100% rename from resources/views/markdown/invoice/table.blade.php rename to resources/views/text/invoice/table.blade.php From 02a7a53ce3e8658a310aad97dfc8d16c4d9226ae Mon Sep 17 00:00:00 2001 From: tomirons Date: Thu, 25 Feb 2021 19:35:55 -0500 Subject: [PATCH 16/16] remove new lines as it breaks the html when parsing --- resources/views/html/alert/box.blade.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/views/html/alert/box.blade.php b/resources/views/html/alert/box.blade.php index c927016..ddb3a9b 100644 --- a/resources/views/html/alert/box.blade.php +++ b/resources/views/html/alert/box.blade.php @@ -3,9 +3,7 @@ - +
- {{ Illuminate\Mail\Markdown::parse($slot) }} - {{ Illuminate\Mail\Markdown::parse($slot) }}