From a44fe5d5a96e85761d41186e27d5b84073340190 Mon Sep 17 00:00:00 2001 From: overtrue Date: Mon, 31 Oct 2022 14:46:22 +0800 Subject: [PATCH] fix: fix breaking change. --- src/Versionable.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Versionable.php b/src/Versionable.php index a006b73..81bcf3c 100644 --- a/src/Versionable.php +++ b/src/Versionable.php @@ -178,6 +178,11 @@ public function forceRemoveAllVersions(): void public function shouldBeVersioning(): bool { + // xxx: fix break change + if (method_exists($this, 'shouldVersioning')) { + return call_user_func([$this, 'shouldVersioning']); + } + return !empty($this->getVersionableAttributes()); }