1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Merge branch '0.7.x' of github.com:appwrite/appwrite into swoole-and-functions

This commit is contained in:
Eldad Fux 2020-10-03 20:08:19 +03:00
commit 45faedde84
46 changed files with 1080 additions and 930 deletions

View file

@ -12,7 +12,7 @@
- Added option to delete user from the console (@PineappleIOnic - #538)
- Added support for Brotli compression (@PedroCisnerosSantana, @Rohitub222)
- New UI micro-interactions and CSS fixes (@AnatoleLucet)
- UI performance & accessibility improvments (#406)
- UI performance & accessibility improvements (#406)
- New Doctor CLI to debug the Appwrite server ([#415](https://github.com/appwrite/appwrite/issues/415))
- All emails are now sent asynchronously for improved performance (@TorstenDittmann)
- Updated grid for OAuth2 providers list in the console
@ -61,10 +61,10 @@
- Fixed a UI bug preventing float values in numeric fields
- Fixed scroll positioning when moving rules order up & down
- Fixed missing validation for database documents key length (32 chars)
- Grammer fix for pt-br email templates (@rubensdemelo)
- Grammar fix for pt-br email templates (@rubensdemelo)
- Fixed update form labels and tooltips for Flutter Android apps
- Fixed missing custom scopes param for OAuth2 session create API route
- Fixed wrong JSON validation when creating and updating database documnets
- Fixed wrong JSON validation when creating and updating database documents
- Fixed bug where max file size was limited to max of 10MB
- Fixed bug preventing the deletion of the project logo
- Fixed Bug when trying to overwrite OAuth cookie in the Flutter SDK
@ -74,6 +74,10 @@
- New OAuth adapter for PayPal sandbox
- Fixed a bug making read permission overwrite write permission in some cases
## Breaking Changes
- **Deprecated** `first` and `last` query params for documents list route in the database API
- **Deprecated** Deprecated Punjabi Translations ('pn')
## Security
- Access to Health API now requires authentication with an API Key with access to `health.read` scope allowed
@ -173,7 +177,7 @@
- Allow non-web platform to skip origin header
- Limited console dashboard to show max 5 alerts at the same time
- Added more webhooks events
- Normailized all webhooks event names
- Normalized all webhooks event names
- Added support for SameSite cookie option with fallback cookie for old clients
- Added a new Discord OAuth adapter
- Added a new Twitch OAuth adapter

View file

@ -29,7 +29,7 @@ When `TYPE` can be:
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature
**All PRs must include commit message with the changes description!**
**All PRs must include a commit message with the changes description!**
For the initial start, fork the project and use git clone command to download the repository to your computer. A standard procedure for working on an issue would be to:
@ -48,13 +48,13 @@ $ git checkout -b [name_of_your_new_branch]
$ git push origin [name_of_your_new_branch]
```
6. Submit your changes for review
5. Submit your changes for review
If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
7. Start a Pull Request
Now submit the pull request and , click on `Create pull request`.
6. Get a code review approval / reject
7. After approval, merge your PR
8. GitHub will automatically delete the branch, after the merge is done. (they can still be restored).
6. Start a Pull Request
Now submit the pull request and click on `Create pull request`.
7. Get a code review approval/reject
8. After approval, merge your PR
9. GitHub will automatically delete the branch after the merge is done. (they can still be restored).
## Setup From Source
@ -177,9 +177,9 @@ Appwrite uses [PHP's Composer](https://getcomposer.org/) for managing dependenci
Appwrite is following the [PHP-FIG standards](https://www.php-fig.org/). Currently, we are using both PSR-0 and PSR-4 for coding standards and autoloading standards. Soon we will also review the project for support with PSR-12 (Extended Coding Style).
We use prettier for our JS coding standards and for auto-formatting our code.
We use prettier for our JS coding standards and auto-formatting our code.
## Scalability, Speed and Performance
## Scalability, Speed, and Performance
Appwrite is built to scale. Please keep in mind that the Appwrite stack can run in different environments and different scales.
@ -214,7 +214,7 @@ For us to find the right balance, please open an issue explaining your ideas bef
This will allow the Appwrite community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.
This is also important for the Appwrite lead developers to be able to give technical input and different emphasize regarding the feature design and architecture.
This is also important for the Appwrite lead developers to be able to give technical input and different emphasis regarding the feature design and architecture.
## Build
@ -263,9 +263,9 @@ docker run --rm skandyla/wrk -t3 -c100 -d30 https://[APPWRITE_HOSTNAME_OR_IP]
## Code Maintenance
We use some automation tools to help us keep a healthy code base.
We use some automation tools to help us keep a healthy codebase.
Improve PHP exeution time by using [fully-qualified function calls](https://veewee.github.io/blog/optimizing-php-performance-by-fq-function-calls/):
Improve PHP execution time by using [fully-qualified function calls](https://veewee.github.io/blog/optimizing-php-performance-by-fq-function-calls/):
```bash
php-cs-fixer fix src/ --rules=native_function_invocation --allow-risky=yes
@ -296,7 +296,7 @@ Pull requests are great, but there are many other areas where you can help Appwr
### Blogging & Speaking
Blogging, speaking about, or creating tutorials about one of Appwrites many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or email team [at] appwrite [dot] io so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite]() repo on GitHub.
Blogging, speaking about, or creating tutorials about one of Appwrites many features. Mention [@appwrite_io](https://twitter.com/appwrite_io) on Twitter and/or email team [at] appwrite [dot] io so we can give pointers and tips and help you spread the word by promoting your content on the different Appwrite communication channels. Please add your blog posts and videos of talks to our [Awesome Appwrite](https://github.com/appwrite/awesome-appwrite) repo on GitHub.
### Presenting at Meetups
@ -316,5 +316,5 @@ Submitting documentation updates, enhancements, designs, or bug fixes. Spelling
### Helping Someone
Searching for Appwrite on Discord, GitHub or StackOverflow and helping someone else who needs help. You can also help by reaching others how to contribute to Appwrite's repo!
Searching for Appwrite on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by reaching others how to contribute to Appwrite's repo!

View file

@ -14,11 +14,11 @@
[![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io)
[![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite)
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstract the complexity and repetitiveness required to build a modern backend API from scratch to allow you to build secure apps faster.
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.
Using Appwrite, you can easily integrate your app with user authentication & multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, schedule CRON tasks, and [more services](https://appwrite.io/docs).
[https://appwrite.io](https://appwrite.io)
Find out more at: [https://appwrite.io](https://appwrite.io)
![Appwrite](public/images/github.png)
@ -41,7 +41,7 @@ Table of Contents:
## Installation
Appwrite backend server is designed to run in a container environment. Running your server is as easy as running one command from your terminal. You can either run Appwrite on your localhost using docker-compose or on any other container orchestration tool like Kubernetes, Docker Swarm or Rancher.
Appwrite backend server is designed to run in a container environment. Running your server is as easy as running one command from your terminal. You can either run Appwrite on your localhost using docker-compose or on any other container orchestration tool like Kubernetes, Docker Swarm, or Rancher.
The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command make sure you have [Docker](https://www.docker.com/products/docker-desktop) installed on your machine:
@ -84,13 +84,13 @@ For advanced production and custom installation, check out our Docker [environme
## Getting Started
Getting started with Appwrite is as easy as creating a new project, choosing your platform and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.
Getting started with Appwrite is as easy as creating a new project, choosing your platform, and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.
* [Getting Started for Web](https://appwrite.io/docs/getting-started-for-web)
* [Getting Started for Flutter](https://appwrite.io/docs/getting-started-for-flutter)
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
* Getting Started for Android (soon...)
* Getting Started for iOS (soon...)
* Getting Started for Android (Coming soon...)
* Getting Started for iOS (Coming soon...)
### Services

View file

@ -15,4 +15,6 @@ return [
'targeta-shopping' => __DIR__.'/credit-cards/tarjeta-shopping.png',
'union-china-pay' => __DIR__.'/credit-cards/union-china-pay.png',
'visa' => __DIR__.'/credit-cards/visa.png',
'mir' => __DIR__.'/credit-cards/mir.png',
'maestro' => __DIR__.'/credit-cards/maestro.png',
];

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 KiB

View file

@ -17,7 +17,7 @@ return [
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Banglades',
'BG' => 'Bulgaria',
'BG' => 'Bulgária',
'BH' => 'Bahrein',
'BS' => 'Bahamák',
'BA' => 'Bosznia-Hercegovina',
@ -50,7 +50,7 @@ return [
'DM' => 'Dominika',
'DK' => 'Dánia',
'DO' => 'Dominikai Köztársaság',
'DZ' => 'Algíria',
'DZ' => 'Algéria',
'EC' => 'Ecuador',
'EG' => 'Egyiptom',
'ER' => 'Eritrea',
@ -67,7 +67,7 @@ return [
'GH' => 'Ghána',
'GN' => 'Guinea',
'GM' => 'Gambia',
'GW' => 'Guinea-Bissau',
'GW' => 'Bissau-Guinea',
'GQ' => 'Egyenlítői-Guinea',
'GR' => 'Görögország',
'GD' => 'Grenada',
@ -88,24 +88,24 @@ return [
'JM' => 'Jamaika',
'JO' => 'Jordánia',
'JP' => 'Japán',
'KZ' => 'Kazakhsztán',
'KZ' => 'Kazahsztán',
'KE' => 'Kenya',
'KG' => 'Kirgizisztán',
'KH' => 'Kambodzsa',
'KI' => 'Kiribati',
'KN' => 'Saint Kitts és Nevis',
'KR' => 'Dél Korea',
'KW' => 'Kuwait',
'KR' => 'Dél-Korea',
'KW' => 'Kuvait',
'LA' => 'Laosz',
'LB' => 'Libanon',
'LR' => 'Libéria',
'LY' => 'Líbia',
'LC' => 'Saint Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LK' => 'Srí Lanka',
'LS' => 'Lesotho',
'LT' => 'Litvánia',
'LU' => 'Luxembourg',
'LU' => 'Luxemburg',
'LV' => 'Lettország',
'MA' => 'Marokkó',
'MC' => 'Monaco',
@ -127,8 +127,8 @@ return [
'MY' => 'Malajzia',
'NA' => 'Namíbia',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NI' => 'Nikaragua',
'NG' => 'Nigéria',
'NI' => 'Nicaragua',
'NL' => 'Hollandia',
'NO' => 'Norvégia',
'NP' => 'Nepál',
@ -145,10 +145,10 @@ return [
'KP' => 'Észak-Korea',
'PT' => 'Portugália',
'PY' => 'Paraguay',
'QA' => 'Qatar',
'QA' => 'Katar',
'RO' => 'Románia',
'RU' => 'Oroszország',
'RW' => 'Rwanda',
'RW' => 'Ruanda',
'SA' => 'Szaúd-Arábia',
'SD' => 'Szudán',
'SN' => 'Szenegál',
@ -161,16 +161,16 @@ return [
'RS' => 'Szerbia',
'SS' => 'Dél-Szudán',
'ST' => 'São Tomé és Príncipe',
'SR' => 'Szurinám',
'SR' => 'Suriname',
'SK' => 'Szlovákia',
'SI' => 'Szlovénia',
'SE' => 'Svédország',
'SZ' => 'Swaziland',
'SZ' => 'Szváziföld',
'SC' => 'Seychelles-szigetek',
'SY' => 'Szíria',
'TD' => 'Csád',
'TG' => 'Togo',
'TH' => 'Tájföld',
'TH' => 'Thaiföld',
'TJ' => 'Tádzsikisztán',
'TM' => 'Türkmenisztán',
'TL' => 'Timor-Leste',
@ -179,9 +179,9 @@ return [
'TN' => 'Tunézia',
'TR' => 'Törökország',
'TV' => 'Tuvalu',
'TZ' => 'Tanzania',
'TZ' => 'Tanzánia',
'UG' => 'Uganda',
'UA' => 'Ukraina',
'UA' => 'Ukrajna',
'UY' => 'Uruguay',
'US' => 'Egyesült Államok',
'UZ' => 'Üzbegisztán',
@ -191,7 +191,7 @@ return [
'VN' => 'Vietnám',
'VU' => 'Vanuatu',
'WS' => 'Szamoa',
'YE' => 'Yemen',
'YE' => 'Jemen',
'ZA' => 'Dél-Afrikai Köztársaság',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',

View file

@ -7,11 +7,11 @@ return [
// Service - Users
'account.emails.team' => '%s Csapat',
'account.emails.verification.title' => 'Fiók megerősítés',
'account.emails.verification.title' => 'Fiók megerősítése',
'account.emails.verification.body' => 'hu.email.auth.confirm.tpl',
'account.emails.recovery.title' => 'Jelszó Visszaállítás',
'account.emails.recovery.title' => 'Jelszó-visszaállítás',
'account.emails.recovery.body' => 'hu.email.auth.recovery.tpl',
'account.emails.invitation.title' => 'Meghívás a %s Csapathoz %s',
'account.emails.invitation.title' => 'Meghívás a %s csapatba %s',
'account.emails.invitation.body' => 'hu.email.auth.invitation.tpl',
'locale.country.unknown' => 'Ismeretlen',

View file

@ -1,15 +1,15 @@
<p>
Szia {{name}},
Kedves {{name}}!
</p>
<p>
Kattints erre a linkre, hogy megerősítsd az e-mail címed.
Kérjük, e-mail címe megerősítéséhez kattintson az alábbi hivatkozásra:
</p>
{{cta}}
<p>
Ha nem kérelmezted, hogy megerősítsük ezt a címet, ignoráld ezt a levelet.
Ha nem kérte az e-mail cím megerősítését, kérjük, tekintse ezt az üzenetet tárgytalannak.
</p>
<p>
Köszönettel,
Köszönettel:
<br />
{{project}} csapat
</p>

View file

@ -1,18 +1,15 @@
<p>
Szia,
Üdvözöljük!
</p>
<p>
Azért küldtük ezt az e-mailt <b>{{owner}}</b> mert meg szeretnénk hívni a <b>{{team}}</b> csapatba a következő projektre {{project}}.
</p>
<p>
Kattints erre a linkre, hogy a <b>{{team}}</b> csapat tagja legyél:
Azért küldtük ezt az e-mailt, mert <b>{{owner}}</b> szeretné meghívni Önt a <b>{{team}}</b> csapatba a {{project}} projektben.
</p>
{{cta}}
<p>
Ha nem vegy ebben érdekelt ignoráld ezt az üzenetet.
Ha nem szeretne csatlakozni, kérjük, tekintse ezt az üzenetet tárgytalannak.
</p>
<p>
Köszönettel,
Köszönettel:
<br />
{{project}} csapat
</p>

View file

@ -1,15 +1,15 @@
<p>
Szia {{name}},
Kedves {{name}}!
</p>
<p>
Kattints erre a linkre, hogy visszaállítsuk a {{project}} jelszavad.
{{project}} jelszava visszaállításához kérjük, kattintson az alábbi linkre:
</p>
{{cta}}
<p>
Ha nem kérvényezted, hogy visszaállítsuk a jelszavad ignoráld ezt a levelet.
Ha nem kérte jelszava visszaállítását, kérjük, tekintse ezt az üzenetet tárgytalannak.
</p>
<p>
Köszönettel,
Köszönettel:
<br />
{{project}} csapat
</p>

View file

@ -3,7 +3,7 @@
/**
* Init
*
* Inializes both Appwrite API entry point, queue workers, and CLI tasks.
* Initializes both Appwrite API entry point, queue workers, and CLI tasks.
* Set configuration, framework resources, app constants
*
*/

View file

@ -28,9 +28,9 @@
<label>Password</label>
<input name="password" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="Six or more characters">
<label>Password Again</label>
<label>Confirm Password</label>
<input name="passwordAgain" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="Six or more characters">
<button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> Apply</button>
</form>
</div>
</div>

View file

@ -14,7 +14,7 @@ class AuditsV1
{
public $args = [];
public function setUp()
public function setUp(): void
{
}
@ -39,7 +39,7 @@ class AuditsV1
$audit->log($userId, $event, $resource, $userAgent, $ip, '', $data);
}
public function tearDown()
public function tearDown(): void
{
// ... Remove environment for this job
}

View file

@ -20,7 +20,7 @@ class CertificatesV1
{
public $args = [];
public function setUp()
public function setUp(): void
{
}
@ -199,7 +199,7 @@ class CertificatesV1
Authorization::reset();
}
public function tearDown()
public function tearDown(): void
{
// ... Remove environment for this job
}

View file

@ -21,7 +21,7 @@ class DeletesV1
protected $consoleDB = null;
public function setUp()
public function setUp(): void
{
}
@ -49,7 +49,7 @@ class DeletesV1
}
}
public function tearDown()
public function tearDown(): void
{
// ... Remove environment for this job
}

View file

@ -101,7 +101,7 @@ class FunctionsV1
public $allowed = [];
public function setUp()
public function setUp(): void
{
}
@ -486,7 +486,7 @@ class FunctionsV1
return $output;
}
public function tearDown()
public function tearDown(): void
{
}
}

View file

@ -15,7 +15,7 @@ class MailsV1
*/
public $args = [];
public function setUp()
public function setUp(): void
{
}
@ -63,7 +63,7 @@ class MailsV1
}
}
public function tearDown()
public function tearDown(): void
{
// ... Remove environment for this job
}

View file

@ -22,7 +22,7 @@ class TasksV1
*/
public $args = [];
public function setUp()
public function setUp(): void
{
}
@ -205,7 +205,7 @@ class TasksV1
return true;
}
public function tearDown()
public function tearDown(): void
{
// ... Remove environment for this job
}

View file

@ -16,7 +16,7 @@ class UsageV1
*/
public $args = [];
public function setUp()
public function setUp(): void
{
}
@ -65,7 +65,7 @@ class UsageV1
}
}
public function tearDown()
public function tearDown(): void
{
// ... Remove environment for this job
}

View file

@ -18,7 +18,7 @@ class WebhooksV1
{
public $args = [];
public function setUp()
public function setUp(): void
{
}
@ -106,7 +106,7 @@ class WebhooksV1
}
}
public function tearDown()
public function tearDown(): void
{
// ... Remove environment for this job
}

View file

@ -51,13 +51,13 @@
"dragonmantank/cron-expression": "2.2.0",
"domnikl/statsd": "2.0.*",
"influxdb/influxdb-php": "1.15.*",
"bacon/bacon-qr-code": "2.0.0",
"phpmailer/phpmailer": "6.1.6"
"bacon/bacon-qr-code": "2.0.2",
"phpmailer/phpmailer": "6.1.7"
},
"require-dev": {
"swoole/ide-helper": "4.5.2",
"swoole/ide-helper": "4.5.4",
"appwrite/sdk-generator": "master",
"phpunit/phpunit": "^7.0"
"phpunit/phpunit": "^9.3"
},
"repositories": [
{

1711
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@ This is your server private secret key that is used to encrypt all sensitive dat
### _APP_STORAGE_LIMIT
Maximun file size allowed for file upload. The deafult value is 100MB limitation. You should pass your size limit value in bytes.
Maximum file size allowed for file upload. The default value is 100MB limitation. You should pass your size limit value in bytes.
### _APP_STORAGE_ANTIVIRUS

6
package-lock.json generated
View file

@ -8484,9 +8484,9 @@
}
},
"yargs-parser": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.0.0.tgz",
"integrity": "sha512-8eblPHTL7ZWRkyjIZJjnGf+TijiKJSwA24svzLRVvtgoi/RZiKa9fFQTrlx0OKLnyHSdt/enrdadji6WFfESVA==",
"version": "20.2.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.0.tgz",
"integrity": "sha512-2agPoRFPoIcFzOIp6656gcvsg2ohtscpw2OINr/q46+Sq41xz2OYLqx5HRHabmFU1OARIPAYH5uteICE7mn/5A==",
"dev": true
}
}

View file

@ -4,7 +4,7 @@
"license": "BSD-3-Clause",
"repository": "public",
"devDependencies": {
"yargs-parser": ">=13.1.2",
"yargs-parser": ">=20.2.0",
"gulp": "^4.0.2",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",

View file

@ -8,11 +8,11 @@ use PHPUnit\Framework\TestCase;
class AuthTest extends TestCase
{
public function setUp()
public function setUp(): void
{
}
public function tearDown()
public function tearDown(): void
{
}
@ -118,4 +118,4 @@ class AuthTest extends TestCase
$this->assertEquals(Auth::tokenVerify($tokens3, Auth::TOKEN_TYPE_LOGIN, $secret), false);
$this->assertEquals(Auth::tokenVerify($tokens3, Auth::TOKEN_TYPE_LOGIN, 'false-secret'), false);
}
}
}

View file

@ -12,12 +12,12 @@ class PasswordTestTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new Password();
}
public function tearDown()
public function tearDown(): void
{
}
@ -36,4 +36,4 @@ class PasswordTestTest extends TestCase
$this->assertEquals($this->object->isValid('WUnOZcn0piQMN8Mh31xw4KQPF0gcNGVA'), true);
$this->assertEquals($this->object->isValid('WUnOZcn0piQMN8Mh31xw4KQPF0gcNGVAx'), false);
}
}
}

View file

@ -12,12 +12,12 @@ class KeyTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new Key();
}
public function tearDown()
public function tearDown(): void
{
}
@ -33,4 +33,4 @@ class KeyTest extends TestCase
$this->assertEquals($this->object->isValid('socialAccountForYoutubeSubscribe'), true);
$this->assertEquals($this->object->isValid('socialAccountForYoutubeSubscrib'), true);
}
}
}

View file

@ -12,12 +12,12 @@ class UIDTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new UID();
}
public function tearDown()
public function tearDown(): void
{
}
@ -27,4 +27,4 @@ class UIDTest extends TestCase
$this->assertEquals($this->object->isValid('5f058a89258075f058a89258075f058t'), true);
$this->assertEquals($this->object->isValid('5f058a89258075f058a89258075f058tx'), false);
}
}
}

