From 577908073d3f355ceb47ca9fc6bd978cb1526c70 Mon Sep 17 00:00:00 2001 From: Eduardo Dobay Date: Wed, 17 Jul 2024 18:40:58 -0300 Subject: [PATCH] Mark password as a SensitiveParameter (#2295) --- src/Phinx/Db/Adapter/PdoAdapter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Phinx/Db/Adapter/PdoAdapter.php b/src/Phinx/Db/Adapter/PdoAdapter.php index 17dc6f1b5..7dfbcedf0 100644 --- a/src/Phinx/Db/Adapter/PdoAdapter.php +++ b/src/Phinx/Db/Adapter/PdoAdapter.php @@ -41,6 +41,7 @@ use Phinx\Util\Literal; use ReflectionProperty; use RuntimeException; +use SensitiveParameter; use Symfony\Component\Console\Output\OutputInterface; use UnexpectedValueException; @@ -86,7 +87,7 @@ protected function verboseLog(string $message): void * @param array $options Connection options * @return \PDO */ - protected function createPdoConnection(string $dsn, ?string $username = null, ?string $password = null, array $options = []): PDO + protected function createPdoConnection(string $dsn, ?string $username = null, #[SensitiveParameter] ?string $password = null, array $options = []): PDO { $adapterOptions = $this->getOptions() + [ 'attr_errmode' => PDO::ERRMODE_EXCEPTION,