fix: Add missing UUID doctrine type.

This commit is contained in:
Pol Dellaiera 2021-12-21 14:31:31 +01:00
parent 01ef9617d6
commit d692793714
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA

View File

@ -11,12 +11,14 @@ declare(strict_types=1);
namespace Chill\WopiBundle\DependencyInjection;
use Ramsey\Uuid\Doctrine\UuidType;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
final class ChillWopiExtension extends Extension
final class ChillWopiExtension extends Extension implements PrependExtensionInterface
{
public function load(array $configs, ContainerBuilder $container)
{
@ -31,4 +33,17 @@ final class ChillWopiExtension extends Extension
$loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.php');
}
public function prepend(ContainerBuilder $container) {
$container->prependExtensionConfig(
'doctrine',
[
'dbal' => [
'types' => [
'uuid' => UuidType::class,
],
],
]
);
}
}