mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge pull request #8249 from appwrite/update-platform
update to use latest platform with module
This commit is contained in:
commit
691ce68636
8 changed files with 57 additions and 46 deletions
|
|
@ -202,7 +202,7 @@ CLI::setResource('logError', function (Registry $register) {
|
|||
}, ['register']);
|
||||
|
||||
$platform = new Appwrite();
|
||||
$platform->init(Service::TYPE_CLI);
|
||||
$platform->init(Service::TYPE_TASK);
|
||||
|
||||
$cli = $platform->getCli();
|
||||
|
||||
|
|
|
|||
|
|
@ -284,11 +284,6 @@ if (!isset($args[1])) {
|
|||
|
||||
\array_shift($args);
|
||||
$workerName = $args[0];
|
||||
$workerIndex = $args[1] ?? '';
|
||||
|
||||
if (!empty($workerIndex)) {
|
||||
$workerName .= '_' . $workerIndex;
|
||||
}
|
||||
|
||||
if (\str_starts_with($workerName, 'databases')) {
|
||||
$queueName = System::getEnv('_APP_QUEUE_NAME', 'database_db_main');
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
"utopia-php/messaging": "0.11.*",
|
||||
"utopia-php/migration": "0.4.*",
|
||||
"utopia-php/orchestration": "0.9.*",
|
||||
"utopia-php/platform": "0.5.*",
|
||||
"utopia-php/platform": "0.7.*",
|
||||
"utopia-php/pools": "0.5.*",
|
||||
"utopia-php/preloader": "0.2.*",
|
||||
"utopia-php/queue": "0.7.*",
|
||||
|
|
|
|||
67
composer.lock
generated
67
composer.lock
generated
|
|
@ -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": "53996479cd4ba0c73dbc72d46b240be0",
|
||||
"content-hash": "18bab1e5f72cc82896aef9e64bf566e8",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
|
@ -1427,16 +1427,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/abuse",
|
||||
"version": "0.37.0",
|
||||
"version": "0.37.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/abuse.git",
|
||||
"reference": "2de5c12886cbd516e511e559afdd9e615d871062"
|
||||
"reference": "4dfcff4754c7804d1a70039792c0f2d59a5cc981"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/2de5c12886cbd516e511e559afdd9e615d871062",
|
||||
"reference": "2de5c12886cbd516e511e559afdd9e615d871062",
|
||||
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/4dfcff4754c7804d1a70039792c0f2d59a5cc981",
|
||||
"reference": "4dfcff4754c7804d1a70039792c0f2d59a5cc981",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1470,9 +1470,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/abuse/issues",
|
||||
"source": "https://github.com/utopia-php/abuse/tree/0.37.0"
|
||||
"source": "https://github.com/utopia-php/abuse/tree/0.37.1"
|
||||
},
|
||||
"time": "2024-03-06T21:20:27+00:00"
|
||||
"time": "2024-06-05T18:03:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/analytics",
|
||||
|
|
@ -1522,16 +1522,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/audit",
|
||||
"version": "0.39.0",
|
||||
"version": "0.39.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/audit.git",
|
||||
"reference": "f0bc15012e05cc0b9dde012ab27d25f193768a2c"
|
||||
"reference": "7ea91e0ceea7b94293612fea94022b73315677c2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/audit/zipball/f0bc15012e05cc0b9dde012ab27d25f193768a2c",
|
||||
"reference": "f0bc15012e05cc0b9dde012ab27d25f193768a2c",
|
||||
"url": "https://api.github.com/repos/utopia-php/audit/zipball/7ea91e0ceea7b94293612fea94022b73315677c2",
|
||||
"reference": "7ea91e0ceea7b94293612fea94022b73315677c2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1563,9 +1563,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/audit/issues",
|
||||
"source": "https://github.com/utopia-php/audit/tree/0.39.0"
|
||||
"source": "https://github.com/utopia-php/audit/tree/0.39.1"
|
||||
},
|
||||
"time": "2024-03-06T21:20:37+00:00"
|
||||
"time": "2024-06-05T19:28:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/cache",
|
||||
|
|
@ -1719,16 +1719,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/database",
|
||||
"version": "0.49.10",
|
||||
"version": "0.49.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "216209121bc97a2010f67a39c561fafe1e936bec"
|
||||
"reference": "4f4b35d99ecdee971c3042279bb1ac8264825030"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/216209121bc97a2010f67a39c561fafe1e936bec",
|
||||
"reference": "216209121bc97a2010f67a39c561fafe1e936bec",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/4f4b35d99ecdee971c3042279bb1ac8264825030",
|
||||
"reference": "4f4b35d99ecdee971c3042279bb1ac8264825030",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1769,9 +1769,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/0.49.10"
|
||||
"source": "https://github.com/utopia-php/database/tree/0.49.11"
|
||||
},
|
||||
"time": "2024-05-20T02:14:20+00:00"
|
||||
"time": "2024-05-30T12:40:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
|
|
@ -2327,16 +2327,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/platform",
|
||||
"version": "0.5.2",
|
||||
"version": "0.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/platform.git",
|
||||
"reference": "b9feabc79b92dc2b05683a986ad43bce5c1583e3"
|
||||
"reference": "beeea0f2c9bce14a6869fc5c87a1047cdecb5c52"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/b9feabc79b92dc2b05683a986ad43bce5c1583e3",
|
||||
"reference": "b9feabc79b92dc2b05683a986ad43bce5c1583e3",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/beeea0f2c9bce14a6869fc5c87a1047cdecb5c52",
|
||||
"reference": "beeea0f2c9bce14a6869fc5c87a1047cdecb5c52",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -2344,7 +2344,8 @@
|
|||
"ext-redis": "*",
|
||||
"php": ">=8.0",
|
||||
"utopia-php/cli": "0.15.*",
|
||||
"utopia-php/framework": "0.33.*"
|
||||
"utopia-php/framework": "0.33.*",
|
||||
"utopia-php/queue": "0.7.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "1.2.*",
|
||||
|
|
@ -2370,9 +2371,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/platform/issues",
|
||||
"source": "https://github.com/utopia-php/platform/tree/0.5.2"
|
||||
"source": "https://github.com/utopia-php/platform/tree/0.7.0"
|
||||
},
|
||||
"time": "2024-05-22T12:50:35+00:00"
|
||||
"time": "2024-05-08T17:00:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/pools",
|
||||
|
|
@ -3824,16 +3825,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "1.29.0",
|
||||
"version": "1.29.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc"
|
||||
"reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc",
|
||||
"reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4",
|
||||
"reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -3865,9 +3866,9 @@
|
|||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0"
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1"
|
||||
},
|
||||
"time": "2024-05-06T12:04:23+00:00"
|
||||
"time": "2024-05-31T08:52:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
|
@ -5613,5 +5614,5 @@
|
|||
"platform-overrides": {
|
||||
"php": "8.3"
|
||||
},
|
||||
"plugin-api-version": "2.2.0"
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@
|
|||
|
||||
namespace Appwrite\Platform;
|
||||
|
||||
use Appwrite\Platform\Services\Tasks;
|
||||
use Appwrite\Platform\Services\Workers;
|
||||
use Appwrite\Platform\Modules\Core;
|
||||
use Utopia\Platform\Platform;
|
||||
|
||||
class Appwrite extends Platform
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->addService('tasks', new Tasks());
|
||||
$this->addService('workers', new Workers());
|
||||
parent::__construct(new Core());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17
src/Appwrite/Platform/Modules/Core.php
Normal file
17
src/Appwrite/Platform/Modules/Core.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules;
|
||||
|
||||
use Appwrite\Platform\Services\Tasks;
|
||||
use Appwrite\Platform\Services\Workers;
|
||||
use Utopia\Platform\Module;
|
||||
|
||||
class Core extends Module
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->addService('tasks', new Tasks());
|
||||
$this->addService('workers', new Workers());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ class Tasks extends Service
|
|||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->type = self::TYPE_CLI;
|
||||
$this->type = Service::TYPE_TASK;
|
||||
$this
|
||||
->addAction(Doctor::getName(), new Doctor())
|
||||
->addAction(Install::getName(), new Install())
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class Workers extends Service
|
|||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->type = self::TYPE_WORKER;
|
||||
$this->type = Service::TYPE_WORKER;
|
||||
$this
|
||||
->addAction(Audits::getName(), new Audits())
|
||||
->addAction(Builds::getName(), new Builds())
|
||||
|
|
|
|||
Loading…
Reference in a new issue