1
0
Fork 0
mirror of synced 2024-06-09 22:34:46 +12:00

Merge pull request #847 from appwrite/fix-duplicated-storage-init

Fixed multiple storage init
This commit is contained in:
Eldad A. Fux 2021-01-24 09:03:49 +02:00 committed by GitHub
commit 666a847e2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 133 additions and 84 deletions

View file

@ -83,9 +83,6 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo
: '.'.$request->getHostname()
);
Storage::setDevice('files', new Local(APP_STORAGE_UPLOADS.'/app-'.$project->getId()));
Storage::setDevice('functions', new Local(APP_STORAGE_FUNCTIONS.'/app-'.$project->getId()));
/*
* Response format
*/

214
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": "54c20e10875569003e57dd930bdde8a3",
"content-hash": "3c94b5ea6b60232905b6831bec020b69",
"packages": [
{
"name": "adhocore/jwt",
@ -1695,6 +1695,58 @@
},
"time": "2020-10-24T08:51:37+00:00"
},
{
"name": "utopia-php/storage",
"version": "0.1.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/storage.git",
"reference": "00e9045cee6bd1ec1d1f27329c329494ef420c19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/00e9045cee6bd1ec1d1f27329c329494ef420c19",
"reference": "00e9045cee6bd1ec1d1f27329c329494ef420c19",
"shasum": ""
},
"require": {
"php": ">=7.4",
"utopia-php/framework": "0.10.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Utopia\\Storage\\": "src/Storage"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Eldad Fux",
"email": "eldad@appwrite.io"
}
],
"description": "A simple Storage library to manage application storage",
"keywords": [
"framework",
"php",
"storage",
"upf",
"utopia"
],
"support": {
"issues": "https://github.com/utopia-php/storage/issues",
"source": "https://github.com/utopia-php/storage/tree/0.1.0"
},
"time": "2021-01-22T07:27:20+00:00"
},
{
"name": "utopia-php/swoole",
"version": "0.2.0",
@ -3082,12 +3134,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "cbe315f4d3b653ac0310862697866ffddabc502f"
"reference": "0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cbe315f4d3b653ac0310862697866ffddabc502f",
"reference": "cbe315f4d3b653ac0310862697866ffddabc502f",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2",
"reference": "0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2",
"shasum": ""
},
"require": {
@ -3151,7 +3203,7 @@
"type": "github"
}
],
"time": "2021-01-02T06:24:37+00:00"
"time": "2021-01-21T05:59:53+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -3159,12 +3211,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "ec77a26a4afef3ab3b4d4f8f25777218f935e53d"
"reference": "d66b11be20460c55f9655b50d06c0070d6de0ab8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/ec77a26a4afef3ab3b4d4f8f25777218f935e53d",
"reference": "ec77a26a4afef3ab3b4d4f8f25777218f935e53d",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/d66b11be20460c55f9655b50d06c0070d6de0ab8",
"reference": "d66b11be20460c55f9655b50d06c0070d6de0ab8",
"shasum": ""
},
"require": {
@ -3212,7 +3264,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:04:09+00:00"
"time": "2021-01-23T09:14:26+00:00"
},
{
"name": "phpunit/php-invoker",
@ -3220,12 +3272,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
"reference": "da682a733325bf5db48ee2786bd640f8cd0f2622"
"reference": "24d9117c920e229e4dd4e65ed966951dc8d6c0ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/da682a733325bf5db48ee2786bd640f8cd0f2622",
"reference": "da682a733325bf5db48ee2786bd640f8cd0f2622",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/24d9117c920e229e4dd4e65ed966951dc8d6c0ee",
"reference": "24d9117c920e229e4dd4e65ed966951dc8d6c0ee",
"shasum": ""
},
"require": {
@ -3276,7 +3328,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:04:19+00:00"
"time": "2021-01-23T09:14:34+00:00"
},
{
"name": "phpunit/php-text-template",
@ -3284,12 +3336,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "ccece2717f047bf9b04848ea84059374b07170bc"
"reference": "3ace7e098d9ae64fdf2ee12e69ec1ed3eb16d6ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/ccece2717f047bf9b04848ea84059374b07170bc",
"reference": "ccece2717f047bf9b04848ea84059374b07170bc",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3ace7e098d9ae64fdf2ee12e69ec1ed3eb16d6ec",
"reference": "3ace7e098d9ae64fdf2ee12e69ec1ed3eb16d6ec",
"shasum": ""
},
"require": {
@ -3336,7 +3388,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:04:58+00:00"
"time": "2021-01-23T09:15:08+00:00"
},
{
"name": "phpunit/php-timer",
@ -3344,12 +3396,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "c9b3e07891acf6f6679cf2956c99b847aa73bcff"
"reference": "7fe4501c193086a375125ff31e7b8bb6122f00bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c9b3e07891acf6f6679cf2956c99b847aa73bcff",
"reference": "c9b3e07891acf6f6679cf2956c99b847aa73bcff",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/7fe4501c193086a375125ff31e7b8bb6122f00bd",
"reference": "7fe4501c193086a375125ff31e7b8bb6122f00bd",
"shasum": ""
},
"require": {
@ -3396,7 +3448,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:04:29+00:00"
"time": "2021-01-23T09:14:43+00:00"
},
{
"name": "phpunit/phpunit",
@ -3561,12 +3613,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "0b90e32f4fc2ed2618af8470384335383a99eeb2"
"reference": "72cbe9a5d3ac979d81dbe177c8bd6d103699c502"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/0b90e32f4fc2ed2618af8470384335383a99eeb2",
"reference": "0b90e32f4fc2ed2618af8470384335383a99eeb2",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/72cbe9a5d3ac979d81dbe177c8bd6d103699c502",
"reference": "72cbe9a5d3ac979d81dbe177c8bd6d103699c502",
"shasum": ""
},
"require": {
@ -3610,7 +3662,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:05:31+00:00"
"time": "2021-01-23T09:15:35+00:00"
},
{
"name": "sebastian/code-unit",
@ -3674,12 +3726,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd"
"reference": "e49b92c16b780c4d526c118d49d904c4626b8c63"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd",
"reference": "822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/e49b92c16b780c4d526c118d49d904c4626b8c63",
"reference": "e49b92c16b780c4d526c118d49d904c4626b8c63",
"shasum": ""
},
"require": {
@ -3722,7 +3774,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:02:48+00:00"
"time": "2021-01-23T09:13:19+00:00"
},
{
"name": "sebastian/comparator",
@ -3730,12 +3782,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1"
"reference": "33c94310f57ca21d5ea6018c4e799be699e85650"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1",
"reference": "b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/33c94310f57ca21d5ea6018c4e799be699e85650",
"reference": "33c94310f57ca21d5ea6018c4e799be699e85650",
"shasum": ""
},
"require": {
@ -3797,7 +3849,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:02:58+00:00"
"time": "2021-01-23T09:13:27+00:00"
},
{
"name": "sebastian/complexity",
@ -3805,12 +3857,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "291f1710889bce9382b87e17ffec544d9b2c3078"
"reference": "b251b4b76965b9a24a847ac5641ed7419723e7e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/291f1710889bce9382b87e17ffec544d9b2c3078",
"reference": "291f1710889bce9382b87e17ffec544d9b2c3078",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/b251b4b76965b9a24a847ac5641ed7419723e7e3",
"reference": "b251b4b76965b9a24a847ac5641ed7419723e7e3",
"shasum": ""
},
"require": {
@ -3855,7 +3907,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:05:10+00:00"
"time": "2021-01-23T09:15:17+00:00"
},
{
"name": "sebastian/diff",
@ -3863,12 +3915,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "3b28ccb04205dbe3f54685d91c34d54f5f09c64e"
"reference": "1c3726f5fc6ecdf41a7d7a992c18db936d79345e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3b28ccb04205dbe3f54685d91c34d54f5f09c64e",
"reference": "3b28ccb04205dbe3f54685d91c34d54f5f09c64e",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1c3726f5fc6ecdf41a7d7a992c18db936d79345e",
"reference": "1c3726f5fc6ecdf41a7d7a992c18db936d79345e",
"shasum": ""
},
"require": {
@ -3922,7 +3974,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:03:08+00:00"
"time": "2021-01-23T09:13:35+00:00"
},
{
"name": "sebastian/environment",
@ -3930,12 +3982,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "1733c33db8c2fb5939ba4b3c2de53eff99528298"
"reference": "71408304f2a06879d9306d6126ff19c26b77ab8f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1733c33db8c2fb5939ba4b3c2de53eff99528298",
"reference": "1733c33db8c2fb5939ba4b3c2de53eff99528298",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/71408304f2a06879d9306d6126ff19c26b77ab8f",
"reference": "71408304f2a06879d9306d6126ff19c26b77ab8f",
"shasum": ""
},
"require": {
@ -3986,7 +4038,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:03:18+00:00"
"time": "2021-01-23T09:13:44+00:00"
},
{
"name": "sebastian/exporter",
@ -3994,12 +4046,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "21b3e1f135974b44d51d85634a255ae84a2fe986"
"reference": "9fdb8e271acb70c94fc378d0cd32de380e1a6f9d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/21b3e1f135974b44d51d85634a255ae84a2fe986",
"reference": "21b3e1f135974b44d51d85634a255ae84a2fe986",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/9fdb8e271acb70c94fc378d0cd32de380e1a6f9d",
"reference": "9fdb8e271acb70c94fc378d0cd32de380e1a6f9d",
"shasum": ""
},
"require": {
@ -4064,7 +4116,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:03:28+00:00"
"time": "2021-01-23T09:13:52+00:00"
},
{
"name": "sebastian/global-state",
@ -4072,12 +4124,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "f51241632128604e92fb08adc3c95eec5228efe2"
"reference": "483fae6c9f89aee344c35547df17b130827a0981"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/f51241632128604e92fb08adc3c95eec5228efe2",
"reference": "f51241632128604e92fb08adc3c95eec5228efe2",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/483fae6c9f89aee344c35547df17b130827a0981",
"reference": "483fae6c9f89aee344c35547df17b130827a0981",
"shasum": ""
},
"require": {
@ -4129,7 +4181,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:03:37+00:00"
"time": "2021-01-23T09:14:00+00:00"
},
{
"name": "sebastian/lines-of-code",
@ -4137,12 +4189,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8"
"reference": "815e6e5f9021de94a4f896835e9a7b0fd9557e2d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8",
"reference": "e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/815e6e5f9021de94a4f896835e9a7b0fd9557e2d",
"reference": "815e6e5f9021de94a4f896835e9a7b0fd9557e2d",
"shasum": ""
},
"require": {
@ -4187,7 +4239,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:05:21+00:00"
"time": "2021-01-23T09:15:26+00:00"
},
{
"name": "sebastian/object-enumerator",
@ -4195,12 +4247,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "b87fec01050be216f000b0bd1b8c44c657d25f1a"
"reference": "5f8c843a728ed5433bbd6f4426923f9d750be40b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/b87fec01050be216f000b0bd1b8c44c657d25f1a",
"reference": "b87fec01050be216f000b0bd1b8c44c657d25f1a",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5f8c843a728ed5433bbd6f4426923f9d750be40b",
"reference": "5f8c843a728ed5433bbd6f4426923f9d750be40b",
"shasum": ""
},
"require": {
@ -4245,7 +4297,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:03:48+00:00"
"time": "2021-01-23T09:14:09+00:00"
},
{
"name": "sebastian/object-reflector",
@ -4253,12 +4305,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "d205aaa619485dbaf797e67c2af79186c606d7ea"
"reference": "d41ef59df68d6f470c8084fae471b56fd2812bb2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d205aaa619485dbaf797e67c2af79186c606d7ea",
"reference": "d205aaa619485dbaf797e67c2af79186c606d7ea",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d41ef59df68d6f470c8084fae471b56fd2812bb2",
"reference": "d41ef59df68d6f470c8084fae471b56fd2812bb2",
"shasum": ""
},
"require": {
@ -4301,7 +4353,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:03:58+00:00"
"time": "2021-01-23T09:14:18+00:00"
},
{
"name": "sebastian/recursion-context",
@ -4309,12 +4361,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "141035d37fad4cf8d8d0f83097792355cfcbb379"
"reference": "f78f35f8c348f59a47e7973ec0533ae7be54254d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/141035d37fad4cf8d8d0f83097792355cfcbb379",
"reference": "141035d37fad4cf8d8d0f83097792355cfcbb379",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f78f35f8c348f59a47e7973ec0533ae7be54254d",
"reference": "f78f35f8c348f59a47e7973ec0533ae7be54254d",
"shasum": ""
},
"require": {
@ -4365,7 +4417,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:04:39+00:00"
"time": "2021-01-23T09:14:51+00:00"
},
{
"name": "sebastian/resource-operations",
@ -4429,12 +4481,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "c415636f612a62bfba64ea53f2f63038e1c2e32e"
"reference": "55fa25ad7fc6fb7caf2f7cfada5e5e20adf731aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/c415636f612a62bfba64ea53f2f63038e1c2e32e",
"reference": "c415636f612a62bfba64ea53f2f63038e1c2e32e",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/55fa25ad7fc6fb7caf2f7cfada5e5e20adf731aa",
"reference": "55fa25ad7fc6fb7caf2f7cfada5e5e20adf731aa",
"shasum": ""
},
"require": {
@ -4478,7 +4530,7 @@
"type": "github"
}
],
"time": "2021-01-18T13:04:49+00:00"
"time": "2021-01-23T09:14:59+00:00"
},
{
"name": "sebastian/version",
@ -4578,12 +4630,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "356c70659d6b48595f9f275cd7c4de0d5544c49c"
"reference": "5d9e349571fa1fed2ed89fe1f5ffd58331468e87"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/356c70659d6b48595f9f275cd7c4de0d5544c49c",
"reference": "356c70659d6b48595f9f275cd7c4de0d5544c49c",
"url": "https://api.github.com/repos/symfony/console/zipball/5d9e349571fa1fed2ed89fe1f5ffd58331468e87",
"reference": "5d9e349571fa1fed2ed89fe1f5ffd58331468e87",
"shasum": ""
},
"require": {
@ -4668,7 +4720,7 @@
"type": "tidelift"
}
],
"time": "2021-01-14T15:43:35+00:00"
"time": "2021-01-23T09:52:46+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -5566,12 +5618,12 @@
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/9c89b265ccc4092d58e66d72af5d343ee77a41ae",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/9c89b265ccc4092d58e66d72af5d343ee77a41ae",
"reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae",
"shasum": ""
},
@ -5615,8 +5667,8 @@
"validate"
],
"support": {
"issues": "https://github.com/webmozart/assert/issues",
"source": "https://github.com/webmozart/assert/tree/master"
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/master"
},
"time": "2021-01-18T12:52:36+00:00"
},