View file

@ -14,7 +14,7 @@ class ComposeTest extends TestCase
protected $object = null;
public function setUp()
public function setUp(): void
{
$data = @file_get_contents(__DIR__.'/../../resources/docker/docker-compose.yml');
@ -25,7 +25,7 @@ class ComposeTest extends TestCase
$this->object = new Compose($data);
}
public function tearDown()
public function tearDown(): void
{
}
@ -56,4 +56,4 @@ class ComposeTest extends TestCase
$this->assertEquals('appwrite-redis', $this->object->getVolumes()[1]);
$this->assertEquals('appwrite-cache', $this->object->getVolumes()[2]);
}
}
}

View file

@ -14,7 +14,7 @@ class EnvTest extends TestCase
protected $object = null;
public function setUp()
public function setUp(): void
{
$data = @file_get_contents(__DIR__.'/../../resources/docker/.env');
@ -25,7 +25,7 @@ class EnvTest extends TestCase
$this->object = new Env($data);
}
public function tearDown()
public function tearDown(): void
{
}
@ -46,4 +46,4 @@ _APP_Y=value2
_APP_Z=value3
", $this->object->export());
}
}
}

View file

@ -18,7 +18,7 @@ class EventTest extends TestCase
*/
protected $queue = '';
public function setUp()
public function setUp(): void
{
$redisHost = App::getEnv('_APP_REDIS_HOST', '');
$redisPort = App::getEnv('_APP_REDIS_PORT', '');
@ -28,7 +28,7 @@ class EventTest extends TestCase
$this->object = new Event($this->queue, 'TestsV1');
}
public function tearDown()
public function tearDown(): void
{
}
@ -63,4 +63,4 @@ class EventTest extends TestCase
$this->assertEquals(null, $this->object->getParam('eventKey2'));
$this->assertEquals(null, $this->object->getParam('eventKey3'));
}
}
}

