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

Separat sorting for enum cases #7910

Closed
m-lotze opened this issue Mar 25, 2024 · 1 comment
Closed

Separat sorting for enum cases #7910

m-lotze opened this issue Mar 25, 2024 · 1 comment

Comments

@m-lotze
Copy link

m-lotze commented Mar 25, 2024

Feature request

It would be nice to be able to define a different sorting algorithm for enum cases or disable enum case alphabetic sorting when using this configuration

'ordered_class_elements' => ['sort_algorithm' => 'alpha', 'order' => ['use_trait', 'case', 'constant_public', 'constant_protected', 'constant_private', 'property_public_static', 'property_protected_static', ...]],

the order of declaration might be important for an enum, since Enum::cases() returns it in this order.

@Wirone
Copy link
Member

Wirone commented Mar 25, 2024

Duplicate of #6591.

@Wirone Wirone closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants