fix: pass variableId to Functions::createVariable and Sites::createVariable

SDK 23.1 added a required \$variableId 2nd parameter:
- Sites::createVariable(\$siteId, \$variableId, \$key, \$value, ?\$secret)
- Functions::createVariable(\$functionId, \$variableId, \$key, \$value, ?\$secret)

Pass the migration resource's id as \$variableId so the destination
preserves the source variable id.

Bumps appwrite/appwrite to 23.1.0 in composer.lock.
This commit is contained in:
Prem Palanisamy committed 2026-05-09 01:23:29 +01:00
1 parent 80e9a0498e
commit 0e88268d10
2 files changed
+8 -6

No files matched your search

Generated
+6 -6
View File
@@ -8,16 +8,16 @@
"packages": [
{
"name": "appwrite/appwrite",
"version": "23.0.0",
"version": "23.1.0",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-for-php.git",
"reference": "d22b36167931294bec4259f0803aba14537030ec"
"reference": "2f275921f10ceb7cff99f2d463f7328b296234fa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/d22b36167931294bec4259f0803aba14537030ec",
"reference": "d22b36167931294bec4259f0803aba14537030ec",
"url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/2f275921f10ceb7cff99f2d463f7328b296234fa",
"reference": "2f275921f10ceb7cff99f2d463f7328b296234fa",
"shasum": ""
},
"require": {
@@ -43,10 +43,10 @@
"support": {
"email": "team@appwrite.io",
"issues": "https://github.com/appwrite/sdk-for-php/issues",
"source": "https://github.com/appwrite/sdk-for-php/tree/23.0.0",
"source": "https://github.com/appwrite/sdk-for-php/tree/23.1.0",
"url": "https://appwrite.io/support"
},
"time": "2026-04-16T12:38:44+00:00"
"time": "2026-05-08T13:44:58+00:00"
},
{
"name": "brick/math",
+2
View File
@@ -2327,6 +2327,7 @@ class Appwrite extends Destination
/** @var EnvVar $resource */
$this->functions->createVariable(
$resource->getFunc()->getId(),
$resource->getId(),
$resource->getKey(),
$resource->getValue()
);
@@ -2576,6 +2577,7 @@ class Appwrite extends Destination
/** @var SiteEnvVar $resource */
$this->sites->createVariable(
$resource->getSite()->getId(),
$resource->getId(),
$resource->getKey(),
$resource->getValue()
);