-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.1 #96
Conversation
@brendt could you please check these changes. There are some interfaces missing and the code isn't perfect. But these three traits are what I can reduce to. |
Looking good, only two minor remarks. I think these traits offer enough value to keep the package alive for now :) |
# Conflicts: # .github/workflows/php-cs-fixer.yml # src/Enum.php # tests/EnumTest.php
@brendt as you can't type-hint traits - what do you think about an interface? This would make type-safety for the Laravel wrapper easier and allows other packages/apps to interact with this base package. |
What would you call the interface? |
Enum, Enumerable, EnumContract - I'm open for everything. |
Then you'd only be able to implement the interface if you use all traits. I'm fine with that simplicity, but why not combine all traits into one as well then? |
Would also be fine with combining the traits. |
Is there a guide somewhere for migrating from Spatie enums to native PHP enums? |
Besides that you will have to replace all "method" calls with constant-like calls. For MyClabs there's a rule, you can probably adjust it or even add it to rector. Last one will be replacing all |
Closing due to inactivity. |
No description provided.