Skip to content

feature: replace MyCLabs Enum constructor call#6588

Merged
TomasVotruba merged 4 commits intorectorphp:mainfrom
carlosvinicius:feature/replace-myclabs-enum-constructor-call
Jan 11, 2025
Merged

feature: replace MyCLabs Enum constructor call#6588
TomasVotruba merged 4 commits intorectorphp:mainfrom
carlosvinicius:feature/replace-myclabs-enum-constructor-call

Conversation

@carlosvinicius
Copy link
Contributor

The My C-Labs enum allows instantiation as a class using new instead of the static method from. (ref).
image

As it is not applicable for native enums, this PR allows the enum instantiations that use the new statement to be replaced by the static method from.

Enums that override the default My C-Labs enum constructor are skipped.

@carlosvinicius carlosvinicius force-pushed the feature/replace-myclabs-enum-constructor-call branch from 158efc5 to ca5a6d2 Compare December 14, 2024 19:38
@carlosvinicius carlosvinicius force-pushed the feature/replace-myclabs-enum-constructor-call branch from ca5a6d2 to f4cd998 Compare December 14, 2024 19:56
@carlosvinicius carlosvinicius force-pushed the feature/replace-myclabs-enum-constructor-call branch from e77a7cf to 6e76750 Compare December 16, 2024 18:04
@TomasVotruba
Copy link
Member

Thank you 👏

@TomasVotruba TomasVotruba merged commit 706170a into rectorphp:main Jan 11, 2025
41 checks passed
@github-actions
Copy link
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants