19declare(strict_types=1);
28 $pw = $this->config->getPassword();
29 return hash(
"sha256", implode(
"-", [
31 $this->config->getHost(),
32 $this->config->getPort(),
33 $this->config->getUser(),
34 $pw !==
null ? $pw->toString() :
""
40 return "The database server is connectable with the supplied configuration.";
56 $db->initFromIniFile($this->config->toMockIniFile());
58 $connect = $db->connect();
59 }
catch (PDOException
$e) {
62 if (
$e->getCode() !== 1049) {
70 "Database cannot be reached. Please check the credentials."
Signals that some goal won't be achievable by actions of the system ever.
static getWrapper(string $a_type)
isNotable()
Get to know if this is an interesting objective for a human.
getPreconditions(Environment $environment)
Objectives might depend on other objectives.
getLabel()
Get a label that describes this objective.
isApplicable(Environment $environment)
@inheritDoc
achieve(Environment $environment)
Objectives can be achieved.
getHash()
Get a hash for this objective.
An environment holds resources to be used in the setup process.