diff --git a/VERSION.txt b/VERSION.txt index 96b71d396c40..1e20ec35c642 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.3.64 \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/app/Jobs/Mail/NinjaMailer.php b/app/Jobs/Mail/NinjaMailer.php index 4ebd9a9bb5ed..774bf680e2c8 100644 --- a/app/Jobs/Mail/NinjaMailer.php +++ b/app/Jobs/Mail/NinjaMailer.php @@ -41,12 +41,17 @@ class NinjaMailer extends Mailable $from_name = $this->mail_obj->from_name; } - return $this->from(config('mail.from.address'), $from_name) + $ninja_mailable = $this->from(config('mail.from.address'), $from_name) ->subject($this->mail_obj->subject) ->view($this->mail_obj->markdown, $this->mail_obj->data) ->withSwiftMessage(function ($message) { $message->getHeaders()->addTextHeader('Tag', $this->mail_obj->tag); }); - + + if(property_exists($this->mail_obj, 'text_view')){ + $ninja_mailable->text($this->mail_obj->text_view, $this->mail_obj->data); + } + + return $ninja_mailable; } } diff --git a/app/Mail/Admin/VerifyUserObject.php b/app/Mail/Admin/VerifyUserObject.php index 2146fabef087..52f977a4316b 100644 --- a/app/Mail/Admin/VerifyUserObject.php +++ b/app/Mail/Admin/VerifyUserObject.php @@ -63,7 +63,8 @@ class VerifyUserObject $mail_obj->data = $data; $mail_obj->markdown = 'email.admin.generic'; $mail_obj->tag = $this->company->company_key; - + $mail_obj->text_view = 'email.admin.verify_user_text'; + return $mail_obj; } } \ No newline at end of file diff --git a/app/Mail/MigrationFailed.php b/app/Mail/MigrationFailed.php index 409e843b2042..b6a2337fe030 100644 --- a/app/Mail/MigrationFailed.php +++ b/app/Mail/MigrationFailed.php @@ -40,6 +40,7 @@ class MigrationFailed extends Mailable return $this ->from(config('mail.from.address'), config('mail.from.name')) + ->text('email.migration.failed_text') ->view('email.migration.failed', [ 'logo' => $this->company->present()->logo(), 'settings' => $this->company->settings, diff --git a/composer.json b/composer.json index d67fba7d5b10..bb9491188bf7 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,6 @@ "league/flysystem-aws-s3-v3": "~1.0", "league/flysystem-cached-adapter": "^1.1", "league/fractal": "^0.17.0", - "league/html-to-markdown": "^5.1", "league/omnipay": "^3.1", "livewire/livewire": "^2.6", "mollie/mollie-api-php": "^2.36", diff --git a/composer.lock b/composer.lock index 6720fe357bca..ae40de127d03 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f3465f8b8e57efe3e6ca0ed04c49bff6", + "content-hash": "8ab74954c338fd80aa6597e93df6357f", "packages": [ { "name": "afosto/yaac", @@ -4905,95 +4905,6 @@ }, "time": "2017-06-12T11:04:56+00:00" }, - { - "name": "league/html-to-markdown", - "version": "5.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/html-to-markdown.git", - "reference": "e0fc8cf07bdabbcd3765341ecb50c34c271d64e1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/e0fc8cf07bdabbcd3765341ecb50c34c271d64e1", - "reference": "e0fc8cf07bdabbcd3765341ecb50c34c271d64e1", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xml": "*", - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "mikehaertl/php-shellcommand": "^1.1.0", - "phpstan/phpstan": "^0.12.99", - "phpunit/phpunit": "^8.5 || ^9.2", - "scrutinizer/ocular": "^1.6", - "unleashedtech/php-coding-standard": "^2.7", - "vimeo/psalm": "^4.22" - }, - "bin": [ - "bin/html-to-markdown" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.2-dev" - } - }, - "autoload": { - "psr-4": { - "League\\HTMLToMarkdown\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com", - "role": "Lead Developer" - }, - { - "name": "Nick Cernis", - "email": "nick@cern.is", - "homepage": "http://modernnerd.net", - "role": "Original Author" - } - ], - "description": "An HTML-to-markdown conversion helper for PHP", - "homepage": "https://github.com/thephpleague/html-to-markdown", - "keywords": [ - "html", - "markdown" - ], - "support": { - "issues": "https://github.com/thephpleague/html-to-markdown/issues", - "source": "https://github.com/thephpleague/html-to-markdown/tree/5.1.0" - }, - "funding": [ - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/html-to-markdown", - "type": "tidelift" - } - ], - "time": "2022-03-02T17:24:08+00:00" - }, { "name": "league/mime-type-detection", "version": "1.9.0", @@ -15758,7 +15669,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.4|^8", + "php": "^8.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*" diff --git a/config/ninja.php b/config/ninja.php index f31cfae39381..acbb348484f4 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.3.64', - 'app_tag' => '5.3.64', + 'app_version' => '5.4.0', + 'app_tag' => '5.4.0', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''), diff --git a/resources/views/email/admin/verify_user_text.blade.php b/resources/views/email/admin/verify_user_text.blade.php new file mode 100644 index 000000000000..3fce2a76c63f --- /dev/null +++ b/resources/views/email/admin/verify_user_text.blade.php @@ -0,0 +1,5 @@ +{!! $title !!} + +{!! ctrans('texts.confirmation_message') !!} + +{!! $url !!} \ No newline at end of file diff --git a/resources/views/email/migration/failed_text.blade b/resources/views/email/migration/failed_text.blade new file mode 100644 index 000000000000..b0ff40957576 --- /dev/null +++ b/resources/views/email/migration/failed_text.blade @@ -0,0 +1,11 @@ +{!! ctrans('texts.migration_failed_label') !!} + +{!! ctrans('texts.migration_failed') }} {{ $company->present()->name() !!} + +@if(\App\Utils\Ninja::isSelfHost() || $is_system) + {!! $exception->getMessage() !!} + {!! $content !!} +@else + Please contact us at contact@invoiceninja.com for more information on this error. +@endif + diff --git a/routes/web.php b/routes/web.php index 67513dc9cc9c..7ce739e80735 100644 --- a/routes/web.php +++ b/routes/web.php @@ -44,4 +44,4 @@ Route::get('stripe/completed', 'StripeConnectController@completed')->name('strip Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Checkout3dsController@index')->middleware('domain_db')->name('checkout.3ds_redirect'); Route::get('mollie/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Mollie3dsController@index')->middleware('domain_db')->name('mollie.3ds_redirect'); Route::get('gocardless/ibp_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\GoCardlessController@ibpRedirect')->middleware('domain_db')->name('gocardless.ibp_redirect'); -Route::get('.well-known/apple-developer-merchantid-domain-association', 'ClientPortal\ApplePayDomainController@showAppleMerchantId'); +Route::get('.well-known/apple-developer-merchantid-domain-association', 'ClientPortal\ApplePayDomainController@showAppleMerchantId'); \ No newline at end of file