Skip to content

Commit e6dcf9b

Browse files
committed
bug symfony#38292 Register the binary types as well (jdelaune)
This PR was squashed before being merged into the 5.2-dev branch. Discussion ---------- Register the binary types as well | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix - | License | MIT | Doc PR | symfony/symfony-docs- Binary versions were not working since they weren't registered Commits ------- 96a0e5f Register the binary types as well
2 parents 713f30e + 96a0e5f commit e6dcf9b

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)