fix: filter deprecated server types for Hetzner

This commit is contained in:
elmariss committed 2025-10-22 00:13:55 +02:00
1 parent 1a7671f66d
commit af1374667b
3 files changed
+11 -3

No files matched your search

+8 -1
View File
@@ -88,7 +88,14 @@ class HetznerService
public function getServerTypes(): array
{
return $this->requestPaginated('get', '/server_types', 'server_types');
$types = $this->requestPaginated('get', '/server_types', 'server_types');
// Filter out entries where "deprecated" is explicitly true
$filtered = array_filter($types, function ($type) {
return ! (isset($type['deprecated']) && $type['deprecated'] === true);
});
return array_values($filtered);
}
public function getSshKeys(): array