View file

@ -12,12 +12,12 @@ class CNAMETest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new CNAME('appwrite.io');
}
public function tearDown()
public function tearDown(): void
{
}
@ -31,4 +31,4 @@ class CNAMETest extends TestCase
$this->assertEquals($this->object->isValid('test1.appwrite.org'), false);
$this->assertEquals($this->object->isValid('test1.appwrite.org'), false);
}
}
}

View file

@ -12,12 +12,12 @@ class DomainTest extends TestCase
*/
protected $domain = null;
public function setUp()
public function setUp(): void
{
$this->domain = new Domain();
}
public function tearDown()
public function tearDown(): void
{
$this->domain = null;
}
@ -43,4 +43,4 @@ class DomainTest extends TestCase
$this->assertEquals(false, $this->domain->isValid(1));
$this->assertEquals(false, $this->domain->isValid(1.2));
}
}
}

View file

@ -7,11 +7,11 @@ use PHPUnit\Framework\TestCase;
class OpenSSLTest extends TestCase
{
public function setUp()
public function setUp(): void
{
}
public function tearDown()
public function tearDown(): void
{
}
@ -27,4 +27,4 @@ class OpenSSLTest extends TestCase
$this->assertEquals(OpenSSL::decrypt($data, $method, $key, 0, $iv, $tag), $secret);
}
}
}

