From 0431b2f157c67cd980489616dc9f297c8680e478 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 6 Feb 2025 19:59:46 +1100 Subject: [PATCH 1/4] Review resizer default --- src/Resize/Resizer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Resize/Resizer.php b/src/Resize/Resizer.php index 3c39fbf62..ba9e45b39 100644 --- a/src/Resize/Resizer.php +++ b/src/Resize/Resizer.php @@ -153,11 +153,11 @@ public function reset(): Resizer public function setOptions(array $options): Resizer { $this->options = array_merge([ - 'mode' => 'auto', - 'offset' => [0, 0], - 'sharpen' => 0, + 'mode' => 'crop', + 'offset' => [0, 0], + 'sharpen' => 0, 'interlace' => false, - 'quality' => 90 + 'quality' => 90 ], $options); return $this; From 8d4d37ab0665a8e5c635e5de47de1a85efe87838 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Mon, 10 Feb 2025 17:57:06 +1100 Subject: [PATCH 2/4] Fixes soft delete check, fixes nested tree restoration --- src/Database/Traits/NestedTree.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Database/Traits/NestedTree.php b/src/Database/Traits/NestedTree.php index 7ffe7dd07..63b09edfc 100644 --- a/src/Database/Traits/NestedTree.php +++ b/src/Database/Traits/NestedTree.php @@ -4,7 +4,6 @@ use October\Rain\Database\Collection; use October\Rain\Database\TreeCollection; use October\Rain\Database\Scopes\NestedTreeScope; -use Illuminate\Database\Eloquent\SoftDeletingScope; use Exception; /** @@ -120,7 +119,10 @@ public function initializeNestedTree() $this->deleteDescendants(); }); - if (static::hasGlobalScope(SoftDeletingScope::class)) { + if ( + static::hasGlobalScope(\October\Rain\Database\Scopes\SoftDeleteScope::class) || + static::hasGlobalScope(\Illuminate\Database\Eloquent\SoftDeletingScope::class) + ) { $this->bindEvent('model.beforeRestore', function () { $this->shiftSiblingsForRestore(); }); From a6835da08e6f4eed5eb5e66e9b0c8f4db28feb48 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Tue, 11 Feb 2025 05:57:32 +1100 Subject: [PATCH 3/4] This check is redundant --- src/Database/Traits/NestedTree.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Database/Traits/NestedTree.php b/src/Database/Traits/NestedTree.php index 63b09edfc..30220dbc2 100644 --- a/src/Database/Traits/NestedTree.php +++ b/src/Database/Traits/NestedTree.php @@ -119,18 +119,13 @@ public function initializeNestedTree() $this->deleteDescendants(); }); - if ( - static::hasGlobalScope(\October\Rain\Database\Scopes\SoftDeleteScope::class) || - static::hasGlobalScope(\Illuminate\Database\Eloquent\SoftDeletingScope::class) - ) { - $this->bindEvent('model.beforeRestore', function () { - $this->shiftSiblingsForRestore(); - }); + $this->bindEvent('model.beforeRestore', function () { + $this->shiftSiblingsForRestore(); + }); - $this->bindEvent('model.afterRestore', function () { - $this->restoreDescendants(); - }); - } + $this->bindEvent('model.afterRestore', function () { + $this->restoreDescendants(); + }); } /** From 79bd64e09e69d8e9155eede10464ba23e220a181 Mon Sep 17 00:00:00 2001 From: jacobdekeizer Date: Wed, 19 Feb 2025 11:12:40 +0100 Subject: [PATCH 4/4] Restore Illuminate Redirector alias for backward compatibility --- src/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Foundation/Application.php b/src/Foundation/Application.php index 073262b3e..f71dfd653 100644 --- a/src/Foundation/Application.php +++ b/src/Foundation/Application.php @@ -347,7 +347,7 @@ public function registerCoreContainerAliases() 'queue' => [\Illuminate\Queue\QueueManager::class, \Illuminate\Contracts\Queue\Factory::class, \Illuminate\Contracts\Queue\Monitor::class], 'queue.connection' => [\Illuminate\Contracts\Queue\Queue::class], 'queue.failer' => [\Illuminate\Queue\Failed\FailedJobProviderInterface::class], - 'redirect' => [\October\Rain\Router\CoreRedirector::class], + 'redirect' => [\October\Rain\Router\CoreRedirector::class, \Illuminate\Routing\Redirector::class], 'redis' => [\Illuminate\Redis\RedisManager::class, \Illuminate\Contracts\Redis\Factory::class], 'redis.connection' => [\Illuminate\Redis\Connections\Connection::class, \Illuminate\Contracts\Redis\Connection::class], 'request' => [\Illuminate\Http\Request::class, \Symfony\Component\HttpFoundation\Request::class],