mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-08 22:29:46 +00:00
Update deps and README + some cleanup
This commit is contained in:
@@ -23,18 +23,6 @@ class PostgresContainer extends GenericContainer
|
||||
$this->withWait(new WaitForExec(["pg_isready", "-h", "127.0.0.1", "-U", $this->username]));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use constructor instead
|
||||
* Left for backward compatibility
|
||||
*/
|
||||
public static function make(string $version = 'latest', string $dbPassword = 'root'): self
|
||||
{
|
||||
return new self(
|
||||
version: $version,
|
||||
password: $dbPassword
|
||||
);
|
||||
}
|
||||
|
||||
public function withPostgresUser(string $username): self
|
||||
{
|
||||
$this->withEnvironment('POSTGRES_USER', $username);
|
||||
@@ -42,6 +30,13 @@ class PostgresContainer extends GenericContainer
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withPostgresPassword(string $password): self
|
||||
{
|
||||
$this->withEnvironment('POSTGRES_PASSWORD', $password);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withPostgresDatabase(string $database): self
|
||||
{
|
||||
$this->withEnvironment('POSTGRES_DB', $database);
|
||||
|
||||
Reference in New Issue
Block a user