diff --git a/packages/serializer/src/Casts/AsSerializable.php b/packages/serializer/src/Casts/AsSerializable.php index 475e02b3c..084d3ff36 100644 --- a/packages/serializer/src/Casts/AsSerializable.php +++ b/packages/serializer/src/Casts/AsSerializable.php @@ -4,12 +4,13 @@ use Illuminate\Container\Container; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; -use Illuminate\Database\Eloquent\Model; use LastDragon_ru\LaraASP\Serializer\Contracts\Serializer; use LastDragon_ru\LaraASP\Serializer\Exceptions\FailedToCast; use function is_string; +// todo(laravel): [update] Update methods signatures after remove v9.x support. + /** * @template TType of object * @@ -33,7 +34,7 @@ public function __construct( /** * @inheritDoc */ - public function get(Model $model, string $key, mixed $value, array $attributes): ?object { + public function get(mixed $model, string $key, mixed $value, array $attributes): ?object { if ($value === null || $value instanceof $this->class) { // no action } elseif (is_string($value)) { @@ -53,7 +54,7 @@ public function get(Model $model, string $key, mixed $value, array $attributes): /** * @inheritDoc */ - public function set(Model $model, string $key, mixed $value, array $attributes): mixed { + public function set(mixed $model, string $key, mixed $value, array $attributes): mixed { if ($value !== null) { $value = Container::getInstance()->make(Serializer::class)->serialize( $value,