Skip to content

Conversation

@vinceAmstoutz
Copy link
Member

@vinceAmstoutz vinceAmstoutz commented Oct 24, 2024

Q A
Branch? main
License MIT
Doc PR Coming soon

Goal:

Using filters as we use Laravel filters. Example with Symfony:

#[ApiResource]
#[GetCollection(
    parameters: [
        'active' => new QueryParameter(
            filter: new BooleanFilter(),
        ),

        // support also for filter aliasing
        'enabled' => new QueryParameter(
            filter: new BooleanFilter(),
            property: 'active',
        ),
    ],
)]
#[ORM\Entity]
class FilteredBooleanParameter {
    // ...
}

TODO:

  • Check swagger UI to see what it's like
  • Do the job for Doctrine ODM (MongoDM)
  • Fix PHPStan
  • Fix MongoDM tests

@vinceAmstoutz vinceAmstoutz force-pushed the feat-doctrine-boolean-filter-like-laravel-filters branch 6 times, most recently from cc689c3 to c5de0d4 Compare October 26, 2024 14:14
@vinceAmstoutz
Copy link
Member Author

@soyuka looks like this in Swagger UI:
image
image
image

@vinceAmstoutz vinceAmstoutz force-pushed the feat-doctrine-boolean-filter-like-laravel-filters branch 7 times, most recently from 2e2f570 to 1892e6a Compare October 26, 2024 18:47
@vinceAmstoutz vinceAmstoutz marked this pull request as ready for review October 26, 2024 18:57
@vinceAmstoutz vinceAmstoutz requested a review from soyuka October 26, 2024 18:57
Copy link
Member

@soyuka soyuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice start! A few comments left to be done!

@vinceAmstoutz vinceAmstoutz force-pushed the feat-doctrine-boolean-filter-like-laravel-filters branch 5 times, most recently from 04a24ac to b1026cb Compare October 31, 2024 15:35
@vinceAmstoutz vinceAmstoutz force-pushed the feat-doctrine-boolean-filter-like-laravel-filters branch 3 times, most recently from 6887caf to a5fe140 Compare November 4, 2024 11:26
@vinceAmstoutz vinceAmstoutz force-pushed the feat-doctrine-boolean-filter-like-laravel-filters branch 2 times, most recently from 1130a1a to 13c15dd Compare November 4, 2024 16:02
@vinceAmstoutz vinceAmstoutz requested a review from soyuka November 4, 2024 16:02
@vinceAmstoutz vinceAmstoutz force-pushed the feat-doctrine-boolean-filter-like-laravel-filters branch 2 times, most recently from c5c4b19 to cbe1cff Compare November 5, 2024 09:00
@vinceAmstoutz vinceAmstoutz force-pushed the feat-doctrine-boolean-filter-like-laravel-filters branch from cbe1cff to fd22d9c Compare November 5, 2024 09:25
@vinceAmstoutz vinceAmstoutz deleted the feat-doctrine-boolean-filter-like-laravel-filters branch November 5, 2024 09:55
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