Skip to content

Commit 080cbd2

Browse files
committed
Bump Docker Engine API to v1.43
1 parent 5b39e70 commit 080cbd2

16 files changed

Lines changed: 16895 additions & 177 deletions

.jane-openapi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ return [
44
'date-prefer-interface' => true,
55
'directory' => __DIR__ . '/src',
66
'namespace' => 'Docker\\API',
7-
'openapi-file' => __DIR__ . '/spec/v1.42.json',
7+
'openapi-file' => __DIR__ . '/spec/v1.43.json',
88
'reference' => true,
99
'strict' => false,
1010
'date-input-format' => 'Y-m-d\TH:i:s.uuP',

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
},
6060
"extra": {
6161
"branch-alias": {
62-
"dev-main": "7.1.42.x-dev",
62+
"dev-main": "7.1.43.x-dev",
63+
"7.1.42": "7.1.42.x-dev",
6364
"7.1.41": "7.1.41.x-dev",
6465
"6.1.41": "6.1.41.x-dev",
6566
"6.1.36": "6.1.36.x-dev"

spec/v1.43.json

Lines changed: 16645 additions & 0 deletions
Large diffs are not rendered by default.

src/Client.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,17 @@ public function containerLogs(string $id, array $queryParameters = [], string $f
174174
* Returns which files in a container's filesystem have been added, deleted,
175175
* or modified. The `Kind` of modification can be one of:.
176176
*
177-
* - `0`: Modified
178-
* - `1`: Added
179-
* - `2`: Deleted
177+
* - `0`: Modified ("C")
178+
* - `1`: Added ("A")
179+
* - `2`: Deleted ("D")
180180
*
181181
* @param string $id ID or name of the container
182182
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
183183
*
184184
* @throws \Docker\API\Exception\ContainerChangesNotFoundException
185185
* @throws \Docker\API\Exception\ContainerChangesInternalServerErrorException
186186
*
187-
* @return \Docker\API\Model\ContainersIdChangesGetResponse200Item[]|\Psr\Http\Message\ResponseInterface|null
187+
* @return \Docker\API\Model\FilesystemChange[]|\Psr\Http\Message\ResponseInterface|null
188188
*/
189189
public function containerChanges(string $id, string $fetch = self::FETCH_OBJECT)
190190
{
@@ -874,7 +874,7 @@ public function imageBuild($requestBody = null, array $queryParameters = [], arr
874874
*
875875
* Available filters:
876876
*
877-
* - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
877+
* - `until=<timestamp>` remove cache older than `<timestamp>`. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time.
878878
* - `id=<id>`
879879
* - `parent=<id>`
880880
* - `type=<string>`
@@ -2633,7 +2633,7 @@ public static function create($httpClient = null, array $additionalPlugins = [],
26332633
if (null === $httpClient) {
26342634
$httpClient = \Http\Discovery\Psr18ClientDiscovery::find();
26352635
$plugins = [];
2636-
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('/v1.42');
2636+
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('/v1.43');
26372637
$plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri);
26382638
if (\count($additionalPlugins) > 0) {
26392639
$plugins = array_merge($plugins, $additionalPlugins);

src/Endpoint/BuildPrune.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class BuildPrune extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc
1818
*
1919
* Available filters:
2020
*
21-
* - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')
21+
* - `until=<timestamp>` remove cache older than `<timestamp>`. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time.
2222
* - `id=<id>`
2323
* - `parent=<id>`
2424
* - `type=<string>`

src/Endpoint/ContainerChanges.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class ContainerChanges extends \Docker\API\Runtime\Client\BaseEndpoint implement
1313
* Returns which files in a container's filesystem have been added, deleted,
1414
* or modified. The `Kind` of modification can be one of:.
1515
*
16-
* - `0`: Modified
17-
* - `1`: Added
18-
* - `2`: Deleted
16+
* - `0`: Modified ("C")
17+
* - `1`: Added ("A")
18+
* - `2`: Deleted ("D")
1919
*
2020
* @param string $id ID or name of the container
2121
*/
@@ -48,14 +48,14 @@ public function getExtraHeaders(): array
4848
* @throws \Docker\API\Exception\ContainerChangesNotFoundException
4949
* @throws \Docker\API\Exception\ContainerChangesInternalServerErrorException
5050
*
51-
* @return \Docker\API\Model\ContainersIdChangesGetResponse200Item[]|null
51+
* @return \Docker\API\Model\FilesystemChange[]|null
5252
*/
5353
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
5454
{
5555
$status = $response->getStatusCode();
5656
$body = (string) $response->getBody();
5757
if ((null === $contentType) === false && (200 === $status && false !== mb_strpos($contentType, 'application/json'))) {
58-
return $serializer->deserialize($body, 'Docker\\API\\Model\\ContainersIdChangesGetResponse200Item[]', 'json');
58+
return $serializer->deserialize($body, 'Docker\\API\\Model\\FilesystemChange[]', 'json');
5959
}
6060
if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) {
6161
throw new \Docker\API\Exception\ContainerChangesNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);

src/Model/ContainerState.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public function isInitialized($property): bool
5050
*/
5151
protected $restarting;
5252
/**
53-
* Whether this container has been killed because it ran out of memory.
53+
* Whether a process within this container has been killed because it ran
54+
* out of memory since the container was last started.
5455
*
5556
* @var bool|null
5657
*/
@@ -191,15 +192,17 @@ public function setRestarting(?bool $restarting): self
191192
}
192193

193194
/**
194-
* Whether this container has been killed because it ran out of memory.
195+
* Whether a process within this container has been killed because it ran
196+
* out of memory since the container was last started.
195197
*/
196198
public function getOOMKilled(): ?bool
197199
{
198200
return $this->oOMKilled;
199201
}
200202

201203
/**
202-
* Whether this container has been killed because it ran out of memory.
204+
* Whether a process within this container has been killed because it ran
205+
* out of memory since the container was last started.
203206
*/
204207
public function setOOMKilled(?bool $oOMKilled): self
205208
{

src/Model/ContainersIdChangesGetResponse200Item.php renamed to src/Model/FilesystemChange.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Docker\API\Model;
66

7-
class ContainersIdChangesGetResponse200Item extends \ArrayObject
7+
class FilesystemChange extends \ArrayObject
88
{
99
/**
1010
* @var array
@@ -16,28 +16,34 @@ public function isInitialized($property): bool
1616
return \array_key_exists($property, $this->initialized);
1717
}
1818
/**
19-
* Path to file that has changed.
19+
* Path to file or directory that has changed.
2020
*
2121
* @var string|null
2222
*/
2323
protected $path;
2424
/**
2525
* Kind of change.
2626
*
27+
* Can be one of:
28+
*
29+
* - `0`: Modified ("C")
30+
* - `1`: Added ("A")
31+
* - `2`: Deleted ("D")
32+
*
2733
* @var int|null
2834
*/
2935
protected $kind;
3036

3137
/**
32-
* Path to file that has changed.
38+
* Path to file or directory that has changed.
3339
*/
3440
public function getPath(): ?string
3541
{
3642
return $this->path;
3743
}
3844

3945
/**
40-
* Path to file that has changed.
46+
* Path to file or directory that has changed.
4147
*/
4248
public function setPath(?string $path): self
4349
{
@@ -49,6 +55,12 @@ public function setPath(?string $path): self
4955

5056
/**
5157
* Kind of change.
58+
*
59+
* Can be one of:
60+
*
61+
* - `0`: Modified ("C")
62+
* - `1`: Added ("A")
63+
* - `2`: Deleted ("D")
5264
*/
5365
public function getKind(): ?int
5466
{
@@ -57,6 +69,12 @@ public function getKind(): ?int
5769

5870
/**
5971
* Kind of change.
72+
*
73+
* Can be one of:
74+
*
75+
* - `0`: Modified ("C")
76+
* - `1`: Added ("A")
77+
* - `2`: Deleted ("D")
6078
*/
6179
public function setKind(?int $kind): self
6280
{

src/Model/HostConfig.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,13 @@ public function isInitialized($property): bool
367367
* @var int[]|null
368368
*/
369369
protected $consoleSize;
370+
/**
371+
* Arbitrary non-identifying metadata attached to container and
372+
* provided to the runtime when the container is started.
373+
*
374+
* @var array<string, string>|null
375+
*/
376+
protected $annotations;
370377
/**
371378
* A list of kernel capabilities to add to the container. Conflicts
372379
* with option 'Capabilities'.
@@ -1630,6 +1637,31 @@ public function setConsoleSize(?array $consoleSize): self
16301637
return $this;
16311638
}
16321639

1640+
/**
1641+
* Arbitrary non-identifying metadata attached to container and
1642+
* provided to the runtime when the container is started.
1643+
*
1644+
* @return array<string, string>|null
1645+
*/
1646+
public function getAnnotations(): ?iterable
1647+
{
1648+
return $this->annotations;
1649+
}
1650+
1651+
/**
1652+
* Arbitrary non-identifying metadata attached to container and
1653+
* provided to the runtime when the container is started.
1654+
*
1655+
* @param array<string, string>|null $annotations
1656+
*/
1657+
public function setAnnotations(?iterable $annotations): self
1658+
{
1659+
$this->initialized['annotations'] = true;
1660+
$this->annotations = $annotations;
1661+
1662+
return $this;
1663+
}
1664+
16331665
/**
16341666
* A list of kernel capabilities to add to the container. Conflicts
16351667
* with option 'Capabilities'.

src/Model/ImageInspect.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ public function isInitialized($property): bool
158158
* Total size of the image including all layers it is composed of.
159159
*
160160
* In versions of Docker before v1.10, this field was calculated from
161-
* the image itself and all of its parent images. Docker v1.10 and up
162-
* store images self-contained, and no longer use a parent-chain, making
163-
* this field an equivalent of the Size field.
161+
* the image itself and all of its parent images. Images are now stored
162+
* self-contained, and no longer use a parent-chain, making this field
163+
* an equivalent of the Size field.
164164
*
165-
* This field is kept for backward compatibility, but may be removed in
166-
* a future version of the API.
165+
* > **Deprecated**: this field is kept for backward compatibility, but
166+
* > will be removed in API v1.44.
167167
*
168168
* @var int|null
169169
*/
@@ -591,12 +591,12 @@ public function setSize(?int $size): self
591591
* Total size of the image including all layers it is composed of.
592592
*
593593
* In versions of Docker before v1.10, this field was calculated from
594-
* the image itself and all of its parent images. Docker v1.10 and up
595-
* store images self-contained, and no longer use a parent-chain, making
596-
* this field an equivalent of the Size field.
594+
* the image itself and all of its parent images. Images are now stored
595+
* self-contained, and no longer use a parent-chain, making this field
596+
* an equivalent of the Size field.
597597
*
598-
* This field is kept for backward compatibility, but may be removed in
599-
* a future version of the API.
598+
* > **Deprecated**: this field is kept for backward compatibility, but
599+
* > will be removed in API v1.44.
600600
*/
601601
public function getVirtualSize(): ?int
602602
{
@@ -607,12 +607,12 @@ public function getVirtualSize(): ?int
607607
* Total size of the image including all layers it is composed of.
608608
*
609609
* In versions of Docker before v1.10, this field was calculated from
610-
* the image itself and all of its parent images. Docker v1.10 and up
611-
* store images self-contained, and no longer use a parent-chain, making
612-
* this field an equivalent of the Size field.
610+
* the image itself and all of its parent images. Images are now stored
611+
* self-contained, and no longer use a parent-chain, making this field
612+
* an equivalent of the Size field.
613613
*
614-
* This field is kept for backward compatibility, but may be removed in
615-
* a future version of the API.
614+
* > **Deprecated**: this field is kept for backward compatibility, but
615+
* > will be removed in API v1.44.
616616
*/
617617
public function setVirtualSize(?int $virtualSize): self
618618
{

0 commit comments

Comments
 (0)