refactor: convert ConsentType to a PHP 8.1 backed enum#1929
Open
kayjoosten wants to merge 1 commit intofeature/stabilize-consent-hashfrom
Open
refactor: convert ConsentType to a PHP 8.1 backed enum#1929kayjoosten wants to merge 1 commit intofeature/stabilize-consent-hashfrom
kayjoosten wants to merge 1 commit intofeature/stabilize-consent-hashfrom
Conversation
Contributor
Author
|
Note: @johanib ik zag hier een @deprecated van 2015.... dus ik kon het echt niet laten. Ik heb het wel apart getrokken van de ander branch maar als je dit kan reviewen merge ik hem in de andere pr. |
b183015 to
c3faaec
Compare
ab9366f to
2aeffa0
Compare
b5009cb to
260c436
Compare
2348282 to
5981524
Compare
Replace the ConsentType value class (with its deprecated public constructor since ~2015) with a proper backed enum. - ConsentType is now `enum ConsentType: string` with cases Explicit = 'explicit' and Implicit = 'implicit' - The deprecated public constructor, the explicit()/implicit() named constructors and the equals() method are removed - DbalConsentRepository uses ConsentType::from() to hydrate from DB - Legacy Consent model methods now accept ConsentType and pass ->value into SQL parameter arrays - All call sites updated from TYPE_EXPLICIT/TYPE_IMPLICIT constants and named constructors to enum cases - ConsentTypeTest updated: invalid-string rejection tested via from(), equality via assertSame() on enum singletons
5981524 to
e6ffa0d
Compare
johanib
approved these changes
Mar 19, 2026
Contributor
|
Looks good, but need to fix test before merging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace the ConsentType value class (with its deprecated public constructor since ~2015) with a proper backed enum.
enum ConsentType: stringwith cases Explicit = 'explicit' and Implicit = 'implicit'