Closed errogaht closed 6 years ago
for fix it i done with this:
$enumName = basename($enumFile, '.php');
$str = "App\Enum\\$enumName";
PhpEnumType::registerEnumType(str_replace('\\', '\\\\', $str), $str);
PhpEnumType::registerEnumType($str);
so doctrine have double:
["App\\Enum\\DepartmentType"]=>
string(33) "Acelaya\Doctrine\Type\PhpEnumType"
["App\Enum\DepartmentType"]=>
string(33) "Acelaya\Doctrine\Type\PhpEnumType"
if i remove any of this then doctrine:schema:update --force fails
This library is framework-agnostic and should work in any case.
Could you provide some tests reproducing the issue?
How do I integrate your library to my Symfony4 project. Do I need a separate bundle to achieve that?
You can create a specific bundle if you want, but it's enough to add the boilerplate code to any existing bundle (like the App bundle)
Here's what I mean https://github.com/danaki/doctrine-enum-type-bundle Not really tested.
Cool. Nice job :)
I'm closing this since it doesn't seem there's any problem with symfony
Hi, but I cant integrate with Symfony. always get In DBALException.php line 283: Unknown column type "" requested. PhpEnumType::registerEnumType added to boot() method of kernel of Symfony 4.1