Skip to content

Commit 2e7b0a1

Browse files
zepichmichaelgracious
authored andcommitted
Added the requireSQLCommentHint to tell Doctrine to add the required comment
1 parent 1360f0f commit 2e7b0a1

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

Type/Encrypted.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,12 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform)
7474
$encryptedValue = sodium_crypto_secretbox($value, $nonce, $key);
7575
return sodium_bin2hex($nonce).'|'.sodium_bin2hex($encryptedValue);
7676
}
77+
78+
/**
79+
* @inheritDoc
80+
*/
81+
public function requiresSQLCommentHint(AbstractPlatform $platform)
82+
{
83+
return true;
84+
}
7785
}

Type/EncryptedArrayCollection.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,12 @@ public function convertToDatabaseValue($array, AbstractPlatform $platform)
9393

9494
return json_encode($encryptedArray);
9595
}
96+
97+
/**
98+
* @inheritDoc
99+
*/
100+
public function requiresSQLCommentHint(AbstractPlatform $platform)
101+
{
102+
return true;
103+
}
96104
}

Type/Hashed.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,12 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform) : str
4242
{
4343
return hash('whirlpool', $value);
4444
}
45+
46+
/**
47+
* @inheritDoc
48+
*/
49+
public function requiresSQLCommentHint(AbstractPlatform $platform)
50+
{
51+
return true;
52+
}
4553
}

0 commit comments

Comments
 (0)