From 7f536750b4ea92799515cd3ae368a1baed06eba6 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 22 Jun 2026 19:18:53 +0400 Subject: [PATCH] Rename build specification availability field --- .../Platform/Modules/Functions/Http/Specifications/XList.php | 4 ++-- .../Platform/Modules/Sites/Http/Specifications/XList.php | 4 ++-- src/Appwrite/Utopia/Response/Model/Specification.php | 2 +- tests/e2e/Services/Functions/FunctionsCustomServerTest.php | 4 ++-- tests/e2e/Services/Sites/SitesCustomServerTest.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Specifications/XList.php b/src/Appwrite/Platform/Modules/Functions/Http/Specifications/XList.php index 498a274280..53d52cccb5 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Specifications/XList.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Specifications/XList.php @@ -58,13 +58,13 @@ class XList extends Base $specs = []; foreach ($allSpecs as $spec) { $spec['enabled'] = true; - $spec['buildEnabled'] = true; + $spec['enabledForBuilds'] = true; if (array_key_exists('runtimeSpecifications', $plan)) { $spec['enabled'] = in_array($spec['slug'], $plan['runtimeSpecifications']); } if (array_key_exists('buildSpecifications', $plan)) { - $spec['buildEnabled'] = in_array($spec['slug'], $plan['buildSpecifications']); + $spec['enabledForBuilds'] = in_array($spec['slug'], $plan['buildSpecifications']); } $maxCpus = System::getEnv('_APP_COMPUTE_CPUS', 0); diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Specifications/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Specifications/XList.php index d5b6515de7..86904e8f67 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Specifications/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Specifications/XList.php @@ -58,13 +58,13 @@ class XList extends Base $specs = []; foreach ($allSpecs as $spec) { $spec['enabled'] = true; - $spec['buildEnabled'] = true; + $spec['enabledForBuilds'] = true; if (array_key_exists('runtimeSpecifications', $plan)) { $spec['enabled'] = in_array($spec['slug'], $plan['runtimeSpecifications']); } if (array_key_exists('buildSpecifications', $plan)) { - $spec['buildEnabled'] = in_array($spec['slug'], $plan['buildSpecifications']); + $spec['enabledForBuilds'] = in_array($spec['slug'], $plan['buildSpecifications']); } $maxCpus = System::getEnv('_APP_COMPUTE_CPUS', 0); diff --git a/src/Appwrite/Utopia/Response/Model/Specification.php b/src/Appwrite/Utopia/Response/Model/Specification.php index 034d399a75..74188a533a 100644 --- a/src/Appwrite/Utopia/Response/Model/Specification.php +++ b/src/Appwrite/Utopia/Response/Model/Specification.php @@ -28,7 +28,7 @@ class Specification extends Model 'default' => false, 'example' => true ]); - $this->addRule('buildEnabled', [ + $this->addRule('enabledForBuilds', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'Is size enabled for builds.', 'default' => false, diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 86aa67df32..aba9ec2104 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -208,12 +208,12 @@ final class FunctionsCustomServerTest extends Scope $this->assertArrayHasKey('memory', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('cpus', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('enabled', $specifications['body']['specifications'][0]); - $this->assertArrayHasKey('buildEnabled', $specifications['body']['specifications'][0]); + $this->assertArrayHasKey('enabledForBuilds', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('slug', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('memory', $specifications['body']['specifications'][1]); $this->assertArrayHasKey('cpus', $specifications['body']['specifications'][1]); $this->assertArrayHasKey('enabled', $specifications['body']['specifications'][1]); - $this->assertArrayHasKey('buildEnabled', $specifications['body']['specifications'][1]); + $this->assertArrayHasKey('enabledForBuilds', $specifications['body']['specifications'][1]); $this->assertArrayHasKey('slug', $specifications['body']['specifications'][1]); $function = $this->createFunction([ diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index 8a326d1023..c5e27cd324 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -34,12 +34,12 @@ final class SitesCustomServerTest extends Scope $this->assertArrayHasKey('memory', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('cpus', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('enabled', $specifications['body']['specifications'][0]); - $this->assertArrayHasKey('buildEnabled', $specifications['body']['specifications'][0]); + $this->assertArrayHasKey('enabledForBuilds', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('slug', $specifications['body']['specifications'][0]); $this->assertArrayHasKey('memory', $specifications['body']['specifications'][1]); $this->assertArrayHasKey('cpus', $specifications['body']['specifications'][1]); $this->assertArrayHasKey('enabled', $specifications['body']['specifications'][1]); - $this->assertArrayHasKey('buildEnabled', $specifications['body']['specifications'][1]); + $this->assertArrayHasKey('enabledForBuilds', $specifications['body']['specifications'][1]); $this->assertArrayHasKey('slug', $specifications['body']['specifications'][1]); $site = $this->createSite([