Closed kevindb closed 4 years ago
Hey, yes, yes, yes and yes.
I'm sorry but this is because of the changes in the Castable
trait.
https://github.com/spatie/laravel-enum/blob/006fe3b00cf8ba82ec41ca4511bb2612b9867a12/src/Enum.php#L14-L21
As the castUsing()
with arguments is a super useful feature we've used the Laravel 8 only approach.
If you fear to upgrade yourself - spend the 9$ and let shift upgrade your app for you. 😉
Oh, don't get me wrong, I am extremely eager to get the project onto Laravel 8. It's a matter of getting it prioritized in the "product timeline". #CorporateLife
Would you like a PR to make the requirement clearer in the Readme?
In general we don't highlight such requirements as they are clearly described in the composer.json
and increase the maintenance effort we have to do every 6months (Laravel release cycle).
We had such notes during Laravel 5/6 and we always forgot to update the README when we've updated the composer.json
.
Maybe I'm not looking in the right place. Where is the Laravel requirement in composer.json?
https://github.com/spatie/laravel-enum/blob/006fe3b00cf8ba82ec41ca4511bb2612b9867a12/composer.json#L29-L33
It's not the Laravel you require as an app developer. But you should know the illuminate namespace. Illuminate
is the components namespace for all the different Laravel components.
Fair enough. I didn't realize until today that the Illuminate version numbers are in sync with the Laravel version numbers.
Thank you for the explanation! I'll double down trying to prioritize our upgrade to Laravel 8.
I too have just hit this problem. Slightly annoying as I love and trust Spatie software but equally I don't have the capacity nor the desire to upgrade to Laravel 8 just yet regardless of whether Shift makes it easier or not.
Just to add to what @kevindb was saying, I too would not think to look in composer.json immediately, I kind of assumed this enum package would work on at least the second most recent version of Laravel. I doubt everyone is using 8.0 just yet.
Oh what the hell. I'm upgrading to Laravel 8.0 now, thanks for giving me extra work to do at 2.30am!
OK - upgraded to Laravel 8.0, package installed, you can ignore this comment! 👍
Thank you for your incredible packages Spatie!!
I am trying to install spatie/laravel-enum 2.1 in my project running laravel-framework 7.19.1. (full error below)
composer require spatie/laravel-enum --update-with-dependencies
My guess is that spatie/laravel-enum requires illuminate/http ^8.0 and that is only available in Laravel 8? If so, does that mean that laravel-enum v2 is only compatible with laravel-framework v8?