Skip to content

[12.x] only check for soft deletes once when mass-pruning#55274

Merged
taylorotwell merged 1 commit into
laravel:12.xfrom
cosmastech:soft-deletes-in-pruning
Apr 4, 2025
Merged

[12.x] only check for soft deletes once when mass-pruning#55274
taylorotwell merged 1 commit into
laravel:12.xfrom
cosmastech:soft-deletes-in-pruning

Conversation

@cosmastech

Copy link
Copy Markdown
Contributor

It's not necessary to repeatedly reflect the traits of a Model to see if it's soft-deletable. This is a very minor optimization.

@cosmastech cosmastech changed the title [12.x] only fetch soft deletes once when mass-pruning [12.x] only check for soft deletes once when mass-pruning Apr 4, 2025
@taylorotwell taylorotwell merged commit e229445 into laravel:12.x Apr 4, 2025
shaedrich added a commit to shaedrich/framework that referenced this pull request Jun 17, 2025
Co-authored-by: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com>

See laravel#55274

See laravel#56060 (comment)
taylorotwell added a commit that referenced this pull request Jun 17, 2025
… class (#56060)

* feat(database): ✨ Add isSoftDeletable(), isPrunable(), and isMassPrunable() to model class

* fix(database): 🐛 Call model method instead of command method

* Restore "only check for soft deletes once when mass-pruning"

Co-authored-by: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com>

See #55274

See #56060 (comment)

* Fix typo

Follow-up to 07520f2

* formatting

* fix test

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
taylorotwell added a commit to illuminate/database that referenced this pull request Jun 17, 2025
… class (#56060)

* feat(database): ✨ Add isSoftDeletable(), isPrunable(), and isMassPrunable() to model class

* fix(database): 🐛 Call model method instead of command method

* Restore "only check for soft deletes once when mass-pruning"

Co-authored-by: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com>

See laravel/framework#55274

See laravel/framework#56060 (comment)

* Fix typo

Follow-up to 07520f2225a78a183c6d02da11f662ddf207657d

* formatting

* fix test

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
taylorotwell added a commit to illuminate/routing that referenced this pull request Jun 17, 2025
… class (#56060)

* feat(database): ✨ Add isSoftDeletable(), isPrunable(), and isMassPrunable() to model class

* fix(database): 🐛 Call model method instead of command method

* Restore "only check for soft deletes once when mass-pruning"

Co-authored-by: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com>

See laravel/framework#55274

See laravel/framework#56060 (comment)

* Fix typo

Follow-up to 07520f2225a78a183c6d02da11f662ddf207657d

* formatting

* fix test

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants