Skip to content

Commit 0308031

Browse files
committed
Allow the host of the database user to be null to match the Core API spec
1 parent b0cd7a1 commit 0308031

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
this package and not the Core API. See the changelog of the [Core API](https://core-api.cyberfusion.io/redoc#section/Changelog)
77
for detailed information.
88

9+
## [1.118.1]
10+
11+
### Fixed
12+
13+
- Allow the host of the database user to be `null` to match the Core API spec.
14+
915
## [1.118.0]
1016

1117
### Added

src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Client implements ClientContract
2020

2121
private const TIMEOUT = 180;
2222

23-
private const VERSION = '1.118.0';
23+
private const VERSION = '1.118.1';
2424

2525
private const USER_AGENT = 'cyberfusion-cluster-api-client/' . self::VERSION;
2626

src/Models/DatabaseUser.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class DatabaseUser extends ClusterModel
1414
private string $name;
1515
private ?string $password;
1616
private ?array $phpmyadminFirewallGroupsIds = null;
17-
private string $host = self::DEFAULT_HOST;
17+
private ?string $host = self::DEFAULT_HOST;
1818
private string $serverSoftwareName = DatabaseEngine::SERVER_SOFTWARE_MARIADB;
1919
private ?int $id = null;
2020
private ?int $clusterId = null;
@@ -38,16 +38,17 @@ public function setName(string $name): self
3838
return $this;
3939
}
4040

41-
public function getHost(): string
41+
public function getHost(): ?string
4242
{
4343
return $this->host;
4444
}
4545

46-
public function setHost(string $host): self
46+
public function setHost(?string $host): self
4747
{
4848
Validator::value($host)
4949
->maxLength(253)
5050
->valueIn(Host::AVAILABLE)
51+
->nullable()
5152
->validate();
5253

5354
$this->host = $host;

0 commit comments

Comments
 (0)