Skip to content

Commit 5c14bb9

Browse files
committed
Deprecate Mongo soft deletes trait
In favor of the Laravel one. Ours is now obsolete; the SoftDeletes trait is only necessary to remove the call to qualifyColumn in the parent trait. But the DocumentModel::qualifyColumn is already disabled
1 parent 456326b commit 5c14bb9

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

docs/includes/eloquent-models/PlanetSoftDelete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App\Models;
44

5+
use Illuminate\Database\Eloquent\SoftDeletes;
56
use MongoDB\Laravel\Eloquent\Model;
6-
use MongoDB\Laravel\Eloquent\SoftDeletes;
77

88
class Planet extends Model
99
{

src/Eloquent/MassPrunable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace MongoDB\Laravel\Eloquent;
66

77
use Illuminate\Database\Eloquent\MassPrunable as EloquentMassPrunable;
8+
use Illuminate\Database\Eloquent\SoftDeletes;
89
use Illuminate\Database\Events\ModelsPruned;
910

1011
use function class_uses_recursive;

src/Eloquent/SoftDeletes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace MongoDB\Laravel\Eloquent;
66

7+
/** @deprecated 6.0.0 in favor of \Illuminate\Database\Eloquent\SoftDeletes */
78
trait SoftDeletes
89
{
910
use \Illuminate\Database\Eloquent\SoftDeletes;

tests/Models/Soft.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
use Carbon\Carbon;
88
use Illuminate\Database\Eloquent\Model;
9+
use Illuminate\Database\Eloquent\SoftDeletes;
910
use MongoDB\Laravel\Eloquent\Builder;
1011
use MongoDB\Laravel\Eloquent\DocumentModel;
1112
use MongoDB\Laravel\Eloquent\MassPrunable;
12-
use MongoDB\Laravel\Eloquent\SoftDeletes;
1313

1414
/** @property Carbon $deleted_at */
1515
class Soft extends Model

tests/Scout/Models/ScoutUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
namespace MongoDB\Laravel\Tests\Scout\Models;
66

77
use Illuminate\Database\Eloquent\Model;
8+
use Illuminate\Database\Eloquent\SoftDeletes;
89
use Illuminate\Database\Schema\Blueprint;
910
use Illuminate\Database\Schema\SQLiteBuilder;
1011
use Illuminate\Support\Facades\Schema;
1112
use Laravel\Scout\Searchable;
12-
use MongoDB\Laravel\Eloquent\SoftDeletes;
1313

1414
use function assert;
1515

0 commit comments

Comments
 (0)