Skip to content

Commit b5386d8

Browse files
loks0nclaude
andcommitted
Fix unclean diff in RunsClusterOperations and remove minimum-stability
- Restore proper union type hints on jsonPatchStatus/jsonMergePatchStatus - Use imported class names instead of FQCN - Fix @throws annotations to use short class names - Remove minimum-stability: dev from composer.json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9f75408 commit b5386d8

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,5 @@
6565
},
6666
"config": {
6767
"sort-packages": true
68-
},
69-
"minimum-stability": "dev"
68+
}
7069
}

src/Traits/RunsClusterOperations.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function allNamespaces(array $query = ['pretty' => 1]): ResourcesList
169169
/**
170170
* Get a fresh instance from the cluster.
171171
*
172-
* @throws \RenokiCo\PhpK8s\Exceptions\KubernetesAPIException
172+
* @throws KubernetesAPIException
173173
*/
174174
public function get(array $query = ['pretty' => 1]): static
175175
{
@@ -186,7 +186,7 @@ public function get(array $query = ['pretty' => 1]): static
186186
/**
187187
* Create the resource.
188188
*
189-
* @throws \RenokiCo\PhpK8s\Exceptions\KubernetesAPIException
189+
* @throws KubernetesAPIException
190190
*/
191191
public function create(array $query = ['pretty' => 1]): static
192192
{
@@ -615,10 +615,10 @@ public function updateStatus(array $query = ['pretty' => 1]): static
615615
/**
616616
* JSON Patch (RFC 6902) the status subresource.
617617
*/
618-
public function jsonPatchStatus($patch, array $query = ['pretty' => 1]): static
618+
public function jsonPatchStatus(JsonPatch|array $patch, array $query = ['pretty' => 1]): static
619619
{
620-
if (! $patch instanceof \RenokiCo\PhpK8s\Patches\JsonPatch) {
621-
$patch = new \RenokiCo\PhpK8s\Patches\JsonPatch($patch);
620+
if (is_array($patch)) {
621+
$patch = new JsonPatch($patch);
622622
}
623623

624624
$instance = $this->cluster
@@ -638,10 +638,10 @@ public function jsonPatchStatus($patch, array $query = ['pretty' => 1]): static
638638
/**
639639
* JSON Merge Patch (RFC 7396) the status subresource.
640640
*/
641-
public function jsonMergePatchStatus($patch, array $query = ['pretty' => 1]): static
641+
public function jsonMergePatchStatus(JsonMergePatch|array $patch, array $query = ['pretty' => 1]): static
642642
{
643-
if (! $patch instanceof \RenokiCo\PhpK8s\Patches\JsonMergePatch) {
644-
$patch = new \RenokiCo\PhpK8s\Patches\JsonMergePatch($patch);
643+
if (is_array($patch)) {
644+
$patch = new JsonMergePatch($patch);
645645
}
646646

647647
$instance = $this->cluster

0 commit comments

Comments
 (0)