You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR properly separates build and runtime specifications for migrated functions and sites, replacing the previous behavior where a single getSpecification() value was used for both. The Func and Site resource classes each gain a dedicated buildSpecification property with graceful fallback to the legacy specification field.
Func / Site model changes: new buildSpecification constructor param; fromArray reads runtimeSpecification/buildSpecification with specification as legacy fallback; getBuildSpecification() applies a ?: fallback to $this->specification when buildSpecification is empty.
Source / destination wiring: Sources/Appwrite.php now passes the two fields separately, and Destinations/Appwrite.php calls the typed accessors instead of the generic getSpecification().
New test: SpecificationTest covers explicit values and the legacy single-field case for Func; a parallel Site legacy test is absent.
Confidence Score: 5/5
Safe to merge — the logic change is backward-compatible and the destination correctly uses the typed accessors throughout.
All changed paths are straightforward and backward-compatible: getBuildSpecification() falls back to the legacy specification field, so existing resources without an explicit build spec continue to behave identically. The only observable gap is that jsonSerialize() emits the raw (possibly empty) buildSpecification rather than the resolved value, but the destination code reads the field through the accessor, so no migration is broken by this.
Func.php and Site.php — both jsonSerialize() implementations output the unresolved buildSpecification field instead of the value returned by getBuildSpecification().
Important Files Changed
Filename
Overview
src/Migration/Resources/Functions/Func.php
Adds buildSpecification property with fallback logic; jsonSerialize() emits raw (potentially empty) buildSpecification rather than the resolved value from getBuildSpecification()
src/Migration/Resources/Sites/Site.php
Same pattern as Func: adds buildSpecification property with correct fallback in accessor, but jsonSerialize() outputs the raw unresolved field
src/Migration/Destinations/Appwrite.php
Correctly switches from getSpecification() to getBuildSpecification() / getRuntimeSpecification() for both functions and sites; uses the method accessors so the fallback logic is respected
src/Migration/Sources/Appwrite.php
Correctly separates runtimeSpecification and buildSpecification when constructing Func and Site from source data, replacing the previous combined fallback expression
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
specificationTesting
composer lint./vendor/bin/phpunit tests/Migration/Unit/Resources