View file

@ -7,11 +7,11 @@ use PHPUnit\Framework\TestCase;
class ResizeTest extends TestCase
{
public function setUp()
public function setUp(): void
{
}
public function tearDown()
public function tearDown(): void
{
}
@ -167,4 +167,4 @@ class ResizeTest extends TestCase
$this->assertEquals('GIF', $image->getImageFormat());
\unlink($target);
}
}
}

View file

@ -12,12 +12,12 @@ class GZIPTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new GZIP();
}
public function tearDown()
public function tearDown(): void
{
}
@ -77,4 +77,4 @@ class GZIPTest extends TestCase
$this->assertEquals($dataSize, 3038056);
}
}
}

View file

@ -12,12 +12,12 @@ class LocalTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new Local(realpath(__DIR__ . '/../../../resources/disk-a'));
}
public function tearDown()
public function tearDown(): void
{
}
@ -120,4 +120,4 @@ class LocalTest extends TestCase
{
$this->assertGreaterThan(0, $this->object->getPartitionTotalSpace());
}
}
}

View file

@ -12,11 +12,11 @@ Storage::setDevice('disk-b', new Local(__DIR__ . '/../../resources/disk-b'));
class StorageTest extends TestCase
{
public function setUp()
public function setUp(): void
{
}
public function tearDown()
public function tearDown(): void
{
}
@ -39,4 +39,4 @@ class StorageTest extends TestCase
$this->assertEquals(Storage::exists('disk-b'), true);
$this->assertEquals(Storage::exists('disk-c'), false);
}
}
}

