|
@ -344,13 +344,13 @@ Things to remember when releasing SDKs:
|
||||||
|
|
||||||
## Debug
|
## Debug
|
||||||
|
|
||||||
Appwrite uses [yasd](https://github.com/swoole/yasd) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code's [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension.
|
Appwrite uses [XDebug](https://github.com/xdebug/xdebug) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code's [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension.
|
||||||
|
|
||||||
If you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection:
|
If you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection:
|
||||||
|
|
||||||
1. Create an init file.
|
1. Set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
|
||||||
2. Duplicate **dev/yasd_init.php.stub** file and name it **dev/yasd_init.php**.
|
2. If needed edit the **dev/xdebug.ini** file to your needs.
|
||||||
3. Set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
|
3. Launch your Appwrite instance while your debugger is listening for connections.
|
||||||
|
|
||||||
### VS Code Launch Configuration
|
### VS Code Launch Configuration
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM appwrite/base:0.4.3 as final
|
FROM appwrite/base:0.7.2 as final
|
||||||
|
|
||||||
LABEL maintainer="team@appwrite.io"
|
LABEL maintainer="team@appwrite.io"
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ COPY ./public /usr/src/code/public
|
||||||
COPY ./bin /usr/local/bin
|
COPY ./bin /usr/local/bin
|
||||||
COPY ./docs /usr/src/code/docs
|
COPY ./docs /usr/src/code/docs
|
||||||
COPY ./src /usr/src/code/src
|
COPY ./src /usr/src/code/src
|
||||||
|
COPY ./dev /usr/src/code/dev
|
||||||
|
|
||||||
# Set Volumes
|
# Set Volumes
|
||||||
RUN mkdir -p /storage/uploads && \
|
RUN mkdir -p /storage/uploads && \
|
||||||
|
@ -126,9 +127,10 @@ RUN chmod +x /usr/local/bin/calc-tier-stats && \
|
||||||
RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
||||||
|
|
||||||
# Enable Extensions
|
# Enable Extensions
|
||||||
RUN if [ "$DEBUG" == "true" ]; then printf "zend_extension=yasd \nyasd.debug_mode=remote \nyasd.init_file=/usr/src/code/dev/yasd_init.php \nyasd.remote_port=9005 \nyasd.log_level=-1" >> /usr/local/etc/php/conf.d/yasd.ini; fi
|
RUN if [ "$DEBUG" == "true" ]; then cp /usr/src/code/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini; fi
|
||||||
|
|
||||||
RUN if [ "$DEBUG" == "true" ]; then echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/appwrite.ini; fi
|
RUN if [ "$DEBUG" == "true" ]; then echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/appwrite.ini; fi
|
||||||
|
RUN if [ "$DEBUG" = "false" ]; then rm -rf /usr/src/code/dev; fi
|
||||||
|
RUN if [ "$DEBUG" = "false" ]; then rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so; fi
|
||||||
RUN echo "opcache.preload_user=www-data" >> /usr/local/etc/php/conf.d/appwrite.ini
|
RUN echo "opcache.preload_user=www-data" >> /usr/local/etc/php/conf.d/appwrite.ini
|
||||||
RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /usr/local/etc/php/conf.d/appwrite.ini
|
RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /usr/local/etc/php/conf.d/appwrite.ini
|
||||||
RUN echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/appwrite.ini
|
RUN echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/appwrite.ini
|
||||||
|
|
|
@ -521,7 +521,7 @@ App::get('/v1/avatars/initials')
|
||||||
// if there is no space, try to split by `_` underscore
|
// if there is no space, try to split by `_` underscore
|
||||||
$words = (count($words) == 1) ? \explode('_', \strtoupper($name)) : $words;
|
$words = (count($words) == 1) ? \explode('_', \strtoupper($name)) : $words;
|
||||||
|
|
||||||
$initials = null;
|
$initials = '';
|
||||||
$code = 0;
|
$code = 0;
|
||||||
|
|
||||||
foreach ($words as $key => $w) {
|
foreach ($words as $key => $w) {
|
||||||
|
|
|
@ -963,7 +963,11 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$image = new Image($source);
|
$image = new Image($source);
|
||||||
|
} catch (ImagickException $e) {
|
||||||
|
throw new Exception(Exception::STORAGE_FILE_TYPE_UNSUPPORTED, $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$image->crop((int) $width, (int) $height, $gravity);
|
$image->crop((int) $width, (int) $height, $gravity);
|
||||||
|
|
||||||
|
|
|
@ -739,7 +739,7 @@ App::error()
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'file' => $file,
|
'file' => $file,
|
||||||
'line' => $line,
|
'line' => $line,
|
||||||
'trace' => $trace,
|
'trace' => \json_encode($trace, JSON_UNESCAPED_UNICODE) === false ? [] : $trace, // check for failing encode
|
||||||
'version' => $version,
|
'version' => $version,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
] : [
|
] : [
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
"utopia-php/config": "0.2.*",
|
"utopia-php/config": "0.2.*",
|
||||||
"utopia-php/database": "0.48.*",
|
"utopia-php/database": "0.48.*",
|
||||||
"utopia-php/domains": "0.5.*",
|
"utopia-php/domains": "0.5.*",
|
||||||
"utopia-php/dsn": "0.1.*",
|
"utopia-php/dsn": "0.2.*",
|
||||||
"utopia-php/framework": "0.33.*",
|
"utopia-php/framework": "0.33.*",
|
||||||
"utopia-php/image": "0.5.*",
|
"utopia-php/image": "0.6.*",
|
||||||
"utopia-php/locale": "0.4.*",
|
"utopia-php/locale": "0.4.*",
|
||||||
"utopia-php/logger": "0.3.*",
|
"utopia-php/logger": "0.3.*",
|
||||||
"utopia-php/messaging": "0.8.*",
|
"utopia-php/messaging": "0.8.*",
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
"chillerlan/php-qrcode": "4.3.4",
|
"chillerlan/php-qrcode": "4.3.4",
|
||||||
"adhocore/jwt": "1.1.2",
|
"adhocore/jwt": "1.1.2",
|
||||||
"webonyx/graphql-php": "14.11.*",
|
"webonyx/graphql-php": "14.11.*",
|
||||||
"league/csv": "9.7.1"
|
"league/csv": "^9.14"
|
||||||
},
|
},
|
||||||
"repositories": [
|
"repositories": [
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "8.0"
|
"php": "8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
69
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "463c5722b5b926ea567fe24d8b983755",
|
"content-hash": "b692b61971354d653a0a0aa27bd5a646",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/jwt",
|
"name": "adhocore/jwt",
|
||||||
|
@ -463,34 +463,39 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/csv",
|
"name": "league/csv",
|
||||||
"version": "9.7.1",
|
"version": "9.14.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/csv.git",
|
"url": "https://github.com/thephpleague/csv.git",
|
||||||
"reference": "0ec57e8264ec92565974ead0d1724cf1026e10c1"
|
"reference": "34bf0df7340b60824b9449b5c526fcc3325070d5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/csv/zipball/0ec57e8264ec92565974ead0d1724cf1026e10c1",
|
"url": "https://api.github.com/repos/thephpleague/csv/zipball/34bf0df7340b60824b9449b5c526fcc3325070d5",
|
||||||
"reference": "0ec57e8264ec92565974ead0d1724cf1026e10c1",
|
"reference": "34bf0df7340b60824b9449b5c526fcc3325070d5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
"ext-filter": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"php": "^7.3 || ^8.0"
|
"php": "^8.1.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-curl": "*",
|
"doctrine/collections": "^2.1.4",
|
||||||
"ext-dom": "*",
|
"ext-dom": "*",
|
||||||
"friendsofphp/php-cs-fixer": "^2.16",
|
"ext-xdebug": "*",
|
||||||
"phpstan/phpstan": "^0.12.0",
|
"friendsofphp/php-cs-fixer": "^v3.22.0",
|
||||||
"phpstan/phpstan-phpunit": "^0.12.0",
|
"phpbench/phpbench": "^1.2.15",
|
||||||
"phpstan/phpstan-strict-rules": "^0.12.0",
|
"phpstan/phpstan": "^1.10.50",
|
||||||
"phpunit/phpunit": "^9.5"
|
"phpstan/phpstan-deprecation-rules": "^1.1.4",
|
||||||
|
"phpstan/phpstan-phpunit": "^1.3.15",
|
||||||
|
"phpstan/phpstan-strict-rules": "^1.5.2",
|
||||||
|
"phpunit/phpunit": "^10.5.3",
|
||||||
|
"symfony/var-dumper": "^6.4.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-dom": "Required to use the XMLConverter and or the HTMLConverter classes",
|
"ext-dom": "Required to use the XMLConverter and the HTMLConverter classes",
|
||||||
"ext-iconv": "Needed to ease transcoding CSV using iconv stream filters"
|
"ext-iconv": "Needed to ease transcoding CSV using iconv stream filters"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
@ -520,7 +525,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "CSV data manipulation made easy in PHP",
|
"description": "CSV data manipulation made easy in PHP",
|
||||||
"homepage": "http://csv.thephpleague.com",
|
"homepage": "https://csv.thephpleague.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"convert",
|
"convert",
|
||||||
"csv",
|
"csv",
|
||||||
|
@ -543,7 +548,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-04-17T16:32:08+00:00"
|
"time": "2023-12-29T07:34:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "matomo/device-detector",
|
"name": "matomo/device-detector",
|
||||||
|
@ -1306,16 +1311,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/dsn",
|
"name": "utopia-php/dsn",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/dsn.git",
|
"url": "https://github.com/utopia-php/dsn.git",
|
||||||
"reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea"
|
"reference": "c11f37a12c3f6aaf9fea97ca7cb363dcc93668d7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/dsn/zipball/17a5935eab1b89fb4b95600db50a1b6d5faa6cea",
|
"url": "https://api.github.com/repos/utopia-php/dsn/zipball/c11f37a12c3f6aaf9fea97ca7cb363dcc93668d7",
|
||||||
"reference": "17a5935eab1b89fb4b95600db50a1b6d5faa6cea",
|
"reference": "c11f37a12c3f6aaf9fea97ca7cb363dcc93668d7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1347,9 +1352,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/dsn/issues",
|
"issues": "https://github.com/utopia-php/dsn/issues",
|
||||||
"source": "https://github.com/utopia-php/dsn/tree/0.1.0"
|
"source": "https://github.com/utopia-php/dsn/tree/0.2.0"
|
||||||
},
|
},
|
||||||
"time": "2022-10-26T10:06:20+00:00"
|
"time": "2023-11-02T12:01:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/framework",
|
"name": "utopia-php/framework",
|
||||||
|
@ -1398,16 +1403,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/image",
|
"name": "utopia-php/image",
|
||||||
"version": "0.5.4",
|
"version": "0.6.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/image.git",
|
"url": "https://github.com/utopia-php/image.git",
|
||||||
"reference": "ca5f436f9aa22dedaa6648f24f3687733808e336"
|
"reference": "88f7209172bdabd81e76ac981c95fac117dc6e08"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/image/zipball/ca5f436f9aa22dedaa6648f24f3687733808e336",
|
"url": "https://api.github.com/repos/utopia-php/image/zipball/88f7209172bdabd81e76ac981c95fac117dc6e08",
|
||||||
"reference": "ca5f436f9aa22dedaa6648f24f3687733808e336",
|
"reference": "88f7209172bdabd81e76ac981c95fac117dc6e08",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1415,6 +1420,8 @@
|
||||||
"php": ">=8.0"
|
"php": ">=8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"laravel/pint": "1.2.*",
|
||||||
|
"phpstan/phpstan": "1.9.x-dev",
|
||||||
"phpunit/phpunit": "^9.3",
|
"phpunit/phpunit": "^9.3",
|
||||||
"vimeo/psalm": "4.13.1"
|
"vimeo/psalm": "4.13.1"
|
||||||
},
|
},
|
||||||
|
@ -1428,12 +1435,6 @@
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Eldad Fux",
|
|
||||||
"email": "eldad@appwrite.io"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "A simple Image manipulation library",
|
"description": "A simple Image manipulation library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"framework",
|
"framework",
|
||||||
|
@ -1444,9 +1445,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/image/issues",
|
"issues": "https://github.com/utopia-php/image/issues",
|
||||||
"source": "https://github.com/utopia-php/image/tree/0.5.4"
|
"source": "https://github.com/utopia-php/image/tree/0.6.0"
|
||||||
},
|
},
|
||||||
"time": "2022-05-11T12:30:41+00:00"
|
"time": "2024-01-24T06:59:44+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/locale",
|
"name": "utopia-php/locale",
|
||||||
|
@ -5172,7 +5173,7 @@
|
||||||
"ext-fileinfo": "*"
|
"ext-fileinfo": "*"
|
||||||
},
|
},
|
||||||
"platform-overrides": {
|
"platform-overrides": {
|
||||||
"php": "8.0"
|
"php": "8.2"
|
||||||
},
|
},
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
|
6
dev/xdebug.ini
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
zend_extension=xdebug
|
||||||
|
|
||||||
|
[xdebug]
|
||||||
|
xdebug.mode=develop,debug
|
||||||
|
xdebug.client_host=host.docker.internal
|
||||||
|
xdebug.start_with_request=yes
|
|
@ -1,4 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
echo 'execute init_file success' . PHP_EOL;
|
|
||||||
Yasd\Api\setRemoteHost('host.docker.internal'); //Set your development machine's IP
|
|
|
@ -60,7 +60,8 @@ class Scryptmodified extends Hash
|
||||||
$saltBytes = \base64_decode($options['salt']);
|
$saltBytes = \base64_decode($options['salt']);
|
||||||
$saltSeparatorBytes = \base64_decode($options['saltSeparator']);
|
$saltSeparatorBytes = \base64_decode($options['saltSeparator']);
|
||||||
|
|
||||||
$derivedKey = \scrypt(\utf8_encode($password), $saltBytes . $saltSeparatorBytes, 16384, 8, 1, 64);
|
$password = mb_convert_encoding($password, 'UTF-8');
|
||||||
|
$derivedKey = \scrypt($password, $saltBytes . $saltSeparatorBytes, 16384, 8, 1, 64);
|
||||||
$derivedKey = \hex2bin($derivedKey);
|
$derivedKey = \hex2bin($derivedKey);
|
||||||
|
|
||||||
return $derivedKey;
|
return $derivedKey;
|
||||||
|
|
|
@ -43,10 +43,10 @@ class PersonalData extends Password
|
||||||
|
|
||||||
if (!$this->strict) {
|
if (!$this->strict) {
|
||||||
$password = strtolower($password);
|
$password = strtolower($password);
|
||||||
$this->userId = strtolower($this->userId);
|
$this->userId = strtolower($this->userId ?? '');
|
||||||
$this->email = strtolower($this->email);
|
$this->email = strtolower($this->email ?? '');
|
||||||
$this->name = strtolower($this->name);
|
$this->name = strtolower($this->name ?? '');
|
||||||
$this->phone = strtolower($this->phone);
|
$this->phone = strtolower($this->phone ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->userId && strpos($password, $this->userId) !== false) {
|
if ($this->userId && strpos($password, $this->userId) !== false) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ class AvatarsTest extends Scope
|
||||||
'x-appwrite-project' => $projectId,
|
'x-appwrite-project' => $projectId,
|
||||||
], $this->getHeaders()), $graphQLPayload);
|
], $this->getHeaders()), $graphQLPayload);
|
||||||
|
|
||||||
$this->assertEquals(18767, \strlen($creditCardIcon['body']));
|
$this->assertEquals(18546, \strlen($creditCardIcon['body']));
|
||||||
|
|
||||||
return $creditCardIcon['body'];
|
return $creditCardIcon['body'];
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ class AvatarsTest extends Scope
|
||||||
'x-appwrite-project' => $projectId,
|
'x-appwrite-project' => $projectId,
|
||||||
], $this->getHeaders()), $graphQLPayload);
|
], $this->getHeaders()), $graphQLPayload);
|
||||||
|
|
||||||
$this->assertEquals(11100, \strlen($browserIcon['body']));
|
$this->assertEquals(13312, \strlen($browserIcon['body']));
|
||||||
|
|
||||||
return $browserIcon['body'];
|
return $browserIcon['body'];
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class AvatarsTest extends Scope
|
||||||
'x-appwrite-project' => $projectId,
|
'x-appwrite-project' => $projectId,
|
||||||
], $this->getHeaders()), $graphQLPayload);
|
], $this->getHeaders()), $graphQLPayload);
|
||||||
|
|
||||||
$this->assertEquals(7460, \strlen($countryFlag['body']));
|
$this->assertEquals(8814, \strlen($countryFlag['body']));
|
||||||
|
|
||||||
return $countryFlag['body'];
|
return $countryFlag['body'];
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ class AvatarsTest extends Scope
|
||||||
'x-appwrite-project' => $projectId,
|
'x-appwrite-project' => $projectId,
|
||||||
], $this->getHeaders()), $graphQLPayload);
|
], $this->getHeaders()), $graphQLPayload);
|
||||||
|
|
||||||
$this->assertEquals(36036, \strlen($image['body']));
|
$this->assertEquals(52585, \strlen($image['body']));
|
||||||
|
|
||||||
return $image['body'];
|
return $image['body'];
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ class AvatarsTest extends Scope
|
||||||
'x-appwrite-project' => $projectId,
|
'x-appwrite-project' => $projectId,
|
||||||
], $this->getHeaders()), $graphQLPayload);
|
], $this->getHeaders()), $graphQLPayload);
|
||||||
|
|
||||||
$this->assertEquals(14771, \strlen($qrCode['body']));
|
$this->assertEquals(29428, \strlen($qrCode['body']));
|
||||||
|
|
||||||
return $qrCode['body'];
|
return $qrCode['body'];
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ class AvatarsTest extends Scope
|
||||||
'x-appwrite-project' => $projectId,
|
'x-appwrite-project' => $projectId,
|
||||||
], $this->getHeaders()), $graphQLPayload);
|
], $this->getHeaders()), $graphQLPayload);
|
||||||
|
|
||||||
$this->assertEquals(5041, \strlen($initials['body']));
|
$this->assertEquals(5025, \strlen($initials['body']));
|
||||||
|
|
||||||
return $initials['body'];
|
return $initials['body'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ScopeTest extends Scope
|
||||||
'x-appwrite-key' => $apiKey,
|
'x-appwrite-key' => $apiKey,
|
||||||
], $gqlPayload);
|
], $gqlPayload);
|
||||||
|
|
||||||
$message = "app.${projectId}@service.localhost (role: applications) missing scope (databases.write)";
|
$message = "app.{$projectId}@service.localhost (role: applications) missing scope (databases.write)";
|
||||||
$this->assertArrayHasKey('errors', $database['body']);
|
$this->assertArrayHasKey('errors', $database['body']);
|
||||||
$this->assertEquals($message, $database['body']['errors'][0]['message']);
|
$this->assertEquals($message, $database['body']['errors'][0]['message']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ trait StorageBase
|
||||||
'name' => 'Test Bucket',
|
'name' => 'Test Bucket',
|
||||||
'fileSecurity' => true,
|
'fileSecurity' => true,
|
||||||
'maximumFileSize' => 2000000, //2MB
|
'maximumFileSize' => 2000000, //2MB
|
||||||
'allowedFileExtensions' => ["jpg", "png", 'jfif'],
|
'allowedFileExtensions' => ['jpg', 'png', 'jfif'],
|
||||||
'permissions' => [
|
'permissions' => [
|
||||||
Permission::read(Role::any()),
|
Permission::read(Role::any()),
|
||||||
Permission::create(Role::any()),
|
Permission::create(Role::any()),
|
||||||
|
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 11 KiB |