<?php namespace App\Form\Enum; enum MeetName: string { case MECZ1 = 'Mecz 1'; case MECZ2 = 'Mecz 2'; }
dodałem go sobie do formularza :
<?php namespace App\Form; use Symfony\Component\Form\Extension\Core\Type\EnumType; use App\Form\Enum\MeetName; class MeetType extends AbstractType { { $builder ->add('name' , null, ['label' => 'Nazwa']) ->add('name' , EnumType::class, [ 'class' => MeetName::class ])
i wydawało mi się że dobrze dodałem , zgodnie z dok.:
https://symfony.com/doc/current/reference/f...types/enum.html
ale niestety mam taki błąd:
Expected to find class "App\Form\Enum\MeetName" in file "C:\xampp\htdocs\ligatyperow2\src/Form\Enum\MeetName.php" while importing services from resource "../src/*", but it was not found! Check the namespace prefix used with the resource in C:\xampp\htdocs\ligatyperow2\config/services.yaml (which is loaded in resource "C:\xampp\htdocs\ligatyperow2\config/services.yaml").
co mam nie tak ?