Skip to content
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

feat(enum-collector): improve extensibility of EnumTransformer #78

Merged
merged 1 commit into from
May 3, 2024

Conversation

innocenzi
Copy link
Contributor

This pull request improves the extensibility of EnumTransformer.

Currently, EnumCollector is directly tied to EnumTransformer, which means that if we want to override the later, we also need to override the former.

With this pull request, the EnumCollector will check if there is a transformer that extends EnumTransformer instead of checking if EnumTransformer exists at all.

Additionally, the verification logic has been extracted to a method so it can be overridden if necessary.

The use case for this is the same as spatie/laravel-data#589

@innocenzi
Copy link
Contributor Author

@rubenvanassche I know v3 is in the works, but would it be possible to take a quick look at that for v2? 👀

@rubenvanassche
Copy link
Member

We'll since it is going to take a few more weeks for v3 I'll merge it!

@rubenvanassche rubenvanassche merged commit cc6969d into spatie:main May 3, 2024
7 checks passed
@innocenzi innocenzi deleted the feat/enum-collector branch May 3, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants