ci: resolve merge conflict with 1.8.x

Use composer analyze (renamed from composer check in 1.8.x).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
loks0n
2026-03-15 18:40:38 +00:00
25 changed files with 88769 additions and 70 deletions
+15 -6
View File
@@ -147,7 +147,7 @@ jobs:
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
- name: Run PHPStan
run: composer check
run: composer analyze
locale:
name: Checks / Locale
@@ -189,14 +189,22 @@ jobs:
return;
}
const files = await github.paginate(github.rest.pulls.listFiles, {
const getContent = (ref) => github.rest.repos.getContent({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
path: 'composer.lock',
ref,
});
const lockFile = files.find(f => f.filename === 'composer.lock');
const databaseChanged = lockFile?.patch?.includes('"name": "utopia-php/database"') ?? false;
const getDbVersion = (lock) => lock.packages?.find(p => p.name === 'utopia-php/database')?.version;
const [{ data: base }, { data: head }] = await Promise.all([
getContent(pr.base.sha),
getContent(pr.head.sha),
]);
const decode = (content) => JSON.parse(Buffer.from(content, 'base64').toString());
const databaseChanged = getDbVersion(decode(base.content)) !== getDbVersion(decode(head.content));
core.setOutput('databases', JSON.stringify(databaseChanged ? allDatabases : defaultDatabases));
core.setOutput('modes', JSON.stringify(databaseChanged ? allModes : defaultModes));
@@ -365,6 +373,7 @@ jobs:
Avatars,
Console,
Databases,
TablesDB,
Functions,
FunctionsSchedule,
GraphQL,
@@ -453,7 +462,7 @@ jobs:
# Services that rely on sequential test method execution (shared static state)
FUNCTIONAL_FLAG="--functional"
case "${{ matrix.service }}" in
Databases|Functions|Realtime) FUNCTIONAL_FLAG="" ;;
Databases|TablesDB|Functions|Realtime) FUNCTIONAL_FLAG="" ;;
esac
docker compose exec -T \
+2 -2
View File
@@ -14,7 +14,7 @@
"lint": "vendor/bin/pint --test --config pint.json",
"format": "vendor/bin/pint --config pint.json",
"bench": "vendor/bin/phpbench run --report=benchmark",
"check": "./vendor/bin/phpstan analyse -c phpstan.neon"
"analyze": "./vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=1G"
},
"autoload": {
"psr-4": {
@@ -99,7 +99,7 @@
"brianium/paratest": "7.*",
"phpunit/phpunit": "12.*",
"swoole/ide-helper": "6.*",
"phpstan/phpstan": "1.12.*",
"phpstan/phpstan": "^2.0",
"textalk/websocket": "1.5.*",
"czproject/git-php": "4.*",
"laravel/pint": "1.*",
Generated
+6 -6
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "b99693284208ff3d006260a089a4f7b9",
"content-hash": "392d5bd2621b3eb57f8b1bf38d9e4bc3",
"packages": [
{
"name": "adhocore/jwt",
@@ -6496,15 +6496,15 @@
},
{
"name": "phpstan/phpstan",
"version": "1.12.32",
"version": "2.1.40",
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8",
"reference": "2770dcdf5078d0b0d53f94317e06affe88419aa8",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b",
"reference": "9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0"
"php": "^7.4|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -6545,7 +6545,7 @@
"type": "github"
}
],
"time": "2025-09-30T10:16:31+00:00"
"time": "2026-02-23T15:04:35+00:00"
},
{
"name": "phpunit/php-code-coverage",
+10
View File
@@ -0,0 +1,10 @@
{
"name": "@appwrite.io/repo",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@appwrite.io/repo"
}
}
}
+83227
View File
File diff suppressed because it is too large Load Diff
+9 -5
View File
@@ -1,13 +1,17 @@
includes:
- phpstan-baseline.neon
parameters:
level: 8
level: max
paths:
- src/Utopia/Bus
- src/Appwrite/Bus
- src/Appwrite/Transformation
- src
- app
- bin
- tests
bootstrapFiles:
- app/init/constants.php
scanDirectories:
- vendor/swoole/ide-helper
excludePaths:
- tests/resources
- app/sdks
@@ -2018,7 +2018,7 @@ class FunctionsCustomServerTest extends Scope
$functionId = $this->setupFunction([
'functionId' => ID::unique(),
'name' => 'Test Scopes executions',
'commands' => 'bash setup.sh && npm install',
'commands' => 'bash setup.sh && npm ci',
'runtime' => 'node-22',
'entrypoint' => 'index.js',
'scopes' => ['users.read'],
@@ -342,7 +342,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
'fallbackFile' => '',
]);
@@ -404,7 +404,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
]);
$this->assertNotEmpty($siteId);
@@ -445,7 +445,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
]);
$this->assertNotEmpty($siteId);
@@ -569,7 +569,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
]);
$this->assertNotEmpty($siteId);
@@ -598,7 +598,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
'adapter' => 'ssr',
'fallbackFile' => '',
'$id' => $siteId,
@@ -849,7 +849,7 @@ class SitesCustomServerTest extends Scope
'providerBranch' => 'main',
'providerRootDirectory' => './',
'$id' => $siteId,
'installCommand' => 'npm install'
'installCommand' => 'npm ci'
]);
$dateValidator = new DatetimeValidator();
@@ -859,7 +859,7 @@ class SitesCustomServerTest extends Scope
$this->assertEquals('Test Site Updated', $site['body']['name']);
$this->assertEquals(true, $dateValidator->isValid($site['body']['$createdAt']));
$this->assertEquals(true, $dateValidator->isValid($site['body']['$updatedAt']));
$this->assertEquals('npm install', $site['body']['installCommand']);
$this->assertEquals('npm ci', $site['body']['installCommand']);
$this->cleanupSite($siteId);
}
@@ -2076,7 +2076,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
'fallbackFile' => '',
]);
@@ -2176,7 +2176,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
'fallbackFile' => '',
'logging' => false // set logging to false
]
@@ -2605,7 +2605,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
]);
$this->assertNotEmpty($siteId);
@@ -2965,7 +2965,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'echo "custom error" && npm install',
'installCommand' => 'echo "custom error" && npm ci',
'adapter' => 'ssr',
]);
$this->assertNotEmpty($siteId);
@@ -3008,7 +3008,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
'fallbackFile' => '',
]);
@@ -3050,7 +3050,7 @@ class SitesCustomServerTest extends Scope
'buildRuntime' => 'node-22',
'outputDirectory' => './dist',
'buildCommand' => 'npm run build',
'installCommand' => 'npm install',
'installCommand' => 'npm ci',
'fallbackFile' => '',
]);
@@ -1,6 +1,6 @@
<?php
namespace Tests\E2E\Services\Databases\TablesDB;
namespace Tests\E2E\Services\TablesDB;
use Tests\E2E\Client;
use Tests\E2E\Scopes\ApiTablesDB;
@@ -1,6 +1,6 @@
<?php
namespace Tests\E2E\Services\Databases\Permissions;
namespace Tests\E2E\Services\TablesDB\Permissions;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\E2E\Client;
@@ -9,6 +9,7 @@ use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\SchemaPolling;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
use Tests\E2E\Services\Databases\Permissions\DatabasesPermissionsBase;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role;
@@ -1,6 +1,6 @@
<?php
namespace Tests\E2E\Services\Databases\Permissions;
namespace Tests\E2E\Services\TablesDB\Permissions;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\E2E\Client;
@@ -9,6 +9,7 @@ use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\SchemaPolling;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
use Tests\E2E\Services\Databases\Permissions\DatabasesPermissionsBase;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role;
@@ -1,6 +1,6 @@
<?php
namespace Tests\E2E\Services\Databases\Permissions;
namespace Tests\E2E\Services\TablesDB\Permissions;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\E2E\Client;
@@ -9,6 +9,7 @@ use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\SchemaPolling;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
use Tests\E2E\Services\Databases\Permissions\DatabasesPermissionsBase;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role;
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases;
namespace Tests\E2E\Services\TablesDB;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideConsole;
use Tests\E2E\Services\Databases\DatabasesBase;
class TablesDBConsoleClientTest extends Scope
{
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases;
namespace Tests\E2E\Services\TablesDB;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
use Tests\E2E\Services\Databases\DatabasesBase;
class TablesDBCustomClientTest extends Scope
{
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases;
namespace Tests\E2E\Services\TablesDB;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideServer;
use Tests\E2E\Services\Databases\DatabasesBase;
class TablesDBCustomServerTest extends Scope
{
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases\Transactions;
namespace Tests\E2E\Services\TablesDB\Transactions;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
use Tests\E2E\Services\Databases\Transactions\ACIDBase;
use Tests\E2E\Traits\DatabasesUrlHelpers;
class TablesDBACIDTest extends Scope
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases\Transactions;
namespace Tests\E2E\Services\TablesDB\Transactions;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
use Tests\E2E\Services\Databases\Transactions\TransactionPermissionsBase;
class TablesDBTransactionPermissionsCustomClientTest extends Scope
{
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases\Transactions;
namespace Tests\E2E\Services\TablesDB\Transactions;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideConsole;
use Tests\E2E\Services\Databases\Transactions\TransactionsBase;
use Tests\E2E\Traits\DatabasesUrlHelpers;
class TablesDBTransactionsConsoleClientTest extends Scope
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases\Transactions;
namespace Tests\E2E\Services\TablesDB\Transactions;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
use Tests\E2E\Services\Databases\Transactions\TransactionsBase;
use Tests\E2E\Traits\DatabasesUrlHelpers;
class TablesDBTransactionsCustomClientTest extends Scope
@@ -1,11 +1,12 @@
<?php
namespace Tests\E2E\Services\Databases\Transactions;
namespace Tests\E2E\Services\TablesDB\Transactions;
use Tests\E2E\Scopes\ApiTablesDB;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideServer;
use Tests\E2E\Services\Databases\Transactions\TransactionsBase;
use Tests\E2E\Traits\DatabasesUrlHelpers;
class TablesDBTransactionsCustomServerTest extends Scope
+1
View File
@@ -0,0 +1 @@
node_modules/
+1
View File
@@ -0,0 +1 @@
node_modules/
@@ -1528,17 +1528,6 @@
"@types/unist": "*"
}
},
"node_modules/@types/node": {
"version": "25.0.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.3.tgz",
"integrity": "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA==",
"license": "MIT",
"optional": true,
"peer": true,
"dependencies": {
"undici-types": "~7.16.0"
}
},
"node_modules/@types/unist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
@@ -2620,9 +2609,9 @@
}
},
"node_modules/devalue": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.3.tgz",
"integrity": "sha512-nc7XjUU/2Lb+SvEFVGcWLiKkzfw8+qHI7zn8WYXKkLMgfGSHbgCEaR6bJpev8Cm6Rmrb19Gfd/tZvGqx9is3wg==",
"version": "5.6.4",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.4.tgz",
"integrity": "sha512-Gp6rDldRsFh/7XuouDbxMH3Mx8GMCcgzIb1pDTvNyn8pZGQ22u+Wa+lGV9dQCltFQ7uVw0MhRyb8XDskNFOReA==",
"license": "MIT"
},
"node_modules/devlop": {
@@ -5128,14 +5117,6 @@
"integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==",
"license": "MIT"
},
"node_modules/undici-types": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"license": "MIT",
"optional": true,
"peer": true
},
"node_modules/unified": {
"version": "11.0.5",
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -2151,9 +2151,9 @@
}
},
"node_modules/devalue": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.3.tgz",
"integrity": "sha512-nc7XjUU/2Lb+SvEFVGcWLiKkzfw8+qHI7zn8WYXKkLMgfGSHbgCEaR6bJpev8Cm6Rmrb19Gfd/tZvGqx9is3wg==",
"version": "5.6.4",
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.6.4.tgz",
"integrity": "sha512-Gp6rDldRsFh/7XuouDbxMH3Mx8GMCcgzIb1pDTvNyn8pZGQ22u+Wa+lGV9dQCltFQ7uVw0MhRyb8XDskNFOReA==",
"license": "MIT"
},
"node_modules/devlop": {