remove legacy

This commit is contained in:
Sergei Shitikov
2025-02-16 13:02:01 +01:00
parent f899c41311
commit b36b08d916
17 changed files with 29 additions and 740 deletions
+8 -6
View File
@@ -17,29 +17,31 @@ class PostgresContainer extends GenericContainer
) {
parent::__construct('postgres:' . $version);
$this->withExposedPorts(5432);
$this->withEnvironment('POSTGRES_USER', $this->username);
$this->withEnvironment('POSTGRES_PASSWORD', $this->password);
$this->withEnvironment('POSTGRES_DB', $this->database);
$this->withEnvironment([
'POSTGRES_USER' => $this->username,
'POSTGRES_PASSWORD' => $this->password,
'POSTGRES_DB' => $this->database,
]);
$this->withWait(new WaitForExec(["pg_isready", "-h", "127.0.0.1", "-U", $this->username]));
}
public function withPostgresUser(string $username): self
{
$this->withEnvironment('POSTGRES_USER', $username);
$this->withEnvironment(['POSTGRES_USER' => $username]);
return $this;
}
public function withPostgresPassword(string $password): self
{
$this->withEnvironment('POSTGRES_PASSWORD', $password);
$this->withEnvironment(['POSTGRES_PASSWORD' => $password]);
return $this;
}
public function withPostgresDatabase(string $database): self
{
$this->withEnvironment('POSTGRES_DB', $database);
$this->withEnvironment(['POSTGRES_DB' => $database]);
return $this;
}