Skip to content

Commit

Permalink
Mark password as a SensitiveParameter (#2295)
Browse files Browse the repository at this point in the history
  • Loading branch information
edudobay authored Jul 17, 2024
1 parent 6154850 commit 5779080
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Phinx/Db/Adapter/PdoAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
use Phinx\Util\Literal;
use ReflectionProperty;
use RuntimeException;
use SensitiveParameter;
use Symfony\Component\Console\Output\OutputInterface;
use UnexpectedValueException;

Expand Down Expand Up @@ -86,7 +87,7 @@ protected function verboseLog(string $message): void
* @param array<int, mixed> $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,
Expand Down

0 comments on commit 5779080

Please sign in to comment.