From 714b8d7ea6e4414a286d9c63749de90f9a06fff0 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 15 Jan 2026 16:14:53 +1300 Subject: [PATCH] Migrate to PHPUnit 11 --- .github/workflows/tests.yml | 8 +- composer.json | 4 +- composer.lock | 649 ++++++++++-------- tests/e2e/General/UsageTest.php | 27 +- tests/e2e/Services/Account/AccountBase.php | 5 +- .../Account/AccountCustomClientTest.php | 113 +-- .../Account/AccountCustomServerTest.php | 13 +- .../e2e/Services/Databases/DatabasesBase.php | 130 +--- .../LegacyPermissionsGuestTest.php | 7 +- .../LegacyPermissionsMemberTest.php | 11 +- .../Permissions/LegacyPermissionsTeamTest.php | 19 +- .../TablesDBPermissionsGuestTest.php | 7 +- .../TablesDBPermissionsMemberTest.php | 11 +- .../TablesDBPermissionsTeamTest.php | 19 +- .../Functions/FunctionsConsoleClientTest.php | 25 +- .../Functions/FunctionsCustomServerTest.php | 83 +-- tests/e2e/Services/GraphQL/AccountTest.php | 1 - .../Services/GraphQL/FunctionsClientTest.php | 6 - .../Services/GraphQL/FunctionsServerTest.php | 11 - .../GraphQL/Legacy/DatabaseClientTest.php | 31 +- .../GraphQL/Legacy/DatabaseServerTest.php | 66 +- tests/e2e/Services/GraphQL/MessagingTest.php | 61 +- .../Services/GraphQL/StorageClientTest.php | 13 +- .../Services/GraphQL/StorageServerTest.php | 17 +- .../GraphQL/TablesDB/DatabaseClientTest.php | 31 +- .../GraphQL/TablesDB/DatabaseServerTest.php | 66 +- .../e2e/Services/GraphQL/TeamsClientTest.php | 17 +- .../e2e/Services/GraphQL/TeamsServerTest.php | 34 +- tests/e2e/Services/GraphQL/UsersTest.php | 21 +- .../e2e/Services/Messaging/MessagingBase.php | 70 +- .../Messaging/MessagingConsoleClientTest.php | 13 +- .../Services/Migrations/MigrationsBase.php | 9 +- .../Projects/ProjectsConsoleClientTest.php | 203 ++---- .../Realtime/RealtimeConsoleClientTest.php | 25 +- .../Realtime/RealtimeCustomClientTest.php | 5 +- .../Services/Sites/SitesConsoleClientTest.php | 5 +- tests/e2e/Services/Storage/StorageBase.php | 34 +- .../Storage/StorageCustomClientTest.php | 9 +- .../Storage/StorageCustomServerTest.php | 17 +- tests/e2e/Services/Teams/TeamsBase.php | 13 +- tests/e2e/Services/Teams/TeamsBaseClient.php | 33 +- tests/e2e/Services/Teams/TeamsBaseServer.php | 21 +- .../Services/Teams/TeamsConsoleClientTest.php | 15 +- .../Services/Teams/TeamsCustomClientTest.php | 9 +- tests/e2e/Services/Tokens/TokensBase.php | 21 +- .../Tokens/TokensConsoleClientTest.php | 13 +- .../Tokens/TokensCustomServerTest.php | 13 +- tests/e2e/Services/Users/UsersBase.php | 111 +-- .../e2e/Services/VCS/VCSConsoleClientTest.php | 41 +- tests/e2e/Services/Webhooks/WebhooksBase.php | 67 +- .../Webhooks/WebhooksCustomClientTest.php | 46 +- .../Webhooks/WebhooksCustomServerTest.php | 53 +- .../Database/Validator/ProjectIdTest.php | 10 +- tests/unit/Utopia/Request/Filters/V16Test.php | 7 +- tests/unit/Utopia/Request/Filters/V17Test.php | 13 +- tests/unit/Utopia/Request/Filters/V18Test.php | 7 +- tests/unit/Utopia/Request/Filters/V19Test.php | 13 +- .../unit/Utopia/Response/Filters/V16Test.php | 31 +- .../unit/Utopia/Response/Filters/V17Test.php | 33 +- .../unit/Utopia/Response/Filters/V18Test.php | 25 +- .../unit/Utopia/Response/Filters/V19Test.php | 67 +- 61 files changed, 888 insertions(+), 1670 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 46c8fe45ce..05bb2d8a4e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -225,15 +225,13 @@ jobs: -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ -e _APP_E2E_RESPONSE_FORMAT="${{ github.event.inputs.response_format }}" \ - appwrite vendor/bin/paratest --processes 4 "$SERVICE_PATH" --exclude-group abuseEnabled,screenshots + appwrite vendor/bin/paratest --processes $(nproc) "$SERVICE_PATH" --exclude-group abuseEnabled,screenshots - name: Failure Logs if: failure() run: | - echo "=== Appwrite Worker Builds Logs ===" - docker compose logs appwrite-worker-builds - echo "=== OpenRuntimes Executor Logs ===" - docker compose logs openruntimes-executor + echo "=== Appwrite Logs ===" + docker compose logs e2e_shared_mode_test: name: E2E Shared Mode Service Test diff --git a/composer.json b/composer.json index e4f5450fdd..8a40a8d91d 100644 --- a/composer.json +++ b/composer.json @@ -90,8 +90,8 @@ "require-dev": { "ext-fileinfo": "*", "appwrite/sdk-generator": "*", - "brianium/paratest": "7.4.*", - "phpunit/phpunit": "10.*", + "brianium/paratest": "7.*", + "phpunit/phpunit": "11.*", "swoole/ide-helper": "5.1.2", "phpstan/phpstan": "1.8.*", "textalk/websocket": "1.5.*", diff --git a/composer.lock b/composer.lock index 28e7d81ca4..d909b43d59 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": "a627761652d4687eaa24f8757bbda302", + "content-hash": "bede08ec681c18e74a3a5d6c7fae2a48", "packages": [ { "name": "adhocore/jwt", @@ -5532,16 +5532,16 @@ }, { "name": "brianium/paratest", - "version": "v7.4.9", + "version": "v7.8.5", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "633c0987ecf6d9b057431225da37b088aa9274a5" + "reference": "9b324c8fc319cf9728b581c7a90e1c8f6361c5e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/633c0987ecf6d9b057431225da37b088aa9274a5", - "reference": "633c0987ecf6d9b057431225da37b088aa9274a5", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/9b324c8fc319cf9728b581c7a90e1c8f6361c5e5", + "reference": "9b324c8fc319cf9728b581c7a90e1c8f6361c5e5", "shasum": "" }, "require": { @@ -5549,27 +5549,27 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "fidry/cpu-core-counter": "^1.2.0", - "jean85/pretty-package-versions": "^2.0.6", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0", - "phpunit/php-code-coverage": "^10.1.16", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-timer": "^6.0.0", - "phpunit/phpunit": "^10.5.47", - "sebastian/environment": "^6.1.0", - "symfony/console": "^6.4.7 || ^7.1.5", - "symfony/process": "^6.4.7 || ^7.1.5" + "fidry/cpu-core-counter": "^1.3.0", + "jean85/pretty-package-versions": "^2.1.1", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", + "phpunit/php-code-coverage": "^11.0.12", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-timer": "^7.0.1", + "phpunit/phpunit": "^11.5.46", + "sebastian/environment": "^7.2.1", + "symfony/console": "^6.4.22 || ^7.3.4 || ^8.0.3", + "symfony/process": "^6.4.20 || ^7.3.4 || ^8.0.3" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "phpstan/phpstan": "^1.12.6", - "phpstan/phpstan-deprecation-rules": "^1.2.1", - "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.1", - "squizlabs/php_codesniffer": "^3.10.3", - "symfony/filesystem": "^6.4.3 || ^7.1.5" + "phpstan/phpstan": "^2.1.33", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpstan/phpstan-phpunit": "^2.0.11", + "phpstan/phpstan-strict-rules": "^2.0.7", + "squizlabs/php_codesniffer": "^3.13.5", + "symfony/filesystem": "^6.4.13 || ^7.3.2 || ^8.0.1" }, "bin": [ "bin/paratest", @@ -5609,7 +5609,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.4.9" + "source": "https://github.com/paratestphp/paratest/tree/v7.8.5" }, "funding": [ { @@ -5621,7 +5621,7 @@ "type": "paypal" } ], - "time": "2025-06-25T06:09:59+00:00" + "time": "2026-01-08T08:02:38+00:00" }, { "name": "doctrine/annotations", @@ -6534,35 +6534,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.16", + "version": "11.0.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77" + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2c1ed04922802c15e1de5d7447b4856de949cf56", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=8.1", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-text-template": "^3.0.1", - "sebastian/code-unit-reverse-lookup": "^3.0.0", - "sebastian/complexity": "^3.2.0", - "sebastian/environment": "^6.1.0", - "sebastian/lines-of-code": "^2.0.2", - "sebastian/version": "^4.0.1", - "theseer/tokenizer": "^1.2.3" + "nikic/php-parser": "^5.7.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.1", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.3.1" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^11.5.46" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -6571,7 +6571,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1.x-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -6600,40 +6600,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.12" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2024-08-22T04:31:57+00:00" + "time": "2025-12-24T07:01:01+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.1.0", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -6661,7 +6673,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" }, "funding": [ { @@ -6669,28 +6681,28 @@ "type": "github" } ], - "time": "2023-08-31T06:24:48+00:00" + "time": "2024-08-27T05:02:59+00:00" }, { "name": "phpunit/php-invoker", - "version": "4.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" @@ -6698,7 +6710,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -6724,7 +6736,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -6732,32 +6745,32 @@ "type": "github" } ], - "time": "2023-02-03T06:56:09+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "3.0.1", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -6784,7 +6797,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -6792,32 +6805,32 @@ "type": "github" } ], - "time": "2023-08-31T14:07:24+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "6.0.0", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -6843,7 +6856,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -6851,20 +6865,20 @@ "type": "github" } ], - "time": "2023-02-03T06:57:52+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "10.5.60", + "version": "11.5.46", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f2e26f52f80ef77832e359205f216eeac00e320c" + "reference": "75dfe79a2aa30085b7132bb84377c24062193f33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f2e26f52f80ef77832e359205f216eeac00e320c", - "reference": "f2e26f52f80ef77832e359205f216eeac00e320c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/75dfe79a2aa30085b7132bb84377c24062193f33", + "reference": "75dfe79a2aa30085b7132bb84377c24062193f33", "shasum": "" }, "require": { @@ -6877,23 +6891,23 @@ "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.16", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-invoker": "^4.0.0", - "phpunit/php-text-template": "^3.0.1", - "phpunit/php-timer": "^6.0.0", - "sebastian/cli-parser": "^2.0.1", - "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.4", - "sebastian/diff": "^5.1.1", - "sebastian/environment": "^6.1.0", - "sebastian/exporter": "^5.1.4", - "sebastian/global-state": "^6.0.2", - "sebastian/object-enumerator": "^5.0.0", - "sebastian/recursion-context": "^5.0.1", - "sebastian/type": "^4.0.0", - "sebastian/version": "^4.0.1" + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.11", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.2", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.1", + "sebastian/exporter": "^6.3.2", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.3", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -6904,7 +6918,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.5-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -6936,7 +6950,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.60" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.46" }, "funding": [ { @@ -6960,7 +6974,7 @@ "type": "tidelift" } ], - "time": "2025-12-06T07:50:42+00:00" + "time": "2025-12-06T08:01:15+00:00" }, { "name": "psr/cache", @@ -7013,28 +7027,28 @@ }, { "name": "sebastian/cli-parser", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -7058,7 +7072,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -7066,32 +7080,32 @@ "type": "github" } ], - "time": "2024-03-02T07:12:49+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { "name": "sebastian/code-unit", - "version": "2.0.0", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -7114,7 +7128,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" }, "funding": [ { @@ -7122,32 +7137,32 @@ "type": "github" } ], - "time": "2023-02-03T06:58:43+00:00" + "time": "2025-03-19T07:56:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "3.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -7169,7 +7184,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" }, "funding": [ { @@ -7177,36 +7193,39 @@ "type": "github" } ], - "time": "2023-02-03T06:59:15+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "5.0.4", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e" + "reference": "85c77556683e6eee4323e4c5468641ca0237e2e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e8e53097718d2b53cfb2aa859b06a41abf58c62e", - "reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85c77556683e6eee4323e4c5468641ca0237e2e8", + "reference": "85c77556683e6eee4323e4c5468641ca0237e2e8", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/diff": "^5.0", - "sebastian/exporter": "^5.0" + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -7246,7 +7265,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.4" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.2" }, "funding": [ { @@ -7266,33 +7285,33 @@ "type": "tidelift" } ], - "time": "2025-09-07T05:25:07+00:00" + "time": "2025-08-10T08:07:46+00:00" }, { "name": "sebastian/complexity", - "version": "3.2.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "68ff824baeae169ec9f2137158ee529584553799" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", - "reference": "68ff824baeae169ec9f2137158ee529584553799", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -7316,7 +7335,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -7324,33 +7343,33 @@ "type": "github" } ], - "time": "2023-12-21T08:37:17+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "5.1.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0", - "symfony/process": "^6.4" + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -7383,7 +7402,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -7391,27 +7410,27 @@ "type": "github" } ], - "time": "2024-03-02T07:15:17+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "6.1.0", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.3" }, "suggest": { "ext-posix": "*" @@ -7419,7 +7438,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.1-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -7447,42 +7466,54 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2024-03-23T08:47:14+00:00" + "time": "2025-05-21T11:55:47+00:00" }, { "name": "sebastian/exporter", - "version": "5.1.4", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0735b90f4da94969541dac1da743446e276defa6" + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6", - "reference": "0735b90f4da94969541dac1da743446e276defa6", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/70a298763b40b213ec087c51c739efcaa90bcd74", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -7525,7 +7556,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.2" }, "funding": [ { @@ -7545,35 +7576,35 @@ "type": "tidelift" } ], - "time": "2025-09-24T06:09:11+00:00" + "time": "2025-09-24T06:12:51+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.2", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -7599,7 +7630,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -7607,33 +7638,33 @@ "type": "github" } ], - "time": "2024-03-02T07:19:19+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.2", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -7657,7 +7688,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -7665,34 +7696,34 @@ "type": "github" } ], - "time": "2023-12-21T08:38:20+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "5.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -7714,7 +7745,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -7722,32 +7754,32 @@ "type": "github" } ], - "time": "2023-02-03T07:08:32+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "3.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -7769,7 +7801,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -7777,32 +7810,32 @@ "type": "github" } ], - "time": "2023-02-03T07:06:18+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "5.0.1", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a" + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a", - "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -7833,7 +7866,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.3" }, "funding": [ { @@ -7853,32 +7886,32 @@ "type": "tidelift" } ], - "time": "2025-08-10T07:50:56+00:00" + "time": "2025-08-13T04:42:22+00:00" }, { "name": "sebastian/type", - "version": "4.0.0", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -7901,37 +7934,50 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.3" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" } ], - "time": "2023-02-03T07:10:45+00:00" + "time": "2025-08-09T06:55:48+00:00" }, { "name": "sebastian/version", - "version": "4.0.1", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -7954,7 +8000,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -7962,7 +8009,7 @@ "type": "github" } ], - "time": "2023-02-07T11:34:05+00:00" + "time": "2024-10-09T05:16:32+00:00" }, { "name": "seld/jsonlint", @@ -8028,6 +8075,58 @@ ], "time": "2024-07-11T14:55:45+00:00" }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, { "name": "swoole/ide-helper", "version": "5.1.2", @@ -8062,47 +8161,39 @@ }, { "name": "symfony/console", - "version": "v7.4.3", + "version": "v8.0.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6" + "reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/732a9ca6cd9dfd940c639062d5edbde2f6727fb6", - "reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6", + "url": "https://api.github.com/repos/symfony/console/zipball/6145b304a5c1ea0bdbd0b04d297a5864f9a7d587", + "reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", + "php": ">=8.4", + "symfony/polyfill-mbstring": "^1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.2|^8.0" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" + "symfony/string": "^7.4|^8.0" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/event-dispatcher": "^6.4|^7.0|^8.0", - "symfony/http-foundation": "^6.4|^7.0|^8.0", - "symfony/http-kernel": "^6.4|^7.0|^8.0", - "symfony/lock": "^6.4|^7.0|^8.0", - "symfony/messenger": "^6.4|^7.0|^8.0", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/stopwatch": "^6.4|^7.0|^8.0", - "symfony/var-dumper": "^6.4|^7.0|^8.0" + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/lock": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -8136,7 +8227,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.3" + "source": "https://github.com/symfony/console/tree/v8.0.3" }, "funding": [ { @@ -8156,7 +8247,7 @@ "type": "tidelift" } ], - "time": "2025-12-23T14:50:43+00:00" + "time": "2025-12-23T14:52:06+00:00" }, { "name": "symfony/filesystem", @@ -8699,20 +8790,20 @@ }, { "name": "symfony/process", - "version": "v7.4.3", + "version": "v8.0.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f" + "reference": "0cbbd88ec836f8757641c651bb995335846abb78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/2f8e1a6cdf590ca63715da4d3a7a3327404a523f", - "reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f", + "url": "https://api.github.com/repos/symfony/process/zipball/0cbbd88ec836f8757641c651bb995335846abb78", + "reference": "0cbbd88ec836f8757641c651bb995335846abb78", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.4" }, "type": "library", "autoload": { @@ -8740,7 +8831,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.4.3" + "source": "https://github.com/symfony/process/tree/v8.0.3" }, "funding": [ { @@ -8760,7 +8851,7 @@ "type": "tidelift" } ], - "time": "2025-12-19T10:00:43+00:00" + "time": "2025-12-19T10:01:18+00:00" }, { "name": "symfony/string", diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index dc49d27aea..2ff0e98d75 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -5,6 +5,7 @@ namespace Tests\E2E\General; use Appwrite\Platform\Modules\Compute\Specification; use CURLFile; use DateTime; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -180,9 +181,7 @@ class UsageTest extends Scope ]; } - /** - * @depends testPrepareUsersStats - */ + #[Depends('testPrepareUsersStats')] public function testUsersStats(array $data): array { $requestsTotal = $data['requestsTotal']; @@ -226,7 +225,7 @@ class UsageTest extends Scope ]); } - /** @depends testUsersStats */ + #[Depends('testUsersStats')] public function testPrepareStorageStats(array $data): array { $requestsTotal = $data['requestsTotal']; @@ -359,9 +358,7 @@ class UsageTest extends Scope ]); } - /** - * @depends testPrepareStorageStats - */ + #[Depends('testPrepareStorageStats')] public function testStorageStats(array $data): array { $bucketId = $data['bucketId']; @@ -418,7 +415,7 @@ class UsageTest extends Scope return $data; } - /** @depends testStorageStats */ + #[Depends('testStorageStats')] public function testPrepareDatabaseStatsCollectionsAPI(array $data): array { $requestsTotal = $data['requestsTotal']; @@ -584,7 +581,7 @@ class UsageTest extends Scope ]); } - /** @depends testPrepareDatabaseStatsCollectionsAPI */ + #[Depends('testPrepareDatabaseStatsCollectionsAPI')] public function testDatabaseStatsCollectionsAPI(array $data): array { $databaseId = $data['databaseId']; @@ -658,7 +655,7 @@ class UsageTest extends Scope return $data; } - /** @depends testDatabaseStatsCollectionsAPI */ + #[Depends('testDatabaseStatsCollectionsAPI')] public function testPrepareDatabaseStatsTablesAPI(array $data): array { $rowsTotal = 0; @@ -830,7 +827,7 @@ class UsageTest extends Scope ]); } - /** @depends testPrepareDatabaseStatsTablesAPI */ + #[Depends('testPrepareDatabaseStatsTablesAPI')] #[Retry(count: 1)] public function testDatabaseStatsTablesAPI(array $data): array { @@ -909,7 +906,7 @@ class UsageTest extends Scope return $data; } - /** @depends testDatabaseStatsTablesAPI */ + #[Depends('testDatabaseStatsTablesAPI')] public function testPrepareFunctionsStats(array $data): array { $executionTime = 0; @@ -1062,7 +1059,7 @@ class UsageTest extends Scope ]); } - /** @depends testPrepareFunctionsStats */ + #[Depends('testPrepareFunctionsStats')] public function testFunctionsStats(array $data): array { $functionId = $data['functionId']; @@ -1192,7 +1189,7 @@ class UsageTest extends Scope return $data; } - /** @depends testPrepareSitesStats */ + #[Depends('testPrepareSitesStats')] public function testSitesStats(array $data) { $siteId = $data['siteId']; @@ -1268,7 +1265,7 @@ class UsageTest extends Scope }); } - /** @depends testFunctionsStats */ + #[Depends('testFunctionsStats')] public function testCustomDomainsFunctionStats(array $data): void { $functionId = $data['functionId']; diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index 8e9369693a..959f111c1c 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Account; +use PHPUnit\Framework\Attributes\Group; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; use Utopia\Database\Validator\Datetime as DatetimeValidator; @@ -365,9 +366,7 @@ trait AccountBase $this->assertEquals('191.0.113.195', $response['body']['clientIp'] ?? $response['body']['ip'] ?? ''); } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testAccountAbuseReset(): void { if (System::getEnv('_APP_OPTIONS_ABUSE', 'enabled') === 'disabled') { diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index b0d95450d1..73d9caa285 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Account; use Appwrite\Tests\Retry; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -20,9 +21,7 @@ class AccountCustomClientTest extends Scope use ProjectCustom; use SideClient; - /** - * @depends testCreateAccount - */ + #[Depends('testCreateAccount')] public function testCreateAccountSession($data): array { $email = $data['email'] ?? ''; @@ -128,9 +127,7 @@ class AccountCustomClientTest extends Scope ]); } - /** - * @depends testCreateAccountSession - */ + #[Depends('testCreateAccountSession')] public function testGetAccount($data): array { $email = $data['email'] ?? ''; @@ -177,9 +174,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreateAccountSession - */ + #[Depends('testCreateAccountSession')] public function testGetAccountPrefs($data): array { $session = $data['session'] ?? ''; @@ -213,9 +208,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreateAccountSession - */ + #[Depends('testCreateAccountSession')] public function testGetAccountSessions($data): array { $session = $data['session'] ?? ''; @@ -270,9 +263,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreateAccountSession - */ + #[Depends('testCreateAccountSession')] public function testGetAccountLogs($data): array { sleep(5); @@ -425,9 +416,7 @@ class AccountCustomClientTest extends Scope // TODO Add tests for OAuth2 session creation - /** - * @depends testCreateAccountSession - */ + #[Depends('testCreateAccountSession')] public function testUpdateAccountName($data): array { $email = $data['email'] ?? ''; @@ -491,7 +480,6 @@ class AccountCustomClientTest extends Scope } /** - * @depends testUpdateAccountName */ #[Retry(count: 1)] public function testUpdateAccountPassword($data): array @@ -728,9 +716,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountPassword - */ + #[Depends('testUpdateAccountPassword')] public function testUpdateAccountEmail($data): array { $newEmail = uniqid() . 'new@localhost.test'; @@ -806,9 +792,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountEmail - */ + #[Depends('testUpdateAccountEmail')] public function testUpdateAccountPrefs($data): array { $newEmail = uniqid() . 'new@localhost.test'; @@ -913,9 +897,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountPrefs - */ + #[Depends('testUpdateAccountPrefs')] public function testCreateAccountVerification($data): array { $email = $data['email'] ?? ''; @@ -990,9 +972,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreateAccountVerification - */ + #[Depends('testCreateAccountVerification')] public function testUpdateAccountVerification($data): array { $id = $data['id'] ?? ''; @@ -1044,9 +1024,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountVerification - */ + #[Depends('testUpdateAccountVerification')] public function testDeleteAccountSession($data): array { $email = $data['email'] ?? ''; @@ -1112,9 +1090,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountVerification - */ + #[Depends('testUpdateAccountVerification')] public function testDeleteAccountSessionCurrent($data): array { $email = $data['email'] ?? ''; @@ -1169,9 +1145,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountVerification - */ + #[Depends('testUpdateAccountVerification')] public function testDeleteAccountSessions($data): array { $session = $data['session'] ?? ''; @@ -1219,9 +1193,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testDeleteAccountSession - */ + #[Depends('testDeleteAccountSession')] public function testCreateAccountRecovery($data): array { $email = $data['email'] ?? ''; @@ -1314,7 +1286,6 @@ class AccountCustomClientTest extends Scope } /** - * @depends testCreateAccountRecovery */ #[Retry(count: 1)] public function testUpdateAccountRecovery($data): array @@ -1488,9 +1459,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals($lastEmailId, $lastEmail['id']); } - /** - * @depends testCreateAccountSession - */ + #[Depends('testCreateAccountSession')] public function testCreateOAuth2AccountSession(): array { $provider = 'mock'; @@ -1990,9 +1959,7 @@ class AccountCustomClientTest extends Scope return $session; } - /** - * @depends testCreateAnonymousAccount - */ + #[Depends('testCreateAnonymousAccount')] public function testCreateAnonymousAccountVerification($session): array { $response = $this->client->call(Client::METHOD_POST, '/account/verification', array_merge([ @@ -2010,9 +1977,7 @@ class AccountCustomClientTest extends Scope return []; } - /** - * @depends testCreateAnonymousAccount - */ + #[Depends('testCreateAnonymousAccount')] public function testUpdateAnonymousAccountPassword($session) { /** @@ -2032,9 +1997,7 @@ class AccountCustomClientTest extends Scope return $session; } - /** - * @depends testUpdateAnonymousAccountPassword - */ + #[Depends('testUpdateAnonymousAccountPassword')] public function testUpdateAnonymousAccountEmail($session) { $email = uniqid() . 'new@localhost.test'; @@ -2426,9 +2389,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals(404, $response['headers']['status-code']); } - /** - * @depends testUpdateAccountName - */ + #[Depends('testUpdateAccountName')] public function testUpdateAccountNameSearch($data): void { $id = $data['id'] ?? ''; @@ -2466,9 +2427,7 @@ class AccountCustomClientTest extends Scope $this->assertEquals($newName, $response['body']['users'][0]['name']); } - /** - * @depends testUpdateAccountEmail - */ + #[Depends('testUpdateAccountEmail')] public function testUpdateAccountEmailSearch($data): void { $id = $data['id'] ?? ''; @@ -2568,9 +2527,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreatePhone - */ + #[Depends('testCreatePhone')] public function testCreateSessionWithPhone(array $data): array { $id = $data['id'] ?? ''; @@ -2655,9 +2612,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreateSessionWithPhone - */ + #[Depends('testCreateSessionWithPhone')] public function testConvertPhoneToPassword(array $data): array { $session = $data['session']; @@ -2700,9 +2655,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testConvertPhoneToPassword - */ + #[Depends('testConvertPhoneToPassword')] public function testUpdatePhone(array $data): array { $newPhone = '+45632569856'; @@ -2754,8 +2707,6 @@ class AccountCustomClientTest extends Scope } /** - * @depends testGetAccountSessions - * @depends testGetAccountLogs */ public function testCreateSession(array $data): array { @@ -2871,9 +2822,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testUpdatePhone - */ + #[Depends('testUpdatePhone')] public function testPhoneVerification(array $data): array { $session = $data['session'] ?? ''; @@ -2953,9 +2902,7 @@ class AccountCustomClientTest extends Scope ]); } - /** - * @depends testPhoneVerification - */ + #[Depends('testPhoneVerification')] public function testUpdatePhoneVerification($data): array { $id = $data['id'] ?? ''; @@ -3114,9 +3061,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreateMagicUrl - */ + #[Depends('testCreateMagicUrl')] public function testCreateSessionWithMagicUrl($data): array { $id = $data['id'] ?? ''; @@ -3191,9 +3136,7 @@ class AccountCustomClientTest extends Scope return $data; } - /** - * @depends testCreateSessionWithMagicUrl - */ + #[Depends('testCreateSessionWithMagicUrl')] public function testUpdateAccountPasswordWithMagicUrl($data): array { $email = $data['email'] ?? ''; diff --git a/tests/e2e/Services/Account/AccountCustomServerTest.php b/tests/e2e/Services/Account/AccountCustomServerTest.php index df8b2e755c..ae28d7e724 100644 --- a/tests/e2e/Services/Account/AccountCustomServerTest.php +++ b/tests/e2e/Services/Account/AccountCustomServerTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Account; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -15,9 +16,7 @@ class AccountCustomServerTest extends Scope use ProjectCustom; use SideServer; - /** - * @depends testCreateAccount - */ + #[Depends('testCreateAccount')] public function testCreateAccountSession($data): array { $email = $data['email'] ?? ''; @@ -112,9 +111,7 @@ class AccountCustomServerTest extends Scope ]); } - /** - * @depends testCreateAccountSession - */ + #[Depends('testCreateAccountSession')] public function testGetAccount($data): array { $email = $data['email'] ?? ''; @@ -239,9 +236,7 @@ class AccountCustomServerTest extends Scope return $data; } - /** - * @depends testCreateMagicUrl - */ + #[Depends('testCreateMagicUrl')] public function testCreateSessionWithMagicUrl($data): array { $id = $data['id'] ?? ''; diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index d253745654..48f15caa13 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Databases; use Appwrite\Extend\Exception; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\SchemaPolling; use Tests\E2E\Traits\DatabasesUrlHelpers; @@ -42,9 +43,7 @@ trait DatabasesBase return ['databaseId' => $database['body']['$id']]; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testCreateCollection(array $data): array { $databaseId = $data['databaseId']; @@ -90,9 +89,7 @@ trait DatabasesBase ]; } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testConsoleProject(array $data): void { if ($this->getSide() === 'server') { @@ -132,9 +129,7 @@ trait DatabasesBase } } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testDisableCollection(array $data): void { $databaseId = $data['databaseId']; @@ -201,9 +196,7 @@ trait DatabasesBase $this->assertTrue($response['body']['enabled']); } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testCreateAttributes(array $data): array { $databaseId = $data['databaseId']; @@ -386,9 +379,7 @@ trait DatabasesBase return $data; } - /** - * @depends testCreateAttributes - */ + #[Depends('testCreateAttributes')] public function testListAttributes(array $data): void { $databaseId = $data['databaseId']; @@ -416,9 +407,7 @@ trait DatabasesBase $this->assertEquals(400, $response['headers']['status-code']); } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testPatchAttribute(array $data): void { $databaseId = $data['databaseId']; @@ -540,9 +529,7 @@ trait DatabasesBase $this->assertEquals($attribute['body']['elements'], ['goalkeeper', 'defender', 'midfielder', 'forward', 'coach']); } - /** - * @depends testCreateAttributes - */ + #[Depends('testCreateAttributes')] public function testAttributeResponseModels(array $data): array { $databaseId = $data['databaseId']; @@ -1225,9 +1212,7 @@ trait DatabasesBase return $data; } - /** - * @depends testCreateAttributes - */ + #[Depends('testCreateAttributes')] public function testCreateIndexes(array $data): array { $databaseId = $data['databaseId']; @@ -1466,9 +1451,7 @@ trait DatabasesBase return $data; } - /** - * @depends testCreateAttributes - */ + #[Depends('testCreateAttributes')] public function testGetIndexByKeyWithLengths(array $data): void { $databaseId = $data['databaseId']; @@ -1551,9 +1534,7 @@ trait DatabasesBase ]); $this->assertEquals(400, $create['headers']['status-code']); } - /** - * @depends testCreateIndexes - */ + #[Depends('testCreateIndexes')] public function testListIndexes(array $data): void { $databaseId = $data['databaseId']; @@ -1582,9 +1563,7 @@ trait DatabasesBase $this->assertEquals(400, $response['headers']['status-code']); } - /** - * @depends testCreateIndexes - */ + #[Depends('testCreateIndexes')] public function testCreateDocument(array $data): array { $databaseId = $data['databaseId']; @@ -1724,9 +1703,7 @@ trait DatabasesBase } - /** - * @depends testCreateIndexes - */ + #[Depends('testCreateIndexes')] public function testUpsertDocument(array $data): void { $databaseId = $data['databaseId']; @@ -2290,9 +2267,7 @@ trait DatabasesBase } } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testListDocuments(array $data): array { $databaseId = $data['databaseId']; @@ -2382,9 +2357,7 @@ trait DatabasesBase return [$this->getRecordResource() => $documents['body'][$this->getRecordResource()], 'databaseId' => $databaseId]; } - /** - * @depends testListDocuments - */ + #[Depends('testListDocuments')] public function testGetDocument(array $data): void { $databaseId = $data['databaseId']; @@ -2408,9 +2381,7 @@ trait DatabasesBase } } - /** - * @depends testListDocuments - */ + #[Depends('testListDocuments')] public function testGetDocumentWithQueries(array $data): void { $databaseId = $data['databaseId']; @@ -2447,9 +2418,7 @@ trait DatabasesBase $this->assertTrue(array_key_exists('$sequence', $response['body'])); } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testListDocumentsAfterPagination(array $data): array { $databaseId = $data['databaseId']; @@ -2589,9 +2558,7 @@ trait DatabasesBase return []; } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testListDocumentsBeforePagination(array $data): array { $databaseId = $data['databaseId']; @@ -2702,9 +2669,7 @@ trait DatabasesBase return []; } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testListDocumentsLimitAndOffset(array $data): array { $databaseId = $data['databaseId']; @@ -2741,9 +2706,7 @@ trait DatabasesBase return []; } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testDocumentsListQueries(array $data): array { $databaseId = $data['databaseId']; @@ -2986,9 +2949,7 @@ trait DatabasesBase return []; } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testUpdateDocument(array $data): array { $databaseId = $data['databaseId']; @@ -3508,9 +3469,7 @@ trait DatabasesBase $this->assertEquals(2031, $verify2['body']['releaseYear']); } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testDeleteDocument(array $data): array { $databaseId = $data['databaseId']; @@ -4110,9 +4069,7 @@ trait DatabasesBase $this->assertEquals('Invalid document structure: Attribute "lowerBound" has invalid format. Value must be a valid range between 5 and 9,223,372,036,854,775,807', $tooLow['body']['message']); } - /** - * @depends testDeleteDocument - */ + #[Depends('testDeleteDocument')] public function testDefaultPermissions(array $data): array { $databaseId = $data['databaseId']; @@ -4619,9 +4576,7 @@ trait DatabasesBase $this->assertCount(1, $documentsUser2['body'][$this->getRecordResource()]); } - /** - * @depends testDefaultPermissions - */ + #[Depends('testDefaultPermissions')] public function testUniqueIndexDuplicate(array $data): array { $databaseId = $data['databaseId']; @@ -4711,9 +4666,7 @@ trait DatabasesBase return $data; } - /** - * @depends testUniqueIndexDuplicate - */ + #[Depends('testUniqueIndexDuplicate')] public function testPersistentCreatedAt(array $data): array { $headers = $this->getSide() === 'client' ? array_merge([ @@ -4893,9 +4846,7 @@ trait DatabasesBase return []; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testAttributeBooleanDefault(array $data): void { $databaseId = $data['databaseId']; @@ -4941,9 +4892,7 @@ trait DatabasesBase $this->assertEquals(202, $false['headers']['status-code']); } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testOneToOneRelationship(array $data): array { $databaseId = $data['databaseId']; @@ -5195,9 +5144,7 @@ trait DatabasesBase ]; } - /** - * @depends testOneToOneRelationship - */ + #[Depends('testOneToOneRelationship')] public function testOneToManyRelationship(array $data): array { $databaseId = $data['databaseId']; @@ -5350,9 +5297,7 @@ trait DatabasesBase return ['databaseId' => $databaseId, 'personCollection' => $personCollection]; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testManyToOneRelationship(array $data): array { $databaseId = $data['databaseId']; @@ -5502,9 +5447,7 @@ trait DatabasesBase ]; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testManyToManyRelationship(array $data): array { $databaseId = $data['databaseId']; @@ -5665,9 +5608,7 @@ trait DatabasesBase ]; } - /** - * @depends testOneToManyRelationship - */ + #[Depends('testOneToManyRelationship')] public function testValidateOperators(array $data): void { $response = $this->client->call(Client::METHOD_GET, $this->getRecordUrl($data['databaseId'], $data['personCollection']), array_merge([ @@ -5708,9 +5649,7 @@ trait DatabasesBase $this->assertArrayHasKey($this->getContainerIdResponseKey(), $response['body'][$this->getRecordResource()][0]); } - /** - * @depends testOneToManyRelationship - */ + #[Depends('testOneToManyRelationship')] public function testSelectQueries(array $data): void { $response = $this->client->call(Client::METHOD_GET, $this->getRecordUrl($data['databaseId'], $data['personCollection']), array_merge([ @@ -5893,7 +5832,6 @@ trait DatabasesBase } /** - * @depends testCreateDatabase * @param array $data * @return void * @throws \Exception @@ -5993,9 +5931,7 @@ trait DatabasesBase $this->assertEquals(200, $update['headers']['status-code']); } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testTimeout(array $data): void { $collection = $this->client->call(Client::METHOD_POST, $this->getContainerUrl($data['databaseId']), array_merge([ diff --git a/tests/e2e/Services/Databases/Permissions/LegacyPermissionsGuestTest.php b/tests/e2e/Services/Databases/Permissions/LegacyPermissionsGuestTest.php index ac8d4531a2..5543461dbd 100644 --- a/tests/e2e/Services/Databases/Permissions/LegacyPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/Permissions/LegacyPermissionsGuestTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Databases\Permissions; +use PHPUnit\Framework\Attributes\DataProvider; use Tests\E2E\Client; use Tests\E2E\Scopes\ApiLegacy; use Tests\E2E\Scopes\ProjectCustom; @@ -92,7 +93,7 @@ class LegacyPermissionsGuestTest extends Scope ]; } - public function permissionsProvider(): array + public static function permissionsProvider(): array { return [ [[Permission::read(Role::any())]], @@ -104,9 +105,7 @@ class LegacyPermissionsGuestTest extends Scope ]; } - /** - * @dataProvider permissionsProvider - */ + #[DataProvider('permissionsProvider')] public function testReadDocuments($permissions) { $data = $this->createCollection(); diff --git a/tests/e2e/Services/Databases/Permissions/LegacyPermissionsMemberTest.php b/tests/e2e/Services/Databases/Permissions/LegacyPermissionsMemberTest.php index dd6babfcd0..1eace856f6 100644 --- a/tests/e2e/Services/Databases/Permissions/LegacyPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Permissions/LegacyPermissionsMemberTest.php @@ -2,6 +2,8 @@ namespace Tests\E2E\Services\Databases\Permissions; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ApiLegacy; use Tests\E2E\Scopes\ProjectCustom; @@ -28,7 +30,7 @@ class LegacyPermissionsMemberTest extends Scope ]; } - public function permissionsProvider(): array + public static function permissionsProvider(): array { return [ [ @@ -228,11 +230,8 @@ class LegacyPermissionsMemberTest extends Scope ]; } - /** - * Data provider params are passed before test dependencies - * @dataProvider permissionsProvider - * @depends testSetupDatabase - */ + #[DataProvider('permissionsProvider')] + #[Depends('testSetupDatabase')] public function testReadDocuments($permissions, $anyCount, $usersCount, $docOnlyCount, $data) { $users = $data['users']; diff --git a/tests/e2e/Services/Databases/Permissions/LegacyPermissionsTeamTest.php b/tests/e2e/Services/Databases/Permissions/LegacyPermissionsTeamTest.php index 6bdb828fab..e2261d49c6 100644 --- a/tests/e2e/Services/Databases/Permissions/LegacyPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/Permissions/LegacyPermissionsTeamTest.php @@ -2,6 +2,8 @@ namespace Tests\E2E\Services\Databases\Permissions; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ApiLegacy; use Tests\E2E\Scopes\ProjectCustom; @@ -118,7 +120,7 @@ class LegacyPermissionsTeamTest extends Scope * $success = can $user read from $collection * [$user, $collection, $success] */ - public function readDocumentsProvider(): array + public static function readDocumentsProvider(): array { return [ ['user1', 'collection1', true], @@ -134,7 +136,7 @@ class LegacyPermissionsTeamTest extends Scope * $success = can $user write to $collection * [$user, $collection, $success] */ - public function writeDocumentsProvider(): array + public static function writeDocumentsProvider(): array { return [ ['user1', 'collection1', true], @@ -196,11 +198,8 @@ class LegacyPermissionsTeamTest extends Scope return $this->users; } - /** - * Data provider params are passed before test dependencies - * @depends testSetupDatabase - * @dataProvider readDocumentsProvider - */ + #[Depends('testSetupDatabase')] + #[DataProvider('readDocumentsProvider')] public function testReadDocuments($user, $collection, $success, $users) { $documents = $this->client->call( @@ -221,10 +220,8 @@ class LegacyPermissionsTeamTest extends Scope } } - /** - * @depends testSetupDatabase - * @dataProvider writeDocumentsProvider - */ + #[Depends('testSetupDatabase')] + #[DataProvider('writeDocumentsProvider')] public function testWriteDocuments($user, $collection, $success, $users) { $documents = $this->client->call( diff --git a/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsGuestTest.php b/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsGuestTest.php index 380676037b..2fcd2e4cd0 100644 --- a/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsGuestTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Databases\Permissions; +use PHPUnit\Framework\Attributes\DataProvider; use Tests\E2E\Client; use Tests\E2E\Scopes\ApiTablesDB; use Tests\E2E\Scopes\ProjectCustom; @@ -92,7 +93,7 @@ class TablesDBPermissionsGuestTest extends Scope ]; } - public function permissionsProvider(): array + public static function permissionsProvider(): array { return [ [[Permission::read(Role::any())]], @@ -104,9 +105,7 @@ class TablesDBPermissionsGuestTest extends Scope ]; } - /** - * @dataProvider permissionsProvider - */ + #[DataProvider('permissionsProvider')] public function testReadDocuments($permissions) { $data = $this->createCollection(); diff --git a/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsMemberTest.php b/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsMemberTest.php index f5a4c8464d..f5f07a1d03 100644 --- a/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsMemberTest.php @@ -2,6 +2,8 @@ namespace Tests\E2E\Services\Databases\Permissions; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ApiTablesDB; use Tests\E2E\Scopes\ProjectCustom; @@ -28,7 +30,7 @@ class TablesDBPermissionsMemberTest extends Scope ]; } - public function permissionsProvider(): array + public static function permissionsProvider(): array { return [ [ @@ -228,11 +230,8 @@ class TablesDBPermissionsMemberTest extends Scope ]; } - /** - * Data provider params are passed before test dependencies - * @dataProvider permissionsProvider - * @depends testSetupDatabase - */ + #[DataProvider('permissionsProvider')] + #[Depends('testSetupDatabase')] public function testReadDocuments($permissions, $anyCount, $usersCount, $docOnlyCount, $data) { $users = $data['users']; diff --git a/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsTeamTest.php b/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsTeamTest.php index 79e3c95ae1..4cffee596c 100644 --- a/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/Permissions/TablesDBPermissionsTeamTest.php @@ -2,6 +2,8 @@ namespace Tests\E2E\Services\Databases\Permissions; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ApiTablesDB; use Tests\E2E\Scopes\ProjectCustom; @@ -118,7 +120,7 @@ class TablesDBPermissionsTeamTest extends Scope * $success = can $user read from $collection * [$user, $collection, $success] */ - public function readDocumentsProvider(): array + public static function readDocumentsProvider(): array { return [ ['user1', 'collection1', true], @@ -134,7 +136,7 @@ class TablesDBPermissionsTeamTest extends Scope * $success = can $user write to $collection * [$user, $collection, $success] */ - public function writeDocumentsProvider(): array + public static function writeDocumentsProvider(): array { return [ ['user1', 'collection1', true], @@ -196,11 +198,8 @@ class TablesDBPermissionsTeamTest extends Scope return $this->users; } - /** - * Data provider params are passed before test dependencies - * @depends testSetupDatabase - * @dataProvider readDocumentsProvider - */ + #[Depends('testSetupDatabase')] + #[DataProvider('readDocumentsProvider')] public function testReadDocuments($user, $collection, $success, $users) { $documents = $this->client->call( @@ -221,10 +220,8 @@ class TablesDBPermissionsTeamTest extends Scope } } - /** - * @depends testSetupDatabase - * @dataProvider writeDocumentsProvider - */ + #[Depends('testSetupDatabase')] + #[DataProvider('writeDocumentsProvider')] public function testWriteDocuments($user, $collection, $success, $users) { $documents = $this->client->call( diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php index 9dae8efdb4..ba1ee423a2 100644 --- a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Functions; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -50,9 +51,7 @@ class FunctionsConsoleClientTest extends Scope ]; } - /** - * @depends testCreateFunction - */ + #[Depends('testCreateFunction')] public function testFunctionUsage(array $data) { /** @@ -98,9 +97,7 @@ class FunctionsConsoleClientTest extends Scope $this->assertEquals(404, $usage['headers']['status-code']); } - /** - * @depends testCreateFunction - */ + #[Depends('testCreateFunction')] public function testCreateFunctionVariable(array $data) { /** @@ -182,9 +179,7 @@ class FunctionsConsoleClientTest extends Scope ); } - /** - * @depends testCreateFunctionVariable - */ + #[Depends('testCreateFunctionVariable')] public function testListVariables(array $data) { /** @@ -211,9 +206,7 @@ class FunctionsConsoleClientTest extends Scope return $data; } - /** - * @depends testListVariables - */ + #[Depends('testListVariables')] public function testGetVariable(array $data) { /** @@ -252,9 +245,7 @@ class FunctionsConsoleClientTest extends Scope return $data; } - /** - * @depends testGetVariable - */ + #[Depends('testGetVariable')] public function testUpdateVariable(array $data) { /** @@ -403,9 +394,7 @@ class FunctionsConsoleClientTest extends Scope return $data; } - /** - * @depends testUpdateVariable - */ + #[Depends('testUpdateVariable')] public function testDeleteVariable(array $data) { /** diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 35bdf90347..818c772434 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -4,6 +4,8 @@ namespace Tests\E2E\Services\Functions; use Appwrite\Platform\Modules\Compute\Specification; use Appwrite\Tests\Retry; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -112,9 +114,7 @@ class FunctionsCustomServerTest extends Scope ]; } - /** - * @depends testCreateFunction - */ + #[Depends('testCreateFunction')] public function testListFunctions(array $data): array { /** @@ -244,9 +244,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testListFunctions - */ + #[Depends('testListFunctions')] public function testGetFunction(array $data): array { /** @@ -267,9 +265,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testGetFunction - */ + #[Depends('testGetFunction')] public function testUpdateFunction($data): array { /** @@ -652,9 +648,7 @@ class FunctionsCustomServerTest extends Scope $this->cleanupFunction($functionId); } - /** - * @depends testUpdateFunction - */ + #[Depends('testUpdateFunction')] public function testCreateDeployment($data): array { /** @@ -714,7 +708,6 @@ class FunctionsCustomServerTest extends Scope } /** - * @depends testUpdateFunction */ #[Retry(count: 3)] public function testCancelDeploymentBuild($data): void @@ -757,9 +750,7 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals('canceled', $deployment['body']['status']); } - /** - * @depends testUpdateFunction - */ + #[Depends('testUpdateFunction')] public function testCreateDeploymentLarge($data): array { /** @@ -820,9 +811,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testCreateDeployment - */ + #[Depends('testCreateDeployment')] public function testUpdateDeployment($data): array { /** @@ -844,9 +833,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testCreateDeployment - */ + #[Depends('testCreateDeployment')] public function testListDeployments(array $data): array { /** @@ -1026,9 +1013,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testCreateDeployment - */ + #[Depends('testCreateDeployment')] public function testGetDeployment(array $data): array { /** @@ -1053,9 +1038,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testUpdateDeployment - */ + #[Depends('testUpdateDeployment')] public function testCreateExecution($data): array { /** @@ -1138,9 +1121,7 @@ class FunctionsCustomServerTest extends Scope return array_merge($data, ['executionId' => $executionId]); } - /** - * @depends testCreateExecution - */ + #[Depends('testCreateExecution')] public function testListExecutions(array $data): array { /** @@ -1241,9 +1222,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testUpdateDeployment - */ + #[Depends('testUpdateDeployment')] public function testSyncCreateExecution($data): array { /** @@ -1266,9 +1245,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testListExecutions - */ + #[Depends('testListExecutions')] public function testGetExecution(array $data): array { /** @@ -1291,9 +1268,7 @@ class FunctionsCustomServerTest extends Scope } - /** - * @depends testGetExecution - */ + #[Depends('testGetExecution')] public function testDeleteExecution($data): array { /** @@ -1343,9 +1318,7 @@ class FunctionsCustomServerTest extends Scope - /** - * @depends testGetExecution - */ + #[Depends('testGetExecution')] public function testUpdateSpecs($data): array { /** @@ -1437,9 +1410,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testGetExecution - */ + #[Depends('testGetExecution')] public function testDeleteDeployment($data): array { /** @@ -1460,9 +1431,7 @@ class FunctionsCustomServerTest extends Scope return $data; } - /** - * @depends testCreateDeployment - */ + #[Depends('testCreateDeployment')] public function testDeleteFunction($data): array { /** @@ -1522,11 +1491,7 @@ class FunctionsCustomServerTest extends Scope $this->cleanupFunction($functionId); } - /** - * - * @return array - */ - public function provideCustomExecutions(): array + public static function provideCustomExecutions(): array { // Most disabled to keep tests fast return [ @@ -1539,14 +1504,8 @@ class FunctionsCustomServerTest extends Scope ]; } - /** - * @param string $folder - * @param string $name - * @param string $entrypoint - * - * @dataProvider provideCustomExecutions - * @depends testExecutionTimeout - */ + #[DataProvider('provideCustomExecutions')] + #[Depends('testExecutionTimeout')] public function testCreateCustomExecution(string $folder, string $name, string $entrypoint, string $runtimeName, string $runtimeVersion) { $functionId = $this->setupFunction([ diff --git a/tests/e2e/Services/GraphQL/AccountTest.php b/tests/e2e/Services/GraphQL/AccountTest.php index 9dd224f1a1..4bad8c935d 100644 --- a/tests/e2e/Services/GraphQL/AccountTest.php +++ b/tests/e2e/Services/GraphQL/AccountTest.php @@ -116,7 +116,6 @@ class AccountTest extends Scope } /** - * @depends testUpdateAccountPhone * @return array * @throws \Exception */ diff --git a/tests/e2e/Services/GraphQL/FunctionsClientTest.php b/tests/e2e/Services/GraphQL/FunctionsClientTest.php index afb3afb428..90aa7e3434 100644 --- a/tests/e2e/Services/GraphQL/FunctionsClientTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsClientTest.php @@ -74,7 +74,6 @@ class FunctionsClientTest extends Scope } /** - * @depends testCreateFunction * @param $function * @return array * @throws \Exception @@ -139,8 +138,6 @@ class FunctionsClientTest extends Scope } /** - * @depends testCreateFunction - * @depends testCreateDeployment * @param $function * @param $deployment * @return array @@ -168,7 +165,6 @@ class FunctionsClientTest extends Scope } /** - * @depends testCreateFunction * @param $function * @return array * @throws \Exception @@ -198,8 +194,6 @@ class FunctionsClientTest extends Scope } /** - * @depends testCreateFunction - * @depends testCreateExecution * @param $function * @param $execution * @return array diff --git a/tests/e2e/Services/GraphQL/FunctionsServerTest.php b/tests/e2e/Services/GraphQL/FunctionsServerTest.php index ed439f457f..4833fdd101 100644 --- a/tests/e2e/Services/GraphQL/FunctionsServerTest.php +++ b/tests/e2e/Services/GraphQL/FunctionsServerTest.php @@ -73,7 +73,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @param $function * @return array * @throws \Exception @@ -135,7 +134,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateDeployment * @param $deployment * @return array * @throws \Exception @@ -163,7 +161,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testGetDeployment * @param $deployment * @return void * @throws \Exception @@ -212,7 +209,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @param $function * @return array * @throws \Exception @@ -263,7 +259,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @param $function * @return array * @throws \Exception @@ -293,7 +288,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateDeployment * @param $deployment * @return array * @throws \Exception @@ -324,7 +318,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @param $function * @return array * @throws \Exception @@ -354,7 +347,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateExecution * @param $execution * @return array * @throws \Exception @@ -385,7 +377,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateFunction * @param $function * @return array * @throws \Exception @@ -423,7 +414,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testCreateDeployment * @param $deployment * @throws \Exception */ @@ -451,7 +441,6 @@ class FunctionsServerTest extends Scope } /** - * @depends testDeleteDeployment * @param $deployment * @throws \Exception */ diff --git a/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php index 192cc8203c..3a0b7eac84 100644 --- a/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\GraphQL\Legacy; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -43,9 +44,7 @@ class DatabaseClientTest extends Scope return $database; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; @@ -83,9 +82,7 @@ class DatabaseClientTest extends Scope ]; } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testCreateStringAttribute($data): array { $projectId = $this->getProject()['$id']; @@ -114,9 +111,7 @@ class DatabaseClientTest extends Scope return $data; } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testCreateIntegerAttribute($data): array { $projectId = $this->getProject()['$id']; @@ -147,8 +142,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateStringAttribute - * @depends testCreateIntegerAttribute */ public function testCreateDocument($data): array { @@ -193,7 +186,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateCollection * @throws \Exception */ public function testGetDocuments($data): void @@ -219,7 +211,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateDocument * @throws \Exception */ public function testGetDocument($data): void @@ -246,7 +237,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateDocument * @throws \Exception */ public function testUpdateDocument($data): void @@ -279,7 +269,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateDocument * @throws \Exception */ public function testDeleteDocument($data): void @@ -386,9 +375,7 @@ class DatabaseClientTest extends Scope ]; } - /** - * @depends testBulkCreateDocuments - */ + #[Depends('testBulkCreateDocuments')] public function testBulkUpdateDocuments(array $data): array { $userId = $this->getUser()['$id']; @@ -423,9 +410,7 @@ class DatabaseClientTest extends Scope return $data; } - /** - * @depends testBulkUpdateDocuments - */ + #[Depends('testBulkUpdateDocuments')] public function testBulkUpsertDocuments(array $data): array { $headers = [ @@ -454,9 +439,7 @@ class DatabaseClientTest extends Scope return $data; } - /** - * @depends testBulkUpsertDocuments - */ + #[Depends('testBulkUpsertDocuments')] public function testBulkDeleteDocuments(array $data): array { $headers = [ diff --git a/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php index 799746ccc7..6db277042e 100644 --- a/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\GraphQL\Legacy; use Exception; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -44,9 +45,7 @@ class DatabaseServerTest extends Scope return $database; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; @@ -111,7 +110,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateStringAttribute($data): array @@ -143,7 +141,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateStringAttribute * @throws Exception */ public function testUpdateStringAttribute($data): array @@ -179,7 +176,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateIntegerAttribute($data): array @@ -211,7 +207,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIntegerAttribute * @throws Exception */ public function testUpdateIntegerAttribute($data): array @@ -251,7 +246,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateBooleanAttribute($data): array @@ -281,7 +275,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateBooleanAttribute * @throws Exception */ public function testUpdateBooleanAttribute($data): array @@ -317,7 +310,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateFloatAttribute($data): array @@ -350,7 +342,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateFloatAttribute * @throws Exception */ public function testUpdateFloatAttribute($data): array @@ -390,7 +381,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateEmailAttribute($data): array @@ -420,7 +410,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateEmailAttribute * @throws Exception */ public function testUpdateEmailAttribute($data): array @@ -456,7 +445,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateEnumAttribute($data): array @@ -492,7 +480,6 @@ class DatabaseServerTest extends Scope /** - * @depends testCreateEnumAttribute * @throws Exception */ public function testUpdateEnumAttribute($data): array @@ -535,7 +522,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateDatetimeAttribute($data): array @@ -565,7 +551,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDatetimeAttribute * @throws Exception */ public function testUpdateDatetimeAttribute($data): array @@ -600,9 +585,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testCreateRelationshipAttribute(array $data): array { $projectId = $this->getProject()['$id']; @@ -632,9 +615,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testCreateRelationshipAttribute - */ + #[Depends('testCreateRelationshipAttribute')] public function testUpdateRelationshipAttribute(array $data): array { sleep(1); @@ -664,7 +645,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateIPAttribute($data): array @@ -695,7 +675,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIPAttribute * @throws Exception */ public function testUpdateIPAttribute($data): array @@ -731,7 +710,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testCreateURLAttribute($data): array @@ -762,7 +740,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateURLAttribute * @throws Exception */ public function testUpdateURLAttribute($data): void @@ -796,8 +773,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testUpdateStringAttribute - * @depends testUpdateIntegerAttribute * @throws Exception */ public function testCreateIndex($data): array @@ -835,10 +810,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testUpdateStringAttribute - * @depends testUpdateIntegerAttribute - * @depends testUpdateBooleanAttribute - * @depends testUpdateEnumAttribute * @throws Exception */ public function testCreateDocument($data): array @@ -945,7 +916,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDatabase * @throws Exception */ public function testGetDatabase($database): void @@ -970,7 +940,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testGetCollections($data): void @@ -995,7 +964,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testGetCollection($data): void @@ -1021,8 +989,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testUpdateStringAttribute - * @depends testUpdateIntegerAttribute * @throws Exception */ public function testGetAttributes($data): void @@ -1048,7 +1014,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testGetAttribute($data): void @@ -1075,7 +1040,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIndex * @throws Exception */ public function testGetIndexes($data): void @@ -1101,7 +1065,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIndex * @throws Exception */ public function testGetIndex($data): void @@ -1128,7 +1091,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testGetDocuments($data): void @@ -1154,7 +1116,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDocument * @throws Exception */ public function testGetDocument($data): void @@ -1228,7 +1189,6 @@ class DatabaseServerTest extends Scope // } /** - * @depends testCreateDatabase * @throws Exception */ public function testUpdateDatabase($database) @@ -1254,7 +1214,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testUpdateCollection($data) @@ -1282,7 +1241,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDocument * @throws Exception */ public function testUpdateDocument($data): void @@ -1342,7 +1300,6 @@ class DatabaseServerTest extends Scope // } /** - * @depends testCreateDocument * @throws Exception */ public function testDeleteDocument($data): void @@ -1392,7 +1349,6 @@ class DatabaseServerTest extends Scope // } /** - * @depends testUpdateStringAttribute * @throws Exception */ public function testDeleteAttribute($data): void @@ -1418,7 +1374,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection * @throws Exception */ public function testDeleteCollection($data) @@ -1443,7 +1398,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDatabase * @throws Exception */ public function testDeleteDatabase($database) @@ -1547,9 +1501,7 @@ class DatabaseServerTest extends Scope ]; } - /** - * @depends testBulkCreateDocuments - */ + #[Depends('testBulkCreateDocuments')] public function testBulkUpdateDocuments(array $data): array { $userId = $this->getUser()['$id']; @@ -1583,9 +1535,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testBulkUpdateDocuments - */ + #[Depends('testBulkUpdateDocuments')] public function testBulkUpsertDocuments(array $data): array { $headers = array_merge([ @@ -1613,9 +1563,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testBulkUpsertDocuments - */ + #[Depends('testBulkUpsertDocuments')] public function testBulkDeleteDocuments(array $data): array { $headers = array_merge([ diff --git a/tests/e2e/Services/GraphQL/MessagingTest.php b/tests/e2e/Services/GraphQL/MessagingTest.php index 125ff479fb..1da88a4879 100644 --- a/tests/e2e/Services/GraphQL/MessagingTest.php +++ b/tests/e2e/Services/GraphQL/MessagingTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\GraphQL; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -119,9 +120,7 @@ class MessagingTest extends Scope return $providers; } - /** - * @depends testCreateProviders - */ + #[Depends('testCreateProviders')] public function testUpdateProviders(array $providers): array { $providersParams = [ @@ -232,9 +231,7 @@ class MessagingTest extends Scope return $providers; } - /** - * @depends testUpdateProviders - */ + #[Depends('testUpdateProviders')] public function testListProviders(array $providers) { $query = $this->getQuery(self::LIST_PROVIDERS); @@ -250,9 +247,7 @@ class MessagingTest extends Scope $this->assertEquals(\count($providers), \count($response['body']['data']['messagingListProviders']['providers'])); } - /** - * @depends testUpdateProviders - */ + #[Depends('testUpdateProviders')] public function testGetProvider(array $providers) { $query = $this->getQuery(self::GET_PROVIDER); @@ -271,9 +266,7 @@ class MessagingTest extends Scope $this->assertEquals($providers[0]['name'], $response['body']['data']['messagingGetProvider']['name']); } - /** - * @depends testUpdateProviders - */ + #[Depends('testUpdateProviders')] public function testDeleteProvider(array $providers) { foreach ($providers as $provider) { @@ -315,9 +308,7 @@ class MessagingTest extends Scope return $response['body']['data']['messagingCreateTopic']; } - /** - * @depends testCreateTopic - */ + #[Depends('testCreateTopic')] public function testUpdateTopic(array $topic) { $topicId = $topic['_id']; @@ -341,9 +332,7 @@ class MessagingTest extends Scope return $topicId; } - /** - * @depends testCreateTopic - */ + #[Depends('testCreateTopic')] public function testListTopics() { $query = $this->getQuery(self::LIST_TOPICS); @@ -360,9 +349,7 @@ class MessagingTest extends Scope $this->assertEquals(1, \count($response['body']['data']['messagingListTopics']['topics'])); } - /** - * @depends testUpdateTopic - */ + #[Depends('testUpdateTopic')] public function testGetTopic(string $topicId) { $query = $this->getQuery(self::GET_TOPIC); @@ -382,9 +369,7 @@ class MessagingTest extends Scope $this->assertEquals('topic2', $response['body']['data']['messagingGetTopic']['name']); } - /** - * @depends testCreateTopic - */ + #[Depends('testCreateTopic')] public function testCreateSubscriber(array $topic) { $topicId = $topic['_id']; @@ -458,9 +443,7 @@ class MessagingTest extends Scope return $response['body']['data']['messagingCreateSubscriber']; } - /** - * @depends testCreateSubscriber - */ + #[Depends('testCreateSubscriber')] public function testListSubscribers(array $subscriber) { $query = $this->getQuery(self::LIST_SUBSCRIBERS); @@ -483,9 +466,7 @@ class MessagingTest extends Scope $this->assertEquals(1, \count($response['body']['data']['messagingListSubscribers']['subscribers'])); } - /** - * @depends testCreateSubscriber - */ + #[Depends('testCreateSubscriber')] public function testGetSubscriber(array $subscriber) { $topicId = $subscriber['topicId']; @@ -513,9 +494,7 @@ class MessagingTest extends Scope $this->assertEquals($subscriber['target']['userId'], $response['body']['data']['messagingGetSubscriber']['target']['userId']); } - /** - * @depends testCreateSubscriber - */ + #[Depends('testCreateSubscriber')] public function testDeleteSubscriber(array $subscriber) { $topicId = $subscriber['topicId']; @@ -537,9 +516,7 @@ class MessagingTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); } - /** - * @depends testUpdateTopic - */ + #[Depends('testUpdateTopic')] public function testDeleteTopic(string $topicId) { $query = $this->getQuery(self::DELETE_TOPIC); @@ -708,9 +685,7 @@ class MessagingTest extends Scope return $message['body']['data']['messagingGetMessage']; } - /** - * @depends testSendEmail - */ + #[Depends('testSendEmail')] public function testUpdateEmail(array $email) { $query = $this->getQuery(self::CREATE_EMAIL); @@ -912,9 +887,7 @@ class MessagingTest extends Scope return $message['body']['data']['messagingGetMessage']; } - /** - * @depends testSendSMS - */ + #[Depends('testSendSMS')] public function testUpdateSMS(array $sms) { $query = $this->getQuery(self::CREATE_SMS); @@ -1118,9 +1091,7 @@ class MessagingTest extends Scope return $message['body']['data']['messagingGetMessage']; } - /** - * @depends testSendPushNotification - */ + #[Depends('testSendPushNotification')] public function testUpdatePushNotification(array $push) { $query = $this->getQuery(self::CREATE_PUSH_NOTIFICATION); diff --git a/tests/e2e/Services/GraphQL/StorageClientTest.php b/tests/e2e/Services/GraphQL/StorageClientTest.php index e05a394d6f..8fc2467c43 100644 --- a/tests/e2e/Services/GraphQL/StorageClientTest.php +++ b/tests/e2e/Services/GraphQL/StorageClientTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\GraphQL; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -50,9 +51,7 @@ class StorageClientTest extends Scope return $bucket; } - /** - * @depends testCreateBucket - */ + #[Depends('testCreateBucket')] public function testCreateFile($bucket): array { $projectId = $this->getProject()['$id']; @@ -90,7 +89,6 @@ class StorageClientTest extends Scope } /** - * @depends testCreateBucket * @param $bucket * @return array * @throws \Exception @@ -120,8 +118,6 @@ class StorageClientTest extends Scope } /** - * @depends testCreateBucket - * @depends testCreateFile * @param $bucket * @param $file * @return array @@ -151,7 +147,6 @@ class StorageClientTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -181,7 +176,6 @@ class StorageClientTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -207,7 +201,6 @@ class StorageClientTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -233,7 +226,6 @@ class StorageClientTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -269,7 +261,6 @@ class StorageClientTest extends Scope } /** - * @depends testCreateFile * @param $file * @throws \Exception */ diff --git a/tests/e2e/Services/GraphQL/StorageServerTest.php b/tests/e2e/Services/GraphQL/StorageServerTest.php index 2c648be99a..1b03df94f3 100644 --- a/tests/e2e/Services/GraphQL/StorageServerTest.php +++ b/tests/e2e/Services/GraphQL/StorageServerTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\GraphQL; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -49,9 +50,7 @@ class StorageServerTest extends Scope return $bucket; } - /** - * @depends testCreateBucket - */ + #[Depends('testCreateBucket')] public function testCreateFile($bucket): array { $projectId = $this->getProject()['$id']; @@ -119,8 +118,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateBucket - * @depends testCreateFile * @param $bucket * @param $file * @return array @@ -152,7 +149,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateBucket * @param $bucket * @return array * @throws \Exception @@ -182,8 +178,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateBucket - * @depends testCreateFile * @param $bucket * @param $file * @return array @@ -213,7 +207,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -243,7 +236,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -269,7 +261,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -295,7 +286,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateBucket * @param $bucket * @return array * @throws \Exception @@ -327,7 +317,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateFile * @param $file * @return array * @throws \Exception @@ -363,7 +352,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateFile * @param $file * @throws \Exception */ @@ -389,7 +377,6 @@ class StorageServerTest extends Scope } /** - * @depends testCreateBucket * @param $bucket * @return array * @throws \Exception diff --git a/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php index 80d891125a..fb1c55935c 100644 --- a/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/DatabaseClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\GraphQL\TablesDB; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -44,9 +45,7 @@ class DatabaseClientTest extends Scope return $database; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testCreateTable($database): array { $projectId = $this->getProject()['$id']; @@ -84,9 +83,7 @@ class DatabaseClientTest extends Scope ]; } - /** - * @depends testCreateTable - */ + #[Depends('testCreateTable')] public function testCreateStringColumn($data): array { $projectId = $this->getProject()['$id']; @@ -115,9 +112,7 @@ class DatabaseClientTest extends Scope return $data; } - /** - * @depends testCreateTable - */ + #[Depends('testCreateTable')] public function testCreateIntegerColumn($data): array { $projectId = $this->getProject()['$id']; @@ -148,8 +143,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateStringColumn - * @depends testCreateIntegerColumn */ public function testCreateRow($data): array { @@ -194,7 +187,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateTable * @throws \Exception */ public function testGetRows($data): void @@ -220,7 +212,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateRow * @throws \Exception */ public function testGetDocument($data): void @@ -247,7 +238,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateRow * @throws \Exception */ public function testUpdateRow($data): void @@ -280,7 +270,6 @@ class DatabaseClientTest extends Scope } /** - * @depends testCreateRow * @throws \Exception */ public function testDeleteRow($data): void @@ -387,9 +376,7 @@ class DatabaseClientTest extends Scope return compact('databaseId', 'tableId', 'projectId'); } - /** - * @depends testBulkCreate - */ + #[Depends('testBulkCreate')] public function testBulkUpdate(array $data): array { $userId = $this->getUser()['$id']; @@ -450,9 +437,7 @@ class DatabaseClientTest extends Scope return $data; } - /** - * @depends testBulkCreate - */ + #[Depends('testBulkCreate')] public function testBulkUpsert(array $data): array { $userId = $this->getUser()['$id']; @@ -542,9 +527,7 @@ class DatabaseClientTest extends Scope return $data; } - /** - * @depends testBulkUpsert - */ + #[Depends('testBulkUpsert')] public function testBulkDelete(array $data): array { $headers = [ diff --git a/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php index 676d570d74..514076eac2 100644 --- a/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\GraphQL\TablesDB; use Exception; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -45,9 +46,7 @@ class DatabaseServerTest extends Scope return $database; } - /** - * @depends testCreateDatabase - */ + #[Depends('testCreateDatabase')] public function testCreateTable($database): array { $projectId = $this->getProject()['$id']; @@ -112,7 +111,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateStringColumn($data): array @@ -144,7 +142,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateStringColumn * @throws Exception */ public function testUpdateStringColumn($data): array @@ -180,7 +177,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateIntegerColumn($data): array @@ -212,7 +208,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIntegerColumn * @throws Exception */ public function testUpdateIntegerColumn($data): array @@ -252,7 +247,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateBooleanColumn($data): array @@ -282,7 +276,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateBooleanColumn * @throws Exception */ public function testUpdateBooleanColumn($data): array @@ -318,7 +311,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateFloatColumn($data): array @@ -351,7 +343,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateFloatColumn * @throws Exception */ public function testUpdateFloatColumn($data): array @@ -391,7 +382,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateEmailColumn($data): array @@ -421,7 +411,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateEmailColumn * @throws Exception */ public function testUpdateEmailColumn($data): array @@ -457,7 +446,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateEnumColumn($data): array @@ -493,7 +481,6 @@ class DatabaseServerTest extends Scope /** - * @depends testCreateEnumColumn * @throws Exception */ public function testUpdateEnumColumn($data): array @@ -536,7 +523,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateDatetimeColumn($data): array @@ -566,7 +552,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDatetimeColumn * @throws Exception */ public function testUpdateDatetimeColumn($data): array @@ -601,9 +586,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testCreateTable - */ + #[Depends('testCreateTable')] public function testCreateRelationshipColumn(array $data): array { $projectId = $this->getProject()['$id']; @@ -633,9 +616,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testCreateRelationshipColumn - */ + #[Depends('testCreateRelationshipColumn')] public function testUpdateRelationshipColumn(array $data): array { sleep(1); @@ -665,7 +646,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateIPColumn($data): array @@ -696,7 +676,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIPColumn * @throws Exception */ public function testUpdateIPColumn($data): array @@ -732,7 +711,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testCreateURLColumn($data): array @@ -763,7 +741,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateURLColumn * @throws Exception */ public function testUpdateURLColumn($data): void @@ -797,8 +774,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testUpdateStringColumn - * @depends testUpdateIntegerColumn * @throws Exception */ public function testCreateIndex($data): array @@ -836,10 +811,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testUpdateStringColumn - * @depends testUpdateIntegerColumn - * @depends testUpdateBooleanColumn - * @depends testUpdateEnumColumn * @throws Exception */ public function testCreateRow($data): array @@ -946,7 +917,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDatabase * @throws Exception */ public function testGetDatabase($database): void @@ -971,7 +941,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testGetTables($data): void @@ -998,7 +967,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testGetTable($data): void @@ -1024,8 +992,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testUpdateStringColumn - * @depends testUpdateIntegerColumn * @throws Exception */ public function testGetColumns($data): void @@ -1051,7 +1017,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testGetColumn($data): void @@ -1078,7 +1043,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIndex * @throws Exception */ public function testGetIndexes($data): void @@ -1104,7 +1068,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateIndex * @throws Exception */ public function testGetIndex($data): void @@ -1131,7 +1094,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testGetRows($data): void @@ -1157,7 +1119,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateRow * @throws Exception */ public function testGetRow($data): void @@ -1231,7 +1192,6 @@ class DatabaseServerTest extends Scope // } /** - * @depends testCreateDatabase * @throws Exception */ public function testUpdateDatabase($database) @@ -1257,7 +1217,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testUpdateTable($data) @@ -1285,7 +1244,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateRow * @throws Exception */ public function testUpdateRow($data): void @@ -1345,7 +1303,6 @@ class DatabaseServerTest extends Scope // } /** - * @depends testCreateRow * @throws Exception */ public function testDeleteRow($data): void @@ -1395,7 +1352,6 @@ class DatabaseServerTest extends Scope // } /** - * @depends testUpdateStringColumn * @throws Exception */ public function testDeleteColumn($data): void @@ -1421,7 +1377,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateTable * @throws Exception */ public function testDeleteTable($data) @@ -1446,7 +1401,6 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateDatabase * @throws Exception */ public function testDeleteDatabase($database) @@ -1550,9 +1504,7 @@ class DatabaseServerTest extends Scope return compact('databaseId', 'tableId', 'projectId'); } - /** - * @depends testBulkCreate - */ + #[Depends('testBulkCreate')] public function testBulkUpdate(array $data): array { $userId = $this->getUser()['$id']; @@ -1612,9 +1564,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testBulkCreate - */ + #[Depends('testBulkCreate')] public function testBulkUpsert(array $data): array { $userId = $this->getUser()['$id']; @@ -1703,9 +1653,7 @@ class DatabaseServerTest extends Scope return $data; } - /** - * @depends testBulkUpsert - */ + #[Depends('testBulkUpsert')] public function testBulkDelete(array $data): array { $headers = array_merge([ diff --git a/tests/e2e/Services/GraphQL/TeamsClientTest.php b/tests/e2e/Services/GraphQL/TeamsClientTest.php index d077d3c87b..be32c5758e 100644 --- a/tests/e2e/Services/GraphQL/TeamsClientTest.php +++ b/tests/e2e/Services/GraphQL/TeamsClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\GraphQL; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -40,9 +41,7 @@ class TeamsClientTest extends Scope return $team; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testCreateTeamMembership($team): array { $projectId = $this->getProject()['$id']; @@ -89,9 +88,7 @@ class TeamsClientTest extends Scope $this->assertArrayNotHasKey('errors', $teams['body']); } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testGetTeam($team) { $projectId = $this->getProject()['$id']; @@ -114,9 +111,7 @@ class TeamsClientTest extends Scope $this->assertIsArray($team); } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testGetTeamMemberships($team) { $projectId = $this->getProject()['$id']; @@ -139,8 +134,6 @@ class TeamsClientTest extends Scope } /** - * @depends testCreateTeam - * @depends testCreateTeamMembership */ public function testGetTeamMembership($team, $membership) { @@ -164,8 +157,6 @@ class TeamsClientTest extends Scope } /** - * @depends testCreateTeam - * @depends testCreateTeamMembership */ public function testDeleteTeamMembership($team, $membership) { diff --git a/tests/e2e/Services/GraphQL/TeamsServerTest.php b/tests/e2e/Services/GraphQL/TeamsServerTest.php index d99ae99cf0..3333e4de6d 100644 --- a/tests/e2e/Services/GraphQL/TeamsServerTest.php +++ b/tests/e2e/Services/GraphQL/TeamsServerTest.php @@ -2,6 +2,8 @@ namespace Tests\E2E\Services\GraphQL; +use PHPUnit\Framework\Attributes\Depends; +use PHPUnit\Framework\Attributes\Group; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -40,9 +42,7 @@ class TeamsServerTest extends Scope return $team; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testCreateTeamMembership($team): array { $projectId = $this->getProject()['$id']; @@ -88,9 +88,7 @@ class TeamsServerTest extends Scope $this->assertArrayNotHasKey('errors', $teams['body']); } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testGetTeam($team) { $projectId = $this->getProject()['$id']; @@ -115,9 +113,7 @@ class TeamsServerTest extends Scope return $team; } - /** - * @depends testGetTeam - */ + #[Depends('testGetTeam')] public function testUpdateTeamPrefs($team) { $projectId = $this->getProject()['$id']; @@ -145,9 +141,7 @@ class TeamsServerTest extends Scope return $team; } - /** - * @depends testUpdateTeamPrefs - */ + #[Depends('testUpdateTeamPrefs')] public function testGetTeamPreferences($team) { $projectId = $this->getProject()['$id']; @@ -169,9 +163,7 @@ class TeamsServerTest extends Scope $this->assertIsArray($prefs['body']['data']['teamsGetPrefs']); } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testGetTeamMemberships($team) { $projectId = $this->getProject()['$id']; @@ -194,8 +186,6 @@ class TeamsServerTest extends Scope } /** - * @depends testCreateTeam - * @depends testCreateTeamMembership */ public function testGetTeamMembership($team, $membership) { @@ -218,9 +208,7 @@ class TeamsServerTest extends Scope $this->assertArrayNotHasKey('errors', $membership['body']); } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testUpdateTeam($team) { $projectId = $this->getProject()['$id']; @@ -245,8 +233,6 @@ class TeamsServerTest extends Scope } /** - * @depends testCreateTeam - * @depends testCreateTeamMembership */ public function testUpdateTeamMembershipRoles($team, $membership) { @@ -273,8 +259,6 @@ class TeamsServerTest extends Scope } /** - * @depends testCreateTeam - * @depends testCreateTeamMembership */ public function testDeleteTeamMembership($team, $membership) { @@ -297,7 +281,7 @@ class TeamsServerTest extends Scope $this->assertEquals(204, $team['headers']['status-code']); } - /** @group cl-ignore */ + #[Group('cl-ignore')] public function testDeleteTeam() { $team = $this->testCreateTeam(); diff --git a/tests/e2e/Services/GraphQL/UsersTest.php b/tests/e2e/Services/GraphQL/UsersTest.php index 7093c354a0..3549cb49d2 100644 --- a/tests/e2e/Services/GraphQL/UsersTest.php +++ b/tests/e2e/Services/GraphQL/UsersTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\GraphQL; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -45,9 +46,7 @@ class UsersTest extends Scope return $user; } - /** - * @depends testCreateUser - */ + #[Depends('testCreateUser')] public function testCreateUserTarget(array $user) { $projectId = $this->getProject()['$id']; @@ -227,9 +226,7 @@ class UsersTest extends Scope $this->assertIsArray($user['body']['data']['usersListLogs']); } - /** - * @depends testCreateUserTarget - */ + #[Depends('testCreateUserTarget')] public function testListUserTargets(array $target) { $projectId = $this->getProject()['$id']; @@ -251,9 +248,7 @@ class UsersTest extends Scope $this->assertCount(2, $targets['body']['data']['usersListTargets']['targets']); } - /** - * @depends testCreateUserTarget - */ + #[Depends('testCreateUserTarget')] public function testGetUserTarget(array $target) { $projectId = $this->getProject()['$id']; @@ -459,9 +454,7 @@ class UsersTest extends Scope $this->assertEquals('{"key":"value"}', $user['body']['data']['usersUpdatePrefs']['data']); } - /** - * @depends testCreateUserTarget - */ + #[Depends('testCreateUserTarget')] public function testUpdateUserTarget(array $target) { $projectId = $this->getProject()['$id']; @@ -531,9 +524,7 @@ class UsersTest extends Scope $this->getUser(); } - /** - * @depends testCreateUserTarget - */ + #[Depends('testCreateUserTarget')] public function testDeleteUserTarget(array $target) { $projectId = $this->getProject()['$id']; diff --git a/tests/e2e/Services/Messaging/MessagingBase.php b/tests/e2e/Services/Messaging/MessagingBase.php index f5fdbc93ba..0227450fc6 100644 --- a/tests/e2e/Services/Messaging/MessagingBase.php +++ b/tests/e2e/Services/Messaging/MessagingBase.php @@ -4,6 +4,7 @@ namespace Tests\E2E\Services\Messaging; use Appwrite\Messaging\Status as MessageStatus; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Utopia\Database\DateTime; use Utopia\Database\Document; @@ -129,9 +130,7 @@ trait MessagingBase return $providers; } - /** - * @depends testCreateProviders - */ + #[Depends('testCreateProviders')] public function testUpdateProviders(array $providers): array { $providersParams = [ @@ -268,9 +267,7 @@ trait MessagingBase $this->assertEquals(400, $response['headers']['status-code']); } - /** - * @depends testUpdateProviders - */ + #[Depends('testUpdateProviders')] public function testListProviders(array $providers) { $response = $this->client->call(Client::METHOD_GET, '/messaging/providers/', [ @@ -285,9 +282,7 @@ trait MessagingBase return $providers; } - /** - * @depends testUpdateProviders - */ + #[Depends('testUpdateProviders')] public function testGetProvider(array $providers) { $response = $this->client->call(Client::METHOD_GET, '/messaging/providers/' . $providers[0]['$id'], [ @@ -299,9 +294,7 @@ trait MessagingBase $this->assertEquals($providers[0]['name'], $response['body']['name']); } - /** - * @depends testUpdateProviders - */ + #[Depends('testUpdateProviders')] public function testDeleteProvider(array $providers) { foreach ($providers as $provider) { @@ -346,9 +339,7 @@ trait MessagingBase ]; } - /** - * @depends testCreateTopic - */ + #[Depends('testCreateTopic')] public function testUpdateTopic(array $topics): string { $response = $this->client->call(Client::METHOD_PATCH, '/messaging/topics/' . $topics['public']['$id'], [ @@ -375,9 +366,7 @@ trait MessagingBase return $response['body']['$id']; } - /** - * @depends testUpdateTopic - */ + #[Depends('testUpdateTopic')] public function testListTopic(string $topicId) { $response = $this->client->call(Client::METHOD_GET, '/messaging/topics', [ @@ -413,9 +402,7 @@ trait MessagingBase return $topicId; } - /** - * @depends testUpdateTopic - */ + #[Depends('testUpdateTopic')] public function testGetTopic(string $topicId) { $response = $this->client->call(Client::METHOD_GET, '/messaging/topics/' . $topicId, [ @@ -430,9 +417,7 @@ trait MessagingBase $this->assertEquals(0, $response['body']['pushTotal']); } - /** - * @depends testCreateTopic - */ + #[Depends('testCreateTopic')] public function testCreateSubscriber(array $topics) { $userId = $this->getUser()['$id']; @@ -571,9 +556,7 @@ trait MessagingBase } } - /** - * @depends testCreateSubscriber - */ + #[Depends('testCreateSubscriber')] public function testGetSubscriber(array $data) { $response = $this->client->call(Client::METHOD_GET, '/messaging/topics/' . $data['topicId'] . '/subscribers/' . $data['subscriberId'], \array_merge([ @@ -590,9 +573,7 @@ trait MessagingBase $this->assertEquals($data['identifier'], $response['body']['target']['identifier']); } - /** - * @depends testCreateSubscriber - */ + #[Depends('testCreateSubscriber')] public function testListSubscribers(array $data) { $subscriberId = $data['subscriberId']; @@ -665,9 +646,7 @@ trait MessagingBase return $data; } - /** - * @depends testListSubscribers - */ + #[Depends('testListSubscribers')] public function testGetSubscriberLogs(array $data): void { /** @@ -792,9 +771,7 @@ trait MessagingBase $this->assertEquals($response['headers']['status-code'], 400); } - /** - * @depends testCreateSubscriber - */ + #[Depends('testCreateSubscriber')] public function testDeleteSubscriber(array $data) { $response = $this->client->call(Client::METHOD_DELETE, '/messaging/topics/' . $data['topicId'] . '/subscribers/' . $data['subscriberId'], \array_merge([ @@ -817,9 +794,7 @@ trait MessagingBase $this->assertEquals(0, $topic['body']['pushTotal']); } - /** - * @depends testUpdateTopic - */ + #[Depends('testUpdateTopic')] public function testDeleteTopic(string $topicId) { $response = $this->client->call(Client::METHOD_DELETE, '/messaging/topics/' . $topicId, [ @@ -830,9 +805,7 @@ trait MessagingBase $this->assertEquals(204, $response['headers']['status-code']); } - /** - * @depends testCreateDraftEmail - */ + #[Depends('testCreateDraftEmail')] public function testListTargets(array $message) { $response = $this->client->call(Client::METHOD_GET, '/messaging/messages/does_not_exist/targets', [ @@ -1391,9 +1364,7 @@ trait MessagingBase ]; } - /** - * @depends testSendEmail - */ + #[Depends('testSendEmail')] public function testUpdateEmail(array $params): void { $email = $params['message']; @@ -1558,9 +1529,7 @@ trait MessagingBase return $message; } - /** - * @depends testSendSMS - */ + #[Depends('testSendSMS')] public function testUpdateSMS(array $sms) { $message = $this->client->call(Client::METHOD_PATCH, '/messaging/messages/sms/' . $sms['body']['$id'], [ @@ -1719,9 +1688,7 @@ trait MessagingBase return $message; } - /** - * @depends testSendPushNotification - */ + #[Depends('testSendPushNotification')] public function testUpdatePushNotification(array $push) { $message = $this->client->call(Client::METHOD_PATCH, '/messaging/messages/push/' . $push['body']['$id'], [ @@ -1773,7 +1740,6 @@ trait MessagingBase } /** - * @depends testSendEmail * @return void * @throws \Exception */ diff --git a/tests/e2e/Services/Messaging/MessagingConsoleClientTest.php b/tests/e2e/Services/Messaging/MessagingConsoleClientTest.php index 49d13128e2..c8cbaad0a7 100644 --- a/tests/e2e/Services/Messaging/MessagingConsoleClientTest.php +++ b/tests/e2e/Services/Messaging/MessagingConsoleClientTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Messaging; use Appwrite\Tests\Async; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -18,9 +19,7 @@ class MessagingConsoleClientTest extends Scope use ProjectCustom; use SideConsole; - /** - * @depends testListProviders - */ + #[Depends('testListProviders')] public function testGetProviderLogs(array $providers): void { /** @@ -171,9 +170,7 @@ class MessagingConsoleClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 400); } - /** - * @depends testListTopic - */ + #[Depends('testListTopic')] public function testGetTopicLogs(string $topicId): void { /** @@ -319,9 +316,7 @@ class MessagingConsoleClientTest extends Scope $this->assertEquals($response['headers']['status-code'], 400); } - /** - * @depends testSendEmail - */ + #[Depends('testSendEmail')] public function testGetMessageLogs(array $email): void { /** diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index bed7a7e542..ccc10ea133 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Migrations; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\General\UsageTest; use Tests\E2E\Scopes\ProjectCustom; @@ -432,9 +433,7 @@ trait MigrationsBase ]; } - /** - * @depends testAppwriteMigrationDatabase - */ + #[Depends('testAppwriteMigrationDatabase')] public function testAppwriteMigrationDatabasesTable(array $data): array { $databaseId = $data['databaseId']; @@ -539,9 +538,7 @@ trait MigrationsBase ]; } - /** - * @depends testAppwriteMigrationDatabasesTable - */ + #[Depends('testAppwriteMigrationDatabasesTable')] public function testAppwriteMigrationDatabasesRow(array $data): void { $table = $data['tableId']; diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index e31331574f..4c117fb24c 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -4,6 +4,8 @@ namespace Tests\E2E\Services\Projects; use Appwrite\Extend\Exception; use Appwrite\Tests\Async; +use PHPUnit\Framework\Attributes\Depends; +use PHPUnit\Framework\Attributes\Group; use Tests\E2E\Client; use Tests\E2E\General\UsageTest; use Tests\E2E\Scopes\ProjectConsole; @@ -22,10 +24,8 @@ class ProjectsConsoleClientTest extends Scope use SideClient; use Async; - /** - * @group smtpAndTemplates - * @group projectsCRUD - */ + #[Group('smtpAndTemplates')] + #[Group('projectsCRUD')] public function testCreateProject(): array { /** @@ -158,7 +158,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(Exception::PROJECT_ALREADY_EXISTS, $response['body']['type']); } - /** @group projectsCRUD */ + #[Group('projectsCRUD')] public function testTransferProjectTeam() { /** @@ -225,10 +225,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals($team2, $response['body']['teamId']); } - /** - * @group projectsCRUD - * @depends testCreateProject - */ + #[Group('projectsCRUD')] public function testListProject($data): array { $id = $data['projectId'] ?? ''; @@ -436,9 +433,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @group projectsCRUD - */ + #[Group('projectsCRUD')] public function testListProjectsQuerySelect(): void { $team = $this->client->call(Client::METHOD_POST, '/teams', array_merge([ @@ -755,9 +750,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); } - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testGetProjectUsage($data): array { $this->markTestIncomplete( @@ -872,10 +865,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(401, $response['headers']['status-code']); } - /** - * @group smtpAndTemplates - * @depends testCreateProject - */ + #[Group('smtpAndTemplates')] public function testUpdateProjectSMTP($data): array { $id = $data['projectId']; @@ -949,9 +939,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @group smtpAndTemplates - */ + #[Group('smtpAndTemplates')] public function testCreateProjectSMTPTests(): void { $smtpHost = System::getEnv('_APP_SMTP_HOST', "maildev"); @@ -1055,10 +1043,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); } - /** - * @group smtpAndTemplates - * @depends testUpdateProjectSMTP - */ + #[Group('smtpAndTemplates')] public function testUpdateTemplates($data): array { $id = $data['projectId']; @@ -1147,7 +1132,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** @depends testCreateProject */ + #[Depends('testCreateProject')] public function testUpdateProjectAuthDuration($data): array { $id = $data['projectId']; @@ -1649,9 +1634,7 @@ class ProjectsConsoleClientTest extends Scope } } - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testUpdateProjectAuthLimit($data): array { $id = $data['projectId'] ?? ''; @@ -1765,9 +1748,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testUpdateProjectAuthLimit - */ + #[Depends('testUpdateProjectAuthLimit')] public function testUpdateProjectAuthSessionsLimit($data): array { $id = $data['projectId'] ?? ''; @@ -1885,9 +1866,7 @@ class ProjectsConsoleClientTest extends Scope } - /** - * @depends testUpdateProjectAuthLimit - */ + #[Depends('testUpdateProjectAuthLimit')] public function testUpdateProjectAuthPasswordHistory($data): array { $id = $data['projectId'] ?? ''; @@ -1993,12 +1972,8 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @group smtpAndTemplates - * @group projectsCRUD - * - * @depends testCreateProject - * */ + #[Group('smtpAndTemplates')] + #[Group('projectsCRUD')] public function testUpdateMockNumbers($data) { $id = $data['projectId'] ?? ''; @@ -2199,9 +2174,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); } - /** - * @depends testUpdateProjectAuthLimit - */ + #[Depends('testUpdateProjectAuthLimit')] public function testUpdateProjectAuthPasswordDictionary($data): array { $id = $data['projectId'] ?? ''; @@ -2330,9 +2303,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testUpdateDisallowPersonalData($data): void { $id = $data['projectId'] ?? ''; @@ -2654,7 +2625,7 @@ class ProjectsConsoleClientTest extends Scope return ['projectId' => $id]; } - /** @depends testUpdateProjectServiceStatusAdmin */ + #[Depends('testUpdateProjectServiceStatusAdmin')] public function testUpdateProjectServiceStatus($data): void { $id = $data['projectId']; @@ -2728,7 +2699,7 @@ class ProjectsConsoleClientTest extends Scope } } - /** @depends testUpdateProjectServiceStatusAdmin */ + #[Depends('testUpdateProjectServiceStatusAdmin')] public function testUpdateProjectServiceStatusServer($data): void { $id = $data['projectId']; @@ -2843,9 +2814,7 @@ class ProjectsConsoleClientTest extends Scope } } - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testCreateProjectWebhook($data): array { $id = $data['projectId'] ?? ''; @@ -2905,9 +2874,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectWebhook - */ + #[Depends('testCreateProjectWebhook')] public function testListProjectWebhook($data): array { $id = $data['projectId'] ?? ''; @@ -2927,9 +2894,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectWebhook - */ + #[Depends('testCreateProjectWebhook')] public function testGetProjectWebhook($data): array { $id = $data['projectId'] ?? ''; @@ -2963,9 +2928,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectWebhook - */ + #[Depends('testCreateProjectWebhook')] public function testUpdateProjectWebhook($data): array { $id = $data['projectId'] ?? ''; @@ -3055,9 +3018,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectWebhook - */ + #[Depends('testCreateProjectWebhook')] public function testUpdateProjectWebhookSignature($data): void { $id = $data['projectId'] ?? ''; @@ -3074,9 +3035,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertNotEquals($signatureKey, $response['body']['signatureKey']); } - /** - * @depends testCreateProjectWebhook - */ + #[Depends('testCreateProjectWebhook')] public function testDeleteProjectWebhook($data): array { $id = $data['projectId'] ?? ''; @@ -3112,9 +3071,7 @@ class ProjectsConsoleClientTest extends Scope // Keys - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testCreateProjectKey($data): array { $id = $data['projectId'] ?? ''; @@ -3160,9 +3117,7 @@ class ProjectsConsoleClientTest extends Scope } - /** - * @depends testCreateProjectKey - */ + #[Depends('testCreateProjectKey')] public function testListProjectKey($data): array { $id = $data['projectId'] ?? ''; @@ -3184,9 +3139,7 @@ class ProjectsConsoleClientTest extends Scope } - /** - * @depends testCreateProjectKey - */ + #[Depends('testCreateProjectKey')] public function testGetProjectKey($data): array { $id = $data['projectId'] ?? ''; @@ -3223,9 +3176,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testValidateProjectKey($data): void { $projectId = $data['projectId'] ?? ''; @@ -3370,9 +3321,7 @@ class ProjectsConsoleClientTest extends Scope } - /** - * @depends testCreateProjectKey - */ + #[Depends('testCreateProjectKey')] public function testUpdateProjectKey($data): array { $id = $data['projectId'] ?? ''; @@ -3436,9 +3385,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectKey - */ + #[Depends('testCreateProjectKey')] public function testDeleteProjectKey($data): array { $id = $data['projectId'] ?? ''; @@ -3472,9 +3419,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testCreateProjectKeyOutdated($data): void { $id = $data['projectId'] ?? ''; @@ -3513,9 +3458,7 @@ class ProjectsConsoleClientTest extends Scope // JWT Keys - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testJWTKey($data): void { $id = $data['projectId'] ?? ''; @@ -3567,9 +3510,7 @@ class ProjectsConsoleClientTest extends Scope // Platforms - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testCreateProjectPlatform($data): array { $id = $data['projectId'] ?? ''; @@ -3743,9 +3684,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectPlatform - */ + #[Depends('testCreateProjectPlatform')] public function testListProjectPlatform($data): array { $id = $data['projectId'] ?? ''; @@ -3767,9 +3706,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectPlatform - */ + #[Depends('testCreateProjectPlatform')] public function testGetProjectPlatform($data): array { $id = $data['projectId'] ?? ''; @@ -3915,9 +3852,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectPlatform - */ + #[Depends('testCreateProjectPlatform')] public function testUpdateProjectPlatform($data): array { $id = $data['projectId'] ?? ''; @@ -4090,9 +4025,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateProjectPlatform - */ + #[Depends('testCreateProjectPlatform')] public function testDeleteProjectPlatform($data): array { $id = $data['projectId'] ?? ''; @@ -4432,9 +4365,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(201, $user3['headers']['status-code']); } - /** - * @depends testCreateProject - */ + #[Depends('testCreateProject')] public function testCreateProjectVariable(array $data) { /** @@ -4521,9 +4452,7 @@ class ProjectsConsoleClientTest extends Scope ); } - /** - * @depends testCreateProjectVariable - */ + #[Depends('testCreateProjectVariable')] public function testListVariables(array $data) { /** @@ -4547,9 +4476,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testListVariables - */ + #[Depends('testListVariables')] public function testGetVariable(array $data) { /** @@ -4591,9 +4518,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testGetVariable - */ + #[Depends('testGetVariable')] public function testUpdateVariable(array $data) { /** @@ -4728,9 +4653,7 @@ class ProjectsConsoleClientTest extends Scope return $data; } - /** - * @depends testUpdateVariable - */ + #[Depends('testUpdateVariable')] public function testDeleteVariable(array $data) { /** @@ -4782,9 +4705,7 @@ class ProjectsConsoleClientTest extends Scope * Devkeys Tests starts here ------------------------------------------------ */ - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testCreateProjectDevKey(): void { /** @@ -4843,9 +4764,7 @@ class ProjectsConsoleClientTest extends Scope } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testListProjectDevKey(): void { /** @@ -4934,9 +4853,7 @@ class ProjectsConsoleClientTest extends Scope } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testGetProjectDevKey(): void { /** @@ -4978,9 +4895,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(404, $response['headers']['status-code']); } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testGetDevKeyWithSdks(): void { /** @@ -5035,9 +4950,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('php', $response['body']['sdks']); } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testNoHostValidationWithDevKey(): void { /** @@ -5116,9 +5029,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testCorsWithDevKey(): void { /** @@ -5173,9 +5084,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals($origin, $response['headers']['access-control-allow-origin'] ?? null); } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testNoRateLimitWithDevKey(): void { /** @@ -5278,9 +5187,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEquals(429, $response['headers']['status-code']); } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testUpdateProjectDevKey(): void { $projectId = $this->setupProject([ @@ -5323,9 +5230,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertEmpty($response['body']['accessedAt']); } - /** - * @group abuseEnabled - */ + #[Group('abuseEnabled')] public function testDeleteProjectDevKey(): void { $projectId = $this->setupProject([ diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index c2834a0228..67b1df8fd5 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Realtime; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -352,9 +353,7 @@ class RealtimeConsoleClientTest extends Scope return ['actorsId' => $actorsId, 'databaseId' => $databaseId]; } - /** - * @depends testAttributesCollectionsAPI - */ + #[Depends('testAttributesCollectionsAPI')] public function testIndexesCollectionAPI(array $data) { $projectId = 'console'; @@ -436,9 +435,7 @@ class RealtimeConsoleClientTest extends Scope return $data; } - /** - * @depends testAttributesTablesAPI - */ + #[Depends('testAttributesTablesAPI')] public function testIndexesTablesAPI(array $data) { $projectId = 'console'; @@ -520,9 +517,7 @@ class RealtimeConsoleClientTest extends Scope return $data; } - /** - * @depends testIndexesCollectionAPI - */ + #[Depends('testIndexesCollectionAPI')] public function testDeleteIndexCollectionsAPI(array $data) { $actorsId = $data['actorsId']; @@ -599,9 +594,7 @@ class RealtimeConsoleClientTest extends Scope return $data; } - /** - * @depends testIndexesTablesAPI - */ + #[Depends('testIndexesTablesAPI')] public function testDeleteIndexTablesAPI(array $data) { $projectId = 'console'; @@ -678,9 +671,7 @@ class RealtimeConsoleClientTest extends Scope return $data; } - /** - * @depends testDeleteIndexCollectionsAPI - */ + #[Depends('testDeleteIndexCollectionsAPI')] public function testDeleteAttributeCollectionsAPI(array $data) { $projectId = 'console'; @@ -753,9 +744,7 @@ class RealtimeConsoleClientTest extends Scope $client->close(); } - /** - * @depends testDeleteIndexTablesAPI - */ + #[Depends('testDeleteIndexTablesAPI')] public function testDeleteAttributeTablesAPI(array $data) { $projectId = 'console'; diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index c6a1686864..1ae0acb032 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -4,6 +4,7 @@ namespace Tests\E2E\Services\Realtime; use CURLFile; use Exception; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -2443,9 +2444,7 @@ class RealtimeCustomClientTest extends Scope return ['teamId' => $teamId]; } - /** - * @depends testChannelTeams - */ + #[Depends('testChannelTeams')] public function testChannelMemberships(array $data) { $teamId = $data['teamId'] ?? ''; diff --git a/tests/e2e/Services/Sites/SitesConsoleClientTest.php b/tests/e2e/Services/Sites/SitesConsoleClientTest.php index 31cee13261..d8a352843e 100644 --- a/tests/e2e/Services/Sites/SitesConsoleClientTest.php +++ b/tests/e2e/Services/Sites/SitesConsoleClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Sites; +use PHPUnit\Framework\Attributes\Group; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -14,9 +15,7 @@ class SitesConsoleClientTest extends Scope use SideConsole; use SitesBase; - /** - * @group screenshots - */ + #[Group('screenshots')] public function testSiteScreenshot(): void { $siteId = $this->setupSite([ diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index d0130eb3d0..8493413aaf 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -4,6 +4,8 @@ namespace Tests\E2E\Services\Storage; use Appwrite\Extend\Exception; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; +use PHPUnit\Framework\Attributes\Group; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; @@ -13,9 +15,7 @@ use Utopia\Database\Validator\Datetime as DatetimeValidator; trait StorageBase { - /** - * @group fileTokens - */ + #[Group('fileTokens')] public function testCreateBucketFile(): array { /** @@ -395,9 +395,7 @@ trait StorageBase $this->assertEquals(409, $file['headers']['status-code']); } - /** - * @depends testCreateBucketFile - */ + #[Depends('testCreateBucketFile')] public function testListBucketFiles(array $data): array { /** @@ -485,9 +483,7 @@ trait StorageBase return $data; } - /** - * @depends testCreateBucketFile - */ + #[Depends('testCreateBucketFile')] public function testGetBucketFile(array $data): array { $bucketId = $data['bucketId']; @@ -708,9 +704,7 @@ trait StorageBase return $data; } - /** - * @depends testCreateBucketFile - */ + #[Depends('testCreateBucketFile')] public function testFilePreviewCache(array $data): array { $bucketId = $data['bucketId']; @@ -801,9 +795,7 @@ trait StorageBase return $data; } - /** - * @depends testCreateBucketFileZstdCompression - */ + #[Depends('testCreateBucketFileZstdCompression')] public function testFilePreviewZstdCompression(array $data): array { $bucketId = $data['bucketId']; @@ -845,9 +837,7 @@ trait StorageBase return $data; } - /** - * @depends testCreateBucketFile - */ + #[Depends('testCreateBucketFile')] public function testUpdateBucketFile(array $data): array { /** @@ -901,9 +891,7 @@ trait StorageBase return $data; } - /** - * @depends testCreateBucketFile - */ + #[Depends('testCreateBucketFile')] public function testFilePreview(array $data): array { $bucketId = $data['bucketId']; @@ -926,9 +914,7 @@ trait StorageBase return $data; } - /** - * @depends testUpdateBucketFile - */ + #[Depends('testUpdateBucketFile')] public function testDeleteBucketFile(array $data): array { /** diff --git a/tests/e2e/Services/Storage/StorageCustomClientTest.php b/tests/e2e/Services/Storage/StorageCustomClientTest.php index 0337856779..f823fea0df 100644 --- a/tests/e2e/Services/Storage/StorageCustomClientTest.php +++ b/tests/e2e/Services/Storage/StorageCustomClientTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Storage; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -1264,9 +1265,7 @@ class StorageCustomClientTest extends Scope return ['fileId' => $file['body']['$id'], 'bucketId' => $bucket['body']['$id']]; } - /** - * @depends testCreateFileDefaultPermissions - */ + #[Depends('testCreateFileDefaultPermissions')] public function testCreateFileAbusePermissions(array $data): void { /** @@ -1330,9 +1329,7 @@ class StorageCustomClientTest extends Scope $this->assertStringContainsString('user:' . $this->getUser()['$id'], $file['body']['message']); } - /** - * @depends testCreateFileDefaultPermissions - */ + #[Depends('testCreateFileDefaultPermissions')] public function testUpdateFileAbusePermissions(array $data): void { /** diff --git a/tests/e2e/Services/Storage/StorageCustomServerTest.php b/tests/e2e/Services/Storage/StorageCustomServerTest.php index 9b0473a352..0b25953475 100644 --- a/tests/e2e/Services/Storage/StorageCustomServerTest.php +++ b/tests/e2e/Services/Storage/StorageCustomServerTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Storage; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -71,9 +72,7 @@ class StorageCustomServerTest extends Scope return ['bucketId' => $bucketId]; } - /** - * @depends testCreateBucket - */ + #[Depends('testCreateBucket')] public function testListBucket($data): array { $id = $data['bucketId'] ?? ''; @@ -170,9 +169,7 @@ class StorageCustomServerTest extends Scope return $data; } - /** - * @depends testCreateBucket - */ + #[Depends('testCreateBucket')] public function testGetBucket(array $data): array { $id = $data['bucketId'] ?? ''; @@ -229,9 +226,7 @@ class StorageCustomServerTest extends Scope return $data; } - /** - * @depends testCreateBucket - */ + #[Depends('testCreateBucket')] public function testUpdateBucket(array $data): array { $id = $data['bucketId'] ?? ''; @@ -272,9 +267,7 @@ class StorageCustomServerTest extends Scope return ['bucketId' => $bucketId]; } - /** - * @depends testCreateBucket - */ + #[Depends('testCreateBucket')] public function testDeleteBucket(array $data): array { $id = $data['bucketId'] ?? ''; diff --git a/tests/e2e/Services/Teams/TeamsBase.php b/tests/e2e/Services/Teams/TeamsBase.php index 0924b09af8..01b3cd4351 100644 --- a/tests/e2e/Services/Teams/TeamsBase.php +++ b/tests/e2e/Services/Teams/TeamsBase.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Teams; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; @@ -126,9 +127,7 @@ trait TeamsBase return ['teamUid' => $teamUid, 'teamName' => $teamName]; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testGetTeam($data): array { $id = $data['teamUid'] ?? ''; @@ -157,9 +156,7 @@ trait TeamsBase return []; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testListTeams($data): array { /** @@ -437,9 +434,7 @@ trait TeamsBase return []; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testUpdateAndGetUserPrefs(array $data): void { $id = $data['teamUid'] ?? ''; diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 101286d7da..4df80daa25 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Teams; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; @@ -10,9 +11,7 @@ use Utopia\Database\Validator\Datetime as DatetimeValidator; trait TeamsBaseClient { - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testGetTeamMemberships($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -137,9 +136,7 @@ trait TeamsBaseClient return $data; } - /** - * @depends testCreateTeamMembership - */ + #[Depends('testCreateTeamMembership')] public function testGetTeamMembership($data): void { $teamUid = $data['teamUid'] ?? ''; @@ -184,9 +181,7 @@ trait TeamsBaseClient $this->assertEquals(401, $response['headers']['status-code']); } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testCreateTeamMembership($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -354,9 +349,7 @@ trait TeamsBaseClient ]; } - /** - * @depends testCreateTeamMembership - */ + #[Depends('testCreateTeamMembership')] public function testListTeamMemberships($data): void { $memberships = $this->client->call(Client::METHOD_GET, '/teams/' . $data['teamUid'] . '/memberships', array_merge([ @@ -385,9 +378,7 @@ trait TeamsBaseClient $this->assertEquals($memberships['body']['memberships'][1]['$id'], $response['body']['memberships'][0]['$id']); } - /** - * @depends testCreateTeamMembership - */ + #[Depends('testCreateTeamMembership')] public function testUpdateTeamMembership($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -560,9 +551,7 @@ trait TeamsBaseClient } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testUpdateMembershipWithSession(array $data): void { $teamUid = $data['teamUid'] ?? ''; @@ -631,9 +620,7 @@ trait TeamsBaseClient $this->assertEmpty($response['cookies']); } - /** - * @depends testUpdateTeamMembership - */ + #[Depends('testUpdateTeamMembership')] public function testUpdateTeamMembershipRoles($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -705,9 +692,7 @@ trait TeamsBaseClient return $data; } - /** - * @depends testUpdateTeamMembershipRoles - */ + #[Depends('testUpdateTeamMembershipRoles')] public function testDeleteTeamMembership($data): array { $teamUid = $data['teamUid'] ?? ''; diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php index 0c6d85e276..e202ce59ac 100644 --- a/tests/e2e/Services/Teams/TeamsBaseServer.php +++ b/tests/e2e/Services/Teams/TeamsBaseServer.php @@ -2,14 +2,13 @@ namespace Tests\E2E\Services\Teams; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Utopia\Database\Validator\Datetime as DatetimeValidator; trait TeamsBaseServer { - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testGetTeamMemberships($data): array { $id = $data['teamUid'] ?? ''; @@ -32,9 +31,7 @@ trait TeamsBaseServer return $data; } - /** - * @depends testCreateTeamMembership - */ + #[Depends('testCreateTeamMembership')] public function testGetTeamMembership($data): void { $teamUid = $data['teamUid'] ?? ''; @@ -140,9 +137,7 @@ trait TeamsBaseServer $this->assertEquals(401, $response['headers']['status-code']); } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testCreateTeamMembership($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -234,9 +229,7 @@ trait TeamsBaseServer ]; } - /** - * @depends testCreateTeamMembership - */ + #[Depends('testCreateTeamMembership')] public function testUpdateMembershipRoles($data) { $teamUid = $data['teamUid'] ?? ''; @@ -283,9 +276,7 @@ trait TeamsBaseServer return $data; } - /** - * @depends testUpdateMembershipRoles - */ + #[Depends('testUpdateMembershipRoles')] public function testDeleteUserUpdatesTeamMembershipCount($data) { $teamUid = $data['teamUid'] ?? ''; diff --git a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php index 7949761d7f..43381c47fa 100644 --- a/tests/e2e/Services/Teams/TeamsConsoleClientTest.php +++ b/tests/e2e/Services/Teams/TeamsConsoleClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Teams; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectConsole; use Tests\E2E\Scopes\Scope; @@ -14,9 +15,7 @@ class TeamsConsoleClientTest extends Scope use ProjectConsole; use SideClient; - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testTeamCreateMembershipConsole($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -38,9 +37,7 @@ class TeamsConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testTeamMembershipPerms($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -116,7 +113,7 @@ class TeamsConsoleClientTest extends Scope return $data; } - /** @depends testUpdateTeamMembership */ + #[Depends('testUpdateTeamMembership')] public function testUpdateTeamMembershipRoles($data): array { $teamUid = $data['teamUid'] ?? ''; @@ -168,9 +165,7 @@ class TeamsConsoleClientTest extends Scope return $data; } - /** - * @depends testUpdateTeamMembershipRoles - */ + #[Depends('testUpdateTeamMembershipRoles')] public function testDeleteTeamMembership($data): array { $teamUid = $data['teamUid'] ?? ''; diff --git a/tests/e2e/Services/Teams/TeamsCustomClientTest.php b/tests/e2e/Services/Teams/TeamsCustomClientTest.php index 9c53bf6baa..8a667e292d 100644 --- a/tests/e2e/Services/Teams/TeamsCustomClientTest.php +++ b/tests/e2e/Services/Teams/TeamsCustomClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\Teams; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -14,9 +15,7 @@ class TeamsCustomClientTest extends Scope use ProjectCustom; use SideClient; - /** - * @depends testGetTeamMemberships - */ + #[Depends('testGetTeamMemberships')] public function testGetMembershipPrivacy($data) { $teamUid = $data['teamUid'] ?? ''; @@ -117,9 +116,7 @@ class TeamsCustomClientTest extends Scope $this->assertArrayHasKey('mfa', $response['body']['memberships'][0]); } - /** - * @depends testUpdateTeamMembership - */ + #[Depends('testUpdateTeamMembership')] public function testTeamsInviteHTMLInjection($data): array { $teamUid = $data['teamUid'] ?? ''; diff --git a/tests/e2e/Services/Tokens/TokensBase.php b/tests/e2e/Services/Tokens/TokensBase.php index ca6feed5fa..fd9c5be337 100644 --- a/tests/e2e/Services/Tokens/TokensBase.php +++ b/tests/e2e/Services/Tokens/TokensBase.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Tokens; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; @@ -76,9 +77,7 @@ trait TokensBase ]; } - /** - * @depends testCreateBucketAndFile - */ + #[Depends('testCreateBucketAndFile')] public function testFailuresWithoutToken(array $data): array { $fileId = $data['fileId']; @@ -140,9 +139,7 @@ trait TokensBase return $data; } - /** - * @depends testCreateBucketAndFile - */ + #[Depends('testCreateBucketAndFile')] public function testPreviewFileWithToken(array $data): array { $token = $data['token']; @@ -177,9 +174,7 @@ trait TokensBase return $data; } - /** - * @depends testPreviewFileWithToken - */ + #[Depends('testPreviewFileWithToken')] public function testCustomPreviewFileWithToken(array $data): array { $fileId = $data['fileId']; @@ -218,9 +213,7 @@ trait TokensBase return $data; } - /** - * @depends testPreviewFileWithToken - */ + #[Depends('testPreviewFileWithToken')] public function testViewFileWithToken(array $data): void { $fileId = $data['fileId']; @@ -248,9 +241,7 @@ trait TokensBase $this->assertEquals('PNG', $image->getImageFormat()); } - /** - * @depends testPreviewFileWithToken - */ + #[Depends('testPreviewFileWithToken')] public function testDownloadFileWithToken(array $data): void { $fileId = $data['fileId']; diff --git a/tests/e2e/Services/Tokens/TokensConsoleClientTest.php b/tests/e2e/Services/Tokens/TokensConsoleClientTest.php index 7a9181b1dc..ba9848ba40 100644 --- a/tests/e2e/Services/Tokens/TokensConsoleClientTest.php +++ b/tests/e2e/Services/Tokens/TokensConsoleClientTest.php @@ -5,6 +5,7 @@ namespace Tests\E2E\Services\Tokens; use Ahc\Jwt\JWT; use Ahc\Jwt\JWTException; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -120,9 +121,7 @@ class TokensConsoleClientTest extends Scope ]; } - /** - * @depends testCreateToken - */ + #[Depends('testCreateToken')] public function testUpdateToken(array $data): array { $tokenId = $data['tokenId']; @@ -187,9 +186,7 @@ class TokensConsoleClientTest extends Scope return $data; } - /** - * @depends testCreateToken - */ + #[Depends('testCreateToken')] public function testListTokens(array $data): array { $res = $this->client->call( @@ -243,9 +240,7 @@ class TokensConsoleClientTest extends Scope return $data; } - /** - * @depends testUpdateToken - */ + #[Depends('testUpdateToken')] public function testDeleteToken(array $data): array { $tokenId = $data['tokenId']; diff --git a/tests/e2e/Services/Tokens/TokensCustomServerTest.php b/tests/e2e/Services/Tokens/TokensCustomServerTest.php index 779d5449b3..55c034e8b6 100644 --- a/tests/e2e/Services/Tokens/TokensCustomServerTest.php +++ b/tests/e2e/Services/Tokens/TokensCustomServerTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Tokens; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -86,9 +87,7 @@ class TokensCustomServerTest extends Scope ]; } - /** - * @depends testCreateToken - */ + #[Depends('testCreateToken')] public function testUpdateToken(array $data): array { $tokenId = $data['tokenId']; @@ -131,9 +130,7 @@ class TokensCustomServerTest extends Scope return $data; } - /** - * @depends testCreateToken - */ + #[Depends('testCreateToken')] public function testListTokens(array $data): array { $res = $this->client->call( @@ -151,9 +148,7 @@ class TokensCustomServerTest extends Scope return $data; } - /** - * @depends testUpdateToken - */ + #[Depends('testUpdateToken')] public function testDeleteToken(array $data): array { $tokenId = $data['tokenId']; diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 37b9a7a605..eb3caee94e 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -4,6 +4,8 @@ namespace Tests\E2E\Services\Users; use Appwrite\Tests\Retry; use Appwrite\Utopia\Response; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; @@ -180,9 +182,8 @@ trait UsersBase /** * Tries to login into all accounts created with hashed password. Ensures hash veifying logic. - * - * @depends testCreateUser */ + #[Depends('testCreateUser')] public function testCreateUserSessionHashed(array $data): void { $userIds = ['md5', 'bcrypt', 'argon2', 'sha512', 'scrypt', 'phpass', 'scrypt-modified']; @@ -232,9 +233,7 @@ trait UsersBase } } - /** - * @depends testCreateUser - */ + #[Depends('testCreateUser')] public function testCreateToken(array $data): void { /** @@ -290,9 +289,7 @@ trait UsersBase $this->assertArrayNotHasKey('secret', $token['body']); } - /** - * @depends testCreateUser - */ + #[Depends('testCreateUser')] public function testCreateSession(array $data): void { /** @@ -331,9 +328,8 @@ trait UsersBase /** * Tests all optional parameters of createUser (email, phone, anonymous..) - * - * @depends testCreateUser */ + #[Depends('testCreateUser')] public function testCreateUserTypes(array $data): void { /** @@ -420,9 +416,7 @@ trait UsersBase $this->assertNotEmpty($response['body']['phone']); } - /** - * @depends testCreateUser - */ + #[Depends('testCreateUser')] public function testListUsers(array $data): void { $totalUsers = 15; @@ -760,9 +754,7 @@ trait UsersBase $this->assertEquals(400, $response['headers']['status-code']); } - /** - * @depends testCreateUser - */ + #[Depends('testCreateUser')] public function testGetUser(array $data): array { /** @@ -831,9 +823,7 @@ trait UsersBase return $data; } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testListUserMemberships(array $data): array { /** @@ -922,9 +912,7 @@ trait UsersBase return $data; } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testUpdateUserName(array $data): array { /** @@ -977,9 +965,7 @@ trait UsersBase return $data; } - /** - * @depends testUpdateUserName - */ + #[Depends('testUpdateUserName')] public function testUpdateUserNameSearch($data): void { $id = $data['userId'] ?? ''; @@ -1015,9 +1001,7 @@ trait UsersBase $this->assertEquals($response['body']['users'][0]['$id'], $id); } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testUpdateUserEmail(array $data): array { /** @@ -1070,9 +1054,7 @@ trait UsersBase return $data; } - /** - * @depends testUpdateUserEmail - */ + #[Depends('testUpdateUserEmail')] public function testUpdateUserEmailSearch($data): void { $id = $data['userId'] ?? ''; @@ -1108,9 +1090,7 @@ trait UsersBase $this->assertEquals($response['body']['users'][0]['$id'], $id); } - /** - * @depends testUpdateUserEmail - */ + #[Depends('testUpdateUserEmail')] public function testUpdateUserPassword(array $data): array { /** @@ -1181,9 +1161,7 @@ trait UsersBase return $data; } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] #[Retry(count: 1)] public function testUpdateUserStatus(array $data): array { @@ -1211,9 +1189,7 @@ trait UsersBase return $data; } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testUpdateEmailVerification(array $data): array { /** @@ -1240,9 +1216,7 @@ trait UsersBase return $data; } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] #[Retry(count: 1)] public function testUpdateAndGetUserPrefs(array $data): array { @@ -1296,9 +1270,7 @@ trait UsersBase return $data; } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testUpdateUserNumber(array $data): array { /** @@ -1364,9 +1336,7 @@ trait UsersBase return $data; } - /** - * @depends testUpdateUserNumber - */ + #[Depends('testUpdateUserNumber')] public function testUpdateUserNumberSearch($data): void { $id = $data['userId'] ?? ''; @@ -1390,10 +1360,7 @@ trait UsersBase $this->assertEquals($response['body']['users'][0]['phone'], $newNumber); } - /** - * @return array{} - */ - public function userLabelsProvider() + public static function userLabelsProvider(): array { return [ 'single label' => [ @@ -1434,10 +1401,8 @@ trait UsersBase ]; } - /** - * @depends testGetUser - * @dataProvider userLabelsProvider - */ + #[Depends('testGetUser')] + #[DataProvider('userLabelsProvider')] public function testUpdateUserLabels(array $labels, int $expectedStatus, array $expectedLabels, array $data): array { $user = $this->client->call(Client::METHOD_PUT, '/users/' . $data['userId'] . '/labels', array_merge([ @@ -1455,9 +1420,7 @@ trait UsersBase return $data; } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testUpdateUserLabelsWithoutLabels(array $data): array { $user = $this->client->call(Client::METHOD_PUT, '/users/' . $data['userId'] . '/labels', array_merge([ @@ -1483,9 +1446,7 @@ trait UsersBase } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testGetLogs(array $data): void { /** @@ -1601,9 +1562,7 @@ trait UsersBase $this->assertEquals($response['headers']['status-code'], 400); } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testCreateUserTarget(array $data): array { $provider = $this->client->call(Client::METHOD_POST, '/messaging/providers/sendgrid', \array_merge([ @@ -1631,9 +1590,7 @@ trait UsersBase return $response['body']; } - /** - * @depends testCreateUserTarget - */ + #[Depends('testCreateUserTarget')] public function testUpdateUserTarget(array $data): array { $response = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/targets/' . $data['$id'], array_merge([ @@ -1648,9 +1605,7 @@ trait UsersBase return $response['body']; } - /** - * @depends testUpdateUserTarget - */ + #[Depends('testUpdateUserTarget')] public function testListUserTarget(array $data) { $response = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/targets', array_merge([ @@ -1662,9 +1617,7 @@ trait UsersBase $this->assertEquals(3, \count($response['body']['targets'])); } - /** - * @depends testUpdateUserTarget - */ + #[Depends('testUpdateUserTarget')] public function testGetUserTarget(array $data) { $response = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/targets/' . $data['$id'], array_merge([ @@ -1675,9 +1628,7 @@ trait UsersBase $this->assertEquals($data['$id'], $response['body']['$id']); } - /** - * @depends testUpdateUserTarget - */ + #[Depends('testUpdateUserTarget')] public function testDeleteUserTarget(array $data) { $response = $this->client->call(Client::METHOD_DELETE, '/users/' . $data['userId'] . '/targets/' . $data['$id'], array_merge([ @@ -1696,9 +1647,7 @@ trait UsersBase $this->assertEquals(2, $response['body']['total']); } - /** - * @depends testGetUser - */ + #[Depends('testGetUser')] public function testDeleteUser(array $data): array { /** diff --git a/tests/e2e/Services/VCS/VCSConsoleClientTest.php b/tests/e2e/Services/VCS/VCSConsoleClientTest.php index 963aa5a84b..f72df5431e 100644 --- a/tests/e2e/Services/VCS/VCSConsoleClientTest.php +++ b/tests/e2e/Services/VCS/VCSConsoleClientTest.php @@ -2,6 +2,7 @@ namespace Tests\E2E\Services\VCS; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -43,9 +44,7 @@ class VCSConsoleClientTest extends Scope return $installationId; } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testGetInstallation(string $installationId): void { /** @@ -61,9 +60,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals('appwrite-test', $installation['body']['organization']); } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testDetectRuntime(string $installationId): void { /** @@ -98,9 +95,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(404, $runtime['headers']['status-code']); } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testDetectFramework(string $installationId) { /** @@ -166,9 +161,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(404, $framework['headers']['status-code']); } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testContents(string $installationId): void { /** @@ -238,9 +231,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(404, $runtime['headers']['status-code']); } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testListRepositories(string $installationId): void { /** @@ -398,9 +389,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals($repositories['body']['total'], 0); } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testGetRepository(string $installationId): void { /** @@ -436,9 +425,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(404, $repository['headers']['status-code']); } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testListRepositoryBranches(string $installationId): void { /** @@ -465,9 +452,7 @@ class VCSConsoleClientTest extends Scope $this->assertEquals(404, $repositoryBranches['headers']['status-code']); } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testCreateFunctionUsingVCS(string $installationId): array { $function = $this->client->call(Client::METHOD_POST, '/functions', array_merge([ @@ -503,9 +488,7 @@ class VCSConsoleClientTest extends Scope ]; } - /** - * @depends testCreateFunctionUsingVCS - */ + #[Depends('testCreateFunctionUsingVCS')] public function testUpdateFunctionUsingVCS(array $data): string { $function = $this->client->call(Client::METHOD_PUT, '/functions/' . $data['functionId'], array_merge([ @@ -538,9 +521,7 @@ class VCSConsoleClientTest extends Scope return $function['body']['$id']; } - /** - * @depends testGitHubAuthorize - */ + #[Depends('testGitHubAuthorize')] public function testCreateRepository(string $installationId): void { /** diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index 3d53a4a2ad..b29c721c75 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -5,6 +5,7 @@ namespace Tests\E2E\Services\Webhooks; use Appwrite\Tests\Async; use Appwrite\Tests\Retry; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; @@ -99,9 +100,7 @@ trait WebhooksBase return array_merge(['actorsId' => $actorsId, 'databaseId' => $databaseId]); } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testCreateAttributes(array $data): array { $actorsId = $data['actorsId']; @@ -196,9 +195,7 @@ trait WebhooksBase return $data; } - /** - * @depends testCreateAttributes - */ + #[Depends('testCreateAttributes')] public function testCreateDocument(array $data): array { $actorsId = $data['actorsId']; @@ -259,9 +256,7 @@ trait WebhooksBase return $data; } - /** - * @depends testCreateDocument - */ + #[Depends('testCreateDocument')] public function testUpdateDocument(array $data): array { $actorsId = $data['actorsId']; @@ -320,7 +315,6 @@ trait WebhooksBase } /** - * @depends testCreateCollection */ #[Retry(count: 1)] public function testDeleteDocument(array $data): array @@ -452,9 +446,7 @@ trait WebhooksBase return array_merge(['actorsId' => $actorsId, 'databaseId' => $databaseId]); } - /** - * @depends testCreateTable - */ + #[Depends('testCreateTable')] public function testCreateColumns(array $data): array { $actorsId = $data['actorsId']; @@ -547,9 +539,7 @@ trait WebhooksBase return $data; } - /** - * @depends testCreateColumns - */ + #[Depends('testCreateColumns')] public function testCreateRow(array $data): array { $actorsId = $data['actorsId']; @@ -610,9 +600,7 @@ trait WebhooksBase return $data; } - /** - * @depends testCreateRow - */ + #[Depends('testCreateRow')] public function testUpdateRow(array $data): array { $actorsId = $data['actorsId']; @@ -671,7 +659,6 @@ trait WebhooksBase } /** - * @depends testCreateTable */ #[Retry(count: 1)] public function testDeleteRow(array $data): array @@ -787,9 +774,7 @@ trait WebhooksBase return array_merge(['bucketId' => $bucketId]); } - /** - * @depends testCreateStorageBucket - */ + #[Depends('testCreateStorageBucket')] public function testUpdateStorageBucket(array $data): array { $bucketId = $data['bucketId']; @@ -832,9 +817,7 @@ trait WebhooksBase return array_merge(['bucketId' => $bucket['body']['$id']]); } - /** - * @depends testCreateStorageBucket - */ + #[Depends('testCreateStorageBucket')] public function testCreateBucketFile(array $data): array { $bucketId = $data['bucketId']; @@ -906,9 +889,7 @@ trait WebhooksBase return $data; } - /** - * @depends testCreateBucketFile - */ + #[Depends('testCreateBucketFile')] public function testUpdateBucketFile(array $data): array { $bucketId = $data['bucketId']; @@ -962,9 +943,7 @@ trait WebhooksBase return $data; } - /** - * @depends testUpdateBucketFile - */ + #[Depends('testUpdateBucketFile')] public function testDeleteBucketFile(array $data): array { $bucketId = $data['bucketId']; @@ -1012,9 +991,7 @@ trait WebhooksBase return $data; } - /** - * @depends testDeleteBucketFile - */ + #[Depends('testDeleteBucketFile')] public function testDeleteStorageBucket(array $data) { $bucketId = $data['bucketId']; @@ -1094,9 +1071,7 @@ trait WebhooksBase return ['teamId' => $teamId]; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testUpdateTeam($data): array { $teamId = $data['teamId']; @@ -1139,9 +1114,7 @@ trait WebhooksBase return ['teamId' => $team['body']['$id']]; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testUpdateTeamPrefs(array $data): array { $id = $data['teamId'] ?? ''; @@ -1235,9 +1208,7 @@ trait WebhooksBase return []; } - /** - * @depends testCreateTeam - */ + #[Depends('testCreateTeam')] public function testCreateTeamMembership($data): array { $teamId = $data['teamId'] ?? ''; @@ -1315,9 +1286,7 @@ trait WebhooksBase ]; } - /** - * @depends testCreateTeamMembership - */ + #[Depends('testCreateTeamMembership')] public function testDeleteTeamMembership($data): void { $teamId = $data['teamId'] ?? ''; @@ -1434,9 +1403,7 @@ trait WebhooksBase $this->assertEquals(400, $webhook['headers']['status-code']); } - /** - * @depends testCreateCollection - */ + #[Depends('testCreateCollection')] public function testWebhookAutoDisable(array $data): void { $projectId = $this->getProject()['$id']; diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php index 0ffdf50e76..91cca30a3b 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Webhooks; use Appwrite\Tests\Retry; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -145,9 +146,7 @@ class WebhooksCustomClientTest extends Scope return []; } - /** - * @depends testCreateAccount - */ + #[Depends('testCreateAccount')] public function testCreateAccountSession($data): array { $id = $data['id'] ?? ''; @@ -224,9 +223,7 @@ class WebhooksCustomClientTest extends Scope ]); } - /** - * @depends testCreateAccount - */ + #[Depends('testCreateAccount')] public function testDeleteAccountSession($data): array { $id = $data['id'] ?? ''; @@ -309,9 +306,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testCreateAccount - */ + #[Depends('testCreateAccount')] public function testDeleteAccountSessions($data): array { $id = $data['id'] ?? ''; @@ -412,7 +407,6 @@ class WebhooksCustomClientTest extends Scope } /** - * @depends testDeleteAccountSessions */ #[Retry(count: 1)] public function testUpdateAccountName($data): array @@ -465,9 +459,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountName - */ + #[Depends('testUpdateAccountName')] public function testUpdateAccountPassword($data): array { $id = $data['id'] ?? ''; @@ -520,9 +512,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountPassword - */ + #[Depends('testUpdateAccountPassword')] public function testUpdateAccountEmail($data): array { $id = $data['id'] ?? ''; @@ -575,9 +565,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountEmail - */ + #[Depends('testUpdateAccountEmail')] public function testUpdateAccountPrefs($data): array { $id = $data['id'] ?? ''; @@ -632,9 +620,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountPrefs - */ + #[Depends('testUpdateAccountPrefs')] public function testCreateAccountVerification($data): array { $id = $data['id'] ?? ''; @@ -688,9 +674,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testCreateAccountVerification - */ + #[Depends('testCreateAccountVerification')] public function testUpdateAccountVerification($data): array { $id = $data['id'] ?? ''; @@ -746,9 +730,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testUpdateAccountPrefs - */ + #[Depends('testUpdateAccountPrefs')] public function testCreateAccountRecovery($data): array { $id = $data['id'] ?? ''; @@ -801,9 +783,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testCreateAccountRecovery - */ + #[Depends('testCreateAccountRecovery')] public function testUpdateAccountRecovery($data): array { $id = $data['id'] ?? ''; @@ -860,9 +840,7 @@ class WebhooksCustomClientTest extends Scope return $data; } - /** - * @depends testCreateTeamMembership - */ + #[Depends('testCreateTeamMembership')] public function testUpdateTeamMembership($data): array { $teamUid = $data['teamId'] ?? ''; diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index d1f1106247..ffe4a1fa38 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -4,6 +4,7 @@ namespace Tests\E2E\Services\Webhooks; use Appwrite\Tests\Async; use CURLFile; +use PHPUnit\Framework\Attributes\Depends; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -22,9 +23,7 @@ class WebhooksCustomServerTest extends Scope use SideServer; // Collection APIs - /** - * @depends testCreateAttributes - */ + #[Depends('testCreateAttributes')] public function testUpdateCollection($data): array { $id = $data['actorsId']; @@ -67,9 +66,7 @@ class WebhooksCustomServerTest extends Scope return array_merge(['actorsId' => $actors['body']['$id']]); } - /** - * @depends testCreateAttributes - */ + #[Depends('testCreateAttributes')] public function testCreateDeleteIndexes($data): array { $actorsId = $data['actorsId']; @@ -209,9 +206,7 @@ class WebhooksCustomServerTest extends Scope } // Table APIs - /** - * @depends testCreateColumns - */ + #[Depends('testCreateColumns')] public function testUpdateTable($data): array { $id = $data['actorsId']; @@ -254,9 +249,7 @@ class WebhooksCustomServerTest extends Scope return array_merge(['actorsId' => $actors['body']['$id']]); } - /** - * @depends testCreateColumns - */ + #[Depends('testCreateColumns')] public function testCreateDeleteColumnIndexes($data): array { $actorsId = $data['actorsId']; @@ -446,9 +439,7 @@ class WebhooksCustomServerTest extends Scope return ['userId' => $user['body']['$id'], 'name' => $user['body']['name'], 'email' => $user['body']['email']]; } - /** - * @depends testCreateUser - */ + #[Depends('testCreateUser')] public function testUpdateUserPrefs(array $data): array { $id = $data['userId']; @@ -487,9 +478,7 @@ class WebhooksCustomServerTest extends Scope return $data; } - /** - * @depends testUpdateUserPrefs - */ + #[Depends('testUpdateUserPrefs')] public function testUpdateUserStatus(array $data): array { $id = $data['userId']; @@ -534,9 +523,7 @@ class WebhooksCustomServerTest extends Scope return $data; } - /** - * @depends testUpdateUserStatus - */ + #[Depends('testUpdateUserStatus')] public function testDeleteUser(array $data): array { $id = $data['userId']; @@ -613,9 +600,7 @@ class WebhooksCustomServerTest extends Scope ]; } - /** - * @depends testCreateFunction - */ + #[Depends('testCreateFunction')] public function testUpdateFunction($data): array { $id = $data['functionId']; @@ -667,9 +652,7 @@ class WebhooksCustomServerTest extends Scope return $data; } - /** - * @depends testUpdateFunction - */ + #[Depends('testUpdateFunction')] public function testCreateDeployment($data): array { /** @@ -717,9 +700,7 @@ class WebhooksCustomServerTest extends Scope return array_merge($data, ['deploymentId' => $deploymentId]); } - /** - * @depends testCreateDeployment - */ + #[Depends('testCreateDeployment')] public function testUpdateDeployment($data): array { $id = $data['functionId'] ?? ''; @@ -766,9 +747,7 @@ class WebhooksCustomServerTest extends Scope return $data; } - /** - * @depends testUpdateDeployment - */ + #[Depends('testUpdateDeployment')] public function testExecutions($data): array { $id = $data['functionId'] ?? ''; @@ -837,9 +816,7 @@ class WebhooksCustomServerTest extends Scope return $data; } - /** - * @depends testExecutions - */ + #[Depends('testExecutions')] public function testDeleteDeployment($data): array { $id = $data['functionId'] ?? ''; @@ -882,9 +859,7 @@ class WebhooksCustomServerTest extends Scope return $data; } - /** - * @depends testDeleteDeployment - */ + #[Depends('testDeleteDeployment')] public function testDeleteFunction($data): array { $id = $data['functionId']; diff --git a/tests/unit/Utopia/Database/Validator/ProjectIdTest.php b/tests/unit/Utopia/Database/Validator/ProjectIdTest.php index 1b4b5384db..8cf1e5c053 100644 --- a/tests/unit/Utopia/Database/Validator/ProjectIdTest.php +++ b/tests/unit/Utopia/Database/Validator/ProjectIdTest.php @@ -3,6 +3,7 @@ namespace Tests\Unit\Utopia\Database\Validator; use Appwrite\Utopia\Database\Validator\ProjectId; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class ProjectIdTest extends TestCase @@ -18,10 +19,7 @@ class ProjectIdTest extends TestCase { } - /** - * @return array - */ - public function provideTest(): array + public static function provideTest(): array { return [ 'unique()' => ['unique()', true], @@ -34,9 +32,7 @@ class ProjectIdTest extends TestCase ]; } - /** - * @dataProvider provideTest - */ + #[DataProvider('provideTest')] public function testValues(string $input, bool $expected): void { $this->assertEquals($this->object->isValid($input), $expected); diff --git a/tests/unit/Utopia/Request/Filters/V16Test.php b/tests/unit/Utopia/Request/Filters/V16Test.php index 322e24260a..2a40e70b0e 100644 --- a/tests/unit/Utopia/Request/Filters/V16Test.php +++ b/tests/unit/Utopia/Request/Filters/V16Test.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Utopia\Request\Filters; use Appwrite\Utopia\Request\Filter; use Appwrite\Utopia\Request\Filters\V16; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class V16Test extends TestCase @@ -22,7 +23,7 @@ class V16Test extends TestCase { } - public function createExecutionProvider(): array + public static function createExecutionProvider(): array { return [ 'data' => [ @@ -42,9 +43,7 @@ class V16Test extends TestCase ]; } - /** - * @dataProvider createExecutionProvider - */ + #[DataProvider('createExecutionProvider')] public function testCreateExecution(array $content, array $expected): void { $model = 'functions.createExecution'; diff --git a/tests/unit/Utopia/Request/Filters/V17Test.php b/tests/unit/Utopia/Request/Filters/V17Test.php index 3efa72c77a..afc363c582 100644 --- a/tests/unit/Utopia/Request/Filters/V17Test.php +++ b/tests/unit/Utopia/Request/Filters/V17Test.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Utopia\Request\Filters; use Appwrite\Utopia\Request\Filter; use Appwrite\Utopia\Request\Filters\V17; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class V17Test extends TestCase @@ -22,7 +23,7 @@ class V17Test extends TestCase { } - public function createUpdateRecoveryProvider() + public static function createUpdateRecoveryProvider(): array { return [ 'remove passwordAgain' => [ @@ -41,9 +42,7 @@ class V17Test extends TestCase ]; } - /** - * @dataProvider createUpdateRecoveryProvider - */ + #[DataProvider('createUpdateRecoveryProvider')] public function testUpdateRecovery(array $content, array $expected): void { $model = 'account.updateRecovery'; @@ -53,7 +52,7 @@ class V17Test extends TestCase $this->assertEquals($expected, $result); } - public function createQueryProvider() + public static function createQueryProvider(): array { return [ 'convert queries' => [ @@ -75,9 +74,7 @@ class V17Test extends TestCase ]; } - /** - * @dataProvider createQueryProvider - */ + #[DataProvider('createQueryProvider')] public function testQuery(array $content, array $expected): void { $model = 'databases.getDocument'; diff --git a/tests/unit/Utopia/Request/Filters/V18Test.php b/tests/unit/Utopia/Request/Filters/V18Test.php index 4e1f81573a..e4f3f0043b 100644 --- a/tests/unit/Utopia/Request/Filters/V18Test.php +++ b/tests/unit/Utopia/Request/Filters/V18Test.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Utopia\Request\Filters; use Appwrite\Utopia\Request\Filter; use Appwrite\Utopia\Request\Filters\V18; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class V18Test extends TestCase @@ -22,7 +23,7 @@ class V18Test extends TestCase { } - public function deleteMfaAuthenticatorProvider() + public static function deleteMfaAuthenticatorProvider(): array { return [ 'remove otp' => [ @@ -37,9 +38,7 @@ class V18Test extends TestCase ]; } - /** - * @dataProvider deleteMfaAuthenticatorProvider - */ + #[DataProvider('deleteMfaAuthenticatorProvider')] public function testdeleteMfaAuthenticator(array $content, array $expected): void { $model = 'account.deleteMfaAuthenticator'; diff --git a/tests/unit/Utopia/Request/Filters/V19Test.php b/tests/unit/Utopia/Request/Filters/V19Test.php index 418951705e..b302ee6a5f 100644 --- a/tests/unit/Utopia/Request/Filters/V19Test.php +++ b/tests/unit/Utopia/Request/Filters/V19Test.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Utopia\Request\Filters; use Appwrite\Utopia\Request\Filter; use Appwrite\Utopia\Request\Filters\V19; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class V19Test extends TestCase @@ -22,7 +23,7 @@ class V19Test extends TestCase { } - public function functionsCreateProvider() + public static function functionsCreateProvider(): array { return [ 'remove template fields' => [ @@ -42,7 +43,7 @@ class V19Test extends TestCase ]; } - public function functionsListExecutionsProvider() + public static function functionsListExecutionsProvider(): array { return [ 'remove search field' => [ @@ -59,9 +60,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider functionsCreateProvider - */ + #[DataProvider('functionsCreateProvider')] public function testFunctionsCreate(array $content, array $expected): void { $model = 'functions.create'; @@ -71,9 +70,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - /** - * @dataProvider functionsListExecutionsProvider - */ + #[DataProvider('functionsListExecutionsProvider')] public function testFunctionsListExecutions(array $content, array $expected): void { $model = 'functions.listExecutions'; diff --git a/tests/unit/Utopia/Response/Filters/V16Test.php b/tests/unit/Utopia/Response/Filters/V16Test.php index 94048dc3c5..e771146e3a 100644 --- a/tests/unit/Utopia/Response/Filters/V16Test.php +++ b/tests/unit/Utopia/Response/Filters/V16Test.php @@ -5,6 +5,7 @@ namespace Tests\Unit\Utopia\Response\Filters; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filters\V16; use Cron\CronExpression; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Utopia\Database\DateTime; @@ -24,7 +25,7 @@ class V16Test extends TestCase { } - public function deploymentProvider(): array + public static function deploymentProvider(): array { return [ 'buildStdout and buildStderr' => [ @@ -64,9 +65,7 @@ class V16Test extends TestCase ]; } - /** - * @dataProvider deploymentProvider - */ + #[DataProvider('deploymentProvider')] public function testDeployment(array $content, array $expected): void { $model = Response::MODEL_DEPLOYMENT; @@ -76,7 +75,7 @@ class V16Test extends TestCase $this->assertEquals($expected, $result); } - public function executionProvider(): array + public static function executionProvider(): array { return [ 'statusCode' => [ @@ -114,9 +113,7 @@ class V16Test extends TestCase ]; } - /** - * @dataProvider executionProvider - */ + #[DataProvider('executionProvider')] public function testExecution(array $content, array $expected): void { $model = Response::MODEL_EXECUTION; @@ -126,7 +123,7 @@ class V16Test extends TestCase $this->assertEquals($expected, $result); } - public function functionProvider(): array + public static function functionProvider(): array { return [ 'empty schedule' => [ @@ -142,9 +139,7 @@ class V16Test extends TestCase ]; } - /** - * @dataProvider functionProvider - */ + #[DataProvider('functionProvider')] public function testFunction(array $content, array $expected): void { $model = Response::MODEL_FUNCTION; @@ -175,7 +170,7 @@ class V16Test extends TestCase $this->assertEquals($expected, $result); } - public function projectProvider(): array + public static function projectProvider(): array { return [ 'oAuthProviders' => [ @@ -212,9 +207,7 @@ class V16Test extends TestCase ]; } - /** - * @dataProvider projectProvider - */ + #[DataProvider('projectProvider')] public function testProject(array $content, array $expected): void { $model = Response::MODEL_PROJECT; @@ -224,7 +217,7 @@ class V16Test extends TestCase $this->assertEquals($expected, $result); } - public function variableProvider(): array + public static function variableProvider(): array { return [ 'functionId' => [ @@ -238,9 +231,7 @@ class V16Test extends TestCase ]; } - /** - * @dataProvider variableProvider - */ + #[DataProvider('variableProvider')] public function testVariable(array $content, array $expected): void { $model = Response::MODEL_VARIABLE; diff --git a/tests/unit/Utopia/Response/Filters/V17Test.php b/tests/unit/Utopia/Response/Filters/V17Test.php index dedaa996e1..21d91e1314 100644 --- a/tests/unit/Utopia/Response/Filters/V17Test.php +++ b/tests/unit/Utopia/Response/Filters/V17Test.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Utopia\Response\Filters; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filters\V17; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class V17Test extends TestCase @@ -22,7 +23,7 @@ class V17Test extends TestCase { } - public function projectProvider(): array + public static function projectProvider(): array { return [ 'rename providers' => [ @@ -52,9 +53,7 @@ class V17Test extends TestCase ]; } - /** - * @dataProvider projectProvider - */ + #[DataProvider('projectProvider')] public function testProject(array $content, array $expected): void { $model = Response::MODEL_PROJECT; @@ -64,7 +63,7 @@ class V17Test extends TestCase $this->assertEquals($expected, $result); } - public function userProvider(): array + public static function userProvider(): array { return [ 'remove targets' => [ @@ -78,9 +77,7 @@ class V17Test extends TestCase ]; } - /** - * @dataProvider userProvider - */ + #[DataProvider('userProvider')] public function testUser(array $content, array $expected): void { $model = Response::MODEL_USER; @@ -90,7 +87,7 @@ class V17Test extends TestCase $this->assertEquals($expected, $result); } - public function tokenProvider(): array + public static function tokenProvider(): array { return [ 'remove securityPhrase' => [ @@ -103,9 +100,7 @@ class V17Test extends TestCase ]; } - /** - * @dataProvider tokenProvider - */ + #[DataProvider('tokenProvider')] public function testToken(array $content, array $expected): void { $model = Response::MODEL_TOKEN; @@ -115,7 +110,7 @@ class V17Test extends TestCase $this->assertEquals($expected, $result); } - public function membershipProvider(): array + public static function membershipProvider(): array { return [ 'remove mfa' => [ @@ -128,9 +123,7 @@ class V17Test extends TestCase ]; } - /** - * @dataProvider membershipProvider - */ + #[DataProvider('membershipProvider')] public function testMembership(array $content, array $expected): void { $model = Response::MODEL_MEMBERSHIP; @@ -140,7 +133,7 @@ class V17Test extends TestCase $this->assertEquals($expected, $result); } - public function sessionProvider(): array + public static function sessionProvider(): array { return [ 'remove factors and secrets' => [ @@ -154,9 +147,7 @@ class V17Test extends TestCase ]; } - /** - * @dataProvider sessionProvider - */ + #[DataProvider('sessionProvider')] public function testSession(array $content, array $expected): void { $model = Response::MODEL_SESSION; @@ -166,7 +157,7 @@ class V17Test extends TestCase $this->assertEquals($expected, $result); } - public function webhookProvider(): array + public static function webhookProvider(): array { return [ 'remove webhook additions' => [ diff --git a/tests/unit/Utopia/Response/Filters/V18Test.php b/tests/unit/Utopia/Response/Filters/V18Test.php index ec4ffb68fc..da169a7d0e 100644 --- a/tests/unit/Utopia/Response/Filters/V18Test.php +++ b/tests/unit/Utopia/Response/Filters/V18Test.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Utopia\Response\Filters; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filters\V18; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class V18Test extends TestCase @@ -22,7 +23,7 @@ class V18Test extends TestCase { } - public function functionProvider(): array + public static function functionProvider(): array { return [ 'remove scopes' => [ @@ -38,9 +39,7 @@ class V18Test extends TestCase ]; } - /** - * @dataProvider functionProvider - */ + #[DataProvider('functionProvider')] public function testFunction(array $content, array $expected): void { $model = Response::MODEL_FUNCTION; @@ -51,7 +50,7 @@ class V18Test extends TestCase } - public function executionProvider(): array + public static function executionProvider(): array { return [ 'remove scheduledAt' => [ @@ -104,9 +103,7 @@ class V18Test extends TestCase ]; } - /** - * @dataProvider executionProvider - */ + #[DataProvider('executionProvider')] public function testExecution(array $content, array $expected): void { $model = Response::MODEL_EXECUTION; @@ -116,7 +113,7 @@ class V18Test extends TestCase $this->assertEquals($expected, $result); } - public function projectProvider(): array + public static function projectProvider(): array { return [ 'remove authMockNumbers and authSessionAlerts' => [ @@ -136,9 +133,7 @@ class V18Test extends TestCase ]; } - /** - * @dataProvider projectProvider - */ + #[DataProvider('projectProvider')] public function testProject(array $content, array $expected): void { $model = Response::MODEL_PROJECT; @@ -148,7 +143,7 @@ class V18Test extends TestCase $this->assertEquals($expected, $result); } - public function runtimeProvider(): array + public static function runtimeProvider(): array { return [ 'remove key' => [ @@ -161,9 +156,7 @@ class V18Test extends TestCase ]; } - /** - * @dataProvider runtimeProvider - */ + #[DataProvider('runtimeProvider')] public function testRuntime(array $content, array $expected): void { $model = Response::MODEL_RUNTIME; diff --git a/tests/unit/Utopia/Response/Filters/V19Test.php b/tests/unit/Utopia/Response/Filters/V19Test.php index 7d413bdd37..eaeefba2fc 100644 --- a/tests/unit/Utopia/Response/Filters/V19Test.php +++ b/tests/unit/Utopia/Response/Filters/V19Test.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Utopia\Response\Filters; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filters\V19; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class V19Test extends TestCase @@ -22,7 +23,7 @@ class V19Test extends TestCase { } - public function functionProvider(): array + public static function functionProvider(): array { return [ 'change deploymentId to deployment' => [ @@ -45,9 +46,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider functionProvider - */ + #[DataProvider('functionProvider')] public function testFunction(array $content, array $expected): void { $model = Response::MODEL_FUNCTION; @@ -57,7 +56,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function functionListProvider(): array + public static function functionListProvider(): array { return [ 'convert list of functions' => [ @@ -101,9 +100,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider functionListProvider - */ + #[DataProvider('functionListProvider')] public function testFunctionList(array $content, array $expected): void { $model = Response::MODEL_FUNCTION_LIST; @@ -113,7 +110,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function deploymentProvider(): array + public static function deploymentProvider(): array { return [ 'rename sourceSize to size and buildDuration to buildTime' => [ @@ -141,9 +138,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider deploymentProvider - */ + #[DataProvider('deploymentProvider')] public function testDeployment(array $content, array $expected): void { $model = Response::MODEL_DEPLOYMENT; @@ -153,7 +148,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function proxyRuleProvider(): array + public static function proxyRuleProvider(): array { return [ 'rename deployment resource fields' => [ @@ -181,9 +176,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider proxyRuleProvider - */ + #[DataProvider('proxyRuleProvider')] public function testProxyRule(array $content, array $expected): void { $model = Response::MODEL_PROXY_RULE; @@ -193,7 +186,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function migrationProvider(): array + public static function migrationProvider(): array { return [ 'remove resourceId field' => [ @@ -216,9 +209,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider migrationProvider - */ + #[DataProvider('migrationProvider')] public function testMigration(array $content, array $expected): void { $model = Response::MODEL_MIGRATION; @@ -228,7 +219,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function projectProvider(): array + public static function projectProvider(): array { return [ 'remove devKeys field' => [ @@ -251,9 +242,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider projectProvider - */ + #[DataProvider('projectProvider')] public function testProject(array $content, array $expected): void { $model = Response::MODEL_PROJECT; @@ -263,7 +252,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function providerRepositoryProvider(): array + public static function providerRepositoryProvider(): array { return [ 'remove runtime field' => [ @@ -286,9 +275,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider providerRepositoryProvider - */ + #[DataProvider('providerRepositoryProvider')] public function testProviderRepository(array $content, array $expected): void { $model = Response::MODEL_PROVIDER_REPOSITORY; @@ -298,7 +285,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function templateVariableProvider(): array + public static function templateVariableProvider(): array { return [ 'remove secret field' => [ @@ -321,9 +308,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider templateVariableProvider - */ + #[DataProvider('templateVariableProvider')] public function testTemplateVariable(array $content, array $expected): void { $model = Response::MODEL_TEMPLATE_VARIABLE; @@ -333,7 +318,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function usageFunctionProvider(): array + public static function usageFunctionProvider(): array { return [ 'remove build-related fields' => [ @@ -360,9 +345,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider usageFunctionProvider - */ + #[DataProvider('usageFunctionProvider')] public function testUsageFunction(array $content, array $expected): void { $model = Response::MODEL_USAGE_FUNCTION; @@ -372,7 +355,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function usageFunctionsProvider(): array + public static function usageFunctionsProvider(): array { return [ 'remove build-related fields' => [ @@ -398,9 +381,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider usageFunctionsProvider - */ + #[DataProvider('usageFunctionsProvider')] public function testUsageFunctions(array $content, array $expected): void { $model = Response::MODEL_USAGE_FUNCTIONS; @@ -410,7 +391,7 @@ class V19Test extends TestCase $this->assertEquals($expected, $result); } - public function variableProvider(): array + public static function variableProvider(): array { return [ 'remove secret field' => [ @@ -433,9 +414,7 @@ class V19Test extends TestCase ]; } - /** - * @dataProvider variableProvider - */ + #[DataProvider('variableProvider')] public function testVariable(array $content, array $expected): void { $model = Response::MODEL_VARIABLE;