diff --git a/.env b/.env index 6583a94fc..30b4a83f7 100644 --- a/.env +++ b/.env @@ -21,6 +21,9 @@ _APP_STATSD_HOST=telegraf _APP_STATSD_PORT=8125 _APP_SMTP_HOST=maildev _APP_SMTP_PORT=25 +_APP_SMTP_SECURE= +_APP_SMTP_USERNAME= +_APP_SMTP_PASSWORD= _APP_STORAGE_LIMIT=100000000 _APP_FUNCTIONS_TIMEOUT=900 -_APP_FUNCTIONS_CONTAINERS=10 \ No newline at end of file +_APP_FUNCTIONS_CONTAINERS=10 diff --git a/.travis.yml b/.travis.yml index 895676573..9af6c8fea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,10 +32,11 @@ before_install: install: - docker --version - docker-compose up -d -- sleep 90 +- sleep 15 script: - docker ps - docker-compose logs appwrite +- docker exec appwrite doctor - docker exec appwrite vars - docker exec appwrite test \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb0e9d131..8b7a205a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -237,7 +237,7 @@ docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t appwrite/ To run tests manually, use the Appwrite Docker CLI from your terminal: ```bash -docker exec appwrite test +docker-compose exec appwrite test ``` ## Benchmarking diff --git a/Dockerfile b/Dockerfile index 75c03c3e0..9b394d5b1 100755 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ FROM php:7.4-cli-alpine as step1 ENV TZ=Asia/Tel_Aviv \ PHP_REDIS_VERSION=5.3.0 \ - PHP_SWOOLE_VERSION=4.5.5 \ + PHP_SWOOLE_VERSION=4.5.6 \ PHP_XDEBUG_VERSION=sdebug_2_9-beta RUN \ @@ -30,7 +30,8 @@ RUN \ wget \ git \ zlib-dev \ - brotli-dev + brotli-dev \ + libmaxminddb-dev RUN docker-php-ext-install sockets @@ -50,7 +51,14 @@ RUN \ phpize && \ ./configure --enable-sockets --enable-http2 && \ make && make install && \ - cd .. + cd .. && \ + ## Maxminddb extension + git clone https://github.com/maxmind/MaxMind-DB-Reader-php.git && \ + cd MaxMind-DB-Reader-php/ext && \ + phpize && \ + ./configure && \ + make && make install && \ + cd ../.. FROM php:7.4-cli-alpine as final @@ -109,6 +117,9 @@ RUN \ imagemagick-dev \ certbot \ docker-cli \ + docker-compose \ + libmaxminddb \ + libmaxminddb-dev \ && pecl install imagick yaml \ && docker-php-ext-enable imagick yaml \ && docker-php-ext-install sockets opcache pdo_mysql \ @@ -120,6 +131,7 @@ WORKDIR /usr/src/code COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ +COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/maxminddb.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/ # Add Source Code COPY ./app /usr/src/code/app @@ -165,6 +177,7 @@ RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ # Enable Extensions RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini +RUN echo extension=maxminddb.so >> /usr/local/etc/php/conf.d/maxminddb.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 diff --git a/README.md b/README.md index 480d53e68..22b487e7a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

