You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Trait Spatie\Activitylog\Traits\LogsActivity on line 371 tries to call getStorableEnumValue method on an Eloquent model. package.json file of the spatie/laravel-activitylog repository requires Laravel version ^8.0 || ^9.0 || ^10.0, but for example in Laravel 9.26.0 there was no getStorableEnumValue method implemented yet. It was added later. For example it is present in Laravel 9.52.15.
Expected behavior
It should automatically upgrade my Laravel app to proper version. 9.0.0 is not new enough. You should change the minimal Laravel version in package.json.
Versions (please complete the following information)
PHP: 8.1
Laravel: 9.26.0
Package: spatie/laravel-activitylog
Additional context
I faced this issue in Laravel 9.26.0. Then I simply upgraded my app with $ composer update. Then my Laravel version raised to 9.52.15 and the problem disappeared. So I suppose that the Laravel developers added getStorableEnumValue somewhere between version 9.26.0 and 9.52.15.
The text was updated successfully, but these errors were encountered:
Besides the fact that we are talking about composer.json: go ahead and provide a PR fixing it. In best case with links to the PRs/Commits that introduced that method.
Yes, sorry, we talk about composer.json not about package.json as I said earlier. Im not gonna make PR. I just wanted to notice you about the bug. Have a nice day.
Hi @mspiderv , I've been looking at this issue and found that the bug was introduced in commit 1ad6f98 and then published in version 4.7.0 of the package. However, I also found that it was fixed in commit a92fde9 and released in version 4.7.2 of the package. Therefore, it appears that you might have been using version 4.7.0 or 4.7.1.
@Gummibeer, you may want to take a look at the changes made to the file src\Traits\LogsActivity.php in commit a92fde9, where this issue has already been resolved.
Describe the bug
Trait
Spatie\Activitylog\Traits\LogsActivity
on line 371 tries to callgetStorableEnumValue
method on an Eloquent model.package.json
file of thespatie/laravel-activitylog
repository requires Laravel version^8.0 || ^9.0 || ^10.0
, but for example in Laravel 9.26.0 there was nogetStorableEnumValue
method implemented yet. It was added later. For example it is present in Laravel9.52.15
.To Reproduce
Create a new Laravel 9.0.0 app (not newer version!) Then install Spatie Laravel Activity Log. Then reproduce steps here: https://spatie.be/docs/laravel-activitylog/v4/advanced-usage/logging-model-events
You will end up with the
Call to undefined method App\\Models\\SomeModel::getStorableEnumValue()
exception.Expected behavior
It should automatically upgrade my Laravel app to proper version. 9.0.0 is not new enough. You should change the minimal Laravel version in
package.json
.Versions (please complete the following information)
Additional context
I faced this issue in Laravel
9.26.0
. Then I simply upgraded my app with$ composer update
. Then my Laravel version raised to9.52.15
and the problem disappeared. So I suppose that the Laravel developers addedgetStorableEnumValue
somewhere between version9.26.0
and9.52.15
.The text was updated successfully, but these errors were encountered: