Add mirror override

This commit is contained in:
Jake Barnby 2024-07-02 14:55:13 +12:00
parent 5f7aae0e60
commit 10adfc5124
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
4 changed files with 64 additions and 40 deletions

View file

@ -44,13 +44,13 @@
"ext-sockets": "*",
"appwrite/php-runtimes": "0.13.*",
"appwrite/php-clamav": "2.0.*",
"utopia-php/abuse": "0.37.*",
"utopia-php/abuse": "0.38.*",
"utopia-php/analytics": "0.10.*",
"utopia-php/audit": "0.39.*",
"utopia-php/audit": "0.40.*",
"utopia-php/cache": "0.10.*",
"utopia-php/cli": "0.15.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.49.*",
"utopia-php/database": "dev-feat-migrations as 0.50.0",
"utopia-php/domains": "0.5.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "0.33.*",

81
composer.lock generated
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": "e002600539435ca8eaaace6e73b4004d",
"content-hash": "6e3cf9eae3ab957e66198445f7fd7381",
"packages": [
{
"name": "adhocore/jwt",
@ -1208,16 +1208,16 @@
},
{
"name": "symfony/polyfill-php80",
"version": "v1.29.0",
"version": "v1.30.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433",
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433",
"shasum": ""
},
"require": {
@ -1268,7 +1268,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0"
},
"funding": [
{
@ -1284,7 +1284,7 @@
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
"time": "2024-05-31T15:07:36+00:00"
},
{
"name": "thecodingmachine/safe",
@ -1427,23 +1427,23 @@
},
{
"name": "utopia-php/abuse",
"version": "0.37.1",
"version": "0.38.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/abuse.git",
"reference": "4dfcff4754c7804d1a70039792c0f2d59a5cc981"
"reference": "b7be9086c9d9b4561d810cbd42fdda798742f56c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/4dfcff4754c7804d1a70039792c0f2d59a5cc981",
"reference": "4dfcff4754c7804d1a70039792c0f2d59a5cc981",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/b7be9086c9d9b4561d810cbd42fdda798742f56c",
"reference": "b7be9086c9d9b4561d810cbd42fdda798742f56c",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-pdo": "*",
"php": ">=8.0",
"utopia-php/database": "0.49.*"
"utopia-php/database": "0.50.*"
},
"require-dev": {
"laravel/pint": "1.5.*",
@ -1470,9 +1470,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/abuse/issues",
"source": "https://github.com/utopia-php/abuse/tree/0.37.1"
"source": "https://github.com/utopia-php/abuse/tree/0.38.0"
},
"time": "2024-06-05T18:03:59+00:00"
"time": "2024-06-24T00:52:02+00:00"
},
{
"name": "utopia-php/analytics",
@ -1522,21 +1522,21 @@
},
{
"name": "utopia-php/audit",
"version": "0.39.1",
"version": "0.40.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/audit.git",
"reference": "7ea91e0ceea7b94293612fea94022b73315677c2"
"reference": "735ae211ce5fee5b52b736731571b4030b1d7cdc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/7ea91e0ceea7b94293612fea94022b73315677c2",
"reference": "7ea91e0ceea7b94293612fea94022b73315677c2",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/735ae211ce5fee5b52b736731571b4030b1d7cdc",
"reference": "735ae211ce5fee5b52b736731571b4030b1d7cdc",
"shasum": ""
},
"require": {
"php": ">=8.0",
"utopia-php/database": "0.49.*"
"utopia-php/database": "0.50.*"
},
"require-dev": {
"laravel/pint": "1.5.*",
@ -1563,22 +1563,22 @@
],
"support": {
"issues": "https://github.com/utopia-php/audit/issues",
"source": "https://github.com/utopia-php/audit/tree/0.39.1"
"source": "https://github.com/utopia-php/audit/tree/0.40.0"
},
"time": "2024-06-05T19:28:22+00:00"
"time": "2024-06-24T00:52:17+00:00"
},
{
"name": "utopia-php/cache",
"version": "0.10.1",
"version": "0.10.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/cache.git",
"reference": "87ee4fc91e50d4ddfef650aa999ea12be3a99583"
"reference": "b22c6eb6d308de246b023efd0fc9758aee8b8247"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/87ee4fc91e50d4ddfef650aa999ea12be3a99583",
"reference": "87ee4fc91e50d4ddfef650aa999ea12be3a99583",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/b22c6eb6d308de246b023efd0fc9758aee8b8247",
"reference": "b22c6eb6d308de246b023efd0fc9758aee8b8247",
"shasum": ""
},
"require": {
@ -1613,9 +1613,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/cache/issues",
"source": "https://github.com/utopia-php/cache/tree/0.10.1"
"source": "https://github.com/utopia-php/cache/tree/0.10.2"
},
"time": "2024-06-18T13:20:25+00:00"
"time": "2024-06-25T20:36:35+00:00"
},
{
"name": "utopia-php/cli",
@ -1719,16 +1719,16 @@
},
{
"name": "utopia-php/database",
"version": "0.49.13",
"version": "dev-feat-migrations",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "fff42e0bd1db5a03d8c5df4302d72443bde3b860"
"reference": "28e41327874f849427a2b9c2f02d9d1a70d6b0cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/fff42e0bd1db5a03d8c5df4302d72443bde3b860",
"reference": "fff42e0bd1db5a03d8c5df4302d72443bde3b860",
"url": "https://api.github.com/repos/utopia-php/database/zipball/28e41327874f849427a2b9c2f02d9d1a70d6b0cb",
"reference": "28e41327874f849427a2b9c2f02d9d1a70d6b0cb",
"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.13"
"source": "https://github.com/utopia-php/database/tree/feat-migrations"
},
"time": "2024-06-18T14:33:55+00:00"
"time": "2024-07-02T01:48:23+00:00"
},
{
"name": "utopia-php/domains",
@ -5589,9 +5589,18 @@
"time": "2023-11-21T18:54:41+00:00"
}
],
"aliases": [],
"aliases": [
{
"package": "utopia-php/database",
"version": "dev-feat-migrations",
"alias": "0.50.0",
"alias_normalized": "0.50.0.0"
}
],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {
"utopia-php/database": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
@ -5615,5 +5624,5 @@
"platform-overrides": {
"php": "8.3"
},
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.6.0"
}

View file

@ -135,7 +135,6 @@ class Databases extends Action
$options = $attribute->getAttribute('options', []);
$project = $dbForConsole->getDocument('projects', $projectId);
try {
switch ($type) {
case Database::VAR_RELATIONSHIP:

View file

@ -0,0 +1,16 @@
<?php
namespace Appwrite\Utopia\Database;
use Utopia\Database\Mirror as UtopiaMirror;
class Mirror extends UtopiaMirror
{
public function __construct(
Database $source,
?Database $destination = null,
array $filters = [],
) {
parent::__construct($source, $destination, $filters);
}
}