Skip to content

Commit 96a0e5f

Browse files
jdelaunefabpot
authored andcommitted
Register the binary types as well
1 parent 713f30e commit 96a0e5f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterUidTypePass.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
namespace Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass;
1313

14+
use Symfony\Bridge\Doctrine\Types\UlidBinaryType;
1415
use Symfony\Bridge\Doctrine\Types\UlidType;
16+
use Symfony\Bridge\Doctrine\Types\UuidBinaryType;
1517
use Symfony\Bridge\Doctrine\Types\UuidType;
1618
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1719
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -38,6 +40,14 @@ public function process(ContainerBuilder $container)
3840
$typeDefinition['ulid'] = ['class' => UlidType::class];
3941
}
4042

43+
if (!isset($typeDefinition['uuid_binary'])) {
44+
$typeDefinition['uuid_binary'] = ['class' => UuidBinaryType::class];
45+
}
46+
47+
if (!isset($typeDefinition['ulid_binary'])) {
48+
$typeDefinition['ulid_binary'] = ['class' => UlidBinaryType::class];
49+
}
50+
4151
$container->setParameter('doctrine.dbal.connection_factory.types', $typeDefinition);
4252
}
4353
}

0 commit comments

Comments
 (0)