title: How to pass a non static callback to the assert choice constraint?
body: <p>I've got a ZipcodeService :</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  declare(strict_types=1);
  
  namespace App\Service;
  
  use App\Repository\CityRepository;
  
  class ZipcodeService
  {
      public function __construct(
         private CityRepository $cityRepository,
      ) {
      }
  
      /**
       * @return array&lt;int|string, mixed&gt;
       */
      public function allZipcodes(): array
      {
          $zipcodes = array_column($this-&gt;cityRepository-&gt;getAllZipcodes(), '1');
  
          $zipcodeChoices = [];
  
          foreach ($zipcodes as $zipcode) {
              $zipcodeChoices[$zipcode] = $zipcode;
          }
  
          return $zipcodeChoices;
      }
  }
  </code></pre>
  <p>And I would like to import this service in my Validation Constraint:</p>
  <pre class="lang-php prettyprint-override"><code>#[ORM\Column(type: 'string', length: 10, nullable: true)]
      #[Assert\Length(min: 5, max: 5, groups: ['edit'])]
      #[Assert\NotBlank(groups: ['edit'])]
      #[Assert\Regex(pattern: ('#^\d*$#'), groups: ['edit', 'registration'])]
      #[Assert\Choice(callback: My zipcodeService callback)]
      private ?string $zipcode = null;
  </code></pre>
  <p>But it's not a static function and I can't pass it static. I'm looking for a way to make it work, any idea ?</p>