From f3d7b0149b33ba0fcdce64805de7c9cd21e42719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 10 Aug 2021 11:54:52 +0200 Subject: [PATCH 1/4] phpcs unused rule --- composer.json | 3 +- composer.lock | 238 +++++++++++++++++++++++++++++++++++++++++++++++++- phpcs.xml | 1 + 3 files changed, 240 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 5c00524..f7c4992 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "fakerphp/faker": "^1.9.1", "mockery/mockery": "^1.4.2", "nunomaduro/collision": "^5.0", - "phpunit/phpunit": "^9.3.3" + "phpunit/phpunit": "^9.3.3", + "slevomat/coding-standard": "^7.0" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index 9207fc2..95af086 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": "0da9cba25dcff87fac2343ef3effa795", + "content-hash": "c562fdb8cdc08bfc5304b53b5ab12941", "packages": [ { "name": "asm89/stack-cors", @@ -5712,6 +5712,76 @@ } ], "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -6598,6 +6668,55 @@ }, "time": "2021-03-17T13:42:18+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "0.5.5", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "ea0b17460ec38e20d7eb64e7ec49b5d44af5d28c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ea0b17460ec38e20d7eb64e7ec49b5d44af5d28c", + "reference": "ea0b17460ec38e20d7eb64e7ec49b5d44af5d28c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.87", + "phpstan/phpstan-strict-rules": "^0.12.5", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/0.5.5" + }, + "time": "2021-06-11T13:24:46+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.6", @@ -7984,6 +8103,123 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "7.0.13", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "122a9bf9a4a2195f74100f47dfb8375982f43cc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/122a9bf9a4a2195f74100f47dfb8375982f43cc9", + "reference": "122a9bf9a4a2195f74100f47dfb8375982f43cc9", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.1 || ^8.0", + "phpstan/phpdoc-parser": "0.5.1 - 0.5.5", + "squizlabs/php_codesniffer": "^3.6.0" + }, + "require-dev": { + "phing/phing": "2.16.4", + "php-parallel-lint/php-parallel-lint": "1.3.0", + "phpstan/phpstan": "0.12.93", + "phpstan/phpstan-deprecation-rules": "0.12.6", + "phpstan/phpstan-phpunit": "0.12.21", + "phpstan/phpstan-strict-rules": "0.12.10", + "phpunit/phpunit": "7.5.20|8.5.5|9.5.7" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/7.0.13" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2021-07-29T14:30:22+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.1", diff --git a/phpcs.xml b/phpcs.xml index 87a8ec8..14acd89 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -80,6 +80,7 @@ + From f310cb9e2dcbbbf2def8a20518048bfea89bbbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 21 Sep 2021 09:49:16 +0200 Subject: [PATCH 2/4] bump kwaadpepper/crud-policies to 0.1.18 bump kwaadpepper/enum to 2.1.1 --- app/Enums/FileCategory.php | 4 ++-- app/Enums/FileType.php | 4 ++-- app/Enums/LoadLevel.php | 4 ++-- app/Enums/Role.php | 4 ++-- app/Enums/TicketStatus.php | 4 ++-- app/Enums/TicketType.php | 4 ++-- composer.json | 4 ++-- composer.lock | 36 +++++++++++++++++++----------------- 8 files changed, 33 insertions(+), 31 deletions(-) diff --git a/app/Enums/FileCategory.php b/app/Enums/FileCategory.php index 37499e3..a04cbff 100644 --- a/app/Enums/FileCategory.php +++ b/app/Enums/FileCategory.php @@ -2,7 +2,7 @@ namespace App\Enums; -use Kwaadpepper\Enum\BaseEnum; +use Kwaadpepper\Enum\BaseEnumRoutable; /** * @method static self collectionNeeds() @@ -13,7 +13,7 @@ use Kwaadpepper\Enum\BaseEnum; * @method static self feedback() */ -class FileCategory extends BaseEnum +class FileCategory extends BaseEnumRoutable { protected static function values(): array { diff --git a/app/Enums/FileType.php b/app/Enums/FileType.php index aca3062..1c75822 100644 --- a/app/Enums/FileType.php +++ b/app/Enums/FileType.php @@ -2,14 +2,14 @@ namespace App\Enums; -use Kwaadpepper\Enum\BaseEnum; +use Kwaadpepper\Enum\BaseEnumRoutable; /** * @method static self stringlink() * @method static self binfile() */ -class FileType extends BaseEnum +class FileType extends BaseEnumRoutable { protected static function values(): array { diff --git a/app/Enums/LoadLevel.php b/app/Enums/LoadLevel.php index 0ceee0d..666065d 100644 --- a/app/Enums/LoadLevel.php +++ b/app/Enums/LoadLevel.php @@ -2,7 +2,7 @@ namespace App\Enums; -use Kwaadpepper\Enum\BaseEnum; +use Kwaadpepper\Enum\BaseEnumRoutable; /** * @method static self weak() @@ -11,7 +11,7 @@ use Kwaadpepper\Enum\BaseEnum; * @method static self overload() */ -class LoadLevel extends BaseEnum +class LoadLevel extends BaseEnumRoutable { protected static function values(): array { diff --git a/app/Enums/Role.php b/app/Enums/Role.php index d4a65a0..193af5f 100644 --- a/app/Enums/Role.php +++ b/app/Enums/Role.php @@ -2,7 +2,7 @@ namespace App\Enums; -use Kwaadpepper\Enum\BaseEnum; +use Kwaadpepper\Enum\BaseEnumRoutable; /** * @method static self developper() @@ -10,7 +10,7 @@ use Kwaadpepper\Enum\BaseEnum; * @method static self client() */ -class Role extends BaseEnum +class Role extends BaseEnumRoutable { protected static function values(): array { diff --git a/app/Enums/TicketStatus.php b/app/Enums/TicketStatus.php index b0fe989..62a4882 100644 --- a/app/Enums/TicketStatus.php +++ b/app/Enums/TicketStatus.php @@ -2,7 +2,7 @@ namespace App\Enums; -use Kwaadpepper\Enum\BaseEnum; +use Kwaadpepper\Enum\BaseEnumRoutable; /** * @method static self new() @@ -17,7 +17,7 @@ use Kwaadpepper\Enum\BaseEnum; * @method static self production() * @method static self archived() */ -class TicketStatus extends BaseEnum +class TicketStatus extends BaseEnumRoutable { protected static function values(): array { diff --git a/app/Enums/TicketType.php b/app/Enums/TicketType.php index c6ca449..ad3589c 100644 --- a/app/Enums/TicketType.php +++ b/app/Enums/TicketType.php @@ -2,13 +2,13 @@ namespace App\Enums; -use Kwaadpepper\Enum\BaseEnum; +use Kwaadpepper\Enum\BaseEnumRoutable; /** * @method static self bug() * @method static self evolution() */ -class TicketType extends BaseEnum +class TicketType extends BaseEnumRoutable { protected static function values(): array { diff --git a/composer.json b/composer.json index f7c4992..f065921 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "fideloper/proxy": "^4.4", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", - "kwaadpepper/crud-policies": "^0.1.9", - "kwaadpepper/enum": "^0.1.4", + "kwaadpepper/crud-policies": "^0.1.18", + "kwaadpepper/enum": "^2.1", "laravel-lang/lang": "~8.0", "laravel/framework": "^8.12", "laravel/tinker": "^2.5", diff --git a/composer.lock b/composer.lock index 95af086..90b9de9 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": "c562fdb8cdc08bfc5304b53b5ab12941", + "content-hash": "6bd42ef9c828624e25c28124d4116e32", "packages": [ { "name": "asm89/stack-cors", @@ -1449,27 +1449,28 @@ }, { "name": "kwaadpepper/crud-policies", - "version": "0.1.9", + "version": "0.1.18", "source": { "type": "git", "url": "https://github.com/Kwaadpepper/crud-policies.git", - "reference": "cb0c3848fe252a4211891f907df387f746bd9750" + "reference": "a8ad75e1ef6e2aac00a45426bebb0b61fac03ba0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Kwaadpepper/crud-policies/zipball/cb0c3848fe252a4211891f907df387f746bd9750", - "reference": "cb0c3848fe252a4211891f907df387f746bd9750", + "url": "https://api.github.com/repos/Kwaadpepper/crud-policies/zipball/a8ad75e1ef6e2aac00a45426bebb0b61fac03ba0", + "reference": "a8ad75e1ef6e2aac00a45426bebb0b61fac03ba0", "shasum": "" }, "require": { "facade/flare-client-php": "^1.8", "illuminate/support": "~7|~8", - "kwaadpepper/enum": "^0.1.4", + "kwaadpepper/enum": "^2.0", "laravel/framework": "~7|~8" }, "require-dev": { "orchestra/testbench": "^6.13", "phpunit/phpunit": "~9.0", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", @@ -1506,31 +1507,32 @@ ], "support": { "issues": "https://github.com/Kwaadpepper/crud-policies/issues", - "source": "https://github.com/Kwaadpepper/crud-policies/tree/0.1.9" + "source": "https://github.com/Kwaadpepper/crud-policies/tree/0.1.18" }, - "time": "2021-07-27T08:58:38+00:00" + "time": "2021-09-15T08:55:36+00:00" }, { "name": "kwaadpepper/enum", - "version": "0.1.4", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/Kwaadpepper/enum.git", - "reference": "f9e2b960d86ceea45c905f11c0c5699529e32848" + "reference": "1c342113b63d15c8b30e5d8a0af5d4d750392037" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Kwaadpepper/enum/zipball/f9e2b960d86ceea45c905f11c0c5699529e32848", - "reference": "f9e2b960d86ceea45c905f11c0c5699529e32848", + "url": "https://api.github.com/repos/Kwaadpepper/enum/zipball/1c342113b63d15c8b30e5d8a0af5d4d750392037", + "reference": "1c342113b63d15c8b30e5d8a0af5d4d750392037", "shasum": "" }, "require": { - "illuminate/support": "~7|~8", - "laravel/framework": "~7|~8" + "php": "^7.3" }, "require-dev": { - "orchestra/testbench": "^6.13", + "orchestra/testbench": "^5", + "phpunit/php-code-coverage": "^9.2", "phpunit/phpunit": "~9.0", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", @@ -1565,9 +1567,9 @@ ], "support": { "issues": "https://github.com/Kwaadpepper/enum/issues", - "source": "https://github.com/Kwaadpepper/enum/tree/0.1.4" + "source": "https://github.com/Kwaadpepper/enum/tree/2.1.1" }, - "time": "2021-04-06T14:35:59+00:00" + "time": "2021-09-20T20:37:21+00:00" }, { "name": "laravel-lang/lang", From 66a17f830d2fdbbbb741eccb64ebacce07e6bac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 21 Sep 2021 09:57:42 +0200 Subject: [PATCH 3/4] composer require kwaadpepper/exception-handler --- app/Exceptions/Handler.php | 44 +------------ composer.json | 1 + composer.lock | 63 ++++++++++++++++++- config/exception-handler.php | 17 +++++ .../views/emails/exception-plain.blade.php | 10 --- resources/views/emails/exception.blade.php | 16 ----- 6 files changed, 81 insertions(+), 70 deletions(-) create mode 100644 config/exception-handler.php delete mode 100644 resources/views/emails/exception-plain.blade.php delete mode 100644 resources/views/emails/exception.blade.php diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 5892cad..19a1a9f 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,10 +2,7 @@ namespace App\Exceptions; -use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; -use Illuminate\Support\Facades\Mail; -use RuntimeException; -use Throwable; +use Kwaadpepper\ExceptionHandler\Exceptions\ExceptionHandler; class Handler extends ExceptionHandler { @@ -29,45 +26,6 @@ class Handler extends ExceptionHandler 'password_confirmation', ]; - /** - * Report or log an exception. - * - * @param \Throwable $exception - * @return void - * - * @throws \Exception - */ - public function report(Throwable $e) - { - if (get_class($e) == RedirectTo::class) { - abort(redirect($e->url)); - } - try { - if (config('app.debug') === false) { - if ($this->shouldntReport($e)) { - return; - } - Mail::send([ - 'html' => 'emails.exception', - 'text' => 'emails.exception-plain' - ], [ - 'exception' => $e, - 'appName' => config('app.name') - ], function ($m) { - $m->to( - config('mail.contactsList.serviceweb'), - sprintf('%s Exception Handler', config('app.name')) - )->subject('Need help !, an error occured in your application, please check Logs ASAP'); - }); - } - // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch - } catch (RuntimeException $e) { - // do nothing, mail send error, let laravel only handle this - } finally { - parent::report($e); - } - } - /** * Register the exception handling callbacks for the application. * diff --git a/composer.json b/composer.json index f065921..132c780 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "guzzlehttp/guzzle": "^7.0.1", "kwaadpepper/crud-policies": "^0.1.18", "kwaadpepper/enum": "^2.1", + "kwaadpepper/exception-handler": "^0.0.3", "laravel-lang/lang": "~8.0", "laravel/framework": "^8.12", "laravel/tinker": "^2.5", diff --git a/composer.lock b/composer.lock index 90b9de9..9df634c 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": "6bd42ef9c828624e25c28124d4116e32", + "content-hash": "c32404ecdf12c6d1eca2e714cb65bbb6", "packages": [ { "name": "asm89/stack-cors", @@ -1571,6 +1571,67 @@ }, "time": "2021-09-20T20:37:21+00:00" }, + { + "name": "kwaadpepper/exception-handler", + "version": "0.0.3", + "source": { + "type": "git", + "url": "https://github.com/Kwaadpepper/exception-handler.git", + "reference": "979e8add45fea601b221e95595366fb446e8c6b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Kwaadpepper/exception-handler/zipball/979e8add45fea601b221e95595366fb446e8c6b7", + "reference": "979e8add45fea601b221e95595366fb446e8c6b7", + "shasum": "" + }, + "require": { + "illuminate/support": "~7|~8", + "laravel/framework": "~7|~8" + }, + "require-dev": { + "orchestra/testbench": "^6.13", + "phpunit/phpunit": "~9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Kwaadpepper\\ExceptionHandler\\ExceptionHandlerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Kwaadpepper\\ExceptionHandler\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jérémy Munsch", + "email": "github@jeremydev.ovh", + "homepage": "https://jeremydev.ovh" + } + ], + "description": "Send emails when exceptions occurs", + "homepage": "https://github.com/kwaadpepper/exception-handler", + "keywords": [ + "email", + "exception", + "laravel", + "policies" + ], + "support": { + "issues": "https://github.com/Kwaadpepper/exception-handler/issues", + "source": "https://github.com/Kwaadpepper/exception-handler/tree/0.0.3" + }, + "time": "2021-09-15T17:06:33+00:00" + }, { "name": "laravel-lang/lang", "version": "8.1.3", diff --git a/config/exception-handler.php b/config/exception-handler.php new file mode 100644 index 0000000..e6bd69b --- /dev/null +++ b/config/exception-handler.php @@ -0,0 +1,17 @@ + !config('app.debug'), + + /** + * Put a developper secured mailbox in here + * so you can receive email if things go mad + */ + 'contactsList' => [ + env('MAIL_LIST_SERVICEWEB', 'equipe.web@ldc.fr') + ] +]; diff --git a/resources/views/emails/exception-plain.blade.php b/resources/views/emails/exception-plain.blade.php deleted file mode 100644 index 0360447..0000000 --- a/resources/views/emails/exception-plain.blade.php +++ /dev/null @@ -1,10 +0,0 @@ -{{ $appName }} Exception Handler - -Une erreur est survenue sur le site {{ $appName }} -{{ $exception->getMessage() }} -date : {{ date('Y-m-d H:i:s') }} -code : {{$exception->getCode() }} -file : {{$exception->getFile() }} -line : {{$exception->getLine() }} - -Veuillez vérifier les logs pour en voir la trace. diff --git a/resources/views/emails/exception.blade.php b/resources/views/emails/exception.blade.php deleted file mode 100644 index 80a46d6..0000000 --- a/resources/views/emails/exception.blade.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - {{ $appName }} Exception Handler - - - -

Une erreur est survenue sur le site {{ $appName }}

-

{{ $exception->getMessage() }}

-

date : {{ date('Y-m-d H:i:s') }}

-

code : {{$exception->getCode() }}

-

file : {{$exception->getFile() }}

-

line : {{$exception->getLine() }}

-

Veuillez vérifier les logs pour en voir la trace.

- - From 94b2c39678c76aa18ab9cc47a7a997b9dbfd3acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 21 Sep 2021 10:04:46 +0200 Subject: [PATCH 4/4] Ticket: 323 tickets.show --- resources/views/ticket/show.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/ticket/show.blade.php b/resources/views/ticket/show.blade.php index c97aaf1..77c3c69 100644 --- a/resources/views/ticket/show.blade.php +++ b/resources/views/ticket/show.blade.php @@ -105,7 +105,7 @@ @if ($message->file !== null)
Ouvrir la pièce jointe
@endif

- Le {{ \Carbon\Carbon::parse($message->created_at)->format('d/m/Y à H:i')}} par {{ $message->user->name }} + Le {{ \Carbon\Carbon::parse($message->created_at)->format('d/m/Y à H:i')}} par {{ $ticket->user ? $ticket->user->name : __('Utilisateur supprimé') }} @endif @endforeach @@ -114,7 +114,7 @@

Description

{!! Utils::plainToHtml($ticket->text) !!}

- Créé le {{ \Carbon\Carbon::parse($ticket->created_at)->format('d/m/Y à H:i') }} par {{ $ticket->user->name }} + Créé le {{ \Carbon\Carbon::parse($ticket->created_at)->format('d/m/Y à H:i') }} par {{ $ticket->user ? $ticket->user->name : __('Utilisateur supprimé') }}
@if ($ticket->file !== null || $ticket->file2 !== null)