From e35899f0aa2698f31cae410116d9a75e0d5a201a Mon Sep 17 00:00:00 2001 From: Micheal Mand Date: Wed, 24 Nov 2021 19:07:41 -0700 Subject: [PATCH 1/5] Fix asset publishing if they were already published (#5734) Thank you @sebdesign for the fix. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 61f491264..8fc7406e7 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "@php artisan package:discover --ansi" ], "post-update-cmd": [ - "@php artisan vendor:publish --tag=laravel-assets --ansi" + "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" From 7bf32280e20d1cbb487ed009ef9d6f268e4badf6 Mon Sep 17 00:00:00 2001 From: Bram Date: Thu, 2 Dec 2021 21:40:24 +0100 Subject: [PATCH 2/5] [8.x] Add types to arrays in boilerplate (#5738) * Add more specific types * Update Authenticate.php * Update Authenticate.php --- app/Http/Kernel.php | 6 +++--- app/Http/Middleware/EncryptCookies.php | 2 +- app/Http/Middleware/PreventRequestsDuringMaintenance.php | 2 +- app/Http/Middleware/TrimStrings.php | 2 +- app/Http/Middleware/TrustHosts.php | 2 +- app/Http/Middleware/TrustProxies.php | 2 +- app/Http/Middleware/VerifyCsrfToken.php | 2 +- app/Providers/AuthServiceProvider.php | 2 +- app/Providers/EventServiceProvider.php | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 39910d78c..09072858d 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -11,7 +11,7 @@ class Kernel extends HttpKernel * * These middleware are run during every request to your application. * - * @var array + * @var string[] */ protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, @@ -26,7 +26,7 @@ class Kernel extends HttpKernel /** * The application's route middleware groups. * - * @var array + * @var array */ protected $middlewareGroups = [ 'web' => [ @@ -51,7 +51,7 @@ class Kernel extends HttpKernel * * These middleware may be assigned to groups or used individually. * - * @var array + * @var array */ protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 033136ad1..8aafb86ed 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -9,7 +9,7 @@ class EncryptCookies extends Middleware /** * The names of the cookies that should not be encrypted. * - * @var array + * @var string[] */ protected $except = [ // diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php index e4956d0bb..c6ca889fe 100644 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ b/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -9,7 +9,7 @@ class PreventRequestsDuringMaintenance extends Middleware /** * The URIs that should be reachable while maintenance mode is enabled. * - * @var array + * @var string[] */ protected $except = [ // diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index a8a252df4..ba871a40e 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -9,7 +9,7 @@ class TrimStrings extends Middleware /** * The names of the attributes that should not be trimmed. * - * @var array + * @var string[] */ protected $except = [ 'current_password', diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php index b0550cfc7..91c19da2f 100644 --- a/app/Http/Middleware/TrustHosts.php +++ b/app/Http/Middleware/TrustHosts.php @@ -9,7 +9,7 @@ class TrustHosts extends Middleware /** * Get the host patterns that should be trusted. * - * @return array + * @return string[] */ public function hosts() { diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 0c7d3b6bb..7761c9701 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -10,7 +10,7 @@ class TrustProxies extends Middleware /** * The trusted proxies for this application. * - * @var array|string|null + * @var string[]|string|null */ protected $proxies; diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 0c13b8548..8b44ba184 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -9,7 +9,7 @@ class VerifyCsrfToken extends Middleware /** * The URIs that should be excluded from CSRF verification. * - * @var array + * @var string[] */ protected $except = [ // diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index ce7449164..9b4e2f8dc 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -10,7 +10,7 @@ class AuthServiceProvider extends ServiceProvider /** * The policy mappings for the application. * - * @var array + * @var array */ protected $policies = [ // 'App\Models\Model' => 'App\Policies\ModelPolicy', diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index a9f10a631..c93d5d1ae 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -12,7 +12,7 @@ class EventServiceProvider extends ServiceProvider /** * The event listener mappings for the application. * - * @var array + * @var array */ protected $listen = [ Registered::class => [ From 8a62ca263323b3b8415b627aeda7533ab2bb5da8 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 3 Dec 2021 15:04:57 +0000 Subject: [PATCH 3/5] Improves generic types on the skeleton (#5740) --- app/Exceptions/Handler.php | 4 ++-- app/Http/Kernel.php | 6 +++--- app/Http/Middleware/EncryptCookies.php | 2 +- app/Http/Middleware/PreventRequestsDuringMaintenance.php | 2 +- app/Http/Middleware/RedirectIfAuthenticated.php | 4 ++-- app/Http/Middleware/TrimStrings.php | 2 +- app/Http/Middleware/TrustHosts.php | 2 +- app/Http/Middleware/TrustProxies.php | 2 +- app/Http/Middleware/VerifyCsrfToken.php | 2 +- app/Models/User.php | 6 +++--- app/Providers/AuthServiceProvider.php | 2 +- app/Providers/EventServiceProvider.php | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 3ca4b3458..8e7fbd1be 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -10,7 +10,7 @@ class Handler extends ExceptionHandler /** * A list of the exception types that are not reported. * - * @var string[] + * @var array> */ protected $dontReport = [ // @@ -19,7 +19,7 @@ class Handler extends ExceptionHandler /** * A list of the inputs that are never flashed for validation exceptions. * - * @var string[] + * @var array */ protected $dontFlash = [ 'current_password', diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 09072858d..d3722c2d5 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -11,7 +11,7 @@ class Kernel extends HttpKernel * * These middleware are run during every request to your application. * - * @var string[] + * @var array */ protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, @@ -26,7 +26,7 @@ class Kernel extends HttpKernel /** * The application's route middleware groups. * - * @var array + * @var array> */ protected $middlewareGroups = [ 'web' => [ @@ -51,7 +51,7 @@ class Kernel extends HttpKernel * * These middleware may be assigned to groups or used individually. * - * @var array + * @var array */ protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 8aafb86ed..867695bdc 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -9,7 +9,7 @@ class EncryptCookies extends Middleware /** * The names of the cookies that should not be encrypted. * - * @var string[] + * @var array */ protected $except = [ // diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php index c6ca889fe..74cbd9a9e 100644 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ b/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -9,7 +9,7 @@ class PreventRequestsDuringMaintenance extends Middleware /** * The URIs that should be reachable while maintenance mode is enabled. * - * @var string[] + * @var array */ protected $except = [ // diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 362b48b0d..a2813a064 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -13,9 +13,9 @@ class RedirectIfAuthenticated * Handle an incoming request. * * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * @param string|null ...$guards - * @return mixed + * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ public function handle(Request $request, Closure $next, ...$guards) { diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index ba871a40e..88cadcaaf 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -9,7 +9,7 @@ class TrimStrings extends Middleware /** * The names of the attributes that should not be trimmed. * - * @var string[] + * @var array */ protected $except = [ 'current_password', diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php index 91c19da2f..7186414c6 100644 --- a/app/Http/Middleware/TrustHosts.php +++ b/app/Http/Middleware/TrustHosts.php @@ -9,7 +9,7 @@ class TrustHosts extends Middleware /** * Get the host patterns that should be trusted. * - * @return string[] + * @return array */ public function hosts() { diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 7761c9701..3391630ec 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -10,7 +10,7 @@ class TrustProxies extends Middleware /** * The trusted proxies for this application. * - * @var string[]|string|null + * @var array|string|null */ protected $proxies; diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 8b44ba184..9e8652172 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -9,7 +9,7 @@ class VerifyCsrfToken extends Middleware /** * The URIs that should be excluded from CSRF verification. * - * @var string[] + * @var array */ protected $except = [ // diff --git a/app/Models/User.php b/app/Models/User.php index e23e0905f..89963686e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -15,7 +15,7 @@ class User extends Authenticatable /** * The attributes that are mass assignable. * - * @var string[] + * @var array */ protected $fillable = [ 'name', @@ -26,7 +26,7 @@ class User extends Authenticatable /** * The attributes that should be hidden for serialization. * - * @var array + * @var array */ protected $hidden = [ 'password', @@ -36,7 +36,7 @@ class User extends Authenticatable /** * The attributes that should be cast. * - * @var array + * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 9b4e2f8dc..22b77e6e3 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -10,7 +10,7 @@ class AuthServiceProvider extends ServiceProvider /** * The policy mappings for the application. * - * @var array + * @var array */ protected $policies = [ // 'App\Models\Model' => 'App\Policies\ModelPolicy', diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index c93d5d1ae..23499eb8d 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -12,7 +12,7 @@ class EventServiceProvider extends ServiceProvider /** * The event listener mappings for the application. * - * @var array + * @var array> */ protected $listen = [ Registered::class => [ From 68a0dbed64604405aeb23739ef1304c561f3bc82 Mon Sep 17 00:00:00 2001 From: Rob Lister Date: Mon, 6 Dec 2021 14:24:41 +0000 Subject: [PATCH 4/5] [8.x] Add option to set sendmail path. Fix default (#5741) * Add option to set sendmail path. Fix default Testing this in an application, it would seem that sendmail -bs is the wrong option for this case? What Laravel appears to do is pipe an RFC-2822 formatted message on STDIN and requires the sendmail emulation to deal with it, rather than -bs which initiates an SMTP session. if Exim is the default MTA then -t would seem to be the correct option. If you have an alternative installed instead of sendmail/exim, then there's no way to set the path, so I added MAIL_SENDMAIL_PATH so you can do, e.g.: MAIL_SENDMAIL_PATH="/usr/bin/msmtp -t --tls=off --from=${MAIL_FROM_ADDRESS} --auto-from=off" msmtp doesn't support -bs at all * Update mail.php Co-authored-by: Taylor Otwell --- config/mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/mail.php b/config/mail.php index e86074948..f96c6c7c3 100644 --- a/config/mail.php +++ b/config/mail.php @@ -59,7 +59,7 @@ return [ 'sendmail' => [ 'transport' => 'sendmail', - 'path' => '/usr/sbin/sendmail -bs', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'), ], 'log' => [ From 7e78e26c7ce45fe1716b82ecbecd6a808a0e7f8b Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 7 Dec 2021 17:10:22 +0100 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a85b39e1..eabd7a59a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Release Notes -## [Unreleased](https://github.com/laravel/laravel/compare/v8.6.8...8.x) +## [Unreleased](https://github.com/laravel/laravel/compare/v8.6.9...8.x) + + +## [v8.6.9 (2021-12-07)](https://github.com/laravel/laravel/compare/v8.6.8...v8.6.9) + +### Changed +- Improves generic types on the skeleton ([#5740](https://github.com/laravel/laravel/pull/5740)) +- Add option to set sendmail path ([#5741](https://github.com/laravel/laravel/pull/5741)) + +### Fixed +- Fix asset publishing if they were already published ([#5734](https://github.com/laravel/laravel/pull/5734)) ## [v8.6.8 (2021-11-23)](https://github.com/laravel/laravel/compare/v8.6.7...v8.6.8)