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

Enum Order should be correctly handled as an enum #404

Closed
Aerendir opened this issue Mar 2, 2024 · 2 comments
Closed

Enum Order should be correctly handled as an enum #404

Aerendir opened this issue Mar 2, 2024 · 2 comments

Comments

@Aerendir
Copy link

Aerendir commented Mar 2, 2024

Currently, to use the enum we have to explicitly call the ->value.

This seems to me to be useless as it would have been sufficient to simply use the Enum and let the code handle the conversion to string.

class MyEntity
{
    ...

-    #[OrderBy(['opened' => Order::Descending->value])]
+    #[OrderBy(['opened' => Order::Descending])]
    private Collection $orderableItems;
@derrabus
Copy link
Member

derrabus commented Mar 2, 2024

The OrderBy attribute is not part of the collections library.

@derrabus derrabus closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
@Aerendir
Copy link
Author

Aerendir commented Mar 2, 2024

@derrabus , you are right: sorry.

I also found an issue already opened about this:

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

No branches or pull requests

2 participants