Skip to content

Commit 592f0eb

Browse files
committed
Merge branch 'release/1.0.1' into main
2 parents 4ad2bc9 + 7842283 commit 592f0eb

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project will be documented in this file. This project adheres to
44
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
55

6+
## [1.0.1] - 2021-07-31
7+
8+
### Fixed
9+
10+
- [#2](https://github.com/laravel-json-api/boolean-softdeletes/pull/2) Use `class_uses_recursive()` to detect trait on
11+
model class.
12+
613
## [1.0.0] - 2021-07-31
714

815
Initial release.

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
],
2525
"require": {
2626
"php": "^7.4|^8.0",
27+
"illuminate/support": "^8.0",
2728
"laravel-json-api/eloquent": "^1.0.0",
2829
"tenantcloud/laravel-boolean-softdeletes": "^3.1"
2930
},

src/Drivers/SoftDeleteBooleanDriver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SoftDeleteBooleanDriver extends StandardDriver
3636
*/
3737
public function __construct($model)
3838
{
39-
if (!in_array(SoftDeletesBoolean::class, class_uses($model), true)) {
39+
if (!in_array(SoftDeletesBoolean::class, class_uses_recursive($model), true)) {
4040
throw new InvalidArgumentException('Expecting a model that is boolean soft-deletable.');
4141
}
4242

0 commit comments

Comments
 (0)