From c11b2ba23c7ac9e5e5f8d86c48ca470ab90b90d5 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Mon, 29 Jul 2024 14:07:58 -0600 Subject: [PATCH 1/2] Stan go away, don't come back another day --- 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 e07a4e66..ab703299 100644 --- a/src/Foundation/Application.php +++ b/src/Foundation/Application.php @@ -327,7 +327,7 @@ public function after($callback) */ public function error(Closure $callback) { - $this->make('Illuminate\Contracts\Debug\ExceptionHandler')->error($callback); + $this->make('Illuminate\Contracts\Debug\ExceptionHandler')->error($callback); // @phpstan-ignore-line } /** From 339af87267d355a8acef6dafbed9d2f2523099d2 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Mon, 29 Jul 2024 16:27:05 -0400 Subject: [PATCH 2/2] Use fromRawAttributes() for custom pivot models (#184) Fixes wintercms/winter#741. Related: https://github.com/wintercms/wn-test-plugin/pull/11 --- src/Database/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Model.php b/src/Database/Model.php index 40390596..8dfcc382 100644 --- a/src/Database/Model.php +++ b/src/Database/Model.php @@ -853,7 +853,7 @@ public function newRelationPivot($relationName, $parent, $attributes, $table, $e if (!is_null($definition) && array_key_exists('pivotModel', $definition)) { $pivotModel = $definition['pivotModel']; - return $pivotModel::fromAttributes($parent, $attributes, $table, $exists); + return $pivotModel::fromRawAttributes($parent, $attributes, $table, $exists); } }