Configuration ############# .. highlight:: php Generally, follow the Doctrine instructions. Plain Doctrine ============== .. note:: Doctrine doc: https://www.doctrine-project.org/projects/doctrine-orm/en/3.3/cookbook/custom-mapping-types.html :: getDatabasePlatform()->registerDoctrineTypeMapping( Inet6Type::NATIVE_TYPE, Inet6Type::NAME, ); Symfony ======= .. note:: Symfony doc: https://symfony.com/doc/current/doctrine/dbal.html#registering-custom-mapping-types .. code-block:: yaml # config/packages/doctrine.yaml doctrine: dbal: types: !php/const Arokettu\IP\Doctrine\IPv6AddressBinaryType::NAME: Arokettu\IP\Doctrine\IPv6AddressBinaryType !php/const Arokettu\IP\Doctrine\IPv6BlockBinaryType::NAME: Arokettu\IP\Doctrine\IPv6BlockBinaryType !php/const Arokettu\IP\Doctrine\VendorSpecific\MariaDB\Inet6Type::NAME: Arokettu\IP\Doctrine\VendorSpecific\MariaDB\Inet6Type mapping_types: inet6: !php/const Arokettu\IP\Doctrine\VendorSpecific\MariaDB\Inet6Type::NAME Applying Types to Models ======================== ::