View file

@ -12,12 +12,12 @@ class FileNameTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new FileName();
}
public function tearDown()
public function tearDown(): void
{
}
@ -30,4 +30,4 @@ class FileNameTest extends TestCase
$this->assertEquals($this->object->isValid('test.png'), true);
$this->assertEquals($this->object->isValid('test'), true);
}
}
}

View file

@ -12,12 +12,12 @@ class FileSizeTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new FileSize(1000);
}
public function tearDown()
public function tearDown(): void
{
}
@ -27,4 +27,4 @@ class FileSizeTest extends TestCase
$this->assertEquals($this->object->isValid(1000), true);
$this->assertEquals($this->object->isValid(999), true);
}
}
}

View file

@ -12,12 +12,12 @@ class FileTypeTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new FileType([FileType::FILE_TYPE_JPEG]);
}
public function tearDown()
public function tearDown(): void
{
}
@ -28,4 +28,4 @@ class FileTypeTest extends TestCase
$this->assertEquals($this->object->isValid(__DIR__ . '/../../../resources/disk-b/kitten-1.png'), false);
$this->assertEquals($this->object->isValid(__DIR__ . '/../../../resources/disk-b/kitten-2.png'), false);
}
}
}

View file

@ -12,12 +12,12 @@ class UploadTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new Upload();
}
public function tearDown()
public function tearDown(): void
{
}
@ -29,4 +29,4 @@ class UploadTest extends TestCase
$this->assertEquals($this->object->isValid(__DIR__ . '/../../../resources/disk-b/kitten-2.png'), false);
$this->assertEquals($this->object->isValid(__FILE__), false);
}
}
}

View file

@ -12,12 +12,12 @@ class CronTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new Cron();
}
public function tearDown()
public function tearDown(): void
{
}
@ -37,4 +37,4 @@ class CronTest extends TestCase
$this->assertEquals(null, false);
$this->assertEquals('', false);
}
}
}

View file

@ -12,7 +12,7 @@ class TemplateTest extends TestCase
*/
protected $object = null;
public function setUp()
public function setUp(): void
{
$this->object = new Template(__DIR__.'/../../resources/template.tpl');
$this->object
@ -20,7 +20,7 @@ class TemplateTest extends TestCase
;
}
public function tearDown()
public function tearDown(): void
{
}
@ -65,4 +65,4 @@ class TemplateTest extends TestCase
$this->assertEquals('app-write', Template::fromCamelCaseToDash('appWrite'));
$this->assertEquals('app-write', Template::fromCamelCaseToDash('App Write'));
}
}
}