[![Hacktoberfest](https://badgen.net/badge/hacktoberfest/friendly/pink)](CONTRIBUTING.md) -[![Discord](https://img.shields.io/discord/564160730845151244?label=discord)](https://discord.gg/GSeTUeA) +[![Discord](https://img.shields.io/discord/564160730845151244?label=discord)](https://appwrite.io/discord) [![Docker Pulls](https://badgen.net/docker/pulls/appwrite/appwrite)](https://travis-ci.org/appwrite/appwrite) [![Travis CI](https://badgen.net/travis/appwrite/appwrite?label=build)](https://travis-ci.com/appwrite/appwrite) [![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io) diff --git a/app/config/locale/codes.php b/app/config/locale/codes.php index 039650da0..d3f289576 100644 --- a/app/config/locale/codes.php +++ b/app/config/locale/codes.php @@ -12,6 +12,7 @@ return [ 'de', // German 'en', // English 'es', // Spanish + 'fa', // Farsi/Persian 'fi', // Finnish 'fo', // Faroese 'fr', // French diff --git a/app/config/locale/eu.php b/app/config/locale/eu.php index fbefd2369..3db5b8773 100644 --- a/app/config/locale/eu.php +++ b/app/config/locale/eu.php @@ -30,8 +30,4 @@ $list = [ 'SE', // Sweden ]; -if (\time() < \strtotime('2020-01-31')) { // @see https://en.wikipedia.org/wiki/Brexit - $list[] = 'GB'; // // United Kingdom -} - return $list; diff --git a/app/config/locale/translations/es.php b/app/config/locale/translations/es.php index efe6c53fa..eec059533 100644 --- a/app/config/locale/translations/es.php +++ b/app/config/locale/translations/es.php @@ -9,7 +9,7 @@ return [ 'account.emails.team' => 'Equipo %s', 'account.emails.verification.title' => 'Confirmación de la cuenta', 'account.emails.verification.body' => 'es.email.auth.confirm.tpl', - 'account.emails.recovery.title' => 'Reestablecer contraseña', + 'account.emails.recovery.title' => 'Restablecer contraseña', 'account.emails.recovery.body' => 'es.email.auth.recovery.tpl', 'account.emails.invitation.title' => 'Invitación al Equipo %s en %s', 'account.emails.invitation.body' => 'es.email.auth.invitation.tpl', diff --git a/app/config/locale/translations/fa.continents.php b/app/config/locale/translations/fa.continents.php new file mode 100644 index 000000000..e55e8f9f3 --- /dev/null +++ b/app/config/locale/translations/fa.continents.php @@ -0,0 +1,11 @@ + 'آفریقا', + 'AN' => 'قطب جنوب', + 'AS' => 'آسیا', + 'EU' => 'اروپا', + 'NA' => 'آمریکای شمالی', + 'OC' => 'اقیانوسیه', + 'SA' => 'آمریکای جنوبی', +]; diff --git a/app/config/locale/translations/fa.countries.php b/app/config/locale/translations/fa.countries.php new file mode 100644 index 000000000..28a5ae0ae --- /dev/null +++ b/app/config/locale/translations/fa.countries.php @@ -0,0 +1,198 @@ + 'افقانستان', + 'AO' => 'آنگولا', + 'AL' => 'آلبانی', + 'AD' => 'آندورا', + 'AE' => 'امارات متحده عربی', + 'AR' => 'آرژانتین', + 'AM' => 'ارمنستان', + 'AG' => 'آنتیگوا و باربودا', + 'AU' => 'استرالیا', + 'AT' => 'اتریش', + 'AZ' => 'آذربایجان', + 'BI' => 'بوروندی', + 'BE' => 'بلژیک', + 'BJ' => 'بنین', + 'BF' => 'بورکینافاسو', + 'BD' => 'بنگلادش', + 'BG' => 'بلغارستان', + 'BH' => 'بحرین', + 'BS' => 'باهاما', + 'BA' => 'بوسنی و هرزگوین', + 'BY' => 'بلاروس', + 'BZ' => 'بلیز', + 'BO' => 'بولیوی', + 'BR' => 'برزیل', + 'BB' => 'باربادوس', + 'BN' => 'برونئی', + 'BT' => 'بوتان', + 'BW' => 'بوتسوانا', + 'CF' => 'جمهوری آفریقای مرکزی', + 'CA' => 'کانادا', + 'CH' => 'سوئیس', + 'CL' => 'شیلی', + 'CN' => 'چین', + 'CI' => 'ساحل عاج', + 'CM' => 'کامرون', + 'CD' => 'کنگو', + 'CG' => 'جمهوری کنگو', + 'CO' => 'کلمبیا', + 'KM' => 'کومور', + 'CV' => 'کیپ ورد', + 'CR' => 'کاستاریکا', + 'CU' => 'کوبا', + 'CY' => 'قبرس', + 'CZ' => 'جمهوری چک', + 'DE' => 'آلمان', + 'DJ' => 'جیبوتی', + 'DM' => 'دومینیکا', + 'DK' => 'دانمارک', + 'DO' => 'جمهوری دومینیکا', + 'DZ' => 'الجزیره', + 'EC' => 'اکوادور', + 'EG' => 'مصر', + 'ER' => 'اریتره', + 'ES' => 'اسپانیا', + 'EE' => 'استونی', + 'ET' => 'اتیوپی', + 'FI' => 'فنلاند', + 'FJ' => 'فیجی', + 'FR' => 'فرانسه', + 'FM' => 'میکرونزی', + 'GA' => 'گابن', + 'GB' => 'انگلستان', + 'GE' => 'گرجستان', + 'GH' => 'غنا', + 'GN' => 'گینه', + 'GM' => 'گامبیا', + 'GW' => 'گینه بیسائو', + 'GQ' => 'گینه استوایی', + 'GR' => 'یونان', + 'GD' => 'گرنادا', + 'GT' => 'گواتمالا', + 'GY' => 'گویان', + 'HN' => 'هندوراس', + 'HR' => 'کرواسی', + 'HT' => 'هائیتی', + 'HU' => 'مجارستان', + 'ID' => 'اندونزی', + 'IN' => 'هند', + 'IE' => 'ایرلند', + 'IR' => 'ایران', + 'IQ' => 'عراث', + 'IS' => 'ایسلند', + 'IL' => 'اسرائیل', + 'IT' => 'ایتالیا', + 'JM' => 'جاماییکا', + 'JO' => 'اردن', + 'JP' => 'جاپن', + 'KZ' => 'قزاقستان', + 'KE' => 'کنیا', + 'KG' => 'قرقیزستان', + 'KH' => 'کامبوج', + 'KI' => 'کیریباتی', + 'KN' => 'سنت کیتس و نویس', + 'KR' => 'کرخ جنوبی', + 'KW' => 'کویت', + 'LA' => 'لائوس', + 'LB' => 'لبنان', + 'LR' => 'لیبریا', + 'LY' => 'لیبی', + 'LC' => 'سنت لوسیا', + 'LI' => 'لیختن اشتاین', + 'LK' => 'سریلانکا', + 'LS' => 'لسوتو', + 'LT' => 'لیتوانی', + 'LU' => 'لوکزامبورگ', + 'LV' => 'لتونی', + 'MA' => 'مراکش', + 'MC' => 'موناکو', + 'MD' => 'مولداوی', + 'MG' => 'ماداگاسکار', + 'MV' => 'مالدیو', + 'MX' => 'مکزیک', + 'MH' => 'جزایر مارشال', + 'MK' => 'مقدونیه', + 'ML' => 'مالی', + 'MT' => 'مالتا', + 'MM' => 'میانمار', + 'ME' => 'مونته نگرو', + 'MN' => 'مغولستان', + 'MZ' => 'موزامبیک', + 'MR' => 'موریتانی', + 'MU' => 'موریس', + 'MW' => 'مالاوی', + 'MY' => 'مالزی', + 'NA' => 'نامیبیا', + 'NE' => 'نیجر', + 'NG' => 'نیجریه', + 'NI' => 'نیکاراگوئه', + 'NL' => 'هلند', + 'NO' => 'نروژ', + 'NP' => 'نپال', + 'NR' => 'نائورو', + 'NZ' => 'نیوزلند', + 'OM' => 'عمان', + 'PK' => 'پاکستان', + 'PA' => 'پاناما', + 'PE' => 'پرو', + 'PH' => 'فیلیپین', + 'PW' => 'پالائو', + 'PG' => 'پاپوآ گینه نو', + 'PL' => 'لهستان', + 'KP' => 'کره شمالی', + 'PT' => 'پرتغال', + 'PY' => 'پاراگوئه', + 'QA' => 'قطر', + 'RO' => 'رومانی', + 'RU' => 'روسیه', + 'RW' => 'رواندا', + 'SA' => 'عربستان سعودی', + 'SD' => 'سودان', + 'SN' => 'سنگال', + 'SG' => 'سنگاپور', + 'SB' => 'جزایر سلیمان', + 'SL' => 'سیرا لئون', + 'SV' => 'السالوادور', + 'SM' => 'سان مارینو', + 'SO' => 'سومالی', + 'RS' => 'صربستان', + 'SS' => 'سودان جنوبی', + 'ST' => 'سائو تومه و پرنسیپ', + 'SR' => 'سورینام', + 'SK' => 'اسلواکی', + 'SI' => 'اسلوونی', + 'SE' => 'سوئد', + 'SZ' => 'سوئیس', + 'SC' => 'سیشل', + 'SY' => 'سوریه', + 'TD' => 'چاد', + 'TG' => 'توگپ', + 'TH' => 'تایلند', + 'TJ' => 'تاجیکستان', + 'TM' => 'ترکمنستان', + 'TL' => 'تیمور-لسته', + 'TO' => 'تونگا', + 'TT' => 'ترینیداد و توباگو', + 'TN' => 'تونس', + 'TR' => 'ترکیه', + 'TV' => 'تووالو', + 'TZ' => 'تانزانیا', + 'UG' => 'اوگاندا', + 'UA' => 'اوکراین', + 'UY' => 'اوگوئه', + 'US' => 'ایالات متحده آمریکا', + 'UZ' => 'ازبکستان', + 'VA' => 'شهر واتیکان', + 'VC' => 'سنت وینسنت و گرنادین ها', + 'VE' => 'ونزوئلا', + 'VN' => 'ویتنام', + 'VU' => 'وانواتو', + 'WS' => 'ساموآ', + 'YE' => 'یمن', + 'ZA' => 'آفریقای جنوبی', + 'ZM' => 'زامبیا', + 'ZW' => 'زیمباوه', +]; diff --git a/app/config/locale/translations/fa.php b/app/config/locale/translations/fa.php new file mode 100644 index 000000000..35fb30afc --- /dev/null +++ b/app/config/locale/translations/fa.php @@ -0,0 +1,21 @@ + '"هنر خردمند بودن، هنر دانستن چیزی است که باید از آن غافل شد."', // This is the line printed in the homepage and console 'view-source' + 'settings.locale' => 'fa', + 'settings.direction' => 'rtl', + + // Service - Users + 'account.emails.team' => 'تیم %s', + 'account.emails.verification.title' => 'تایید حساب کاربری', + 'account.emails.verification.body' => 'fa.email.auth.confirm.tpl', + 'account.emails.recovery.title' => 'بازیابی رمز عبور', + 'account.emails.recovery.body' => 'fa.email.auth.recovery.tpl', + 'account.emails.invitation.title' => 'دعوتنامه به تیم %s در %s', + 'account.emails.invitation.body' => 'fa.email.auth.invitation.tpl', + + 'locale.country.unknown' => 'ناشناخته', + + 'countries' => include 'fa.countries.php', + 'continents' => include 'fa.continents.php', +]; diff --git a/app/config/locale/translations/templates/es.email.auth.invitation.tpl b/app/config/locale/translations/templates/es.email.auth.invitation.tpl index d07b7ffb5..c1a8f81f1 100644 --- a/app/config/locale/translations/templates/es.email.auth.invitation.tpl +++ b/app/config/locale/translations/templates/es.email.auth.invitation.tpl @@ -2,7 +2,7 @@ Hola,

- Te hemos enviamos este correo porque {{owner}} quiere invitarte a formar parte del equipo {{team}} en {{project}}. + Te hemos enviado este correo porque {{owner}} quiere invitarte a formar parte del equipo {{team}} en {{project}}.

Sigue este enlace para unirte al equipo {{team}}: diff --git a/app/config/locale/translations/templates/es.email.auth.recovery.tpl b/app/config/locale/translations/templates/es.email.auth.recovery.tpl index 0f1cfaa43..e498fd335 100644 --- a/app/config/locale/translations/templates/es.email.auth.recovery.tpl +++ b/app/config/locale/translations/templates/es.email.auth.recovery.tpl @@ -2,11 +2,11 @@ Hola {{name}},

- Sigue este enlace para reestablecer tu contraseña de {{project}}. + Sigue este enlace para restablecer tu contraseña de {{project}}.

{{cta}}

- Si no has pedido reestablecer tu contraseña, puedes ignorar este mensaje. + Si no solicitaste restablecer tu contraseña, puedes ignorar este mensaje.

Gracias, diff --git a/app/config/locale/translations/templates/fa.email.auth.confirm.tpl b/app/config/locale/translations/templates/fa.email.auth.confirm.tpl new file mode 100644 index 000000000..dcd33d88a --- /dev/null +++ b/app/config/locale/translations/templates/fa.email.auth.confirm.tpl @@ -0,0 +1,16 @@ +

+ +سلام {{name}}، +

+

+ برای تأیید آدرس ایمیل خود، روی این لینک کلیک کنید. +

+{{cta}} +

+اگر از شما خواسته نشده است این آدرس ایمیل را تأیید کنید، می توانید این پیام را نادیده بگیرید. +

+

+ متشکریم, +
+ تیم {{project}} +

\ No newline at end of file diff --git a/app/config/locale/translations/templates/fa.email.auth.invitation.tpl b/app/config/locale/translations/templates/fa.email.auth.invitation.tpl new file mode 100644 index 000000000..a89c7decc --- /dev/null +++ b/app/config/locale/translations/templates/fa.email.auth.invitation.tpl @@ -0,0 +1,18 @@ +

+ سلام، +

+

+ این نامه برای شما ارسال شد زیرا {{owner}} می‌خواهد شما را به عضویت تیم {{team}} در {{project}} دعوت کند. +

+

+ برای عضویت در تیم {{team}} بر روی لینک زیر کلیک کنید : +

+{{cta}} +

+اگر علاقه‌ای ندارید، می توانید این پیام را نادیده بگیرید. +

+

+ متشکریم, +
+ {{project}} تیم +

\ No newline at end of file diff --git a/app/config/locale/translations/templates/fa.email.auth.recovery.tpl b/app/config/locale/translations/templates/fa.email.auth.recovery.tpl new file mode 100644 index 000000000..b493d5e03 --- /dev/null +++ b/app/config/locale/translations/templates/fa.email.auth.recovery.tpl @@ -0,0 +1,15 @@ +

+ سلام {{name}}، +

+

+ لینک زیر را کلیک کنید تا رمز عبور {{project}} را بازیابی کنید. +

+{{cta}} +

+ اگر علاقه‌ای ندارید، می توانید این پیام را نادیده بگیرید. +

+

+ متشکریم، +
+ تیم {{project}} +

diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 9eaa82d5a..95dff2548 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -634,7 +634,7 @@ App::get('/v1/account/sessions') /** @var Utopia\Response $response */ /** @var Appwrite\Database\Document $user */ /** @var Utopia\Locale\Locale $locale */ - /** @var GeoIp2\Database\Reader $geodb */ + /** @var MaxMind\Db\Reader $geodb */ $tokens = $user->getAttribute('tokens', []); $sessions = []; @@ -669,9 +669,17 @@ App::get('/v1/account/sessions') ]; try { - $record = $geodb->country($token->getAttribute('ip', '')); - $sessions[$index]['geo']['isoCode'] = \strtolower($record->country->isoCode); - $sessions[$index]['geo']['country'] = (isset($countries[$record->country->isoCode])) ? $countries[$record->country->isoCode] : $locale->getText('locale.country.unknown'); + $record = $geodb->get($token->getAttribute('ip', '')); + + if ($record) { + $sessions[$index]['geo']['isoCode'] = \strtolower($record['country']['iso_code']); + $sessions[$index]['geo']['country'] = (isset($countries[$record['country']['iso_code']])) ? $countries[$record['country']['iso_code']] : $locale->getText('locale.country.unknown'); + } + else { + $sessions[$index]['geo']['isoCode'] = '--'; + $sessions[$index]['geo']['country'] = $locale->getText('locale.country.unknown'); + } + } catch (\Exception $e) { $sessions[$index]['geo']['isoCode'] = '--'; $sessions[$index]['geo']['country'] = $locale->getText('locale.country.unknown'); @@ -696,7 +704,7 @@ App::get('/v1/account/logs') /** @var Appwrite\Database\Document $project */ /** @var Appwrite\Database\Document $user */ /** @var Utopia\Locale\Locale $locale */ - /** @var GeoIp2\Database\Reader $geodb */ + /** @var MaxMind\Db\Reader $geodb */ $adapter = new AuditAdapter($register->get('db')); $adapter->setNamespace('app_'.$project->getId()); @@ -746,10 +754,17 @@ App::get('/v1/account/logs') ]; try { - $record = $geodb->country($log['ip']); - $output[$i]['geo']['isoCode'] = \strtolower($record->country->isoCode); - $output[$i]['geo']['country'] = $record->country->name; - $output[$i]['geo']['country'] = (isset($countries[$record->country->isoCode])) ? $countries[$record->country->isoCode] : $locale->getText('locale.country.unknown'); + $record = $geodb->get($log['ip']); + + if(isset($record)){ + $output[$i]['geo']['isoCode'] = \strtolower($record['country']['iso_code']); + $output[$i]['geo']['country'] = (isset($countries[$record['country']['iso_code']])) ? $countries[$record['country']['iso_code']] : $locale->getText('locale.country.unknown'); + } + else{ + $output[$i]['geo']['isoCode'] = '--'; + $output[$i]['geo']['country'] = $locale->getText('locale.country.unknown'); + } + } catch (\Exception $e) { $output[$i]['geo']['isoCode'] = '--'; $output[$i]['geo']['country'] = $locale->getText('locale.country.unknown'); diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 8349cce24..49889f48d 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -11,12 +11,10 @@ use Utopia\Cache\Cache; use Utopia\Cache\Adapter\Filesystem; use Appwrite\Resize\Resize; use Appwrite\URL\URL as URLParse; -use BaconQrCode\Renderer\ImageRenderer; -use BaconQrCode\Renderer\Image\ImagickImageBackEnd; -use BaconQrCode\Renderer\RendererStyle\RendererStyle; -use BaconQrCode\Writer; use Utopia\Config\Config; use Utopia\Validator\HexColor; +use chillerlan\QRCode\QRCode; +use chillerlan\QRCode\QROptions; $avatarCallback = function ($type, $code, $width, $height, $quality, $response) { /** @var Utopia\Response $response */ @@ -365,13 +363,11 @@ App::get('/v1/avatars/qr') /** @var Utopia\Response $response */ $download = ($download === '1' || $download === 'true' || $download === 1 || $download === true); - - $renderer = new ImageRenderer( - new RendererStyle($size, $margin), - new ImagickImageBackEnd('png', 100) - ); - - $writer = new Writer($renderer); + $qropts = new QROptions([ + 'quietzone' => $size, + 'outputType' => QRCode::OUTPUT_IMAGICK + ]); + $qrcode = new QRCode($qropts); if ($download) { $response->addHeader('Content-Disposition', 'attachment; filename="qr.png"'); @@ -380,7 +376,7 @@ App::get('/v1/avatars/qr') $response ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + (60 * 60 * 24 * 45)).' GMT') // 45 days cache ->setContentType('image/png') - ->send($writer->writeString($text)) + ->send($qrcode->render($text)) ; }, ['response']); @@ -460,4 +456,4 @@ App::get('/v1/avatars/initials') ->setContentType('image/png') ->send($image->getImageBlob()) ; - }, ['response', 'user']); \ No newline at end of file + }, ['response', 'user']); diff --git a/app/controllers/api/locale.php b/app/controllers/api/locale.php index 8be46d8e4..764a54304 100644 --- a/app/controllers/api/locale.php +++ b/app/controllers/api/locale.php @@ -15,7 +15,7 @@ App::get('/v1/locale') /** @var Utopia\Request $request */ /** @var Utopia\Response $response */ /** @var Utopia\Locale\Locale $locale */ - /** @var GeoIp2\Database\Reader $geodb */ + /** @var MaxMind\Db\Reader $geodb */ $eu = Config::getParam('locale-eu'); $currencies = Config::getParam('locale-currencies'); @@ -29,23 +29,23 @@ App::get('/v1/locale') $currency = null; - try { - $record = $geodb->country($ip); - $output['countryCode'] = $record->country->isoCode; - $output['country'] = (isset($countries[$record->country->isoCode])) ? $countries[$record->country->isoCode] : $locale->getText('locale.country.unknown'); - //$output['countryTimeZone'] = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $record->country->isoCode); - $output['continent'] = (isset($continents[$record->continent->code])) ? $continents[$record->continent->code] : $locale->getText('locale.country.unknown'); - $output['continentCode'] = $record->continent->code; - $output['eu'] = (\in_array($record->country->isoCode, $eu)) ? true : false; + $record = $geodb->get($ip); + + if($record) { + $output['countryCode'] = $record['country']['iso_code']; + $output['country'] = (isset($countries[$record['country']['iso_code']])) ? $countries[$record['country']['iso_code']] : $locale->getText('locale.country.unknown'); + $output['continent'] = (isset($continents[$record['continent']['code']])) ? $continents[$record['continent']['code']] : $locale->getText('locale.country.unknown'); + $output['continentCode'] = $record['continent']['code']; + $output['eu'] = (\in_array($record['country']['iso_code'], $eu)) ? true : false; foreach ($currencies as $code => $element) { - if (isset($element['locations']) && isset($element['code']) && \in_array($record->country->isoCode, $element['locations'])) { + if (isset($element['locations']) && isset($element['code']) && \in_array($record['country']['iso_code'], $element['locations'])) { $currency = $element['code']; } } $output['currency'] = $currency; - } catch (\Exception $e) { + } else { $output['countryCode'] = '--'; $output['country'] = $locale->getText('locale.country.unknown'); $output['continent'] = $locale->getText('locale.country.unknown'); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 21894e313..4f629b568 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -231,7 +231,7 @@ App::get('/v1/users/:userId/sessions') /** @var Utopia\Response $response */ /** @var Appwrite\Database\Database $projectDB */ /** @var Utopia\Locale\Locale $locale */ - /** @var GeoIp2\Database\Reader $geodb */ + /** @var MaxMind\Db\Reader $geodb */ $user = $projectDB->getDocument($userId); @@ -270,9 +270,16 @@ App::get('/v1/users/:userId/sessions') ]; try { - $record = $geodb->country($token->getAttribute('ip', '')); - $sessions[$index]['geo']['isoCode'] = \strtolower($record->country->isoCode); - $sessions[$index]['geo']['country'] = (isset($countries[$record->country->isoCode])) ? $countries[$record->country->isoCode] : $locale->getText('locale.country.unknown'); + $record = $geodb->get($token->getAttribute('ip', '')); + + if ($record) { + $sessions[$index]['geo']['isoCode'] = \strtolower($record['country']['iso_code']); + $sessions[$index]['geo']['country'] = (isset($countries[$record['country']['iso_code']])) ? $countries[$record['country']['iso_code']] : $locale->getText('locale.country.unknown'); + } else { + $sessions[$index]['geo']['isoCode'] = '--'; + $sessions[$index]['geo']['country'] = $locale->getText('locale.country.unknown'); + } + } catch (\Exception $e) { $sessions[$index]['geo']['isoCode'] = '--'; $sessions[$index]['geo']['country'] = $locale->getText('locale.country.unknown'); @@ -299,7 +306,7 @@ App::get('/v1/users/:userId/logs') /** @var Appwrite\Database\Document $project */ /** @var Appwrite\Database\Database $projectDB */ /** @var Utopia\Locale\Locale $locale */ - /** @var GeoIp2\Database\Reader $geodb */ + /** @var MaxMind\Db\Reader $geodb */ $user = $projectDB->getDocument($userId); @@ -356,10 +363,17 @@ App::get('/v1/users/:userId/logs') ]; try { - $record = $geodb->country($log['ip']); - $output[$i]['geo']['isoCode'] = \strtolower($record->country->isoCode); - $output[$i]['geo']['country'] = $record->country->name; - $output[$i]['geo']['country'] = (isset($countries[$record->country->isoCode])) ? $countries[$record->country->isoCode] : $locale->getText('locale.country.unknown'); + $record = $geodb->get($log['ip']); + + if(isset($record)){ + $output[$i]['geo']['isoCode'] = \strtolower($record['country']['iso_code']); + $output[$i]['geo']['country'] = (isset($countries[$record['country']['iso_code']])) ? $countries[$record['country']['iso_code']] : $locale->getText('locale.country.unknown'); + } + else{ + $output[$i]['geo']['isoCode'] = '--'; + $output[$i]['geo']['country'] = $locale->getText('locale.country.unknown'); + } + } catch (\Exception $e) { $output[$i]['geo']['isoCode'] = '--'; $output[$i]['geo']['country'] = $locale->getText('locale.country.unknown'); diff --git a/app/http.php b/app/http.php index 8f185064e..f98acc9d2 100644 --- a/app/http.php +++ b/app/http.php @@ -98,11 +98,12 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo try { $app->run($request, $response); } catch (\Throwable $th) { + Console::error('[Error] Type: '.get_class($th)); + Console::error('[Error] Message: '.$th->getMessage()); + Console::error('[Error] File: '.$th->getFile()); + Console::error('[Error] Line: '.$th->getLine()); + if(App::isDevelopment()) { - var_dump(get_class($th)); - var_dump($th->getMessage()); - var_dump($th->getFile()); - var_dump($th->getLine()); $swooleResponse->end('error: '.$th->getMessage()); } diff --git a/app/init.php b/app/init.php index d44039ec2..d24ca9d28 100644 --- a/app/init.php +++ b/app/init.php @@ -25,7 +25,7 @@ use Utopia\View; use Utopia\Config\Config; use Utopia\Locale\Locale; use Utopia\Registry\Registry; -use GeoIp2\Database\Reader; +use MaxMind\Db\Reader; use PHPMailer\PHPMailer\PHPMailer; use PDO as PDONative; @@ -233,6 +233,7 @@ Locale::setLanguage('cz', include __DIR__.'/config/locale/translations/cz.php'); Locale::setLanguage('de', include __DIR__.'/config/locale/translations/de.php'); Locale::setLanguage('en', include __DIR__.'/config/locale/translations/en.php'); Locale::setLanguage('es', include __DIR__.'/config/locale/translations/es.php'); +Locale::setLanguage('fa', include __DIR__.'/config/locale/translations/fa.php'); Locale::setLanguage('fi', include __DIR__.'/config/locale/translations/fi.php'); Locale::setLanguage('fo', include __DIR__.'/config/locale/translations/fo.php'); Locale::setLanguage('fr', include __DIR__.'/config/locale/translations/fr.php'); diff --git a/app/preload.php b/app/preload.php index 6cf308f8c..d58d6717f 100644 --- a/app/preload.php +++ b/app/preload.php @@ -23,9 +23,6 @@ include __DIR__.'/controllers/general.php'; $preloader = new Preloader(); foreach ([ - realpath(__DIR__ . '/../app/config'), - realpath(__DIR__ . '/../app/controllers'), - realpath(__DIR__ . '/../src'), realpath(__DIR__ . '/../vendor/twig/twig'), realpath(__DIR__ . '/../vendor/guzzlehttp/guzzle'), realpath(__DIR__ . '/../vendor/domnikl'), diff --git a/app/tasks/install.php b/app/tasks/install.php index c1d002601..5345ad627 100644 --- a/app/tasks/install.php +++ b/app/tasks/install.php @@ -142,10 +142,14 @@ $cli $stdout = ''; $stderr = ''; + + Console::log("Running \"docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans\""); + $exit = Console::execute("docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans", null, $stdout, $stderr); if ($exit !== 0) { Console::error("Failed to install Appwrite dockers"); + Console::error($stderr); exit($exit); } else { Console::success("Appwrite installed successfully"); diff --git a/app/tasks/migrate.php b/app/tasks/migrate.php index 8f7fc9c7e..e44488ce0 100644 --- a/app/tasks/migrate.php +++ b/app/tasks/migrate.php @@ -8,13 +8,12 @@ use Appwrite\Database\Database; use Appwrite\Database\Document; use Appwrite\Database\Validator\Authorization; -$db = $register->get('db'); - $callbacks = [ '0.4.0' => function() { Console::log('I got nothing to do.'); }, - '0.5.0' => function($project) use ($db, $projectDB, $requset) { + '0.5.0' => function($project) use ($register, $projectDB, $requset) { + $db = $register->get('db'); Console::log('Migrating project: '.$project->getId()); diff --git a/app/views/console/account/index.phtml b/app/views/console/account/index.phtml index 6889764d8..1606b41bd 100644 --- a/app/views/console/account/index.phtml +++ b/app/views/console/account/index.phtml @@ -298,7 +298,7 @@ - + diff --git a/app/views/console/functions/index.phtml b/app/views/console/functions/index.phtml index 5262d6188..32564fea4 100644 --- a/app/views/console/functions/index.phtml +++ b/app/views/console/functions/index.phtml @@ -47,8 +47,8 @@ $environments = $this->getParam('environments', []); -
events assigned
-
 
+
events assigned
+
 
diff --git a/app/views/console/home/index.phtml b/app/views/console/home/index.phtml index 50f4a30b0..afc44428f 100644 --- a/app/views/console/home/index.phtml +++ b/app/views/console/home/index.phtml @@ -135,7 +135,7 @@ $graph = $this->getParam('graph', false); -

+

diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 49d599a7d..089bb438f 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -270,9 +270,9 @@ services: - "3306:3306" environment: - MYSQL_ROOT_PASSWORD=rootsecretpassword - - MYSQL_DATABASE=appwrite - - MYSQL_USER=user - - MYSQL_PASSWORD=password + - MYSQL_DATABASE=${_APP_DB_SCHEMA} + - MYSQL_USER=${_APP_DB_USER} + - MYSQL_PASSWORD=${_APP_DB_PASS} command: 'mysqld --innodb-flush-method=fsync' smtp: @@ -295,7 +295,7 @@ services: - appwrite-redis:/data:rw clamav: - image: appwrite/clamav:1.0.12 + image: appwrite/clamav:1.2.0 container_name: appwrite-clamav restart: unless-stopped networks: diff --git a/app/workers/certificates.php b/app/workers/certificates.php index da3c4ec5c..73d61107e 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -66,7 +66,7 @@ class CertificatesV1 } if(!$domain->isKnown() || $domain->isTest()) { - throw new Exception('Unkown public suffix for domain'); + throw new Exception('Unknown public suffix for domain'); } if($validateTarget) { diff --git a/composer.json b/composer.json index 18430e350..c2c3b9d0f 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "ext-yaml": "*", "ext-dom": "*", "ext-redis": "*", + "ext-swoole": "*", "ext-pdo": "*", "ext-openssl": "*", "ext-zlib": "*", @@ -45,17 +46,15 @@ "utopia-php/domains": "1.1.*", "resque/php-resque": "1.3.6", - "geoip2/geoip2": "2.10.0", "piwik/device-detector": "3.13.0", "dragonmantank/cron-expression": "3.0.1", "domnikl/statsd": "3.0.*", "influxdb/influxdb-php": "1.15.*", - "bacon/bacon-qr-code": "2.0.2", "phpmailer/phpmailer": "6.1.7", - "adhocore/jwt": "1.1.0" + "chillerlan/php-qrcode": "^4.2" }, "require-dev": { - "swoole/ide-helper": "4.5.4", + "swoole/ide-helper": "4.5.5", "appwrite/sdk-generator": "master", "phpunit/phpunit": "^9.3" }, @@ -74,4 +73,4 @@ "php": "7.4" } } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 5417a6e5c..918d39a94 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "19f7cef86ddc98623cd3ffffa2be2cae", + "content-hash": "6b4324f0371e508d691337551c00c74e", "packages": [ { "name": "adhocore/jwt", @@ -153,6 +153,125 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "time": "2020-07-30T16:40:58+00:00" }, + { + "name": "chillerlan/php-qrcode", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-qrcode.git", + "reference": "2cecb32cf618319dd01d9bc1fa64dc6bb683df85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/2cecb32cf618319dd01d9bc1fa64dc6bb683df85", + "reference": "2cecb32cf618319dd01d9bc1fa64dc6bb683df85", + "shasum": "" + }, + "require": { + "chillerlan/php-settings-container": "^2.0", + "ext-mbstring": "*", + "php": "^7.4" + }, + "require-dev": { + "phan/phan": "^2.7", + "phpunit/phpunit": "^9.1", + "setasign/fpdf": "^1.8.2" + }, + "suggest": { + "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", + "setasign/fpdf": "Required to use the QR FPDF output." + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\QRCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazuhiko Arase", + "homepage": "https://github.com/kazuhikoarase" + }, + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + }, + { + "name": "Contributors", + "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" + } + ], + "description": "A QR code generator. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-qrcode", + "keywords": [ + "phpqrcode", + "qr", + "qr code", + "qrcode", + "qrcode-generator" + ], + "funding": [ + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], + "time": "2020-06-04T17:07:12+00:00" + }, + { + "name": "chillerlan/php-settings-container", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/chillerlan/php-settings-container.git", + "reference": "75888345532373074fba482a6642c0f8cda996f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/75888345532373074fba482a6642c0f8cda996f0", + "reference": "75888345532373074fba482a6642c0f8cda996f0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.4" + }, + "require-dev": { + "phan/phan": "^2.6", + "phpunit/phpunit": "^9.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "chillerlan\\Settings\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Smiley", + "email": "smiley@chillerlan.net", + "homepage": "https://github.com/codemasher" + } + ], + "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+", + "homepage": "https://github.com/chillerlan/php-settings-container", + "keywords": [ + "PHP7", + "Settings", + "container", + "helper" + ], + "time": "2020-04-16T16:56:44+00:00" + }, { "name": "colinmollenhour/credis", "version": "v1.11.4", @@ -193,76 +312,6 @@ "homepage": "https://github.com/colinmollenhour/credis", "time": "2020-10-13T23:55:13+00:00" }, - { - "name": "composer/ca-bundle", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "8a7ecad675253e4654ea05505233285377405215" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215", - "reference": "8a7ecad675253e4654ea05505233285377405215", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", - "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2020-08-23T12:54:47+00:00" - }, { "name": "dasprid/enum", "version": "1.0.3", @@ -410,59 +459,6 @@ ], "time": "2020-08-21T02:30:13+00:00" }, - { - "name": "geoip2/geoip2", - "version": "v2.10.0", - "source": { - "type": "git", - "url": "https://github.com/maxmind/GeoIP2-php.git", - "reference": "419557cd21d9fe039721a83490701a58c8ce784a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/419557cd21d9fe039721a83490701a58c8ce784a", - "reference": "419557cd21d9fe039721a83490701a58c8ce784a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "maxmind-db/reader": "~1.5", - "maxmind/web-service-common": "~0.6", - "php": ">=5.6" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "2.*", - "phpunit/phpunit": "5.*", - "squizlabs/php_codesniffer": "3.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "GeoIp2\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Gregory J. Oschwald", - "email": "goschwald@maxmind.com", - "homepage": "https://www.maxmind.com/" - } - ], - "description": "MaxMind GeoIP2 PHP API", - "homepage": "https://github.com/maxmind/GeoIP2-php", - "keywords": [ - "IP", - "geoip", - "geoip2", - "geolocation", - "maxmind" - ], - "time": "2019-12-12T18:48:39+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "7.2.0", @@ -567,12 +563,12 @@ "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "60d379c243457e073cff02bc323a2a86cb355631" + "reference": "ddfeedfff2a52661429437da0702979f708e6ac6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", - "reference": "60d379c243457e073cff02bc323a2a86cb355631", + "url": "https://api.github.com/repos/guzzle/promises/zipball/ddfeedfff2a52661429437da0702979f708e6ac6", + "reference": "ddfeedfff2a52661429437da0702979f708e6ac6", "shasum": "" }, "require": { @@ -610,7 +606,7 @@ "keywords": [ "promise" ], - "time": "2020-09-30T07:37:28+00:00" + "time": "2020-10-19T16:50:15+00:00" }, { "name": "guzzlehttp/psr7", @@ -618,12 +614,12 @@ "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + "reference": "25f7f893f0b52b7b14e244a16679d72b1f0088de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/25f7f893f0b52b7b14e244a16679d72b1f0088de", + "reference": "25f7f893f0b52b7b14e244a16679d72b1f0088de", "shasum": "" }, "require": { @@ -681,7 +677,7 @@ "uri", "url" ], - "time": "2020-09-30T07:37:11+00:00" + "time": "2020-10-22T07:42:05+00:00" }, { "name": "influxdb/influxdb-php", @@ -744,112 +740,6 @@ ], "time": "2020-09-18T13:24:03+00:00" }, - { - "name": "maxmind-db/reader", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", - "reference": "b566d429ac9aec10594b0935be8ff38302f8d5c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/b566d429ac9aec10594b0935be8ff38302f8d5c8", - "reference": "b566d429ac9aec10594b0935be8ff38302f8d5c8", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "conflict": { - "ext-maxminddb": "<1.8.0,>=2.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "2.*", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpcov": ">=6.0.0", - "phpunit/phpunit": ">=8.0.0,<10.0.0", - "squizlabs/php_codesniffer": "3.*" - }, - "suggest": { - "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder", - "ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder", - "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups" - }, - "type": "library", - "autoload": { - "psr-4": { - "MaxMind\\Db\\": "src/MaxMind/Db" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Gregory J. Oschwald", - "email": "goschwald@maxmind.com", - "homepage": "https://www.maxmind.com/" - } - ], - "description": "MaxMind DB Reader API", - "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php", - "keywords": [ - "database", - "geoip", - "geoip2", - "geolocation", - "maxmind" - ], - "time": "2020-10-01T17:30:21+00:00" - }, - { - "name": "maxmind/web-service-common", - "version": "v0.8.0", - "source": { - "type": "git", - "url": "https://github.com/maxmind/web-service-common-php.git", - "reference": "ba67d9532cfaf499bd71774b8170d05df4f75fb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/ba67d9532cfaf499bd71774b8170d05df4f75fb7", - "reference": "ba67d9532cfaf499bd71774b8170d05df4f75fb7", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0.3", - "ext-curl": "*", - "ext-json": "*", - "php": ">=7.2" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "2.*", - "phpunit/phpunit": "^8.0 || ^9.0", - "squizlabs/php_codesniffer": "3.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "MaxMind\\Exception\\": "src/Exception", - "MaxMind\\WebService\\": "src/WebService" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Gregory Oschwald", - "email": "goschwald@maxmind.com" - } - ], - "description": "Internal MaxMind Web Service API", - "homepage": "https://github.com/maxmind/web-service-common-php", - "time": "2020-10-01T15:28:36+00:00" - }, { "name": "mustangostang/spyc", "version": "dev-master", @@ -1290,16 +1180,16 @@ }, { "name": "utopia-php/abuse", - "version": "0.2.1", + "version": "0.2.2", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "b485eddeda335c4f7d1a16fbf5544e37bdf195ac" + "reference": "8e65890a6d7afa9f57992f1eca9fe64508f9822e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/b485eddeda335c4f7d1a16fbf5544e37bdf195ac", - "reference": "b485eddeda335c4f7d1a16fbf5544e37bdf195ac", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/8e65890a6d7afa9f57992f1eca9fe64508f9822e", + "reference": "8e65890a6d7afa9f57992f1eca9fe64508f9822e", "shasum": "" }, "require": { @@ -1307,7 +1197,8 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.4", + "vimeo/psalm": "4.0.1" }, "type": "library", "autoload": { @@ -1333,20 +1224,20 @@ "upf", "utopia" ], - "time": "2020-06-20T11:35:08+00:00" + "time": "2020-10-23T06:51:42+00:00" }, { "name": "utopia-php/audit", - "version": "0.3.1", + "version": "0.3.2", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "7bcceba05ed640fe910e7b6b0c82d998fb9d6495" + "reference": "544ecff78788d11f60992a721f102cafc22ab084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/7bcceba05ed640fe910e7b6b0c82d998fb9d6495", - "reference": "7bcceba05ed640fe910e7b6b0c82d998fb9d6495", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/544ecff78788d11f60992a721f102cafc22ab084", + "reference": "544ecff78788d11f60992a721f102cafc22ab084", "shasum": "" }, "require": { @@ -1354,7 +1245,8 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" }, "type": "library", "autoload": { @@ -1380,28 +1272,29 @@ "upf", "utopia" ], - "time": "2020-06-20T11:36:43+00:00" + "time": "2020-10-23T08:09:44+00:00" }, { "name": "utopia-php/cache", - "version": "0.2.1", + "version": "0.2.3", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d" + "reference": "a44b904127f88fa64673e402e5c0732ff6687d47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d", - "reference": "52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/a44b904127f88fa64673e402e5c0732ff6687d47", + "reference": "a44b904127f88fa64673e402e5c0732ff6687d47", "shasum": "" }, "require": { "ext-json": "*", - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" }, "type": "library", "autoload": { @@ -1427,7 +1320,7 @@ "upf", "utopia" ], - "time": "2020-06-20T11:43:40+00:00" + "time": "2020-10-24T10:11:01+00:00" }, { "name": "utopia-php/cli", @@ -1479,23 +1372,24 @@ }, { "name": "utopia-php/config", - "version": "0.2.1", + "version": "0.2.2", "source": { "type": "git", "url": "https://github.com/utopia-php/config.git", - "reference": "48c5009c33b8426260ee7425100e716d7ed7f693" + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/config/zipball/48c5009c33b8426260ee7425100e716d7ed7f693", - "reference": "48c5009c33b8426260ee7425100e716d7ed7f693", + "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc", + "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" }, "type": "library", "autoload": { @@ -1521,7 +1415,7 @@ "upf", "utopia" ], - "time": "2020-06-20T11:38:58+00:00" + "time": "2020-10-24T09:49:09+00:00" }, { "name": "utopia-php/domains", @@ -1619,23 +1513,24 @@ }, { "name": "utopia-php/locale", - "version": "0.3.2", + "version": "0.3.3", "source": { "type": "git", "url": "https://github.com/utopia-php/locale.git", - "reference": "89c488fbff65fc87c048786c3d76b6003fbaa833" + "reference": "5b5b22aab786d6e66eb3b9d546b7e606deae68e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/locale/zipball/89c488fbff65fc87c048786c3d76b6003fbaa833", - "reference": "89c488fbff65fc87c048786c3d76b6003fbaa833", + "url": "https://api.github.com/repos/utopia-php/locale/zipball/5b5b22aab786d6e66eb3b9d546b7e606deae68e4", + "reference": "5b5b22aab786d6e66eb3b9d546b7e606deae68e4", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" }, "type": "library", "autoload": { @@ -1661,27 +1556,28 @@ "upf", "utopia" ], - "time": "2020-06-29T20:53:16+00:00" + "time": "2020-10-24T08:12:55+00:00" }, { "name": "utopia-php/preloader", - "version": "0.2.0", + "version": "0.2.4", "source": { "type": "git", "url": "https://github.com/utopia-php/preloader.git", - "reference": "e710e7cf38605dd67c6cc599dd1150735765ad2e" + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/preloader/zipball/e710e7cf38605dd67c6cc599dd1150735765ad2e", - "reference": "e710e7cf38605dd67c6cc599dd1150735765ad2e", + "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0", + "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0", "shasum": "" }, "require": { "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" }, "type": "library", "autoload": { @@ -1709,27 +1605,28 @@ "upf", "utopia" ], - "time": "2020-08-14T23:17:55+00:00" + "time": "2020-10-24T07:04:59+00:00" }, { "name": "utopia-php/registry", - "version": "0.2.3", + "version": "0.2.4", "source": { "type": "git", "url": "https://github.com/utopia-php/registry.git", - "reference": "948aa82942a1bde8b97ec74fdc1a83fb24122788" + "reference": "428a94f1a36147e7b7221e778c01e1be08db2893" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/registry/zipball/948aa82942a1bde8b97ec74fdc1a83fb24122788", - "reference": "948aa82942a1bde8b97ec74fdc1a83fb24122788", + "url": "https://api.github.com/repos/utopia-php/registry/zipball/428a94f1a36147e7b7221e778c01e1be08db2893", + "reference": "428a94f1a36147e7b7221e778c01e1be08db2893", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" }, "type": "library", "autoload": { @@ -1756,7 +1653,7 @@ "upf", "utopia" ], - "time": "2020-07-04T22:14:07+00:00" + "time": "2020-10-24T08:51:37+00:00" } ], "packages-dev": [ @@ -1766,7 +1663,7 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "a57b3cd56c4bfe1538276cfc77456cf95d8835cb" + "reference": "ad1ee55f61967546c0889d377b628e244182311e" }, "require": { "ext-curl": "*", @@ -1796,7 +1693,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2020-10-14T12:07:25+00:00" + "time": "2020-10-20T10:23:43+00:00" }, { "name": "doctrine/instantiator", @@ -2401,12 +2298,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "e33667ac376b7f4dbe97ab556f8e7c8daee383d3" + "reference": "709a404472c4aabdf54c64d5ce98c6f3113f6bb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e33667ac376b7f4dbe97ab556f8e7c8daee383d3", - "reference": "e33667ac376b7f4dbe97ab556f8e7c8daee383d3", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/709a404472c4aabdf54c64d5ce98c6f3113f6bb4", + "reference": "709a404472c4aabdf54c64d5ce98c6f3113f6bb4", "shasum": "" }, "require": { @@ -2466,7 +2363,7 @@ "type": "github" } ], - "time": "2020-10-15T05:14:52+00:00" + "time": "2020-10-25T04:48:50+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2474,12 +2371,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "8a1b0bfa74eba894f241e23261febb84c7ffbd8d" + "reference": "9261b419918657b8414f50bad5dd7259ab883144" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/8a1b0bfa74eba894f241e23261febb84c7ffbd8d", - "reference": "8a1b0bfa74eba894f241e23261febb84c7ffbd8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/9261b419918657b8414f50bad5dd7259ab883144", + "reference": "9261b419918657b8414f50bad5dd7259ab883144", "shasum": "" }, "require": { @@ -2522,7 +2419,7 @@ "type": "github" } ], - "time": "2020-10-15T05:05:12+00:00" + "time": "2020-10-25T04:50:35+00:00" }, { "name": "phpunit/php-invoker", @@ -2530,12 +2427,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "dcc4b2e39d6cb5ba5435a0177ebe947c0c0d05ff" + "reference": "4438206001579af6dd8cb5fde02ff6d1a7b56b83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/dcc4b2e39d6cb5ba5435a0177ebe947c0c0d05ff", - "reference": "dcc4b2e39d6cb5ba5435a0177ebe947c0c0d05ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/4438206001579af6dd8cb5fde02ff6d1a7b56b83", + "reference": "4438206001579af6dd8cb5fde02ff6d1a7b56b83", "shasum": "" }, "require": { @@ -2581,7 +2478,7 @@ "type": "github" } ], - "time": "2020-10-15T05:05:21+00:00" + "time": "2020-10-25T04:50:46+00:00" }, { "name": "phpunit/php-text-template", @@ -2589,12 +2486,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0b11f04dcd54d149c3904cda577ea8ef8735e377" + "reference": "da49b59805800de599d36c873d06d968212d4833" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0b11f04dcd54d149c3904cda577ea8ef8735e377", - "reference": "0b11f04dcd54d149c3904cda577ea8ef8735e377", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/da49b59805800de599d36c873d06d968212d4833", + "reference": "da49b59805800de599d36c873d06d968212d4833", "shasum": "" }, "require": { @@ -2636,7 +2533,7 @@ "type": "github" } ], - "time": "2020-10-15T05:06:00+00:00" + "time": "2020-10-25T04:51:25+00:00" }, { "name": "phpunit/php-timer", @@ -2644,12 +2541,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "7fe57355ba7462b1cd940d93aa003660b4e6db20" + "reference": "ef5018a5d81904ae1a8b5d998f1d16138b86aa42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/7fe57355ba7462b1cd940d93aa003660b4e6db20", - "reference": "7fe57355ba7462b1cd940d93aa003660b4e6db20", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/ef5018a5d81904ae1a8b5d998f1d16138b86aa42", + "reference": "ef5018a5d81904ae1a8b5d998f1d16138b86aa42", "shasum": "" }, "require": { @@ -2691,7 +2588,7 @@ "type": "github" } ], - "time": "2020-10-15T05:05:31+00:00" + "time": "2020-10-25T04:50:56+00:00" }, { "name": "phpunit/phpunit", @@ -2699,12 +2596,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "338bf27b4510498c4b0ab70c7cbc292a591dc0df" + "reference": "bf6442de9f2867600e30acc538803a5911237f72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/338bf27b4510498c4b0ab70c7cbc292a591dc0df", - "reference": "338bf27b4510498c4b0ab70c7cbc292a591dc0df", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bf6442de9f2867600e30acc538803a5911237f72", + "reference": "bf6442de9f2867600e30acc538803a5911237f72", "shasum": "" }, "require": { @@ -2790,7 +2687,7 @@ "type": "github" } ], - "time": "2020-10-19T09:25:00+00:00" + "time": "2020-10-25T04:47:12+00:00" }, { "name": "sebastian/cli-parser", @@ -2798,12 +2695,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "bb13fcea306b784ef38fc1cda21c1395c233f4bc" + "reference": "20af41a47fef3a828e400b9fa65a9e70014821fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/bb13fcea306b784ef38fc1cda21c1395c233f4bc", - "reference": "bb13fcea306b784ef38fc1cda21c1395c233f4bc", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/20af41a47fef3a828e400b9fa65a9e70014821fa", + "reference": "20af41a47fef3a828e400b9fa65a9e70014821fa", "shasum": "" }, "require": { @@ -2842,7 +2739,7 @@ "type": "github" } ], - "time": "2020-10-15T05:19:54+00:00" + "time": "2020-10-25T04:59:31+00:00" }, { "name": "sebastian/code-unit", @@ -2850,12 +2747,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "46a6ff3fabc0449fa17ca3ec485c44ab792f65c1" + "reference": "f18e2644f5c453eb800569ad19d829c50a5c231a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/46a6ff3fabc0449fa17ca3ec485c44ab792f65c1", - "reference": "46a6ff3fabc0449fa17ca3ec485c44ab792f65c1", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/f18e2644f5c453eb800569ad19d829c50a5c231a", + "reference": "f18e2644f5c453eb800569ad19d829c50a5c231a", "shasum": "" }, "require": { @@ -2894,7 +2791,7 @@ "type": "github" } ], - "time": "2020-10-15T05:03:44+00:00" + "time": "2020-10-25T04:49:06+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2902,12 +2799,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "a801a24d7681090e8334c631b99181df063ea457" + "reference": "c46c6a70d436c927b8a7c4a22b93219e0a57f116" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/a801a24d7681090e8334c631b99181df063ea457", - "reference": "a801a24d7681090e8334c631b99181df063ea457", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c46c6a70d436c927b8a7c4a22b93219e0a57f116", + "reference": "c46c6a70d436c927b8a7c4a22b93219e0a57f116", "shasum": "" }, "require": { @@ -2945,7 +2842,7 @@ "type": "github" } ], - "time": "2020-10-15T05:03:53+00:00" + "time": "2020-10-25T04:49:16+00:00" }, { "name": "sebastian/comparator", @@ -2953,12 +2850,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "d43148f588efca5b5dd0c3d98da467f5aafdac6b" + "reference": "1374f447d5707d2d1e690c6400c3034973007b1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d43148f588efca5b5dd0c3d98da467f5aafdac6b", - "reference": "d43148f588efca5b5dd0c3d98da467f5aafdac6b", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1374f447d5707d2d1e690c6400c3034973007b1d", + "reference": "1374f447d5707d2d1e690c6400c3034973007b1d", "shasum": "" }, "require": { @@ -3015,7 +2912,7 @@ "type": "github" } ], - "time": "2020-10-15T05:04:03+00:00" + "time": "2020-10-25T04:49:26+00:00" }, { "name": "sebastian/complexity", @@ -3023,12 +2920,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "6d4cf3e8224f1e8527ab434b4ba902978af523db" + "reference": "6536228719815a632cf51b28d0871fc2aa3b79c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/6d4cf3e8224f1e8527ab434b4ba902978af523db", - "reference": "6d4cf3e8224f1e8527ab434b4ba902978af523db", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/6536228719815a632cf51b28d0871fc2aa3b79c5", + "reference": "6536228719815a632cf51b28d0871fc2aa3b79c5", "shasum": "" }, "require": { @@ -3068,7 +2965,7 @@ "type": "github" } ], - "time": "2020-10-15T05:06:11+00:00" + "time": "2020-10-25T04:51:35+00:00" }, { "name": "sebastian/diff", @@ -3076,12 +2973,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "c25d82b5b776a3ba4e3b232a8688e969477444e0" + "reference": "531bfd6f8d3deb09cf51f7a3f628ea6e1e8c8c03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c25d82b5b776a3ba4e3b232a8688e969477444e0", - "reference": "c25d82b5b776a3ba4e3b232a8688e969477444e0", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/531bfd6f8d3deb09cf51f7a3f628ea6e1e8c8c03", + "reference": "531bfd6f8d3deb09cf51f7a3f628ea6e1e8c8c03", "shasum": "" }, "require": { @@ -3130,7 +3027,7 @@ "type": "github" } ], - "time": "2020-10-15T05:04:12+00:00" + "time": "2020-10-25T04:49:36+00:00" }, { "name": "sebastian/environment", @@ -3138,12 +3035,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "40fcf803a36737ce1d2c46c489fb5d1ec2db45d4" + "reference": "6e46ab7acfa9793f848ea444355ad8407508b604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/40fcf803a36737ce1d2c46c489fb5d1ec2db45d4", - "reference": "40fcf803a36737ce1d2c46c489fb5d1ec2db45d4", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e46ab7acfa9793f848ea444355ad8407508b604", + "reference": "6e46ab7acfa9793f848ea444355ad8407508b604", "shasum": "" }, "require": { @@ -3189,7 +3086,7 @@ "type": "github" } ], - "time": "2020-10-15T05:04:22+00:00" + "time": "2020-10-25T04:49:45+00:00" }, { "name": "sebastian/exporter", @@ -3197,12 +3094,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "dbdc89af25883b35be6ddd4b88a8bc5d22bb819d" + "reference": "fcfea176bfa64c9b76e9e326754fddcff97c0b91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/dbdc89af25883b35be6ddd4b88a8bc5d22bb819d", - "reference": "dbdc89af25883b35be6ddd4b88a8bc5d22bb819d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/fcfea176bfa64c9b76e9e326754fddcff97c0b91", + "reference": "fcfea176bfa64c9b76e9e326754fddcff97c0b91", "shasum": "" }, "require": { @@ -3262,7 +3159,7 @@ "type": "github" } ], - "time": "2020-10-15T05:04:32+00:00" + "time": "2020-10-25T04:49:55+00:00" }, { "name": "sebastian/global-state", @@ -3270,12 +3167,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "3a606041b47fb201c1d62ae03078d0e8a62569a6" + "reference": "baec50db0ae2a69ecc95381249d04410da1f408d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3a606041b47fb201c1d62ae03078d0e8a62569a6", - "reference": "3a606041b47fb201c1d62ae03078d0e8a62569a6", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/baec50db0ae2a69ecc95381249d04410da1f408d", + "reference": "baec50db0ae2a69ecc95381249d04410da1f408d", "shasum": "" }, "require": { @@ -3322,7 +3219,7 @@ "type": "github" } ], - "time": "2020-10-15T05:04:42+00:00" + "time": "2020-10-25T04:50:06+00:00" }, { "name": "sebastian/lines-of-code", @@ -3330,12 +3227,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "5835b6f4707e022ae53a2a67420a3388b318715a" + "reference": "a1c2dd0ac77460dde453c7d50a51feca4d7eec97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/5835b6f4707e022ae53a2a67420a3388b318715a", - "reference": "5835b6f4707e022ae53a2a67420a3388b318715a", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/a1c2dd0ac77460dde453c7d50a51feca4d7eec97", + "reference": "a1c2dd0ac77460dde453c7d50a51feca4d7eec97", "shasum": "" }, "require": { @@ -3375,7 +3272,7 @@ "type": "github" } ], - "time": "2020-10-15T05:06:21+00:00" + "time": "2020-10-25T04:51:46+00:00" }, { "name": "sebastian/object-enumerator", @@ -3383,12 +3280,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "192362c78b33b0231e1e8841678be93ce6f31830" + "reference": "fb188a20279fcdb1e31646765f477f6909d2425d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/192362c78b33b0231e1e8841678be93ce6f31830", - "reference": "192362c78b33b0231e1e8841678be93ce6f31830", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/fb188a20279fcdb1e31646765f477f6909d2425d", + "reference": "fb188a20279fcdb1e31646765f477f6909d2425d", "shasum": "" }, "require": { @@ -3428,7 +3325,7 @@ "type": "github" } ], - "time": "2020-10-15T05:04:51+00:00" + "time": "2020-10-25T04:50:16+00:00" }, { "name": "sebastian/object-reflector", @@ -3436,12 +3333,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "da3d1ade6fef132f2486d297c35cf61e45930a0b" + "reference": "243921e7a4a5d7123446151debe9d2c5dbe51001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/da3d1ade6fef132f2486d297c35cf61e45930a0b", - "reference": "da3d1ade6fef132f2486d297c35cf61e45930a0b", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/243921e7a4a5d7123446151debe9d2c5dbe51001", + "reference": "243921e7a4a5d7123446151debe9d2c5dbe51001", "shasum": "" }, "require": { @@ -3479,7 +3376,7 @@ "type": "github" } ], - "time": "2020-10-15T05:05:01+00:00" + "time": "2020-10-25T04:50:26+00:00" }, { "name": "sebastian/recursion-context", @@ -3487,12 +3384,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "3767a68ada0fc1d50b22db067cd2256b1b722faa" + "reference": "8853f5bc9d57f00f3eeec81d21844766d1ab3d64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3767a68ada0fc1d50b22db067cd2256b1b722faa", - "reference": "3767a68ada0fc1d50b22db067cd2256b1b722faa", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/8853f5bc9d57f00f3eeec81d21844766d1ab3d64", + "reference": "8853f5bc9d57f00f3eeec81d21844766d1ab3d64", "shasum": "" }, "require": { @@ -3538,7 +3435,7 @@ "type": "github" } ], - "time": "2020-10-15T05:05:41+00:00" + "time": "2020-10-25T04:51:06+00:00" }, { "name": "sebastian/resource-operations", @@ -3597,12 +3494,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "5eb6a85e349cab8a411886cb52c070393d71bc7e" + "reference": "1680f27f4bb5977f9be4fb25c21bd89e2cf91792" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/5eb6a85e349cab8a411886cb52c070393d71bc7e", - "reference": "5eb6a85e349cab8a411886cb52c070393d71bc7e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/1680f27f4bb5977f9be4fb25c21bd89e2cf91792", + "reference": "1680f27f4bb5977f9be4fb25c21bd89e2cf91792", "shasum": "" }, "require": { @@ -3641,7 +3538,7 @@ "type": "github" } ], - "time": "2020-10-15T05:05:50+00:00" + "time": "2020-10-25T04:51:16+00:00" }, { "name": "sebastian/version", @@ -3728,20 +3625,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "dev-master", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -3749,7 +3646,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3800,24 +3697,24 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "dev-master", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "48928d471ede0548b399f54b0286fe0d0ed79267" + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/48928d471ede0548b399f54b0286fe0d0ed79267", - "reference": "48928d471ede0548b399f54b0286fe0d0ed79267", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -3825,7 +3722,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.20-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3877,7 +3774,7 @@ "type": "tidelift" } ], - "time": "2020-09-14T11:01:58+00:00" + "time": "2020-10-23T14:02:19+00:00" }, { "name": "theseer/tokenizer", @@ -3931,16 +3828,16 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "fa2f1ccdb44a973571235c4a78487c040f26f116" + "reference": "78173b3c850e344cb8515fc2a05138d39a6c39e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/fa2f1ccdb44a973571235c4a78487c040f26f116", - "reference": "fa2f1ccdb44a973571235c4a78487c040f26f116", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/78173b3c850e344cb8515fc2a05138d39a6c39e0", + "reference": "78173b3c850e344cb8515fc2a05138d39a6c39e0", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3" }, @@ -3998,7 +3895,7 @@ "type": "tidelift" } ], - "time": "2020-10-14T06:37:57+00:00" + "time": "2020-10-21T12:45:52+00:00" }, { "name": "webmozart/assert", @@ -4064,6 +3961,7 @@ "ext-yaml": "*", "ext-dom": "*", "ext-redis": "*", + "ext-swoole": "*", "ext-pdo": "*", "ext-openssl": "*", "ext-zlib": "*", diff --git a/docker-compose.nginx.yml b/docker-compose.nginx.yml index ba79f4e4d..5cca223fb 100644 --- a/docker-compose.nginx.yml +++ b/docker-compose.nginx.yml @@ -133,7 +133,7 @@ services: - appwrite-redis:/data:rw clamav: - image: appwrite/clamav:1.0.12 + image: appwrite/clamav:1.2.0 container_name: appwrite-clamav restart: unless-stopped networks: diff --git a/docker-compose.yml b/docker-compose.yml index 19388e463..e595a6c37 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -266,6 +266,9 @@ services: - _APP_REDIS_PORT - _APP_SMTP_HOST - _APP_SMTP_PORT + - _APP_SMTP_SECURE + - _APP_SMTP_USERNAME + - _APP_SMTP_PASSWORD appwrite-schedule: entrypoint: schedule @@ -293,10 +296,10 @@ services: ports: - "3306:3306" environment: - - MYSQL_ROOT_PASSWORD=rootsecretpassword - - MYSQL_DATABASE=appwrite - - MYSQL_USER=user - - MYSQL_PASSWORD=password + - MYSQL_ROOT_PASSWORD=password + - MYSQL_DATABASE=${_APP_DB_SCHEMA} + - MYSQL_USER=${_APP_DB_USER} + - MYSQL_PASSWORD=${_APP_DB_PASS} command: 'mysqld --innodb-flush-method=fsync' # command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu @@ -331,7 +334,7 @@ services: - appwrite-redis:/data:rw clamav: - image: appwrite/clamav:1.0.12 + image: appwrite/clamav:1.2.0 container_name: appwrite-clamav restart: unless-stopped networks: diff --git a/docs/tutorials/environment-variables.md b/docs/tutorials/environment-variables.md index d4799380e..7de4c95e4 100644 --- a/docs/tutorials/environment-variables.md +++ b/docs/tutorials/environment-variables.md @@ -26,7 +26,7 @@ Maximum file size allowed for file upload. The default value is 100MB limitation ### _APP_STORAGE_ANTIVIRUS -This variable allows you to disable the internal anti-virus scans. By default, this value is set to 'enabled' to cancel the scans, set the value to 'disabled'. When disabled, it's recommended to turn off the ClamAV container for better resource usage. +This variable allows you to disable the internal anti-virus scans. This value is set to 'enabled' by default, to cancel the scans set the value to 'disabled'. When disabled, it's recommended to turn off the ClamAV container for better resource usage. ### _APP_CONSOLE_WHITELIST_EMAILS diff --git a/src/Appwrite/Extend/PDO.php b/src/Appwrite/Extend/PDO.php index fce9165b4..384fc71be 100644 --- a/src/Appwrite/Extend/PDO.php +++ b/src/Appwrite/Extend/PDO.php @@ -62,6 +62,8 @@ class PDO extends PDONative public function reconnect() { $this->pdo = new PDONative($this->dsn, $this->username, $this->passwd, $this->options); + + echo '[PDO] MySQL connection restarted'.PHP_EOL; // Connection settings $this->pdo->setAttribute(PDONative::ATTR_DEFAULT_FETCH_MODE, PDONative::FETCH_ASSOC); // Return arrays diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml index 4a3192947..8309ce62d 100644 --- a/tests/resources/docker/docker-compose.yml +++ b/tests/resources/docker/docker-compose.yml @@ -320,7 +320,7 @@ services: - appwrite-redis:/data:rw clamav: - image: appwrite/clamav:1.0.12 + image: appwrite/clamav:1.2.0 container_name: appwrite-clamav restart: unless-stopped networks: diff --git a/tests/unit/General/ExtensionsTest.php b/tests/unit/General/ExtensionsTest.php new file mode 100644 index 000000000..2a7c9d58e --- /dev/null +++ b/tests/unit/General/ExtensionsTest.php @@ -0,0 +1,117 @@ +assertEquals(true, extension_loaded('redis')); + } + + public function testSwoole() + { + $this->assertEquals(true, extension_loaded('swoole')); + } + + public function testYAML() + { + $this->assertEquals(true, extension_loaded('yaml')); + } + + public function testOPCache() + { + $this->assertEquals(true, extension_loaded('Zend OPcache')); + } + + public function testDOM() + { + $this->assertEquals(true, extension_loaded('dom')); + } + + public function testPDO() + { + $this->assertEquals(true, extension_loaded('PDO')); + } + + public function testImagick() + { + $this->assertEquals(true, extension_loaded('imagick')); + } + + public function testJSON() + { + $this->assertEquals(true, extension_loaded('json')); + } + + public function testCURL() + { + $this->assertEquals(true, extension_loaded('curl')); + } + + public function testMBString() + { + $this->assertEquals(true, extension_loaded('mbstring')); + } + + public function testOPENSSL() + { + $this->assertEquals(true, extension_loaded('openssl')); + } + + public function testZLIB() + { + $this->assertEquals(true, extension_loaded('zlib')); + } + + public function testSockets() + { + $this->assertEquals(true, extension_loaded('sockets')); + } + + public function testMaxminddb() + { + $this->assertEquals(true, extension_loaded('maxminddb')); + } +}