Skip to content

Commit

Permalink
Built using latest janephp with fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Millar <rid@cylo.io>
  • Loading branch information
Rid committed Oct 18, 2023
1 parent 0983de5 commit 49bce99
Show file tree
Hide file tree
Showing 95 changed files with 302 additions and 306 deletions.
36 changes: 20 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"sort-packages": true,
"preferred-install": "dist",
"allow-plugins": {
"php-http/discovery": true
"php-http/discovery": false
}
},
"minimum-stability": "dev",
Expand All @@ -22,29 +22,31 @@
{
"type": "github",
"url": "https://github.com/flavioheleno"
},
{
"type": "patreon",
"url": "https://www.patreon.com/flavioheleno"
}
],
"require": {
"php": ">=8.1",
"ext-json": "*",
"ext-mbstring": "*",
"jane-php/open-api-runtime": "^7.4",
"nyholm/psr7": "^1.8",
"jane-php/json-schema-runtime": "^7.5",
"jane-php/open-api-runtime": "^7.5",
"php-http/client-common": "^2.7",
"php-http/discovery": "^1.19",
"php-http/multipart-stream-builder": "^1.3",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0 || ^2.0"
"psr/http-message": "^2.0",
"psr/http-client-implementation": "*",
"psr/http-factory-implementation": "*",
"psr/http-message-implementation": "*",
"symfony/deprecation-contracts": "^3.3",
"symfony/options-resolver": "^6.3",
"symfony/serializer": "^6.3",
"symfony/validator": "^6.3"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.8",
"jane-php/json-schema": "^7.4",
"jane-php/open-api-3": "^7.4"
},
"suggest": {
"php-http/socket-client": "Socket-based HTTP Client to use the API"
"jane-php/open-api-3": "^7.4",
"roave/security-advisories": "dev-latest"
},
"conflict": {
"docker-php/docker-php-api": "*"
Expand All @@ -59,9 +61,11 @@
},
"extra": {
"branch-alias": {
"dev-main": "7.1.41.x-dev",
"dev-main": "7.1.43.x-dev",
"7.1.42": "7.1.42.x-dev",
"7.1.41": "7.1.41.x-dev",
"6.1.41": "6.1.41.x-dev",
"6.1.36": "6.1.36.x-dev"
}
}
}
}
6 changes: 3 additions & 3 deletions src/Normalizer/BuildInfoNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function normalize($object, $format = null, array $context = [])
$data['error'] = $object->getError();
}
if ($object->isInitialized('errorDetail') && null !== $object->getErrorDetail()) {
$data['errorDetail'] = $this->normalizer->normalize($object->getErrorDetail(), 'json', $context);
$data['errorDetail'] = null === $object->getErrorDetail() ? null : new \ArrayObject($this->normalizer->normalize($object->getErrorDetail(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('status') && null !== $object->getStatus()) {
$data['status'] = $object->getStatus();
Expand All @@ -125,10 +125,10 @@ public function normalize($object, $format = null, array $context = [])
$data['progress'] = $object->getProgress();
}
if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) {
$data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context);
$data['progressDetail'] = null === $object->getProgressDetail() ? null : new \ArrayObject($this->normalizer->normalize($object->getProgressDetail(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('aux') && null !== $object->getAux()) {
$data['aux'] = $this->normalizer->normalize($object->getAux(), 'json', $context);
$data['aux'] = null === $object->getAux() ? null : new \ArrayObject($this->normalizer->normalize($object->getAux(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
Expand Down
6 changes: 3 additions & 3 deletions src/Normalizer/ClusterInfoNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function normalize($object, $format = null, array $context = [])
$data['ID'] = $object->getID();
}
if ($object->isInitialized('version') && null !== $object->getVersion()) {
$data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context);
$data['Version'] = null === $object->getVersion() ? null : new \ArrayObject($this->normalizer->normalize($object->getVersion(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
$data['CreatedAt'] = $object->getCreatedAt();
Expand All @@ -135,10 +135,10 @@ public function normalize($object, $format = null, array $context = [])
$data['UpdatedAt'] = $object->getUpdatedAt();
}
if ($object->isInitialized('spec') && null !== $object->getSpec()) {
$data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context);
$data['Spec'] = null === $object->getSpec() ? null : new \ArrayObject($this->normalizer->normalize($object->getSpec(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) {
$data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context);
$data['TLSInfo'] = null === $object->getTLSInfo() ? null : new \ArrayObject($this->normalizer->normalize($object->getTLSInfo(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('rootRotationInProgress') && null !== $object->getRootRotationInProgress()) {
$data['RootRotationInProgress'] = $object->getRootRotationInProgress();
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/ConfigNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function normalize($object, $format = null, array $context = [])
$data['ID'] = $object->getID();
}
if ($object->isInitialized('version') && null !== $object->getVersion()) {
$data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context);
$data['Version'] = null === $object->getVersion() ? null : new \ArrayObject($this->normalizer->normalize($object->getVersion(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
$data['CreatedAt'] = $object->getCreatedAt();
Expand All @@ -101,7 +101,7 @@ public function normalize($object, $format = null, array $context = [])
$data['UpdatedAt'] = $object->getUpdatedAt();
}
if ($object->isInitialized('spec') && null !== $object->getSpec()) {
$data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context);
$data['Spec'] = null === $object->getSpec() ? null : new \ArrayObject($this->normalizer->normalize($object->getSpec(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/ConfigSpecNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function normalize($object, $format = null, array $context = [])
$data['Name'] = $object->getName();
}
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
$values = [];
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getLabels() as $key => $value) {
$values[$key] = $value;
}
Expand All @@ -100,7 +100,7 @@ public function normalize($object, $format = null, array $context = [])
$data['Data'] = $object->getData();
}
if ($object->isInitialized('templating') && null !== $object->getTemplating()) {
$data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context);
$data['Templating'] = null === $object->getTemplating() ? null : new \ArrayObject($this->normalizer->normalize($object->getTemplating(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
foreach ($object as $key_1 => $value_1) {
if (preg_match('/.*/', (string) $key_1)) {
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/ConfigsCreatePostBodyNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function normalize($object, $format = null, array $context = [])
$data['Name'] = $object->getName();
}
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
$values = [];
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getLabels() as $key => $value) {
$values[$key] = $value;
}
Expand All @@ -100,7 +100,7 @@ public function normalize($object, $format = null, array $context = [])
$data['Data'] = $object->getData();
}
if ($object->isInitialized('templating') && null !== $object->getTemplating()) {
$data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context);
$data['Templating'] = null === $object->getTemplating() ? null : new \ArrayObject($this->normalizer->normalize($object->getTemplating(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
foreach ($object as $key_1 => $value_1) {
if (preg_match('/.*/', (string) $key_1)) {
Expand Down
12 changes: 6 additions & 6 deletions src/Normalizer/ContainerConfigNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ public function normalize($object, $format = null, array $context = [])
$data['AttachStderr'] = $object->getAttachStderr();
}
if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) {
$values = [];
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getExposedPorts() as $key => $value) {
$values[$key] = $this->normalizer->normalize($value, 'json', $context);
$values[$key] = null === $value ? null : new \ArrayObject($this->normalizer->normalize($value, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
$data['ExposedPorts'] = $values;
}
Expand Down Expand Up @@ -289,7 +289,7 @@ public function normalize($object, $format = null, array $context = [])
$data['Cmd'] = $values_2;
}
if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) {
$data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context);
$data['Healthcheck'] = null === $object->getHealthcheck() ? null : new \ArrayObject($this->normalizer->normalize($object->getHealthcheck(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) {
$data['ArgsEscaped'] = $object->getArgsEscaped();
Expand All @@ -298,9 +298,9 @@ public function normalize($object, $format = null, array $context = [])
$data['Image'] = $object->getImage();
}
if ($object->isInitialized('volumes') && null !== $object->getVolumes()) {
$values_3 = [];
$values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getVolumes() as $key_1 => $value_3) {
$values_3[$key_1] = $this->normalizer->normalize($value_3, 'json', $context);
$values_3[$key_1] = null === $value_3 ? null : new \ArrayObject($this->normalizer->normalize($value_3, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
$data['Volumes'] = $values_3;
}
Expand Down Expand Up @@ -328,7 +328,7 @@ public function normalize($object, $format = null, array $context = [])
$data['OnBuild'] = $values_5;
}
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
$values_6 = [];
$values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getLabels() as $key_2 => $value_6) {
$values_6[$key_2] = $value_6;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Normalizer/ContainerStateNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function normalize($object, $format = null, array $context = [])
$data['FinishedAt'] = $object->getFinishedAt();
}
if ($object->isInitialized('health') && null !== $object->getHealth()) {
$data['Health'] = $this->normalizer->normalize($object->getHealth(), 'json', $context);
$data['Health'] = null === $object->getHealth() ? null : new \ArrayObject($this->normalizer->normalize($object->getHealth(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
foreach ($object as $key => $value) {
if (preg_match('/.*/', (string) $key)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public function normalize($object, $format = null, array $context = [])
{
$data = [];
if ($object->isInitialized('networks') && null !== $object->getNetworks()) {
$values = [];
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getNetworks() as $key => $value) {
$values[$key] = $this->normalizer->normalize($value, 'json', $context);
$values[$key] = null === $value ? null : new \ArrayObject($this->normalizer->normalize($value, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
$data['Networks'] = $values;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Normalizer/ContainerSummaryItemNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function normalize($object, $format = null, array $context = [])
if ($object->isInitialized('ports') && null !== $object->getPorts()) {
$values_1 = [];
foreach ($object->getPorts() as $value_1) {
$values_1[] = $this->normalizer->normalize($value_1, 'json', $context);
$values_1[] = null === $value_1 ? null : new \ArrayObject($this->normalizer->normalize($value_1, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
$data['Ports'] = $values_1;
}
Expand All @@ -200,7 +200,7 @@ public function normalize($object, $format = null, array $context = [])
$data['SizeRootFs'] = $object->getSizeRootFs();
}
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
$values_2 = [];
$values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getLabels() as $key => $value_2) {
$values_2[$key] = $value_2;
}
Expand All @@ -213,15 +213,15 @@ public function normalize($object, $format = null, array $context = [])
$data['Status'] = $object->getStatus();
}
if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) {
$data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context);
$data['HostConfig'] = null === $object->getHostConfig() ? null : new \ArrayObject($this->normalizer->normalize($object->getHostConfig(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('networkSettings') && null !== $object->getNetworkSettings()) {
$data['NetworkSettings'] = $this->normalizer->normalize($object->getNetworkSettings(), 'json', $context);
$data['NetworkSettings'] = null === $object->getNetworkSettings() ? null : new \ArrayObject($this->normalizer->normalize($object->getNetworkSettings(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('mounts') && null !== $object->getMounts()) {
$values_3 = [];
foreach ($object->getMounts() as $value_3) {
$values_3[] = $this->normalizer->normalize($value_3, 'json', $context);
$values_3[] = null === $value_3 ? null : new \ArrayObject($this->normalizer->normalize($value_3, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
$data['Mounts'] = $values_3;
}
Expand Down
16 changes: 8 additions & 8 deletions src/Normalizer/ContainersCreatePostBodyNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ public function normalize($object, $format = null, array $context = [])
$data['AttachStderr'] = $object->getAttachStderr();
}
if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) {
$values = [];
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getExposedPorts() as $key => $value) {
$values[$key] = $this->normalizer->normalize($value, 'json', $context);
$values[$key] = null === $value ? null : new \ArrayObject($this->normalizer->normalize($value, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
$data['ExposedPorts'] = $values;
}
Expand Down Expand Up @@ -301,7 +301,7 @@ public function normalize($object, $format = null, array $context = [])
$data['Cmd'] = $values_2;
}
if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) {
$data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context);
$data['Healthcheck'] = null === $object->getHealthcheck() ? null : new \ArrayObject($this->normalizer->normalize($object->getHealthcheck(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) {
$data['ArgsEscaped'] = $object->getArgsEscaped();
Expand All @@ -310,9 +310,9 @@ public function normalize($object, $format = null, array $context = [])
$data['Image'] = $object->getImage();
}
if ($object->isInitialized('volumes') && null !== $object->getVolumes()) {
$values_3 = [];
$values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getVolumes() as $key_1 => $value_3) {
$values_3[$key_1] = $this->normalizer->normalize($value_3, 'json', $context);
$values_3[$key_1] = null === $value_3 ? null : new \ArrayObject($this->normalizer->normalize($value_3, 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
$data['Volumes'] = $values_3;
}
Expand Down Expand Up @@ -340,7 +340,7 @@ public function normalize($object, $format = null, array $context = [])
$data['OnBuild'] = $values_5;
}
if ($object->isInitialized('labels') && null !== $object->getLabels()) {
$values_6 = [];
$values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($object->getLabels() as $key_2 => $value_6) {
$values_6[$key_2] = $value_6;
}
Expand All @@ -360,10 +360,10 @@ public function normalize($object, $format = null, array $context = [])
$data['Shell'] = $values_7;
}
if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) {
$data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context);
$data['HostConfig'] = null === $object->getHostConfig() ? null : new \ArrayObject($this->normalizer->normalize($object->getHostConfig(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('networkingConfig') && null !== $object->getNetworkingConfig()) {
$data['NetworkingConfig'] = $this->normalizer->normalize($object->getNetworkingConfig(), 'json', $context);
$data['NetworkingConfig'] = null === $object->getNetworkingConfig() ? null : new \ArrayObject($this->normalizer->normalize($object->getNetworkingConfig(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
foreach ($object as $key_3 => $value_8) {
if (preg_match('/.*/', (string) $key_3)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function normalize($object, $format = null, array $context = [])
{
$data = [];
if ($object->isInitialized('errorResponse') && null !== $object->getErrorResponse()) {
$data['ErrorResponse'] = $this->normalizer->normalize($object->getErrorResponse(), 'json', $context);
$data['ErrorResponse'] = null === $object->getErrorResponse() ? null : new \ArrayObject($this->normalizer->normalize($object->getErrorResponse(), 'json', $context), \ArrayObject::ARRAY_AS_PROPS);
}
if ($object->isInitialized('message') && null !== $object->getMessage()) {
$data['message'] = $object->getMessage();
Expand Down
Loading

0 comments on commit 49bce99

Please sign in to comment.