Skip to content

Commit 5779080

Browse files
authored
Mark password as a SensitiveParameter (#2295)
1 parent 6154850 commit 5779080

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Phinx/Db/Adapter/PdoAdapter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
use Phinx\Util\Literal;
4242
use ReflectionProperty;
4343
use RuntimeException;
44+
use SensitiveParameter;
4445
use Symfony\Component\Console\Output\OutputInterface;
4546
use UnexpectedValueException;
4647

@@ -86,7 +87,7 @@ protected function verboseLog(string $message): void
8687
* @param array<int, mixed> $options Connection options
8788
* @return \PDO
8889
*/
89-
protected function createPdoConnection(string $dsn, ?string $username = null, ?string $password = null, array $options = []): PDO
90+
protected function createPdoConnection(string $dsn, ?string $username = null, #[SensitiveParameter] ?string $password = null, array $options = []): PDO
9091
{
9192
$adapterOptions = $this->getOptions() + [
9293
'attr_errmode' => PDO::ERRMODE_EXCEPTION,

0 commit comments

Comments
 (0)