title: How can I use API Platform filters in YAML?
body: <p>First of all, I want to inform you that I already read the docs about the problem I'm having today, and I also made a search on StackOverflow and Google, but didn't find a proper solution.</p>
  
  <p>I am building a Customer Relationship Management API for practice sake with Symfony 4 and API Platform. I already learned a lot about API Platform, and even though I could have used annotations for resources configuration, I forced myself to use YAML in order to learn more about it.</p>
  
  <p>So, I have a Customer resource which has several attributes: <em>id</em>, <em>firstname</em>, <em>lastname</em>, <em>emailAddress</em>, <em>company</em>, <em>createdAt</em>, <em>updatedAt</em>, and <em>owner</em>. My goal is to add a <strong>SearchFilter</strong> on this resource (in YAML) and add most of the attributes as properties of this filter.</p>
  
  <p>I already tried the solution given here: <a href="https://github.com/api-platform/core/issues/1755" rel="noreferrer">https://github.com/api-platform/core/issues/1755</a>. The problem is that I can't manage to make it work. In services.yaml, I see that you can add arguments, but I don't know what equivalent you can find in annotations...</p>
  
  <p>In <code>config/services.yaml</code>:</p>
  
  <pre><code># filters
      app.my_filter:
          parent: 'api_platform.doctrine.orm.search_filter'
          tags: ['api_platform.filter']
          autowire: false
          autoconfigure: false
          public: false
  </code></pre>
  
  <p>In <code>resources/customer.yaml</code>:</p>
  
  <pre><code>App\Entity\Customer:
      collectionOperations:
          get:
              normalization_context:
                  groups: ['Customer:Get']
              filters: ['app.my_filter']
  </code></pre>
  
  <p>What I intend to is something similar to this with annotations in <code>src/Entity/Customer.php</code>:</p>
  
  <pre class="lang-php prettyprint-override"><code>/**
   * @ApiResource
   *
   * [...]
   *
   * @ApiFilter(SearchFilter::class, properties={
   *     "firstname": "partial",
   *     "lastname": "partial",
   *     "emailAddress": "partial",
   *     "company": "partial"
   * })
   */
  class Customer
  {
  ...
  }
  </code></pre>
  
  <p>I hope that you'll be able to help and that my problem is clearly explained. If not, please tell me and I'll do my best to give your more details.</p>
  
  <p>Thanks!</p>