Using custom types in Symfony & Doctrine
Ruslan Karimov
1K1

Thanks for publishing this article! I shared it in the Symfony Slack chat and some users added some comments. I reproduce them below in case you want to review something.

Comment #1: Nice, but it misses an important thing: the dc2type comment … without it doctrine:schema:validate will always fail and tell that the schema isn’t in sync with the current database. This leads to doctrine:schema:update endlessly trying to add the comment. See also https://blog.vandenbrand.org/2015/06/25/creating-a-custom-doctrine-dbal-type-the-right-way/

Comment #2: Overriding `Type::requiresSQLCommentHint()` to return true is enough actually AFAIK. No need to add the comment yourself as described in the post you’ve mentioned.

A single golf clap? Or a long standing ovation?

By clapping more or less, you can signal to us which stories really stand out.