Utilizes tebru/aes-encryption and adds a Doctrine type that automatically encrypts and decrypts values in the database.
composer require tebru/doctrine-encryption-bundle
Add to AppKernel
new Tebru\DoctrineEncryptionBundle\DoctrineEncryptionBundle(),
Set the column annotation type to encrypted
on your entity property
@ORM\Column(type="encrypted")