Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Mar 16, 2023
1 parent a4ef24c commit 2d26659
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"post-autoload-dump": "@composer run prepare",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"ci": [
"@composer audit",
"@composer run prepare",
"@php vendor/bin/phpstan analyse",
"@php vendor/bin/pint"
Expand Down
7 changes: 1 addition & 6 deletions src/Eloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Database\Eloquent\Builder as EloquentQueryBuilder;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Queue\SerializableClosureFactory;
use Laravel\SerializableClosure\SerializableClosure;

/**
Expand Down Expand Up @@ -35,11 +34,7 @@ public static function serialize($builder): array
'class' => \get_class($model),
'connection' => $model->getConnectionName(),
'eager' => collect($builder->getEagerLoads())->map(function ($callback) {
$closure = class_exists(SerializableClosureFactory::class)
? SerializableClosureFactory::make($callback)
: new SerializableClosure($callback);

return \serialize($closure);
return \serialize(new SerializableClosure($callback));
})->all(),
'removedScopes' => $builder->removedScopes(),
],
Expand Down

0 comments on commit 2d26659

Please sign in to comment.