Chore: update base enum class with forked version from myclabs #7383
+798
−88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: GIVE-760
Description
We have a php 8.1 incompatibility conflict with the myclabs/php-enum class. Unfortunately we are currently tied to php 7.2 at the moment and cannot update to their latest package that resolves the conflict.
Furthermore, this package is not really maintained anymore since enums were introduced in php 8.1
So for more control over stability and compatibility with GiveWP, this PR forks the base enum class from myclabs including the unit tests and updates our Enum to extend it.
Affects
This technically affects our value objects that extend the enum class, however it's still the same logic with the namespace being our own so the risk is very low.
Visuals
N/A
Testing Instructions
Unit tests and static analysis should take care of the bulk testing. We will want to run through QA regression testing as well.
Pre-review Checklist
@unreleased
tags included in DocBlocks