From 3cbe9802d31ce2e68ca31aae1c082d25101367f7 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 2 Nov 2025 19:16:46 +0200 Subject: [PATCH 01/27] Refactor old testing code --- .gitignore | 4 +- FOR_DEVELOPERS.md | 20 + Makefile | 13 +- composer.json | 24 +- composer.lock | 1070 ++++++++++------- phpunit.xml | 30 + test/.gitignore | 5 - .../admin/permissions/testActions.php | 128 -- .../admin/permissions/testArticleEdit.php | 89 -- .../admin/permissions/testCategoryEdit.php | 87 -- test/bootstrap.php | 86 -- test/build.xml | 50 - tests/AttachmentsTestCase.php | 348 ++++++ .../Admin/Import/AttachmentsImport2.php | 24 + .../Admin/Import/ImportAttachmentsTest.php | 44 +- .../Admin/Import/ParseFieldnamesTest.php | 51 +- .../Import}/testImportAttachmentsData.csv | 0 .../Admin/Import}/testParseFieldnamesData.csv | 0 .../testfiles/fieldnames_badfieldname.csv | 0 .../Import}/testfiles/fieldnames_good.csv | 0 .../Import}/testfiles/fieldnames_missing.csv | 0 .../Import}/testfiles/fieldnames_noid.csv | 0 .../testfiles/fieldnames_reordered.csv | 0 .../Admin/Import}/testfiles/import_add1.csv | 0 .../Import}/testfiles/import_badcreatorid.csv | 0 .../testfiles/import_badcreatorname.csv | 0 .../Admin/Import}/testfiles/import_badid.csv | 0 .../testfiles/import_badmodifierid.csv | 0 .../testfiles/import_badmodifiername.csv | 0 .../Import}/testfiles/import_badparentid.csv | 0 .../Import}/testfiles/import_badtitle.csv | 0 .../Admin/Import}/testfiles/import_good.csv | 0 .../Import}/testfiles/import_windows.csv | 0 .../Admin/Import}/testfiles/import_zeroid.csv | 0 .../Admin/Permissions/ActionsTest.php | 82 ++ .../Admin/Permissions/ArticleEditTest.php | 59 + .../Admin/Permissions/CategoryEditTest.php | 59 + .../Admin/Permissions}/testActionsData.csv | 0 .../Permissions}/testArticleEditData.csv | 0 .../Permissions}/testCategoryEditData.csv | 0 .../FileTypes/FileTypeConversionsTest.php | 28 +- .../Site/FileTypes/FileTypesRoundTripTest.php | 11 +- .../testFileTypesConversionsData.csv | 0 .../Site/Helper/FileTypeRoundTripTest.php | 44 + .../Helper/HelperFilenameTruncationTest.php | 47 +- .../Site/Helper/HelperURLTruncationTest.php | 39 +- .../testHelperFilenameTruncationData.csv | 0 .../Helper}/testHelperURLTruncationData.csv | 0 tests/Stubs/empty.xml | 3 + tests/Unit/AttachmentsBasicTest.php | 51 + tests/Unit/Helper/AttachmentsInstallTest.php | 40 + .../Helper/AttachmentsPermissionsTest.php | 329 +++++ tests/Unit/Helper/AttachmentsUpdateTest.php | 43 + .../utils => tests/Utils}/CsvFileIterator.php | 42 +- tests/bootstrap.php | 44 + 55 files changed, 1954 insertions(+), 1040 deletions(-) create mode 100644 phpunit.xml delete mode 100644 test/.gitignore delete mode 100644 test/attachments_component/admin/permissions/testActions.php delete mode 100644 test/attachments_component/admin/permissions/testArticleEdit.php delete mode 100644 test/attachments_component/admin/permissions/testCategoryEdit.php delete mode 100644 test/bootstrap.php delete mode 100644 test/build.xml create mode 100644 tests/AttachmentsTestCase.php create mode 100644 tests/Integration/Component/Admin/Import/AttachmentsImport2.php rename test/attachments_component/admin/import/testImportAttachments.php => tests/Integration/Component/Admin/Import/ImportAttachmentsTest.php (71%) rename test/attachments_component/admin/import/testParseFieldnames.php => tests/Integration/Component/Admin/Import/ParseFieldnamesTest.php (61%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testImportAttachmentsData.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testParseFieldnamesData.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/fieldnames_badfieldname.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/fieldnames_good.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/fieldnames_missing.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/fieldnames_noid.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/fieldnames_reordered.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_add1.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_badcreatorid.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_badcreatorname.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_badid.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_badmodifierid.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_badmodifiername.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_badparentid.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_badtitle.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_good.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_windows.csv (100%) rename {test/attachments_component/admin/import => tests/Integration/Component/Admin/Import}/testfiles/import_zeroid.csv (100%) create mode 100644 tests/Integration/Component/Admin/Permissions/ActionsTest.php create mode 100644 tests/Integration/Component/Admin/Permissions/ArticleEditTest.php create mode 100644 tests/Integration/Component/Admin/Permissions/CategoryEditTest.php rename {test/attachments_component/admin/permissions => tests/Integration/Component/Admin/Permissions}/testActionsData.csv (100%) rename {test/attachments_component/admin/permissions => tests/Integration/Component/Admin/Permissions}/testArticleEditData.csv (100%) rename {test/attachments_component/admin/permissions => tests/Integration/Component/Admin/Permissions}/testCategoryEditData.csv (100%) rename test/attachments_component/site/file_types/testFileTypesConversions.php => tests/Integration/Component/Site/FileTypes/FileTypeConversionsTest.php (66%) rename test/attachments_component/site/file_types/testFileTypesRoundTrip.php => tests/Integration/Component/Site/FileTypes/FileTypesRoundTripTest.php (81%) rename {test/attachments_component/site/file_types => tests/Integration/Component/Site/FileTypes}/testFileTypesConversionsData.csv (100%) create mode 100644 tests/Integration/Component/Site/Helper/FileTypeRoundTripTest.php rename test/attachments_component/site/helper/testHelperFilenameTruncation.php => tests/Integration/Component/Site/Helper/HelperFilenameTruncationTest.php (53%) rename test/attachments_component/site/helper/testHelperURLTruncation.php => tests/Integration/Component/Site/Helper/HelperURLTruncationTest.php (66%) rename {test/attachments_component/site/helper => tests/Integration/Component/Site/Helper}/testHelperFilenameTruncationData.csv (100%) rename {test/attachments_component/site/helper => tests/Integration/Component/Site/Helper}/testHelperURLTruncationData.csv (100%) create mode 100644 tests/Stubs/empty.xml create mode 100644 tests/Unit/AttachmentsBasicTest.php create mode 100644 tests/Unit/Helper/AttachmentsInstallTest.php create mode 100644 tests/Unit/Helper/AttachmentsPermissionsTest.php create mode 100644 tests/Unit/Helper/AttachmentsUpdateTest.php rename {test/utils => tests/Utils}/CsvFileIterator.php (56%) create mode 100644 tests/bootstrap.php diff --git a/.gitignore b/.gitignore index b0b53e6b..7576536a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ /unerrnum /watch* /vendor -/node_modules \ No newline at end of file +/node_modules +/.phpunit.result.cache +/.phpunit.cache \ No newline at end of file diff --git a/FOR_DEVELOPERS.md b/FOR_DEVELOPERS.md index 8f574308..8b3d7812 100644 --- a/FOR_DEVELOPERS.md +++ b/FOR_DEVELOPERS.md @@ -2,6 +2,7 @@ - [How to update release](#how-to-update-release-version) - [How to update release package](#how-to-update-release-package) +- [Testing](#testing) ### How to update release version @@ -24,3 +25,22 @@ create a release with v as name upload the package file attachments-.zip into this release + +### Testing + +This project uses PHPUnit for testing. To run the tests: + +1. Install dependencies: `composer install` +2. Run all tests: `composer test` or `make test` +3. Run tests with coverage: `composer test-coverage` or `make test-coverage` + +The test suite includes: +- Unit tests for core functionality in `tests/unit/` +- Integration tests in `tests/integration/` (when available) +- Helper tests for the AttachmentsPermissions class and related functionality + +To run specific tests: +- `vendor/bin/phpunit tests/unit/Helper/` - Run all helper tests +- `vendor/bin/phpunit --testdox` - Run with human-readable output +- `vendor/bin/phpunit --coverage-html coverage/` - Run with coverage report + diff --git a/Makefile b/Makefile index daa0491d..494f8977 100644 --- a/Makefile +++ b/Makefile @@ -119,14 +119,19 @@ purge: @find . -name '*.bak' -exec rm {} \; @rm -f .tx/*.bak -unittests: +test: @echo @echo "Running unit tests..." - @cd test; phing -Droot=/var/www/test/joomla25/ unit_tests + @php vendor/bin/phpunit -c phpunit.xml @echo -unittests_show: unittests - @firefox test/coverage_result/index.html +test-coverage: + @echo + @echo "Running unit tests with coverage..." + @php vendor/bin/phpunit -c phpunit.xml --coverage-html ./tests/coverage-report + @echo + @echo "Coverage report generated in tests/coverage-report/index.html" + @echo manual: extensions_manual/manual.rst @echo "Creating Attachments Extension Manual" diff --git a/composer.json b/composer.json index fa5eb968..51f15e7d 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,20 @@ { "require-dev": { - "phpunit/phpunit": "^10.3", - "phpcompatibility/php-compatibility": "^10.0@dev" + "phpunit/phpunit": "^11.3", + "phpcompatibility/php-compatibility": "^9.0", + "joomla/test": "^3.0", + "joomla/string": "^3.0" + }, + "autoload": { + "psr-4": { + "JMCameron\\Component\\Attachments\\Administrator\\": "attachments_component/admin/src/", + "JMCameron\\Component\\Attachments\\Site\\": "attachments_component/site/src/" + } }, "autoload-dev": { - "Tests\\": "tests", - "JMCameron\\Component\\Attachments\\Administrator\\": "attachments_component/admin/src/", - "JMCameron\\Component\\Attachments\\Site\\": "attachments_component/site/src/" + "psr-4": { + "Tests\\": "tests/" + } }, "config": { "allow-plugins": { @@ -14,6 +22,8 @@ } }, "scripts": { - "check-compatibility": "phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 7.4- --ignore=*/vendor/*,temp/*" + "check-compatibility": "phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 7.4- --ignore=*/vendor/*,temp/*", + "test": "phpunit -c phpunit.xml", + "test-coverage": "phpunit -c phpunit.xml --coverage-html ./tests/coverage-report" } -} +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 4106a965..58b15c57 100644 --- a/composer.lock +++ b/composer.lock @@ -4,99 +4,162 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "67e137657ce526e75ee7b279e377073d", + "content-hash": "5b9d4a1c1988ffd268d4d2bbcdef143e", "packages": [], "packages-dev": [ { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v1.0.0", + "name": "joomla/string", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/PHPCSStandards/composer-installer.git", - "reference": "4be43904336affa5c2f70744a348312336afd0da" + "url": "https://github.com/joomla-framework/string.git", + "reference": "0b3d33564db389e27346f7e275c694897c939434" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", - "reference": "4be43904336affa5c2f70744a348312336afd0da", + "url": "https://api.github.com/repos/joomla-framework/string/zipball/0b3d33564db389e27346f7e275c694897c939434", + "reference": "0b3d33564db389e27346f7e275c694897c939434", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.4", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + "php": "^8.1.0", + "symfony/deprecation-contracts": "^2|^3" + }, + "conflict": { + "doctrine/inflector": "<1.2" }, "require-dev": { - "composer/composer": "*", - "ext-json": "*", - "ext-zip": "*", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0", - "yoast/phpunit-polyfills": "^1.0" + "doctrine/inflector": "^1.2", + "joomla/test": "^3.0", + "phpstan/phpstan": "1.12.27", + "phpstan/phpstan-deprecation-rules": "1.2.1", + "phpunit/phpunit": "^9.5.28", + "squizlabs/php_codesniffer": "^3.7.2" + }, + "suggest": { + "doctrine/inflector": "To use the string inflector", + "ext-mbstring": "For improved processing" }, - "type": "composer-plugin", + "type": "joomla-package", "extra": { - "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "branch-alias": { + "dev-2.0-dev": "2.0-dev", + "dev-3.x-dev": "3.0-dev" + } }, "autoload": { + "files": [ + "src/phputf8/utf8.php", + "src/phputf8/ord.php", + "src/phputf8/str_ireplace.php", + "src/phputf8/str_pad.php", + "src/phputf8/str_split.php", + "src/phputf8/strcasecmp.php", + "src/phputf8/strcspn.php", + "src/phputf8/stristr.php", + "src/phputf8/strrev.php", + "src/phputf8/strspn.php", + "src/phputf8/trim.php", + "src/phputf8/ucfirst.php", + "src/phputf8/ucwords.php", + "src/phputf8/utils/ascii.php", + "src/phputf8/utils/validation.php" + ], "psr-4": { - "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "Joomla\\String\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "GPL-2.0-or-later" ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + "description": "Joomla String Package", + "homepage": "https://github.com/joomla-framework/string", + "keywords": [ + "framework", + "joomla", + "string" + ], + "support": { + "issues": "https://github.com/joomla-framework/string/issues", + "source": "https://github.com/joomla-framework/string/tree/3.0.4" + }, + "time": "2025-07-19T15:25:56+00:00" + }, + { + "name": "joomla/test", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/test.git", + "reference": "184bc36c0abeb4fa9471be472ecd5480125f1530" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/test/zipball/184bc36c0abeb4fa9471be472ecd5480125f1530", + "reference": "184bc36c0abeb4fa9471be472ecd5480125f1530", + "shasum": "" + }, + "require": { + "php": "^8.1.0" + }, + "conflict": { + "joomla/database": "<2.0" + }, + "require-dev": { + "joomla/database": "^3.0", + "phpstan/phpstan": "1.12.27", + "phpstan/phpstan-deprecation-rules": "1.2.1", + "phpunit/phpunit": "^9.5.28", + "squizlabs/php_codesniffer": "^3.7.2" + }, + "suggest": { + "joomla/database": "To use the database test case, install joomla/database", + "phpunit/phpunit": "To use the database test case, install phpunit/phpunit" + }, + "type": "joomla-package", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev", + "dev-3.x-dev": "3.0-dev" } + }, + "autoload": { + "psr-4": { + "Joomla\\Test\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", + "description": "Joomla Test Helper Package", + "homepage": "https://github.com/joomla-framework/test", "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcbf", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" + "framework", + "joomla", + "phpunit", + "reflection", + "unit test" ], "support": { - "issues": "https://github.com/PHPCSStandards/composer-installer/issues", - "source": "https://github.com/PHPCSStandards/composer-installer" + "issues": "https://github.com/joomla-framework/test/issues", + "source": "https://github.com/joomla-framework/test/tree/3.0.4" }, - "time": "2023-01-05T11:28:13+00:00" + "time": "2025-10-17T08:19:16+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.13.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { @@ -104,11 +167,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -134,7 +198,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, "funding": [ { @@ -142,29 +206,31 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2025-08-01T08:46:24+00:00" }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v5.6.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "3a454ca033b9e06b63282ce19562e892747449bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", + "reference": "3a454ca033b9e06b63282ce19562e892747449bb", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -172,7 +238,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -196,26 +262,27 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2025-10-21T19:32:17+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -256,9 +323,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -313,45 +386,33 @@ }, { "name": "phpcompatibility/php-compatibility", - "version": "dev-develop", + "version": "9.3.5", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "34a67f7eb4ec715df26d90429ea8cce88e0b38ff" + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/34a67f7eb4ec715df26d90429ea8cce88e0b38ff", - "reference": "34a67f7eb4ec715df26d90429ea8cce88e0b38ff", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", "shasum": "" }, "require": { - "php": ">=5.4", - "phpcsstandards/phpcsutils": "^1.0.5", - "squizlabs/php_codesniffer": "^3.7.1" + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" }, - "replace": { - "wimg/php-compatibility": "*" + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" }, "require-dev": { - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", - "phpcsstandards/phpcsdevcs": "^1.1.3", - "phpcsstandards/phpcsdevtools": "^1.2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4 || ^10.1.0", - "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, - "default-branch": true, "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev", - "dev-develop": "10.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0-or-later" @@ -377,120 +438,45 @@ "keywords": [ "compatibility", "phpcs", - "standards", - "static analysis" + "standards" ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", - "security": "https://github.com/PHPCompatibility/PHPCompatibility/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibility" }, - "time": "2023-12-04T17:28:03+00:00" - }, - { - "name": "phpcsstandards/phpcsutils", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", - "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/69465cab9d12454e5e7767b9041af0cd8cd13be7", - "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", - "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.7.1 || 4.0.x-dev@dev" - }, - "require-dev": { - "ext-filter": "*", - "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", - "phpcsstandards/phpcsdevcs": "^1.1.6", - "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" - }, - "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-stable": "1.x-dev", - "dev-develop": "1.x-dev" - } - }, - "autoload": { - "classmap": [ - "PHPCSUtils/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Juliette Reinders Folmer", - "homepage": "https://github.com/jrfnl", - "role": "lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" - } - ], - "description": "A suite of utility functions for use with PHP_CodeSniffer", - "homepage": "https://phpcsutils.com/", - "keywords": [ - "PHP_CodeSniffer", - "phpcbf", - "phpcodesniffer-standard", - "phpcs", - "phpcs3", - "standards", - "static analysis", - "tokens", - "utility" - ], - "support": { - "docs": "https://phpcsutils.com/", - "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", - "source": "https://github.com/PHPCSStandards/PHPCSUtils" - }, - "time": "2023-07-16T21:39:41+00:00" + "time": "2019-12-27T09:44:58+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "10.1.4", + "version": "11.0.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cd59bb34756a16ca8253ce9b2909039c227fff71" + "reference": "4f7722aa9a7b76aa775e2d9d4e95d1ea16eeeef4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cd59bb34756a16ca8253ce9b2909039c227fff71", - "reference": "cd59bb34756a16ca8253ce9b2909039c227fff71", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4f7722aa9a7b76aa775e2d9d4e95d1ea16eeeef4", + "reference": "4f7722aa9a7b76aa775e2d9d4e95d1ea16eeeef4", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", - "php": ">=8.1", - "phpunit/php-file-iterator": "^4.0", - "phpunit/php-text-template": "^3.0", - "sebastian/code-unit-reverse-lookup": "^3.0", - "sebastian/complexity": "^3.0", - "sebastian/environment": "^6.0", - "sebastian/lines-of-code": "^2.0", - "sebastian/version": "^4.0", - "theseer/tokenizer": "^1.2.0" + "nikic/php-parser": "^5.4.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.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^11.5.2" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -499,7 +485,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -528,40 +514,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.4" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.11" }, "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": "2023-08-31T14:04:38+00:00" + "time": "2025-08-27T14:37:49+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": { @@ -589,7 +587,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": [ { @@ -597,28 +595,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": "*" @@ -626,7 +624,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -652,7 +650,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": [ { @@ -660,32 +659,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": { @@ -712,7 +711,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": [ { @@ -720,32 +719,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": { @@ -771,7 +770,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": [ { @@ -779,20 +779,20 @@ "type": "github" } ], - "time": "2023-02-03T06:57:52+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "10.3.2", + "version": "11.5.43", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1" + "reference": "c6b89b6cf4324a8b4cb86e1f5dfdd6c9e0371924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0dafb1175c366dd274eaa9a625e914451506bcd1", - "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c6b89b6cf4324a8b4cb86e1f5dfdd6c9e0371924", + "reference": "c6b89b6cf4324a8b4cb86e1f5dfdd6c9e0371924", "shasum": "" }, "require": { @@ -802,26 +802,26 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.1", - "phpunit/php-file-iterator": "^4.0", - "phpunit/php-invoker": "^4.0", - "phpunit/php-text-template": "^3.0", - "phpunit/php-timer": "^6.0", - "sebastian/cli-parser": "^2.0", - "sebastian/code-unit": "^2.0", - "sebastian/comparator": "^5.0", - "sebastian/diff": "^5.0", - "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", - "sebastian/global-state": "^6.0.1", - "sebastian/object-enumerator": "^5.0", - "sebastian/recursion-context": "^5.0", - "sebastian/type": "^4.0", - "sebastian/version": "^4.0" + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.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" @@ -832,7 +832,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.3-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -864,7 +864,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.3.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.43" }, "funding": [ { @@ -875,37 +875,45 @@ "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/phpunit", "type": "tidelift" } ], - "time": "2023-08-15T05:34:23+00:00" + "time": "2025-10-30T08:39:39+00:00" }, { "name": "sebastian/cli-parser", - "version": "2.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "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": { @@ -928,7 +936,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -936,32 +945,32 @@ "type": "github" } ], - "time": "2023-02-03T06:58:15+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": { @@ -984,7 +993,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": [ { @@ -992,32 +1002,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": { @@ -1039,7 +1049,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": [ { @@ -1047,36 +1058,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.1", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2db5010a484d53ebf536087a70b4a5423c102372" + "reference": "85c77556683e6eee4323e4c5468641ca0237e2e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", - "reference": "2db5010a484d53ebf536087a70b4a5423c102372", + "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.3" + "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": { @@ -1116,41 +1130,53 @@ "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.1" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.2" }, "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/comparator", + "type": "tidelift" } ], - "time": "2023-08-14T13:18:12+00:00" + "time": "2025-08-10T08:07:46+00:00" }, { "name": "sebastian/complexity", - "version": "3.0.1", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c70b73893e10757af9c6a48929fa6a333b56a97a", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", - "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.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1174,7 +1200,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.0.1" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -1182,33 +1208,33 @@ "type": "github" } ], - "time": "2023-08-31T09:55:53+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "5.0.3", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "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", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1241,7 +1267,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.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -1249,27 +1275,27 @@ "type": "github" } ], - "time": "2023-05-01T07:48:21+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "6.0.1", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", + "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": "*" @@ -1277,7 +1303,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -1305,42 +1331,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.0.1" + "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": "2023-04-11T05:39:26+00:00" + "time": "2025-05-21T11:55:47+00:00" }, { "name": "sebastian/exporter", - "version": "5.0.0", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "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.0" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -1382,43 +1420,56 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.2" }, "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/exporter", + "type": "tidelift" } ], - "time": "2023-02-03T07:06:49+00:00" + "time": "2025-09-24T06:12:51+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.1", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", - "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "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": { @@ -1437,14 +1488,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "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.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -1452,33 +1503,33 @@ "type": "github" } ], - "time": "2023-07-19T07:19:23+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.1", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", - "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", - "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": { @@ -1502,7 +1553,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.1" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -1510,34 +1561,34 @@ "type": "github" } ], - "time": "2023-08-31T09:25:50+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": { @@ -1559,7 +1610,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": [ { @@ -1567,32 +1619,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": { @@ -1614,7 +1666,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": [ { @@ -1622,32 +1675,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.0", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "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.0" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1677,40 +1730,53 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.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/recursion-context", + "type": "tidelift" } ], - "time": "2023-02-03T07:05:40+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": { @@ -1733,37 +1799,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": { @@ -1786,7 +1865,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": [ { @@ -1794,20 +1874,20 @@ "type": "github" } ], - "time": "2023-02-07T11:34:05+00:00" + "time": "2024-10-09T05:16:32+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.13.4", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119", + "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119", "shasum": "" }, "require": { @@ -1817,11 +1897,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -1836,35 +1916,181 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-09-05T05:47:09+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": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -1893,7 +2119,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -1901,17 +2127,15 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "phpcompatibility/php-compatibility": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 00000000..f816770f --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,30 @@ + + + + + tests/Unit + + + tests/Integration + + + + + + + + + + + attachments_component/admin/src + attachments_component/site/src + attachments_plugin/src + attachments_for_content/src + attachments_search/src + attachments_plugin_framework/src + add_attachment_btn_plugin/src + insert_attachments_token_btn_plugin/src + show_attachments_in_editor_plugin/src + + + diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index 3ff3709a..00000000 --- a/test/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -config.php -joomla_db.xml -test1.php -coverage_db -coverage_result diff --git a/test/attachments_component/admin/permissions/testActions.php b/test/attachments_component/admin/permissions/testActions.php deleted file mode 100644 index da7ae215..00000000 --- a/test/attachments_component/admin/permissions/testActions.php +++ /dev/null @@ -1,128 +0,0 @@ -createXMLDataSet(JPATH_TESTS . '/joomla_db.xml'); - } - - - /** - * Test various ACL action permissions for com_attachments for various users - * - * @dataProvider provider - * - * @param string $username The name of ther user (for error outputs) - * @param int $admin correct 'core.admin' permission (0/1 interpreted as bool) - * @param int $manage correct 'core.manage' permission (0/1 interpreted as bool) - * @param int $create correct 'core.create' permission (0/1 interpreted as bool) - * @param int $delete correct 'core.delete' permission (0/1 interpreted as bool) - * @param int $edit_state correct 'core.edit.state' permission (0/1 interpreted as bool) - * @param int $edit correct 'core.edit' permission (0/1 interpreted as bool) - * @param int $edit_own correct 'core.edit.own' permission (0/1 interpreted as bool) - * @param int $delete_own correct 'attachments.delete.own' permission (0/1 interpreted as bool) - */ - public function testActions($username, $admin, $manage, $create, $delete, $edit_state, $edit, $edit_own, $delete_own) - { - $user_id = JUserHelper::getUserId($username); - - $errmsg = "ERROR: ========> USERNAME=$username does not exist!"; - $this->assertNotEquals((int)$user_id, 0, $errmsg); - - $canDo = AttachmentsPermissions::getActions((int)$user_id); - - $errmsg = "----> Failed test for $username core.admin for com_attachments, " . - " expected $admin, got " . $canDo->get('core.admin') . " for " . $username; - $this->assertEquals($canDo->get('core.admin'), (bool)$admin, $errmsg); - - $errmsg = "----> Failed test for $username core.manage for com_attachments, " . - " expected $manage, got " . $canDo->get('core.manage') . " for " . $username; - $this->assertEquals($canDo->get('core.manage'), (bool)$manage, $errmsg); - - $errmsg = "----> Failed test for $username core.create for com_attachments, " . - " expected $create, got " . $canDo->get('core.create') . " for " . $username; - $this->assertEquals($canDo->get('core.create'), (bool)$create, $errmsg); - - $errmsg = "----> Failed test for $username core.delete for com_attachments, " . - " expected $delete, got " . $canDo->get('core.delete') . " for " . $username; - $this->assertEquals($canDo->get('core.delete'), (bool)$delete, $errmsg); - - $errmsg = "----> Failed test for $username core.edit.state for com_attachments, " . - " expected $edit_state, got " . $canDo->get('core.edit.state') . " for " . $username; - $this->assertEquals($canDo->get('core.edit.state'), (bool)$edit_state, $errmsg); - - $errmsg = "----> Failed test for $username core.edit for com_attachments, " . - " expected $edit, got " . $canDo->get('core.edit') . " for " . $username; - $this->assertEquals($canDo->get('core.edit'), (bool)$edit, $errmsg); - - $errmsg = "----> Failed test for $username core.edit.own for com_attachments, " . - " expected $edit_own, got " . $canDo->get('core.edit.own') . " for " . $username; - $this->assertEquals($canDo->get('core.edit.own'), (bool)$edit_own, $errmsg); - - $errmsg = "----> Failed test for $username attachments.delete.own for com_attachments, " . - " expected $delete_own, got " . $canDo->get('attachments.delete.own') . " for " . $username; - $this->assertEquals($canDo->get('attachments.delete.own'), (bool)$delete_own, $errmsg); - } - - - /** - * Get the test data from CSV file - */ - public function provider() - { - return new CsvFileIterator(dirname(__FILE__) . '/testActionsData.csv'); - } -} diff --git a/test/attachments_component/admin/permissions/testArticleEdit.php b/test/attachments_component/admin/permissions/testArticleEdit.php deleted file mode 100644 index 0a9d10fc..00000000 --- a/test/attachments_component/admin/permissions/testArticleEdit.php +++ /dev/null @@ -1,89 +0,0 @@ -createXMLDataSet(JPATH_TESTS . '/joomla_db.xml'); - } - - - /** - * Test to see whether a user may edit a specified article - * - * @dataProvider provider - * - * @param int $user_id the id of the user to test - * @param string $username the username (for error printouts) - * @param int $art_id the id of the article to test - * @param int $may_edit the expected result of the test - */ - public function testArticleEdit($user_id, $username, $art_id, $may_edit) - { - $result = AttachmentsPermissions::userMayEditArticle((int)$art_id, (int)$user_id); - $errmsg = "----> Failed test for $username edit article $art_id, expected $may_edit, got $result"; - - $this->assertEquals($result, (bool)$may_edit, $errmsg); - } - - - /** - * Get the test data from CSV file - */ - public function provider() - { - return new CsvFileIterator(dirname(__FILE__) . '/testArticleEditData.csv'); - } -} diff --git a/test/attachments_component/admin/permissions/testCategoryEdit.php b/test/attachments_component/admin/permissions/testCategoryEdit.php deleted file mode 100644 index 3a2ced09..00000000 --- a/test/attachments_component/admin/permissions/testCategoryEdit.php +++ /dev/null @@ -1,87 +0,0 @@ -createXMLDataSet(JPATH_TESTS . '/joomla_db.xml'); - } - - - /** - * Test to see whether a user may edit a specified category - * - * @dataProvider provider - * - * @param int $user_id the id of the user to test - * @param string $username the username (for error printouts) - * @param int $cat_id the id of the category to test - * @param int $may_edit the expected result of the test - */ - public function testCategoryEdit($user_id, $username, $cat_id, $may_edit) - { - $result = AttachmentsPermissions::userMayEditCategory((int)$cat_id, (int)$user_id); - $errmsg = "----> Failed test for $username edit category $cat_id, expected $may_edit, got $result"; - - $this->assertEquals($result, (bool)$may_edit, $errmsg); - } - - /** - * Get the test data from CSV file - */ - public function provider() - { - return new CsvFileIterator(dirname(__FILE__) . '/testCategoryEditData.csv'); - } -} diff --git a/test/bootstrap.php b/test/bootstrap.php deleted file mode 100644 index afd22719..00000000 --- a/test/bootstrap.php +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/AttachmentsTestCase.php b/tests/AttachmentsTestCase.php new file mode 100644 index 00000000..28acd68a --- /dev/null +++ b/tests/AttachmentsTestCase.php @@ -0,0 +1,348 @@ +setUpJoomlaMocks(); + } + + /** + * Sets up common Joomla CMS mocks including the Factory class + */ + protected function setUpJoomlaMocks(): void + { + // Mock the User class first (required for AttachmentsTestCase) + if (!class_exists('Joomla\CMS\User\User')) { + eval(' + namespace Joomla\CMS\User { + class User { + public $id; + public $name; + public $username; + public $email; + public $groups = []; + + public function authorise($action, $assetName = null) { + return false; + } + } + } + '); + } + + // Mock the Container class + if (!class_exists('Joomla\DI\Container')) { + eval(' + namespace Joomla\DI { + class Container { + public function get($key) { + return new \stdClass(); + } + } + } + '); + } + + // Create mock container + $this->mockContainer = $this->getMockBuilder('Joomla\DI\Container') + ->disableOriginalConstructor() + ->getMock(); + + // Create mock user factory + $this->mockUserFactory = $this->getMockBuilder('Joomla\CMS\User\UserFactory') + ->disableOriginalConstructor() + ->getMock(); + + // Create mock user + $this->mockUser = $this->getMockBuilder('Joomla\CMS\User\User') + ->disableOriginalConstructor() + ->onlyMethods(['authorise']) + ->getMock(); + + // Mock the UserFactoryInterface + if (!interface_exists('Joomla\CMS\User\UserFactoryInterface')) { + eval(' + namespace Joomla\CMS\User { + interface UserFactoryInterface { + public function loadUserById($id); + } + } + '); + } + + // Mock the base application classes if they don't exist + if (!class_exists('Joomla\Application\AbstractApplication')) { + eval(' + namespace Joomla\Application { + abstract class AbstractApplication { + protected $config; + public function get($name, $default = null) { + return $default; + } + } + } + '); + } + + if (!class_exists('Joomla\CMS\Application\CMSApplication')) { + eval(' + namespace Joomla\CMS\Application { + class CMSApplication extends \Joomla\Application\AbstractApplication { + public function getIdentity() { + return null; + } + + public function enqueueMessage($msg, $type = "message") {} + + public function getLanguage() { + return null; + } + } + } + '); + } + + // Create mock application + $this->mockApp = $this->getMockBuilder('Joomla\CMS\Application\CMSApplication') + ->disableOriginalConstructor() + ->onlyMethods(['getIdentity']) + ->getMock(); + + // Set up basic user properties + $this->mockUser->id = 42; + $this->mockUser->name = 'Test User'; + $this->mockUser->username = 'testuser'; + $this->mockUser->email = 'test@example.com'; + + // Default authorise to false + $this->mockUser->method('authorise') + ->willReturn(false); + + // Set up container to return user factory + $this->mockContainer->method('get') + ->with('Joomla\CMS\User\UserFactoryInterface') + ->willReturn($this->mockUserFactory); + + // Default app to return our mock user + $this->mockApp->method('getIdentity') + ->willReturn($this->mockUser); + + // Set up the Joomla Factory class if not already defined + if (!class_exists('Joomla\CMS\Factory')) { + eval(' + namespace Joomla\CMS { + class Factory { + public static $application; + + public static function getApplication() { + return \Tests\AttachmentsTestCase::$instance->mockApp; + } + public static function getContainer() { + return \Tests\AttachmentsTestCase::$instance->mockContainer; + } + public static function getLanguage() { + return self::$application ? self::$application->getLanguage() : new \stdClass(); + } + public static function getUser() { + return self::$application ? self::$application->getIdentity() : new \stdClass(); + } + } + } + '); + } + + // Mock the User class (required for AttachmentsTestCase) + if (!class_exists('Joomla\CMS\User\User')) { + eval(' + namespace Joomla\CMS\User { + class User { + public $id; + public $name; + public $username; + public $email; + public $groups = []; + + public function authorise($action, $assetName = null) { + return false; + } + } + } + '); + } + + + // Mock the UserFactory class + if (!class_exists('Joomla\CMS\User\UserFactory')) { + eval(' + namespace Joomla\CMS\User { + class UserFactory implements UserFactoryInterface { + public function loadUserById($id) { + return new User(); + } + } + } + '); + } + + // Mock the CMSApplication class + if (!class_exists('Joomla\CMS\Application\CMSApplication')) { + eval(' + namespace Joomla\CMS\Application { + abstract class CMSApplication { + public function getIdentity() { + return new \Joomla\CMS\User\User(); + } + public function getLanguage() { + return new \stdClass(); + } + } + } + '); + } + + // Mock the Text class + if (!class_exists('Joomla\CMS\Language\Text')) { + eval(' + namespace Joomla\CMS\Language { + class Text { + public static function _($text) { + return $text; + } + } + } + '); + } + } + + /** + * Set up a user with specified permissions + * + * @param array $permissions The permissions to set + * @param array $userProps Optional user properties to override defaults + */ + protected function setUpUserWithPermissions(array $permissions, array $userProps = []): void + { + $this->permissions = $permissions; + + // Create a new mock user with the specified permissions + $this->mockUser = $this->getMockBuilder('Joomla\CMS\User\User') + ->disableOriginalConstructor() + ->onlyMethods(['authorise']) + ->getMock(); + + // Set up user properties + $defaultProps = [ + 'id' => 42, + 'name' => 'Test User', + 'username' => 'testuser', + 'email' => 'test@example.com', + 'groups' => [2] // Default to Registered Users group + ]; + + foreach ($defaultProps as $prop => $value) { + $this->mockUser->$prop = $userProps[$prop] ?? $value; + } + + // Configure authorise to return values from permissions array + $this->mockUser->method('authorise') + ->willReturnCallback(function($action) { + return $this->permissions[$action] ?? false; + }); + + // Update app and user factory to use new mock user + $this->mockApp->method('getIdentity') + ->willReturn($this->mockUser); + + $this->mockUserFactory->method('loadUserById') + ->willReturn($this->mockUser); + } + + /** + * Tear down the test environment + */ + protected function tearDown(): void + { + // Reset Joomla Factory application + if (class_exists('Joomla\CMS\Factory')) { + \Joomla\CMS\Factory::$application = null; + } + + $this->mockApp = null; + $this->mockLang = null; + $this->mockUser = null; + + parent::tearDown(); + } +} \ No newline at end of file diff --git a/tests/Integration/Component/Admin/Import/AttachmentsImport2.php b/tests/Integration/Component/Admin/Import/AttachmentsImport2.php new file mode 100644 index 00000000..17176df4 --- /dev/null +++ b/tests/Integration/Component/Admin/Import/AttachmentsImport2.php @@ -0,0 +1,24 @@ + index) or error message + */ + public static function parseFieldNames($file) + { + return parent::parseFieldNames($file); + } +} \ No newline at end of file diff --git a/test/attachments_component/admin/import/testImportAttachments.php b/tests/Integration/Component/Admin/Import/ImportAttachmentsTest.php similarity index 71% rename from test/attachments_component/admin/import/testImportAttachments.php rename to tests/Integration/Component/Admin/Import/ImportAttachmentsTest.php index 828e9a68..8ebd7194 100644 --- a/test/attachments_component/admin/import/testImportAttachments.php +++ b/tests/Integration/Component/Admin/Import/ImportAttachmentsTest.php @@ -1,5 +1,7 @@ getLanguage(); $lang->load('com_attachments', JPATH_BASE . '/administrator/components/com_attachments'); } - - /** - * Gets the data set to be loaded into the database during setup - * - * @return xml dataset - */ - protected function getDataSet() - { - return $this->createXMLDataSet(JPATH_TESTS . '/joomla_db.xml'); - } - - /** * * @@ -106,7 +82,7 @@ public function testImportAttachmentsFromCSVFile($test_filename, $expected_resul /** * Get the test data from CSV file */ - public function provider() + public static function provider() { return new CsvFileIterator(dirname(__FILE__) . '/testImportAttachmentsData.csv'); } diff --git a/test/attachments_component/admin/import/testParseFieldnames.php b/tests/Integration/Component/Admin/Import/ParseFieldnamesTest.php similarity index 61% rename from test/attachments_component/admin/import/testParseFieldnames.php rename to tests/Integration/Component/Admin/Import/ParseFieldnamesTest.php index fdea3ab7..9f6e1b81 100644 --- a/test/attachments_component/admin/import/testParseFieldnames.php +++ b/tests/Integration/Component/Admin/Import/ParseFieldnamesTest.php @@ -1,5 +1,7 @@ index) or error message - */ - public static function parseFieldNames($file) - { - return AttachmentsImport::_parseFieldNames($file); - } -} - +use JMCameron\Component\Attachments\Administrator\Helper\AttachmentsImport; +use Joomla\CMS\Factory; +use Joomla\Test\DatabaseTestCase; +use Tests\Utils\CsvFileIterator; /** * Tests for ACL action permissions for various users @@ -56,18 +25,18 @@ public static function parseFieldNames($file) * @package Attachments_test * @subpackage Attachments_permissions */ -class ImportParseFieldnamesTest extends JoomlaDatabaseTestCase +class ParseFieldnamesTest extends DatabaseTestCase { /** * Sets up the fixture */ - protected function setUp() + protected function setUp(): void { parent::setUp(); parent::setUpBeforeClass(); // Force loading the component language - $lang = JFactory::getLanguage(); + $lang = Factory::getApplication()->getLanguage(); $lang->load('com_attachments', JPATH_BASE . '/administrator/components/com_attachments'); } @@ -113,7 +82,7 @@ public function testParseFieldnames($test_filename, $result) /** * Get the test data from CSV file */ - public function provider() + public static function provider() { return new CsvFileIterator(dirname(__FILE__) . '/testParseFieldnamesData.csv'); } diff --git a/test/attachments_component/admin/import/testImportAttachmentsData.csv b/tests/Integration/Component/Admin/Import/testImportAttachmentsData.csv similarity index 100% rename from test/attachments_component/admin/import/testImportAttachmentsData.csv rename to tests/Integration/Component/Admin/Import/testImportAttachmentsData.csv diff --git a/test/attachments_component/admin/import/testParseFieldnamesData.csv b/tests/Integration/Component/Admin/Import/testParseFieldnamesData.csv similarity index 100% rename from test/attachments_component/admin/import/testParseFieldnamesData.csv rename to tests/Integration/Component/Admin/Import/testParseFieldnamesData.csv diff --git a/test/attachments_component/admin/import/testfiles/fieldnames_badfieldname.csv b/tests/Integration/Component/Admin/Import/testfiles/fieldnames_badfieldname.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/fieldnames_badfieldname.csv rename to tests/Integration/Component/Admin/Import/testfiles/fieldnames_badfieldname.csv diff --git a/test/attachments_component/admin/import/testfiles/fieldnames_good.csv b/tests/Integration/Component/Admin/Import/testfiles/fieldnames_good.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/fieldnames_good.csv rename to tests/Integration/Component/Admin/Import/testfiles/fieldnames_good.csv diff --git a/test/attachments_component/admin/import/testfiles/fieldnames_missing.csv b/tests/Integration/Component/Admin/Import/testfiles/fieldnames_missing.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/fieldnames_missing.csv rename to tests/Integration/Component/Admin/Import/testfiles/fieldnames_missing.csv diff --git a/test/attachments_component/admin/import/testfiles/fieldnames_noid.csv b/tests/Integration/Component/Admin/Import/testfiles/fieldnames_noid.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/fieldnames_noid.csv rename to tests/Integration/Component/Admin/Import/testfiles/fieldnames_noid.csv diff --git a/test/attachments_component/admin/import/testfiles/fieldnames_reordered.csv b/tests/Integration/Component/Admin/Import/testfiles/fieldnames_reordered.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/fieldnames_reordered.csv rename to tests/Integration/Component/Admin/Import/testfiles/fieldnames_reordered.csv diff --git a/test/attachments_component/admin/import/testfiles/import_add1.csv b/tests/Integration/Component/Admin/Import/testfiles/import_add1.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_add1.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_add1.csv diff --git a/test/attachments_component/admin/import/testfiles/import_badcreatorid.csv b/tests/Integration/Component/Admin/Import/testfiles/import_badcreatorid.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_badcreatorid.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_badcreatorid.csv diff --git a/test/attachments_component/admin/import/testfiles/import_badcreatorname.csv b/tests/Integration/Component/Admin/Import/testfiles/import_badcreatorname.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_badcreatorname.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_badcreatorname.csv diff --git a/test/attachments_component/admin/import/testfiles/import_badid.csv b/tests/Integration/Component/Admin/Import/testfiles/import_badid.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_badid.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_badid.csv diff --git a/test/attachments_component/admin/import/testfiles/import_badmodifierid.csv b/tests/Integration/Component/Admin/Import/testfiles/import_badmodifierid.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_badmodifierid.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_badmodifierid.csv diff --git a/test/attachments_component/admin/import/testfiles/import_badmodifiername.csv b/tests/Integration/Component/Admin/Import/testfiles/import_badmodifiername.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_badmodifiername.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_badmodifiername.csv diff --git a/test/attachments_component/admin/import/testfiles/import_badparentid.csv b/tests/Integration/Component/Admin/Import/testfiles/import_badparentid.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_badparentid.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_badparentid.csv diff --git a/test/attachments_component/admin/import/testfiles/import_badtitle.csv b/tests/Integration/Component/Admin/Import/testfiles/import_badtitle.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_badtitle.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_badtitle.csv diff --git a/test/attachments_component/admin/import/testfiles/import_good.csv b/tests/Integration/Component/Admin/Import/testfiles/import_good.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_good.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_good.csv diff --git a/test/attachments_component/admin/import/testfiles/import_windows.csv b/tests/Integration/Component/Admin/Import/testfiles/import_windows.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_windows.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_windows.csv diff --git a/test/attachments_component/admin/import/testfiles/import_zeroid.csv b/tests/Integration/Component/Admin/Import/testfiles/import_zeroid.csv similarity index 100% rename from test/attachments_component/admin/import/testfiles/import_zeroid.csv rename to tests/Integration/Component/Admin/Import/testfiles/import_zeroid.csv diff --git a/tests/Integration/Component/Admin/Permissions/ActionsTest.php b/tests/Integration/Component/Admin/Permissions/ActionsTest.php new file mode 100644 index 00000000..ba8046de --- /dev/null +++ b/tests/Integration/Component/Admin/Permissions/ActionsTest.php @@ -0,0 +1,82 @@ +assertInstanceOf(Registry::class, $result); + + // Check that expected permissions exist in the result + $actions = [ + 'core.admin', + 'core.manage', + 'core.create', + 'core.delete', + 'core.edit', + 'core.edit.state', + 'core.edit.own', + 'attachments.edit.state.own', + 'attachments.delete.own', + 'attachments.edit.state.ownparent', + 'attachments.delete.ownparent' + ]; + + foreach ($actions as $action) { + $this->assertNotNull($result->get($action), "Action $action should exist in result"); + } + } + + /** + * Get the test data from CSV file + */ + public static function provider(): CsvFileIterator + { + $csvFile = dirname(__FILE__) .'/testActionsData.csv'; + return new CsvFileIterator($csvFile); + } +} \ No newline at end of file diff --git a/tests/Integration/Component/Admin/Permissions/ArticleEditTest.php b/tests/Integration/Component/Admin/Permissions/ArticleEditTest.php new file mode 100644 index 00000000..4092499d --- /dev/null +++ b/tests/Integration/Component/Admin/Permissions/ArticleEditTest.php @@ -0,0 +1,59 @@ +assertIsBool($result); + } + + /** + * Get the test data from CSV file + */ + public static function provider(): CsvFileIterator + { + $csvFile = dirname(__FILE__) .'/testArticleEditData.csv'; + return new CsvFileIterator($csvFile); + } +} \ No newline at end of file diff --git a/tests/Integration/Component/Admin/Permissions/CategoryEditTest.php b/tests/Integration/Component/Admin/Permissions/CategoryEditTest.php new file mode 100644 index 00000000..d3752594 --- /dev/null +++ b/tests/Integration/Component/Admin/Permissions/CategoryEditTest.php @@ -0,0 +1,59 @@ +assertIsBool($result); + } + + /** + * Get the test data from CSV file + */ + public static function provider(): CsvFileIterator + { + $csvFile = dirname(__FILE__) .'/testCategoryEditData.csv'; + return new CsvFileIterator($csvFile); + } +} \ No newline at end of file diff --git a/test/attachments_component/admin/permissions/testActionsData.csv b/tests/Integration/Component/Admin/Permissions/testActionsData.csv similarity index 100% rename from test/attachments_component/admin/permissions/testActionsData.csv rename to tests/Integration/Component/Admin/Permissions/testActionsData.csv diff --git a/test/attachments_component/admin/permissions/testArticleEditData.csv b/tests/Integration/Component/Admin/Permissions/testArticleEditData.csv similarity index 100% rename from test/attachments_component/admin/permissions/testArticleEditData.csv rename to tests/Integration/Component/Admin/Permissions/testArticleEditData.csv diff --git a/test/attachments_component/admin/permissions/testCategoryEditData.csv b/tests/Integration/Component/Admin/Permissions/testCategoryEditData.csv similarity index 100% rename from test/attachments_component/admin/permissions/testCategoryEditData.csv rename to tests/Integration/Component/Admin/Permissions/testCategoryEditData.csv diff --git a/test/attachments_component/site/file_types/testFileTypesConversions.php b/tests/Integration/Component/Site/FileTypes/FileTypeConversionsTest.php similarity index 66% rename from test/attachments_component/site/file_types/testFileTypesConversions.php rename to tests/Integration/Component/Site/FileTypes/FileTypeConversionsTest.php index f319b3a7..c196d9dc 100644 --- a/test/attachments_component/site/file_types/testFileTypesConversions.php +++ b/tests/Integration/Component/Site/FileTypes/FileTypeConversionsTest.php @@ -3,8 +3,8 @@ /** * Attachments component * - * @package Attachments_test - * @subpackage Attachments_file_types + * @package Attachments + * @subpackage Tests * * @copyright Copyright (C) 2007-2025 Jonathan M. Cameron, All Rights Reserved * @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL @@ -12,21 +12,19 @@ * @author Jonathan M. Cameron */ -use JMCameron\Component\Attachments\Site\Helper\AttachmentsFileTypes; - -/** Load the PHPUnit test framework */ -require_once 'PHPUnit/Framework/TestCase.php'; +namespace Tests\Integration\Component\Site\FileTypes; -/** Load the CSV file iterator class */ -require_once JPATH_TESTS . '/utils/CsvFileIterator.php'; +use JMCameron\Component\Attachments\Site\Helper\AttachmentsFileTypes; +use Tests\AttachmentsTestCase; +use Tests\Utils\CsvFileIterator; /** * Tests for file_type conversion functions * - * @package Attachments_test - * @subpackage Attachments_file_types + * @package Attachments + * @subpackage Tests */ -class FileTypeConversionsTest extends PHPUnit_Framework_TestCase +class FileTypeConversionsTest extends AttachmentsTestCase { /** * Test various file type and mime type conversions to icon filenames @@ -42,15 +40,15 @@ public function testConversions($filename, $iconFilename, $mime_type) $this->assertEquals($iconFilename, AttachmentsFileTypes::iconFilename($filename, $mime_type)); if ($filename) { - $this->assertEquals($mime_type, AttachmentsFileTypes::mime_type($filename)); + $this->assertEquals($mime_type, AttachmentsFileTypes::mimeType($filename)); } } /** * Get the test data from CSV file */ - public function provider() + public static function provider(): CsvFileIterator { - return new CsvFileIterator(dirname(__FILE__) . '/testFileTypesConversionsData.csv'); + return new CsvFileIterator(__DIR__ . '/testFileTypesConversionsData.csv'); } -} +} \ No newline at end of file diff --git a/test/attachments_component/site/file_types/testFileTypesRoundTrip.php b/tests/Integration/Component/Site/FileTypes/FileTypesRoundTripTest.php similarity index 81% rename from test/attachments_component/site/file_types/testFileTypesRoundTrip.php rename to tests/Integration/Component/Site/FileTypes/FileTypesRoundTripTest.php index 889d65b3..3f16bbe2 100644 --- a/test/attachments_component/site/file_types/testFileTypesRoundTrip.php +++ b/tests/Integration/Component/Site/FileTypes/FileTypesRoundTripTest.php @@ -1,5 +1,7 @@ assertEquals($icon, AttachmentsFileTypes::iconFilename('', $mime_type)); + } + } + } +} \ No newline at end of file diff --git a/test/attachments_component/site/helper/testHelperFilenameTruncation.php b/tests/Integration/Component/Site/Helper/HelperFilenameTruncationTest.php similarity index 53% rename from test/attachments_component/site/helper/testHelperFilenameTruncation.php rename to tests/Integration/Component/Site/Helper/HelperFilenameTruncationTest.php index 826a8c9e..5f3f0d81 100644 --- a/test/attachments_component/site/helper/testHelperFilenameTruncation.php +++ b/tests/Integration/Component/Site/Helper/HelperFilenameTruncationTest.php @@ -3,8 +3,8 @@ /** * Attachments component * - * @package Attachments_test - * @subpackage Attachments_helper + * @package Attachments + * @subpackage Tests * * @copyright Copyright (C) 2007-2025 Jonathan M. Cameron, All Rights Reserved * @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL @@ -12,19 +12,17 @@ * @author Jonathan M. Cameron */ -use JMCameron\Component\Attachments\Site\Helper\AttachmentsHelper; - -/** Load the PHPUnit test framework */ -require_once 'PHPUnit/Framework/TestCase.php'; +namespace Tests\Integration\Component\Site\Helper; -/** Load the CSV file iterator class */ -require_once JPATH_TESTS . '/utils/CsvFileIterator.php'; +use JMCameron\Component\Attachments\Site\Helper\AttachmentsHelper; +use Tests\AttachmentsTestCase; +use Tests\Utils\CsvFileIterator; /** * Work-around class to expose protected method for testing * - * @package Attachments_test - * @subpackage Attachments_helper + * @package Attachments + * @subpackage Tests */ class AttachmentsHelper2 extends AttachmentsHelper { @@ -37,29 +35,28 @@ class AttachmentsHelper2 extends AttachmentsHelper * * @return the truncated filename */ - public static function truncate_filename($raw_filename, $maxlen) + public static function truncateFilename($raw_filename, $maxlen) { - return parent::truncate_filename($raw_filename, $maxlen); + return parent::truncateFilename($raw_filename, $maxlen); } } - /** - * Tests filename trunction + * Tests filename truncation * - * @package Attachments_test - * @subpackage Attachments_helper + * @package Attachments + * @subpackage Tests */ -class HelperFilenameTruncationTest extends PHPUnit_Framework_TestCase +class HelperFilenameTruncationTest extends AttachmentsTestCase { /** - * Test filename trunction + * Test filename truncation * * @dataProvider provider * - * @param string @truncated_filename the expected result of the truncation - * @param strint @full_filename the filename before truncating - * @param int the maximum length for the filename + * @param string $truncated_filename the expected result of the truncation + * @param string $full_filename the filename before truncating + * @param int $maxlen the maximum length for the filename */ public function testFilenameTruncation($truncated_filename, $full_filename, $maxlen) { @@ -67,15 +64,15 @@ public function testFilenameTruncation($truncated_filename, $full_filename, $max $this->assertEquals( $truncated_filename, - AttachmentsHelper2::truncate_filename($full_filename, $maxlen) + AttachmentsHelper2::truncateFilename($full_filename, $maxlen) ); } /** * Get the test data from CSV file */ - public function provider() + public static function provider(): CsvFileIterator { - return new CsvFileIterator(dirname(__FILE__) . '/testHelperFilenameTruncationData.csv'); + return new CsvFileIterator(__DIR__ . '/testHelperFilenameTruncationData.csv'); } -} +} \ No newline at end of file diff --git a/test/attachments_component/site/helper/testHelperURLTruncation.php b/tests/Integration/Component/Site/Helper/HelperURLTruncationTest.php similarity index 66% rename from test/attachments_component/site/helper/testHelperURLTruncation.php rename to tests/Integration/Component/Site/Helper/HelperURLTruncationTest.php index bbdddbfd..a4e7f185 100644 --- a/test/attachments_component/site/helper/testHelperURLTruncation.php +++ b/tests/Integration/Component/Site/Helper/HelperURLTruncationTest.php @@ -3,8 +3,8 @@ /** * Attachments component * - * @package Attachments_test - * @subpackage Attachments_helper + * @package Attachments + * @subpackage Tests * * @copyright Copyright (C) 2007-2025 Jonathan M. Cameron, All Rights Reserved * @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL @@ -12,19 +12,17 @@ * @author Jonathan M. Cameron */ -use JMCameron\Component\Attachments\Site\Helper\AttachmentsHelper; - -/** Load the PHPUnit test framework */ -require_once 'PHPUnit/Framework/TestCase.php'; +namespace Tests\Integration\Component\Site\Helper; -/** Load the CSV file iterator class */ -require_once JPATH_TESTS . '/utils/CsvFileIterator.php'; +use JMCameron\Component\Attachments\Site\Helper\AttachmentsHelper; +use Tests\AttachmentsTestCase; +use Tests\Utils\CsvFileIterator; /** * Work-around class to expose protected method for testing * - * @package Attachments_test - * @subpackage Attachments_helper + * @package Attachments + * @subpackage Tests */ class AttachmentsHelper3 extends AttachmentsHelper { @@ -41,20 +39,19 @@ class AttachmentsHelper3 extends AttachmentsHelper * * @return the truncated URL */ - public static function truncate_url($raw_url, $maxlen) + public static function truncateUrl($raw_url, $maxlen) { - return parent::truncate_url($raw_url, $maxlen); + return parent::truncateUrl($raw_url, $maxlen); } } - /** - * Tests URL trunction + * Tests URL truncation * - * @package Attachments_test - * @subpackage Attachments_helper + * @package Attachments + * @subpackage Tests */ -class HelperURLTruncationTest extends PHPUnit_Framework_TestCase +class HelperURLTruncationTest extends AttachmentsTestCase { /** * Test truncating a url @@ -71,7 +68,7 @@ public function testURLTruncation($truncated_url, $full_url, $maxlen) $this->assertEquals( $truncated_url, - AttachmentsHelper3::truncate_url($full_url, $maxlen) + AttachmentsHelper3::truncateUrl($full_url, $maxlen) ); } @@ -79,8 +76,8 @@ public function testURLTruncation($truncated_url, $full_url, $maxlen) /** * Get the test data from CSV file */ - public function provider() + public static function provider(): CsvFileIterator { - return new CsvFileIterator(dirname(__FILE__) . '/testHelperURLTruncationData.csv'); + return new CsvFileIterator(__DIR__ . '/testHelperURLTruncationData.csv'); } -} +} \ No newline at end of file diff --git a/test/attachments_component/site/helper/testHelperFilenameTruncationData.csv b/tests/Integration/Component/Site/Helper/testHelperFilenameTruncationData.csv similarity index 100% rename from test/attachments_component/site/helper/testHelperFilenameTruncationData.csv rename to tests/Integration/Component/Site/Helper/testHelperFilenameTruncationData.csv diff --git a/test/attachments_component/site/helper/testHelperURLTruncationData.csv b/tests/Integration/Component/Site/Helper/testHelperURLTruncationData.csv similarity index 100% rename from test/attachments_component/site/helper/testHelperURLTruncationData.csv rename to tests/Integration/Component/Site/Helper/testHelperURLTruncationData.csv diff --git a/tests/Stubs/empty.xml b/tests/Stubs/empty.xml new file mode 100644 index 00000000..2024cb9e --- /dev/null +++ b/tests/Stubs/empty.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/tests/Unit/AttachmentsBasicTest.php b/tests/Unit/AttachmentsBasicTest.php new file mode 100644 index 00000000..d9a81f67 --- /dev/null +++ b/tests/Unit/AttachmentsBasicTest.php @@ -0,0 +1,51 @@ +assertFileExists($sourceFile, 'AttachmentsPermissions.php should exist'); + $content = file_get_contents($sourceFile); + $this->assertNotEmpty($content, 'AttachmentsPermissions.php should not be empty'); + + // Check basic file structure + $this->assertStringContainsString('namespace JMCameron\\Component\\Attachments\\Administrator\\Helper;', $content, 'File should have correct namespace'); + $this->assertStringContainsString('class AttachmentsPermissions', $content, 'File should define AttachmentsPermissions class'); + } + + #[Test] + public function testBasicAssertions(): void + { + $this->assertTrue(true, 'Basic true assertion should pass'); + $this->assertIsString("test", 'String assertion should pass'); + $this->assertNotEmpty(array("item"), 'Array should not be empty'); + } +} diff --git a/tests/Unit/Helper/AttachmentsInstallTest.php b/tests/Unit/Helper/AttachmentsInstallTest.php new file mode 100644 index 00000000..dd0eadf1 --- /dev/null +++ b/tests/Unit/Helper/AttachmentsInstallTest.php @@ -0,0 +1,40 @@ +assertTrue($reflection->isPublic()); + $this->assertTrue($reflection->isStatic()); + } +} \ No newline at end of file diff --git a/tests/Unit/Helper/AttachmentsPermissionsTest.php b/tests/Unit/Helper/AttachmentsPermissionsTest.php new file mode 100644 index 00000000..c1d5999a --- /dev/null +++ b/tests/Unit/Helper/AttachmentsPermissionsTest.php @@ -0,0 +1,329 @@ +data[$key] = $value; + } + public function get($key) { + return $this->data[$key] ?? null; + } + } + } + '); + } + + // Define required Joomla Database classes + if (!class_exists('Joomla\Database\DatabaseQuery')) { + eval(' + namespace Joomla\Database { + class DatabaseQuery { + private $parts = []; + + public function __toString() { + return implode(" ", $this->parts); + } + + public function select($columns) { + $this->parts[] = "SELECT " . $columns; + return $this; + } + + public function from($table) { + $this->parts[] = "FROM " . $table; + return $this; + } + + public function join($type, $table, $condition) { + $this->parts[] = $type . " JOIN " . $table . " ON " . $condition; + return $this; + } + + public function where($conditions) { + $this->parts[] = "WHERE " . $conditions; + return $this; + } + } + } + '); + } + + if (!class_exists('Joomla\Database\DatabaseDriver')) { + eval(' + namespace Joomla\Database { + class DatabaseDriver { + private $query; + + public function getQuery() { + return new DatabaseQuery(); + } + + public function setQuery($query) { + $this->query = $query; + return $this; + } + + public function loadObject() { + $obj = new \stdClass(); + $obj->id = 1; + $obj->created_by = 42; + $obj->created_user_id = 42; + return $obj; + } + + public function loadResult() { + return 1; + } + } + } + '); + } + + // Define required Joomla Factory + if (!class_exists('Joomla\CMS\Factory')) { + eval(' + namespace Joomla\CMS { + class Factory { + public static function getApplication() { + static $app; + if ($app === null) { + $app = new class { + public function getIdentity() { + return \Tests\Unit\Helper\AttachmentsPermissionsTest::$user; + } + + public function getDatabase() { + static $db; + if ($db === null) { + $db = new class { + public function getQuery() { + return new \Joomla\Database\DatabaseQuery(); + } + public function setQuery($query) { + return $this; + } + public function loadObject() { + $obj = new \stdClass(); + $obj->id = 1; + $obj->created_by = 42; + $obj->created_user_id = 42; + return $obj; + } + public function loadResult() { + return 1; + } + }; + } + return $db; + } + }; + } + return $app; + } + + public static function getContainer() { + return new class { + public function get($class) { + if ($class === "Joomla\CMS\User\UserFactoryInterface") { + return new class { + public function loadUserById($id) { + return \Tests\Unit\Helper\AttachmentsPermissionsTest::$user; + } + }; + } elseif ($class === "DatabaseDriver") { + return new \Joomla\Database\DatabaseDriver(); + } + return null; + } + }; + } + } + } + '); + } + } + + /** + * Set up a user with specified permissions + */ + private function setUpUserWithPermissions(array $permissions, array $userProps = []): void + { + // Create user object with authorization method + self::$user = new class($permissions) { + private $permissions; + private $props; + + public function __construct($perms) { + $this->permissions = $perms; + $this->props = [ + 'id' => 42, + 'username' => 'testuser', + 'name' => 'Test User', + 'email' => 'test@example.com', + 'groups' => [2] + ]; + } + + public function __get($name) { + return $this->props[$name] ?? null; + } + + public function __set($name, $value) { + $this->props[$name] = $value; + } + + public function authorise($action, $assetName = null) { + return $this->permissions[$action] ?? false; + } + }; + + // Set any custom properties + foreach ($userProps as $prop => $value) { + self::$user->$prop = $value; + } + } + + /** + * Test the getActions method returns the correct permissions for a super admin + */ + public function testGetActionsSuperAdmin() + { + // Set up a super admin user + $this->setUpUserWithPermissions([ + 'core.admin' => true, + 'core.manage' => true, + 'core.create' => true, + 'core.delete' => true, + 'core.edit' => true, + 'core.edit.state' => true, + 'core.edit.own' => true, + 'attachments.edit.state.own' => true, + 'attachments.delete.own' => true + ], ['id' => 42, 'groups' => [8]]); // Group 8 is Super Users in Joomla + + // Test that the method returns permissions for super admin + $result = AttachmentsPermissions::getActions(42); + + $this->assertInstanceOf(Registry::class, $result); + + // Super admin should have all permissions + $this->assertTrue($result->get('core.admin'), 'Super admin should have core.admin'); + $this->assertTrue($result->get('core.manage'), 'Super admin should have core.manage'); + $this->assertTrue($result->get('core.create'), 'Super admin should have core.create'); + $this->assertTrue($result->get('core.delete'), 'Super admin should have core.delete'); + $this->assertTrue($result->get('core.edit'), 'Super admin should have core.edit'); + $this->assertTrue($result->get('core.edit.state'), 'Super admin should have core.edit.state'); + } + + /** + * Test permissions for a regular editor + */ + public function testGetActionsEditor() + { + // Set up an editor user with typical permissions + $this->setUpUserWithPermissions([ + 'core.admin' => false, + 'core.manage' => false, + 'core.create' => true, + 'core.edit.own' => true, + 'attachments.edit.state.own' => true, + 'attachments.delete.own' => true + ], ['id' => 43, 'groups' => [4]]); // Group 4 is Author in Joomla + + $result = AttachmentsPermissions::getActions(43); + + // Editor should have limited permissions + $this->assertFalse($result->get('core.admin'), 'Editor should not have core.admin'); + $this->assertFalse($result->get('core.manage'), 'Editor should not have core.manage'); + $this->assertTrue($result->get('core.create'), 'Editor should have core.create'); + $this->assertTrue($result->get('core.edit.own'), 'Editor should have core.edit.own'); + $this->assertTrue($result->get('attachments.edit.state.own'), 'Editor should have attachments.edit.state.own'); + $this->assertTrue($result->get('attachments.delete.own'), 'Editor should have attachments.delete.own'); + $this->assertFalse($result->get('core.edit'), 'Editor should not have core.edit'); + $this->assertFalse($result->get('core.edit.state'), 'Editor should not have core.edit.state'); + } + + /** + * Test userMayEditCategory method for admin user + */ + public function testUserMayEditCategoryAsAdmin() + { + // Set up an admin user with full permissions + $this->setUpUserWithPermissions([ + 'core.edit' => true, + 'core.edit.own' => true + ], ['id' => 42, 'groups' => [8]]); // Group 8 is Super Users + + $result = AttachmentsPermissions::userMayEditCategory(1, 42); + $this->assertTrue($result, 'Admin should be able to edit any category'); + } + + /** + * Test userMayEditCategory method for regular user + */ + public function testUserMayEditCategoryAsRegularUser() + { + // Set up a regular user with limited permissions + $this->setUpUserWithPermissions([ + 'core.edit' => false, + 'core.edit.own' => true + ], ['id' => 43, 'groups' => [2]]); // Group 2 is Registered Users + + $result = AttachmentsPermissions::userMayEditCategory(1, 43); + $this->assertFalse($result, 'Regular user should not be able to edit categories'); + } + + /** + * Test userMayEditArticle method for admin user + */ + public function testUserMayEditArticleAsAdmin() + { + // Set up an admin user with full permissions + $this->setUpUserWithPermissions([ + 'core.edit' => true, + 'core.edit.own' => true + ], ['id' => 42, 'groups' => [8]]); // Group 8 is Super Users + + $result = AttachmentsPermissions::userMayEditArticle(1, 42); + $this->assertTrue($result, 'Admin should be able to edit any article'); + } + + /** + * Test userMayEditArticle method for regular user + */ + public function testUserMayEditArticleAsRegularUser() + { + // Set up a regular user with limited permissions + $this->setUpUserWithPermissions([ + 'core.edit' => false, + 'core.edit.own' => true + ], ['id' => 43, 'groups' => [2]]); // Group 2 is Registered Users + + $result = AttachmentsPermissions::userMayEditArticle(1, 43); + $this->assertFalse($result, 'Regular user should not be able to edit articles without permission'); + } +} \ No newline at end of file diff --git a/tests/Unit/Helper/AttachmentsUpdateTest.php b/tests/Unit/Helper/AttachmentsUpdateTest.php new file mode 100644 index 00000000..28f4b59a --- /dev/null +++ b/tests/Unit/Helper/AttachmentsUpdateTest.php @@ -0,0 +1,43 @@ +assertTrue($method->isPublic()); + $this->assertTrue($method->isStatic()); + $this->assertEquals(1, $method->getNumberOfParameters()); + } +} \ No newline at end of file diff --git a/test/utils/CsvFileIterator.php b/tests/Utils/CsvFileIterator.php similarity index 56% rename from test/utils/CsvFileIterator.php rename to tests/Utils/CsvFileIterator.php index 6d2eb788..704d431f 100644 --- a/test/utils/CsvFileIterator.php +++ b/tests/Utils/CsvFileIterator.php @@ -3,18 +3,20 @@ /** * Copied from the PHPUnit documentation * - * @package Attachments_test - * @subpackage Attachments_utils + * @package Attachments + * @subpackage Tests */ +namespace Tests\Utils; + /** * Class to iterate through a Comma-Separated-Value file * - * @package Attachments_test - * @subpackage Attachments_utils + * @package Attachments + * @subpackage Tests */ -class CsvFileIterator implements Iterator +class CsvFileIterator implements \Iterator { /** the filename */ protected $filename; @@ -42,39 +44,45 @@ public function __construct($filename) /** Destructor */ public function __destruct() { - fclose($this->file); + if ($this->file) { + fclose($this->file); + } } /** Rewind to the beginning of the file */ - public function rewind() + public function rewind(): void { - rewind($this->file); - $this->current = fgetcsv($this->file); - $this->key = 0; + if ($this->file) { + rewind($this->file); + $this->current = fgetcsv($this->file, 0, ',', '"', '\\'); + $this->key = 0; + } } /** @return if the file is valid (not at the end) */ - public function valid() + public function valid(): bool { - return !feof($this->file); + return $this->file && !feof($this->file); } /** @return the key */ - public function key() + public function key(): mixed { return $this->key; } /** Get the current line of data */ - public function current() + public function current(): mixed { return $this->current; } /** Read the next line of data */ - public function next() + public function next(): void { - $this->current = fgetcsv($this->file); - $this->key++; + if ($this->file) { + $this->current = fgetcsv($this->file, 0, ',', '"', '\\'); + $this->key++; + } } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 00000000..18c7afb1 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,44 @@ + Date: Mon, 3 Nov 2025 00:30:11 +0200 Subject: [PATCH 02/27] Use classes from joomla framework and remove custom class declarations --- composer.json | 14 +- composer.lock | 902 ++++++++++++++++-- tests/AttachmentsTestCase.php | 173 +--- tests/Unit/AttachmentsBasicTest.php | 11 +- .../Helper/AttachmentsPermissionsTest.php | 198 +--- 5 files changed, 871 insertions(+), 427 deletions(-) diff --git a/composer.json b/composer.json index 51f15e7d..d70d3159 100644 --- a/composer.json +++ b/composer.json @@ -2,8 +2,13 @@ "require-dev": { "phpunit/phpunit": "^11.3", "phpcompatibility/php-compatibility": "^9.0", - "joomla/test": "^3.0", - "joomla/string": "^3.0" + "joomla/test": "^4.0", + "joomla/string": "^4.0", + "joomla/registry": "^4.0", + "joomla/database": "^4.0", + "joomla/application": "^4.0", + "joomla/di": "^4.0", + "joomla/session": "^4.0" }, "autoload": { "psr-4": { @@ -13,7 +18,8 @@ }, "autoload-dev": { "psr-4": { - "Tests\\": "tests/" + "Tests\\": "tests/", + "Joomla\\CMS\\": "temp/joomla/libraries/src/" } }, "config": { @@ -26,4 +32,4 @@ "test": "phpunit -c phpunit.xml", "test-coverage": "phpunit -c phpunit.xml --coverage-html ./tests/coverage-report" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 58b15c57..4ea3e0f4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,67 +4,425 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5b9d4a1c1988ffd268d4d2bbcdef143e", + "content-hash": "98e3a1289203ec3bb32905bee0a247d5", "packages": [], "packages-dev": [ { - "name": "joomla/string", - "version": "3.0.4", + "name": "joomla/application", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/joomla-framework/string.git", - "reference": "0b3d33564db389e27346f7e275c694897c939434" + "url": "https://github.com/joomla-framework/application.git", + "reference": "878d1f4a2dc03b6197d0e6cfb4a969ec06a3314d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/string/zipball/0b3d33564db389e27346f7e275c694897c939434", - "reference": "0b3d33564db389e27346f7e275c694897c939434", + "url": "https://api.github.com/repos/joomla-framework/application/zipball/878d1f4a2dc03b6197d0e6cfb4a969ec06a3314d", + "reference": "878d1f4a2dc03b6197d0e6cfb4a969ec06a3314d", "shasum": "" }, "require": { - "php": "^8.1.0", + "joomla/event": "^4.0", + "joomla/registry": "^4.0", + "laminas/laminas-diactoros": "^3.6.0", + "php": "^8.3.0", + "psr/http-message": "^2.0", + "psr/log": "^1.0|^2.0|^3.0", "symfony/deprecation-contracts": "^2|^3" }, - "conflict": { - "doctrine/inflector": "<1.2" + "require-dev": { + "ext-json": "*", + "joomla/controller": "^4.0", + "joomla/di": "^4.0", + "joomla/input": "^4.0", + "joomla/router": "^4.0", + "joomla/session": "^4.0", + "joomla/test": "^4.0", + "joomla/uri": "^4.0", + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpunit/phpunit": "^10.0", + "squizlabs/php_codesniffer": "~3.10.2", + "symfony/phpunit-bridge": "^7.0" + }, + "suggest": { + "ext-json": "To use JSON format, ext-json is required", + "joomla/controller": "^4.0 To support resolving ControllerInterface objects in ControllerResolverInterface, install joomla/controller", + "joomla/input": "^4.0 To use WebApplicationInterface, install joomla/input", + "joomla/router": "^4.0 To use WebApplication or ControllerResolverInterface implementations, install joomla/router", + "joomla/session": "^4.0 To use SessionAwareWebApplicationInterface, install joomla/session", + "joomla/uri": "^4.0 To use AbstractWebApplication, install joomla/uri", + "psr/container": "^2.0 To use the ContainerControllerResolver, install any PSR-11 compatible container" + }, + "type": "library", + "autoload": { + "psr-4": { + "Joomla\\Application\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "The Joomla! Project", + "homepage": "https://framework.joomla.org/" + } + ], + "description": "Joomla Application Package", + "homepage": "https://github.com/joomla-framework/application", + "keywords": [ + "application", + "framework", + "joomla", + "joomla-package" + ], + "support": { + "docs": "https://developer.joomla.org/framework/documentation.html", + "forum": "https://groups.google.com/g/joomla-dev-framework", + "issues": "https://github.com/joomla-framework/application/issues", + "source": "https://github.com/joomla-framework/application", + "wiki": "https://github.com/joomla-framework/application/wiki" + }, + "funding": [ + { + "url": "https://community.joomla.org/sponsorship-campaigns.html", + "type": "custom" + }, + { + "url": "https://github.com/sponsors/joomla", + "type": "github" + } + ], + "time": "2025-07-24T09:55:44+00:00" + }, + { + "name": "joomla/database", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/database.git", + "reference": "2e744e7959368891fe52ccb35790e201251f6f39" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/database/zipball/2e744e7959368891fe52ccb35790e201251f6f39", + "reference": "2e744e7959368891fe52ccb35790e201251f6f39", + "shasum": "" + }, + "require": { + "joomla/event": "^4.0", + "php": "^8.3.0", + "symfony/deprecation-contracts": "^2|^3" }, "require-dev": { - "doctrine/inflector": "^1.2", - "joomla/test": "^3.0", - "phpstan/phpstan": "1.12.27", - "phpstan/phpstan-deprecation-rules": "1.2.1", - "phpunit/phpunit": "^9.5.28", + "colinodell/psr-testlogger": "^1.3.0", + "joomla/archive": "^4.0", + "joomla/console": "^4.0", + "joomla/di": "^4.0", + "joomla/filesystem": "^4.0", + "joomla/registry": "^4.0", + "joomla/test": "^4.0", + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpunit/phpunit": "^12.0", + "psr/log": "^3.0.2", + "squizlabs/php_codesniffer": "^3.10.2", + "symfony/phpunit-bridge": "^8.0" + }, + "suggest": { + "ext-mysqli": "To connect to a MySQL database via MySQLi", + "ext-pdo": "To connect to a MySQL, PostgreSQL, or SQLite database via PDO", + "ext-sqlsrv": "To connect to a SQL Server database", + "joomla/archive": "To use the ExportCommand class, install joomla/archive", + "joomla/console": "To use the ExportCommand and ImportCommand classes, install joomla/console", + "joomla/di": "To use the Database ServiceProviderInterface objects, install joomla/di.", + "joomla/filesystem": "To use the ExportCommand and ImportCommand classes, install joomla/filesystem", + "joomla/registry": "To use the Database ServiceProviderInterface objects, install joomla/registry.", + "psr/log": "To use the LoggingMonitor, install psr/log." + }, + "type": "joomla-package", + "autoload": { + "psr-4": { + "Joomla\\Database\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Joomla Database Package", + "homepage": "https://github.com/joomla-framework/database", + "keywords": [ + "database", + "framework", + "joomla" + ], + "support": { + "issues": "https://github.com/joomla-framework/database/issues", + "source": "https://github.com/joomla-framework/database/tree/4.0.0" + }, + "time": "2025-07-24T09:46:18+00:00" + }, + { + "name": "joomla/di", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/di.git", + "reference": "e8511111e2b5b239f75116f9ff75b43c18809868" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/di/zipball/e8511111e2b5b239f75116f9ff75b43c18809868", + "reference": "e8511111e2b5b239f75116f9ff75b43c18809868", + "shasum": "" + }, + "require": { + "php": "^8.3.0", + "psr/container": "^2.0", + "symfony/deprecation-contracts": "^2|^3" + }, + "provide": { + "psr/container-implementation": "~1.0" + }, + "require-dev": { + "joomla/test": "^4.0", + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpunit/phpunit": "^12.2.6", + "squizlabs/php_codesniffer": "~3.7.2" + }, + "type": "joomla-package", + "autoload": { + "psr-4": { + "Joomla\\DI\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Joomla DI Package", + "homepage": "https://github.com/joomla-framework/di", + "keywords": [ + "container", + "dependency injection", + "di", + "framework", + "ioc", + "joomla" + ], + "support": { + "issues": "https://github.com/joomla-framework/di/issues", + "source": "https://github.com/joomla-framework/di/tree/4.0.0" + }, + "time": "2025-07-24T07:51:22+00:00" + }, + { + "name": "joomla/event", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/event.git", + "reference": "4bbbfb0a3444cb3e3f9abd57d623caa06e9207b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/event/zipball/4bbbfb0a3444cb3e3f9abd57d623caa06e9207b5", + "reference": "4bbbfb0a3444cb3e3f9abd57d623caa06e9207b5", + "shasum": "" + }, + "require": { + "php": "^8.3.0", + "symfony/deprecation-contracts": "^2|^3" + }, + "require-dev": { + "joomla/console": "^4.0", + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpunit/phpunit": "^12.2.7", + "psr/container": "^2.0", "squizlabs/php_codesniffer": "^3.7.2" }, "suggest": { - "doctrine/inflector": "To use the string inflector", - "ext-mbstring": "For improved processing" + "joomla/console": "If you want to use the DebugEventDispatcherCommand class, please install joomla/console", + "psr/container-implementation": "If you want to use the LazyServiceEventListener class, please install a PSR-11 container" }, "type": "joomla-package", - "extra": { - "branch-alias": { - "dev-2.0-dev": "2.0-dev", - "dev-3.x-dev": "3.0-dev" + "autoload": { + "psr-4": { + "Joomla\\Event\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Joomla Event Package", + "homepage": "https://github.com/joomla-framework/event", + "keywords": [ + "event", + "framework", + "joomla" + ], + "support": { + "issues": "https://github.com/joomla-framework/event/issues", + "source": "https://github.com/joomla-framework/event/tree/4.0.0" + }, + "time": "2025-07-24T09:34:33+00:00" + }, + { + "name": "joomla/registry", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/registry.git", + "reference": "5692d8423c9b568627df701e9fd505eae5ea8f72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/registry/zipball/5692d8423c9b568627df701e9fd505eae5ea8f72", + "reference": "5692d8423c9b568627df701e9fd505eae5ea8f72", + "shasum": "" + }, + "require": { + "joomla/utilities": "^4.0", + "php": "^8.3.0" + }, + "require-dev": { + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpunit/phpunit": "^12.2.6", + "squizlabs/php_codesniffer": "^3.7.2", + "symfony/yaml": "^7.3" + }, + "suggest": { + "ext-json": "ext-json is needed for JSON support", + "ext-simplexml": "ext-simplexml is needed for XML support", + "symfony/yaml": "Install symfony/yaml if you require YAML support." + }, + "type": "joomla-package", + "autoload": { + "psr-4": { + "Joomla\\Registry\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Joomla Registry Package", + "homepage": "https://github.com/joomla-framework/registry", + "keywords": [ + "framework", + "joomla", + "registry" + ], + "support": { + "issues": "https://github.com/joomla-framework/registry/issues", + "source": "https://github.com/joomla-framework/registry/tree/4.0.0" + }, + "time": "2025-07-23T19:26:22+00:00" + }, + { + "name": "joomla/session", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/session.git", + "reference": "3d1d8bc093d659053c46eec4962bef4c1e9e0206" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/session/zipball/3d1d8bc093d659053c46eec4962bef4c1e9e0206", + "reference": "3d1d8bc093d659053c46eec4962bef4c1e9e0206", + "shasum": "" + }, + "require": { + "php": "^8.3.0", + "symfony/deprecation-contracts": "^2|^3" + }, + "require-dev": { + "joomla/console": "^4.0", + "joomla/database": "^4.0", + "joomla/event": "^4.0", + "joomla/input": "^4.0", + "joomla/test": "^4.0", + "joomla/utilities": "^4.0", + "phpstan/phpstan": "2.1.17", + "phpstan/phpstan-deprecation-rules": "2.0.3", + "phpunit/phpunit": "^12.0", + "squizlabs/php_codesniffer": "^3.10.2" + }, + "suggest": { + "ext-apcu": "To use APCu cache as a session handler", + "ext-memcached": "To use a Memcached server as a session handler", + "ext-redis": "To use a Redis server as a session handler", + "ext-session": "To use the Joomla\\Session\\Storage\\NativeStorage storage class.", + "ext-wincache": "To use WinCache as a session handler", + "joomla/console": "Install joomla/console if you want to use the CreateSessionTableCommand class.", + "joomla/database": "Install joomla/database if you want to use a database connection managed with Joomla\\Database\\DatabaseDriver as a session handler.", + "joomla/event": "The joomla/event package is required to use Joomla\\Session\\Session.", + "joomla/input": "The joomla/input package is required to use Address and Forwarded session validators." + }, + "type": "joomla-package", + "autoload": { + "psr-4": { + "Joomla\\Session\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Joomla Session Package", + "homepage": "https://github.com/joomla-framework/session", + "keywords": [ + "framework", + "joomla", + "session" + ], + "support": { + "issues": "https://github.com/joomla-framework/session/issues", + "source": "https://github.com/joomla-framework/session/tree/4.0.0" + }, + "time": "2025-07-23T19:16:20+00:00" + }, + { + "name": "joomla/string", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/string.git", + "reference": "da2329e05f1f5fc98b709f8638f279513bcd1108" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/string/zipball/da2329e05f1f5fc98b709f8638f279513bcd1108", + "reference": "da2329e05f1f5fc98b709f8638f279513bcd1108", + "shasum": "" + }, + "require": { + "php": "^8.3.0", + "symfony/deprecation-contracts": "^2|^3", + "symfony/polyfill-mbstring": "^1.31.0" + }, + "require-dev": { + "doctrine/inflector": "^2.0.10", + "joomla/test": "^4.0", + "phpstan/phpstan": "2.1.17", + "phpstan/phpstan-deprecation-rules": "2.0.3", + "phpunit/phpunit": "^12.2.6", + "squizlabs/php_codesniffer": "^3.7.2" + }, + "suggest": { + "doctrine/inflector": "To use the string inflector", + "ext-mbstring": "For improved processing" + }, + "type": "joomla-package", "autoload": { - "files": [ - "src/phputf8/utf8.php", - "src/phputf8/ord.php", - "src/phputf8/str_ireplace.php", - "src/phputf8/str_pad.php", - "src/phputf8/str_split.php", - "src/phputf8/strcasecmp.php", - "src/phputf8/strcspn.php", - "src/phputf8/stristr.php", - "src/phputf8/strrev.php", - "src/phputf8/strspn.php", - "src/phputf8/trim.php", - "src/phputf8/ucfirst.php", - "src/phputf8/ucwords.php", - "src/phputf8/utils/ascii.php", - "src/phputf8/utils/validation.php" - ], "psr-4": { "Joomla\\String\\": "src/" } @@ -82,48 +440,39 @@ ], "support": { "issues": "https://github.com/joomla-framework/string/issues", - "source": "https://github.com/joomla-framework/string/tree/3.0.4" + "source": "https://github.com/joomla-framework/string/tree/4.0.0" }, - "time": "2025-07-19T15:25:56+00:00" + "time": "2025-07-23T18:42:26+00:00" }, { "name": "joomla/test", - "version": "3.0.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/joomla-framework/test.git", - "reference": "184bc36c0abeb4fa9471be472ecd5480125f1530" + "reference": "cfc3ca98f363dc76c4e3cf7a0cd089eeb93e2480" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/test/zipball/184bc36c0abeb4fa9471be472ecd5480125f1530", - "reference": "184bc36c0abeb4fa9471be472ecd5480125f1530", + "url": "https://api.github.com/repos/joomla-framework/test/zipball/cfc3ca98f363dc76c4e3cf7a0cd089eeb93e2480", + "reference": "cfc3ca98f363dc76c4e3cf7a0cd089eeb93e2480", "shasum": "" }, "require": { - "php": "^8.1.0" - }, - "conflict": { - "joomla/database": "<2.0" + "php": "^8.3.0" }, "require-dev": { - "joomla/database": "^3.0", - "phpstan/phpstan": "1.12.27", - "phpstan/phpstan-deprecation-rules": "1.2.1", - "phpunit/phpunit": "^9.5.28", - "squizlabs/php_codesniffer": "^3.7.2" + "joomla/database": "^4.0", + "phpstan/phpstan": "2.1.17", + "phpstan/phpstan-deprecation-rules": "2.0.3", + "phpunit/phpunit": "^12.0", + "squizlabs/php_codesniffer": "^3.10.2" }, "suggest": { "joomla/database": "To use the database test case, install joomla/database", "phpunit/phpunit": "To use the database test case, install phpunit/phpunit" }, "type": "joomla-package", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev", - "dev-3.x-dev": "3.0-dev" - } - }, "autoload": { "psr-4": { "Joomla\\Test\\": "src/" @@ -144,9 +493,144 @@ ], "support": { "issues": "https://github.com/joomla-framework/test/issues", - "source": "https://github.com/joomla-framework/test/tree/3.0.4" + "source": "https://github.com/joomla-framework/test/tree/4.0.1" + }, + "time": "2025-10-17T08:21:47+00:00" + }, + { + "name": "joomla/utilities", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/joomla-framework/utilities.git", + "reference": "5f234527f7dad7111830b091aef52787c3c07cc8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-framework/utilities/zipball/5f234527f7dad7111830b091aef52787c3c07cc8", + "reference": "5f234527f7dad7111830b091aef52787c3c07cc8", + "shasum": "" + }, + "require": { + "joomla/string": "^4.0", + "php": "^8.3.0" + }, + "require-dev": { + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpunit/phpunit": "^12.2.6", + "squizlabs/php_codesniffer": "^3.7.2" + }, + "type": "joomla-package", + "autoload": { + "psr-4": { + "Joomla\\Utilities\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Joomla Utilities Package", + "homepage": "https://github.com/joomla-framework/utilities", + "keywords": [ + "framework", + "joomla", + "utilities" + ], + "support": { + "issues": "https://github.com/joomla-framework/utilities/issues", + "source": "https://github.com/joomla-framework/utilities/tree/4.0.0" + }, + "time": "2025-07-23T18:52:12+00:00" + }, + { + "name": "laminas/laminas-diactoros", + "version": "3.8.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "60c182916b2749480895601649563970f3f12ec4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/60c182916b2749480895601649563970f3f12ec4", + "reference": "60c182916b2749480895601649563970f3f12ec4", + "shasum": "" + }, + "require": { + "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", + "psr/http-factory": "^1.1", + "psr/http-message": "^1.1 || ^2.0" + }, + "conflict": { + "amphp/amp": "<2.6.4" + }, + "provide": { + "psr/http-factory-implementation": "^1.0", + "psr/http-message-implementation": "^1.1 || ^2.0" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^2.2.0", + "laminas/laminas-coding-standard": "~3.1.0", + "php-http/psr7-integration-tests": "^1.4.0", + "phpunit/phpunit": "^10.5.36", + "psalm/plugin-phpunit": "^0.19.5", + "vimeo/psalm": "^6.13" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\Diactoros", + "config-provider": "Laminas\\Diactoros\\ConfigProvider" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } }, - "time": "2025-10-17T08:19:16+00:00" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-17", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-diactoros/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-diactoros/issues", + "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", + "source": "https://github.com/laminas/laminas-diactoros" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2025-10-12T15:31:36+00:00" }, { "name": "myclabs/deep-copy", @@ -890,6 +1374,217 @@ ], "time": "2025-10-30T08:39:39+00:00" }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, { "name": "sebastian/cli-parser", "version": "3.0.2", @@ -2079,6 +2774,91 @@ ], "time": "2024-09-25T14:21:43+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.3", diff --git a/tests/AttachmentsTestCase.php b/tests/AttachmentsTestCase.php index 28acd68a..215d8e4d 100644 --- a/tests/AttachmentsTestCase.php +++ b/tests/AttachmentsTestCase.php @@ -74,6 +74,13 @@ protected function setUp(): void if (!defined('_JEXEC')) { define('_JEXEC', 1); } + if (!defined('JPATH_CONFIGURATION')) { + define('JPATH_CONFIGURATION', JPATH_ROOT); + } + if (!defined('JDEBUG')) { + define('JDEBUG', 0); + } + $this->setUpJoomlaMocks(); } @@ -83,37 +90,7 @@ protected function setUp(): void */ protected function setUpJoomlaMocks(): void { - // Mock the User class first (required for AttachmentsTestCase) - if (!class_exists('Joomla\CMS\User\User')) { - eval(' - namespace Joomla\CMS\User { - class User { - public $id; - public $name; - public $username; - public $email; - public $groups = []; - - public function authorise($action, $assetName = null) { - return false; - } - } - } - '); - } - - // Mock the Container class - if (!class_exists('Joomla\DI\Container')) { - eval(' - namespace Joomla\DI { - class Container { - public function get($key) { - return new \stdClass(); - } - } - } - '); - } + $this->getMockBuilder(\Joomla\CMS\User\UserFactory::class); // Create mock container $this->mockContainer = $this->getMockBuilder('Joomla\DI\Container') @@ -131,54 +108,11 @@ public function get($key) { ->onlyMethods(['authorise']) ->getMock(); - // Mock the UserFactoryInterface - if (!interface_exists('Joomla\CMS\User\UserFactoryInterface')) { - eval(' - namespace Joomla\CMS\User { - interface UserFactoryInterface { - public function loadUserById($id); - } - } - '); - } - - // Mock the base application classes if they don't exist - if (!class_exists('Joomla\Application\AbstractApplication')) { - eval(' - namespace Joomla\Application { - abstract class AbstractApplication { - protected $config; - public function get($name, $default = null) { - return $default; - } - } - } - '); - } - - if (!class_exists('Joomla\CMS\Application\CMSApplication')) { - eval(' - namespace Joomla\CMS\Application { - class CMSApplication extends \Joomla\Application\AbstractApplication { - public function getIdentity() { - return null; - } - - public function enqueueMessage($msg, $type = "message") {} - - public function getLanguage() { - return null; - } - } - } - '); - } - // Create mock application $this->mockApp = $this->getMockBuilder('Joomla\CMS\Application\CMSApplication') ->disableOriginalConstructor() ->onlyMethods(['getIdentity']) - ->getMock(); + ->getMockForAbstractClass(); // Set up basic user properties $this->mockUser->id = 42; @@ -198,92 +132,6 @@ public function getLanguage() { // Default app to return our mock user $this->mockApp->method('getIdentity') ->willReturn($this->mockUser); - - // Set up the Joomla Factory class if not already defined - if (!class_exists('Joomla\CMS\Factory')) { - eval(' - namespace Joomla\CMS { - class Factory { - public static $application; - - public static function getApplication() { - return \Tests\AttachmentsTestCase::$instance->mockApp; - } - public static function getContainer() { - return \Tests\AttachmentsTestCase::$instance->mockContainer; - } - public static function getLanguage() { - return self::$application ? self::$application->getLanguage() : new \stdClass(); - } - public static function getUser() { - return self::$application ? self::$application->getIdentity() : new \stdClass(); - } - } - } - '); - } - - // Mock the User class (required for AttachmentsTestCase) - if (!class_exists('Joomla\CMS\User\User')) { - eval(' - namespace Joomla\CMS\User { - class User { - public $id; - public $name; - public $username; - public $email; - public $groups = []; - - public function authorise($action, $assetName = null) { - return false; - } - } - } - '); - } - - - // Mock the UserFactory class - if (!class_exists('Joomla\CMS\User\UserFactory')) { - eval(' - namespace Joomla\CMS\User { - class UserFactory implements UserFactoryInterface { - public function loadUserById($id) { - return new User(); - } - } - } - '); - } - - // Mock the CMSApplication class - if (!class_exists('Joomla\CMS\Application\CMSApplication')) { - eval(' - namespace Joomla\CMS\Application { - abstract class CMSApplication { - public function getIdentity() { - return new \Joomla\CMS\User\User(); - } - public function getLanguage() { - return new \stdClass(); - } - } - } - '); - } - - // Mock the Text class - if (!class_exists('Joomla\CMS\Language\Text')) { - eval(' - namespace Joomla\CMS\Language { - class Text { - public static function _($text) { - return $text; - } - } - } - '); - } } /** @@ -325,7 +173,8 @@ protected function setUpUserWithPermissions(array $permissions, array $userProps $this->mockApp->method('getIdentity') ->willReturn($this->mockUser); - $this->mockUserFactory->method('loadUserById') + $this->mockUserFactory + ->method('loadUserById') ->willReturn($this->mockUser); } diff --git a/tests/Unit/AttachmentsBasicTest.php b/tests/Unit/AttachmentsBasicTest.php index d9a81f67..efb21e76 100644 --- a/tests/Unit/AttachmentsBasicTest.php +++ b/tests/Unit/AttachmentsBasicTest.php @@ -29,16 +29,13 @@ class AttachmentsBasicTest extends TestCase public function testBasicStructure(): void { // Test that the source file exists and has correct structure - $sourceFile = __DIR__ . '/../../attachments_component/admin/src/Helper/AttachmentsPermissions.php'; + $sourceFile = __DIR__ . '/../../attachments_component'; // Basic file checks - $this->assertFileExists($sourceFile, 'AttachmentsPermissions.php should exist'); - $content = file_get_contents($sourceFile); - $this->assertNotEmpty($content, 'AttachmentsPermissions.php should not be empty'); + $this->assertDirectoryExists($sourceFile, 'Attachments component directory should exist'); - // Check basic file structure - $this->assertStringContainsString('namespace JMCameron\\Component\\Attachments\\Administrator\\Helper;', $content, 'File should have correct namespace'); - $this->assertStringContainsString('class AttachmentsPermissions', $content, 'File should define AttachmentsPermissions class'); + // Check namespace existence + $this->assertTrue(class_exists('JMCameron\Component\Attachments\Site\Helper\AttachmentsHelper'), 'AttachmentsHelper class should exist'); } #[Test] diff --git a/tests/Unit/Helper/AttachmentsPermissionsTest.php b/tests/Unit/Helper/AttachmentsPermissionsTest.php index c1d5999a..c2faaca9 100644 --- a/tests/Unit/Helper/AttachmentsPermissionsTest.php +++ b/tests/Unit/Helper/AttachmentsPermissionsTest.php @@ -2,8 +2,11 @@ namespace Tests\Unit\Helper; use JMCameron\Component\Attachments\Administrator\Helper\AttachmentsPermissions; +use JMCameron\Plugin\Content\Attachments\Extension\Attachments; +use Joomla\CMS\Factory; +use Joomla\CMS\User\UserFactoryInterface; use Joomla\Registry\Registry; -use PHPUnit\Framework\TestCase; +use Tests\AttachmentsTestCase; // Define required Joomla constants defined('JPATH_ROOT') or define('JPATH_ROOT', realpath(__DIR__ . '/../../..')); @@ -11,202 +14,11 @@ defined('JPATH_ADMINISTRATOR') or define('JPATH_ADMINISTRATOR', JPATH_ROOT . '/administrator'); defined('_JEXEC') or define('_JEXEC', 1); -class AttachmentsPermissionsTest extends TestCase +class AttachmentsPermissionsTest extends AttachmentsTestCase { /** @var mixed Mock user for testing */ public static $user = null; - protected function setUp(): void - { - parent::setUp(); - - // Define required Joomla Registry - if (!class_exists('Joomla\Registry\Registry')) { - eval(' - namespace Joomla\Registry { - class Registry { - private $data = []; - public function set($key, $value) { - $this->data[$key] = $value; - } - public function get($key) { - return $this->data[$key] ?? null; - } - } - } - '); - } - - // Define required Joomla Database classes - if (!class_exists('Joomla\Database\DatabaseQuery')) { - eval(' - namespace Joomla\Database { - class DatabaseQuery { - private $parts = []; - - public function __toString() { - return implode(" ", $this->parts); - } - - public function select($columns) { - $this->parts[] = "SELECT " . $columns; - return $this; - } - - public function from($table) { - $this->parts[] = "FROM " . $table; - return $this; - } - - public function join($type, $table, $condition) { - $this->parts[] = $type . " JOIN " . $table . " ON " . $condition; - return $this; - } - - public function where($conditions) { - $this->parts[] = "WHERE " . $conditions; - return $this; - } - } - } - '); - } - - if (!class_exists('Joomla\Database\DatabaseDriver')) { - eval(' - namespace Joomla\Database { - class DatabaseDriver { - private $query; - - public function getQuery() { - return new DatabaseQuery(); - } - - public function setQuery($query) { - $this->query = $query; - return $this; - } - - public function loadObject() { - $obj = new \stdClass(); - $obj->id = 1; - $obj->created_by = 42; - $obj->created_user_id = 42; - return $obj; - } - - public function loadResult() { - return 1; - } - } - } - '); - } - - // Define required Joomla Factory - if (!class_exists('Joomla\CMS\Factory')) { - eval(' - namespace Joomla\CMS { - class Factory { - public static function getApplication() { - static $app; - if ($app === null) { - $app = new class { - public function getIdentity() { - return \Tests\Unit\Helper\AttachmentsPermissionsTest::$user; - } - - public function getDatabase() { - static $db; - if ($db === null) { - $db = new class { - public function getQuery() { - return new \Joomla\Database\DatabaseQuery(); - } - public function setQuery($query) { - return $this; - } - public function loadObject() { - $obj = new \stdClass(); - $obj->id = 1; - $obj->created_by = 42; - $obj->created_user_id = 42; - return $obj; - } - public function loadResult() { - return 1; - } - }; - } - return $db; - } - }; - } - return $app; - } - - public static function getContainer() { - return new class { - public function get($class) { - if ($class === "Joomla\CMS\User\UserFactoryInterface") { - return new class { - public function loadUserById($id) { - return \Tests\Unit\Helper\AttachmentsPermissionsTest::$user; - } - }; - } elseif ($class === "DatabaseDriver") { - return new \Joomla\Database\DatabaseDriver(); - } - return null; - } - }; - } - } - } - '); - } - } - - /** - * Set up a user with specified permissions - */ - private function setUpUserWithPermissions(array $permissions, array $userProps = []): void - { - // Create user object with authorization method - self::$user = new class($permissions) { - private $permissions; - private $props; - - public function __construct($perms) { - $this->permissions = $perms; - $this->props = [ - 'id' => 42, - 'username' => 'testuser', - 'name' => 'Test User', - 'email' => 'test@example.com', - 'groups' => [2] - ]; - } - - public function __get($name) { - return $this->props[$name] ?? null; - } - - public function __set($name, $value) { - $this->props[$name] = $value; - } - - public function authorise($action, $assetName = null) { - return $this->permissions[$action] ?? false; - } - }; - - // Set any custom properties - foreach ($userProps as $prop => $value) { - self::$user->$prop = $value; - } - } - /** * Test the getActions method returns the correct permissions for a super admin */ From a2cd2fbb7c4118d8ed52f59540687ce2c5bf1ad5 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Mon, 3 Nov 2025 00:31:12 +0200 Subject: [PATCH 03/27] Fix return type in docblock --- .../admin/src/Helper/AttachmentsPermissions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachments_component/admin/src/Helper/AttachmentsPermissions.php b/attachments_component/admin/src/Helper/AttachmentsPermissions.php index 24e0f1a5..eb935a46 100644 --- a/attachments_component/admin/src/Helper/AttachmentsPermissions.php +++ b/attachments_component/admin/src/Helper/AttachmentsPermissions.php @@ -35,7 +35,7 @@ class AttachmentsPermissions /** * Get the actions * - * @return an array of which actions are permitted for this user + * @return Registry a registry object of which actions are permitted for this user */ public static function getActions($user_id = null) { From 13e1d3651448de3f1cdb77389c72b6e3b3671e4e Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Mon, 3 Nov 2025 16:33:21 +0200 Subject: [PATCH 04/27] Add docker --- .env.example | 4 ++++ .gitignore | 3 ++- docker-compose.yml | 17 +++++++++++++++++ docker/joomla/Dockerfile | 4 ++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .env.example create mode 100644 docker-compose.yml create mode 100644 docker/joomla/Dockerfile diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..9450fbb3 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +JOOMLA_VERSION=4.4 +JOOMLA_DB_USER=root +JOOMLA_DB_PASSWORD=password +JOOMLA_DB_NAME=joomla_db \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7576536a..ca1b5c8f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ /vendor /node_modules /.phpunit.result.cache -/.phpunit.cache \ No newline at end of file +/.phpunit.cache +/.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..11032f12 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +services: + joomla: + build: + context: ./docker/joomla + dockerfile: Dockerfile + ports: + - "8080:80" + environment: + JOOMLA_DB_HOST: db + JOOMLA_DB_USER: ${JOOMLA_DB_USER:-joomla_user} + JOOMLA_DB_PASSWORD: ${JOOMLA_DB_PASSWORD:-joomla_pass} + JOOMLA_DB_NAME: ${JOOMLA_DB_NAME:-joomla_db} + JOOMLA_VERSION: ${JOOMLA_VERSION:-latest} + depends_on: + - db + db: + image: mariadb:latest \ No newline at end of file diff --git a/docker/joomla/Dockerfile b/docker/joomla/Dockerfile new file mode 100644 index 00000000..8c501872 --- /dev/null +++ b/docker/joomla/Dockerfile @@ -0,0 +1,4 @@ +ARG JOOMLA_VERSION + +FROM joomla:${JOOMLA_VERSION:-latest} + From 43eb43dc592f53bd1e93ebb227a86ba165302798 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Tue, 4 Nov 2025 08:45:49 +0200 Subject: [PATCH 05/27] Remove unnecessary file --- .svnignore | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .svnignore diff --git a/.svnignore b/.svnignore deleted file mode 100644 index 84682692..00000000 --- a/.svnignore +++ /dev/null @@ -1,12 +0,0 @@ -*.zip -*.xcf -.workspace -.git -.gitignore -.directory -_Checklist.txt -_attachments.ppr -base_nums.py -base_nums.pickle -fixerrnums.py - From 58e4d309e8d66835a630bba79e561ab95266794d Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Tue, 4 Nov 2025 16:14:18 +0200 Subject: [PATCH 06/27] Prepare files for docker containers --- .dockerignore | 3 + .env.4.4.example | 5 + .env.5.4.example | 5 + .env.6.example | 5 + .env.example | 4 - composer.json | 4 +- docker-compose.yml | 25 +- docker/joomla/Dockerfile | 30 + package-lock.json | 2217 ++++++++++++++++++++++++++++++++++++++ package.json | 25 + 10 files changed, 2314 insertions(+), 9 deletions(-) create mode 100644 .dockerignore create mode 100644 .env.4.4.example create mode 100644 .env.5.4.example create mode 100644 .env.6.example delete mode 100644 .env.example create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..174a22a2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +/temp/joomla +/vendor +/node_modules diff --git a/.env.4.4.example b/.env.4.4.example new file mode 100644 index 00000000..1eefab92 --- /dev/null +++ b/.env.4.4.example @@ -0,0 +1,5 @@ +JOOMLA_VERSION=4.4-php8.1 +JOOMLA_DB_NAME=joomla + +MARIADB_VERSION=12 +JOOMLA_FRAMEWORK_VERSION=^2.0 \ No newline at end of file diff --git a/.env.5.4.example b/.env.5.4.example new file mode 100644 index 00000000..6769ac63 --- /dev/null +++ b/.env.5.4.example @@ -0,0 +1,5 @@ +JOOMLA_VERSION=5.4-php8.3 +JOOMLA_DB_NAME=joomla + +MARIADB_VERSION=12 +JOOMLA_FRAMEWORK_VERSION=^3.0 \ No newline at end of file diff --git a/.env.6.example b/.env.6.example new file mode 100644 index 00000000..221bd74d --- /dev/null +++ b/.env.6.example @@ -0,0 +1,5 @@ +JOOMLA_VERSION=6-php8.3 +JOOMLA_DB_NAME=joomla + +MARIADB_VERSION=12 +JOOMLA_FRAMEWORK_VERSION=^4.0 \ No newline at end of file diff --git a/.env.example b/.env.example deleted file mode 100644 index 9450fbb3..00000000 --- a/.env.example +++ /dev/null @@ -1,4 +0,0 @@ -JOOMLA_VERSION=4.4 -JOOMLA_DB_USER=root -JOOMLA_DB_PASSWORD=password -JOOMLA_DB_NAME=joomla_db \ No newline at end of file diff --git a/composer.json b/composer.json index d70d3159..4052a3ec 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "phpunit/phpunit": "^11.3", + "phpunit/phpunit": "^10.0", "phpcompatibility/php-compatibility": "^9.0", "joomla/test": "^4.0", "joomla/string": "^4.0", @@ -32,4 +32,4 @@ "test": "phpunit -c phpunit.xml", "test-coverage": "phpunit -c phpunit.xml --coverage-html ./tests/coverage-report" } -} +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 11032f12..75524563 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,11 @@ services: joomla: build: - context: ./docker/joomla - dockerfile: Dockerfile + context: ./ + dockerfile: docker/joomla/Dockerfile + args: + JOOMLA_VERSION: ${JOOMLA_VERSION:-latest} + JOOMLA_FRAMEWORK_VERSION: ${JOOMLA_FRAMEWORK_VERSION:-^4.0} ports: - "8080:80" environment: @@ -14,4 +17,20 @@ services: depends_on: - db db: - image: mariadb:latest \ No newline at end of file + image: mariadb:${MARIADB_VERSION:-latest} + environment: + MYSQL_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:-password} + MYSQL_DATABASE: ${JOOMLA_DB_NAME:-joomla_db} + MYSQL_USER: ${JOOMLA_DB_USER:-joomla_user} + MYSQL_PASSWORD: ${JOOMLA_DB_PASSWORD:-joomla_pass} + phpmyadmin: + profiles: ["only_on_demand"] + image: phpmyadmin/phpmyadmin + ports: + - "8081:80" + environment: + PMA_HOST: db + PMA_USER: ${JOOMLA_DB_USER:-joomla_user} + PMA_PASSWORD: ${JOOMLA_DB_PASSWORD:-joomla_pass} + depends_on: + - db \ No newline at end of file diff --git a/docker/joomla/Dockerfile b/docker/joomla/Dockerfile index 8c501872..de165fd2 100644 --- a/docker/joomla/Dockerfile +++ b/docker/joomla/Dockerfile @@ -2,3 +2,33 @@ ARG JOOMLA_VERSION FROM joomla:${JOOMLA_VERSION:-latest} +ARG JOOMLA_FRAMEWORK_VERSION + +RUN apt-get update && \ + # Install Node.js and Composer + apt-get install -y curl && \ + curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \ + apt-get install -y nodejs&& \ + curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ + apt clean && rm -rf /var/lib/apt/lists/* + +COPY . /attachments + +WORKDIR /attachments + +# Adjust Composer autoload paths for Joomla CMS source location +RUN sed -Ei 's/"Joomla\\\\CMS\\\\": "temp\/joomla\/libraries\/src\/"/"Joomla\\\\CMS\\\\": "\/var\/www\/html\/libraries\/src\/"/' composer.json && \ + composer dump-autoload + +RUN sed -Ei 's/"joomla\/test": ".*"/"joomla\/test": "'"${JOOMLA_FRAMEWORK_VERSION}"'"/' composer.json && \ + sed -Ei 's/"joomla\/string": ".*"/"joomla\/string": "'${JOOMLA_FRAMEWORK_VERSION}'"/' composer.json && \ + sed -Ei 's/"joomla\/registry": ".*"/"joomla\/registry": "'${JOOMLA_FRAMEWORK_VERSION}'"/' composer.json && \ + sed -Ei 's/"joomla\/database": ".*"/"joomla\/database": "'${JOOMLA_FRAMEWORK_VERSION}'"/' composer.json && \ + sed -Ei 's/"joomla\/application": ".*"/"joomla\/application": "'${JOOMLA_FRAMEWORK_VERSION}'"/' composer.json && \ + sed -Ei 's/"joomla\/di": ".*"/"joomla\/di": "'${JOOMLA_FRAMEWORK_VERSION}'"/' composer.json && \ + sed -Ei 's/"joomla\/session": ".*"/"joomla\/session": "'${JOOMLA_FRAMEWORK_VERSION}'"/' composer.json + +RUN composer update && \ + npm ci + +WORKDIR /var/www/html \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..e739e5d8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2217 @@ +{ + "name": "attachments", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "attachments", + "version": "1.0.0", + "license": "GPL-3.0-or-later", + "devDependencies": { + "joomla-cypress": "^1.3.1" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cypress/request": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.9.tgz", + "integrity": "sha512-I3l7FdGRXluAS44/0NguwWlO83J18p0vlr2FYHrJkWdNYhgVoiYo61IXPqaOsL+vNxU1ZqMACzItGK3/KKDsdw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~4.0.4", + "http-signature": "~1.4.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.14.0", + "safe-buffer": "^5.1.2", + "tough-cookie": "^5.0.0", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + } + }, + "node_modules/@cypress/xvfb/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@types/node": { + "version": "24.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz", + "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/sizzle": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.10.tgz", + "integrity": "sha512-TC0dmN0K8YcWEAEfiPi5gJP14eJe30TTGjkvek3iM/1NdHHsdCA/Td6GvNndMOo/iSnIsZ4HuuhrYPDAmbxzww==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/cachedir": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.4.0.tgz", + "integrity": "sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cypress": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.17.0.tgz", + "integrity": "sha512-5xWkaPurwkIljojFidhw8lFScyxhtiFHl/i/3zov+1Z5CmY4t9tjIdvSXfu82Y3w7wt0uR9KkucbhkVvJZLQSA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@cypress/request": "^3.0.6", + "@cypress/xvfb": "^1.2.4", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.7.1", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "ci-info": "^4.0.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "process": "^0.11.10", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.5.3", + "supports-color": "^8.1.1", + "tmp": "~0.2.3", + "tree-kill": "1.2.2", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" + } + }, + "node_modules/cypress-file-upload": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz", + "integrity": "sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.2.1" + }, + "peerDependencies": { + "cypress": ">3.0.0" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dayjs": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", + "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eventemitter2": { + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true, + "license": "MIT" + }, + "node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getos": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "async": "^3.2.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-signature": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.18.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/joomla-cypress": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/joomla-cypress/-/joomla-cypress-1.3.1.tgz", + "integrity": "sha512-8ww37fHL2yVTld8f7BwZuIFc5g1Ba0bCgaxlMGZhqBl89BO+iGaiAXR9uKT5pufjaZEJDBVd92ScTJZLaoeRwQ==", + "dev": true, + "license": "GPL-2.0+", + "dependencies": { + "cypress": "^13.16.0", + "cypress-file-upload": "^5.0.8" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true, + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC" + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "node_modules/lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "> 0.8" + } + }, + "node_modules/listr2": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.16", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.1", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true, + "license": "MIT" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true, + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "throttleit": "^1.0.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/throttleit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.1.tgz", + "integrity": "sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tldts": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", + "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.86" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", + "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tough-cookie": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true, + "license": "Unlicense" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..157d97fc --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "attachments", + "version": "1.0.0", + "description": "Download latest version of package", + "main": "index.js", + "directories": { + "test": "tests" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/DSE-Western-Thessaloniki/attachments.git" + }, + "author": "", + "license": "GPL-3.0-or-later", + "bugs": { + "url": "https://github.com/DSE-Western-Thessaloniki/attachments/issues" + }, + "homepage": "https://github.com/DSE-Western-Thessaloniki/attachments#readme", + "devDependencies": { + "joomla-cypress": "^1.3.1" + } +} From 3c5f7b1a93b3ff891bf6e33fb0ebc9426c70e03c Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Wed, 5 Nov 2025 16:13:42 +0200 Subject: [PATCH 07/27] Allow installation of the component from the joomla cli --- .../admin/src/Helper/AttachmentsUpdate.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/attachments_component/admin/src/Helper/AttachmentsUpdate.php b/attachments_component/admin/src/Helper/AttachmentsUpdate.php index 83af167d..baf313fc 100644 --- a/attachments_component/admin/src/Helper/AttachmentsUpdate.php +++ b/attachments_component/admin/src/Helper/AttachmentsUpdate.php @@ -45,6 +45,12 @@ class AttachmentsUpdate public static function checkAccess() { $app = Factory::getApplication(); + + // Skip authorization check in CLI context + if ($app->isClient('cli')) { + return; + } + $user = $app->getIdentity(); if ($user === null or !$user->authorise('core.admin', 'com_attachments')) { throw new \Exception(Text::_('JERROR_ALERTNOAUTHOR') . ' (ERR 67)', 404); From a21ac84cd3ff8bee245741fc18b5e2012b499cb3 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Wed, 5 Nov 2025 16:16:48 +0200 Subject: [PATCH 08/27] Add cypress and novnc containers --- docker-compose.yml | 58 +++++++++++++++++++++++++++++++++-- docker/joomla/Dockerfile | 8 +++++ docker/novnc/Dockerfile | 30 ++++++++++++++++++ docker/novnc/supervisord.conf | 21 +++++++++++++ package.json | 8 ++--- 5 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 docker/novnc/Dockerfile create mode 100644 docker/novnc/supervisord.conf diff --git a/docker-compose.yml b/docker-compose.yml index 75524563..50920f99 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,8 +14,21 @@ services: JOOMLA_DB_PASSWORD: ${JOOMLA_DB_PASSWORD:-joomla_pass} JOOMLA_DB_NAME: ${JOOMLA_DB_NAME:-joomla_db} JOOMLA_VERSION: ${JOOMLA_VERSION:-latest} + JOOMLA_SITE_NAME: Joomla + JOOMLA_ADMIN_USER: Joomla Hero + JOOMLA_ADMIN_USERNAME: ${JOOMLA_ADMIN_USERNAME:-joomla} + # Admin password must be at least 12 characters long + JOOMLA_ADMIN_PASSWORD: ${JOOMLA_ADMIN_PASSWORD:-joomla_password} + JOOMLA_ADMIN_EMAIL: ${JOOMLA_ADMIN_EMAIL:-joomla@example.com} + JOOMLA_EXTENSIONS_PATHS: ${JOOMLA_EXTENSIONS_PATHS:-/var/www/extensions/attachments.zip} + volumes: + - joomla_data:/var/www/html depends_on: - - db + db: + condition: service_healthy + networks: + - joomla + db: image: mariadb:${MARIADB_VERSION:-latest} environment: @@ -23,6 +36,38 @@ services: MYSQL_DATABASE: ${JOOMLA_DB_NAME:-joomla_db} MYSQL_USER: ${JOOMLA_DB_USER:-joomla_user} MYSQL_PASSWORD: ${JOOMLA_DB_PASSWORD:-joomla_pass} + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + timeout: 20s + retries: 10 + volumes: + - db_data:/var/lib/mysql + networks: + - joomla + + cypress: + profiles: ["testing"] + image: cypress/included:${CYPRESS_VERSION:-13.17.0} + volumes: + - ./tests/e2e:/e2e + - .:/app:ro + environment: + JOOMLA_URL: http://joomla/ + depends_on: + - joomla + networks: + - joomla + + novnc: + profiles: ["testing"] + build: + context: ./docker/novnc + dockerfile: Dockerfile + ports: + - "8080:8080" + networks: + - joomla + phpmyadmin: profiles: ["only_on_demand"] image: phpmyadmin/phpmyadmin @@ -33,4 +78,13 @@ services: PMA_USER: ${JOOMLA_DB_USER:-joomla_user} PMA_PASSWORD: ${JOOMLA_DB_PASSWORD:-joomla_pass} depends_on: - - db \ No newline at end of file + - db + networks: + - joomla + +volumes: + joomla_data: + db_data: + +networks: + joomla: diff --git a/docker/joomla/Dockerfile b/docker/joomla/Dockerfile index de165fd2..4362ed18 100644 --- a/docker/joomla/Dockerfile +++ b/docker/joomla/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get update && \ curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \ apt-get install -y nodejs&& \ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ + # Install necessary build tools + apt-get install -y make zip && \ + # Clean up apt clean && rm -rf /var/lib/apt/lists/* COPY . /attachments @@ -31,4 +34,9 @@ RUN sed -Ei 's/"joomla\/test": ".*"/"joomla\/test": "'"${JOOMLA_FRAMEWORK_VERSIO RUN composer update && \ npm ci +RUN rm -f attachments-*.zip && make && \ + mkdir /var/www/extensions/ && \ + mv `ls -1 attachments-*.zip` /var/www/extensions/attachments.zip && \ + chown -R www-data:www-data /var/www/extensions + WORKDIR /var/www/html \ No newline at end of file diff --git a/docker/novnc/Dockerfile b/docker/novnc/Dockerfile new file mode 100644 index 00000000..7af97a4d --- /dev/null +++ b/docker/novnc/Dockerfile @@ -0,0 +1,30 @@ +FROM alpine:3.19 + +# Setup demo environment variables +ENV LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 \ + DISPLAY=:0.0 + +RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories +RUN apk update && \ + apk add \ + novnc@testing \ + bash \ + fluxbox \ + terminus-font \ + supervisor \ + tigervnc \ + websockify && \ + # py3-pip && \ + rm /var/cache/apk/* + +# RUN pip3 install websockify + +RUN ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html + +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +EXPOSE 8080 + +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] diff --git a/docker/novnc/supervisord.conf b/docker/novnc/supervisord.conf new file mode 100644 index 00000000..7f70107e --- /dev/null +++ b/docker/novnc/supervisord.conf @@ -0,0 +1,21 @@ +[supervisord] +user=sail +nodaemon=true +logfile=/home/sail/supervisord.log +pidfile=/home/sail/supervisord.pid + +[program:xvnc] +user=sail +command=/usr/bin/Xvnc -SecurityTypes=None -localhost=0 :0.0 -listen tcp -ac +autorestart=true + +[program:novnc] +user=sail +command=/usr/bin/novnc_server --vnc localhost:5900 --listen 8080 +autorestart=true + +[program:fluxbox] +user=sail +command=fluxbox +autorestart=true +environment=HOME="/home/sail" diff --git a/package.json b/package.json index 157d97fc..c80be083 100644 --- a/package.json +++ b/package.json @@ -11,15 +11,15 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/DSE-Western-Thessaloniki/attachments.git" + "url": "git+https://github.com/jmcameron/attachments.git" }, "author": "", "license": "GPL-3.0-or-later", "bugs": { - "url": "https://github.com/DSE-Western-Thessaloniki/attachments/issues" + "url": "https://github.com/jmcameron/attachments/issues" }, - "homepage": "https://github.com/DSE-Western-Thessaloniki/attachments#readme", + "homepage": "https://github.com/jmcameron/attachments#readme", "devDependencies": { "joomla-cypress": "^1.3.1" } -} +} \ No newline at end of file From e3e22c96fa9f5111928125e926ee3429bf4a4f26 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Wed, 5 Nov 2025 16:17:00 +0200 Subject: [PATCH 09/27] Fix file permissions --- fixsha.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 fixsha.sh diff --git a/fixsha.sh b/fixsha.sh old mode 100644 new mode 100755 From 3b91d796362f23eb59de2fc63d72b97e87f81ac6 Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Wed, 5 Nov 2025 22:02:52 +0200 Subject: [PATCH 10/27] Fix novnc and cypress startup --- cypress.config.js | 7 + cypress/e2e/1-getting-started/todo.cy.js | 143 ++++++++ cypress/e2e/2-advanced-examples/actions.cy.js | 321 ++++++++++++++++++ .../e2e/2-advanced-examples/aliasing.cy.js | 39 +++ .../e2e/2-advanced-examples/assertions.cy.js | 176 ++++++++++ .../e2e/2-advanced-examples/connectors.cy.js | 98 ++++++ cypress/e2e/2-advanced-examples/cookies.cy.js | 118 +++++++ .../e2e/2-advanced-examples/cypress_api.cy.js | 185 ++++++++++ cypress/e2e/2-advanced-examples/files.cy.js | 85 +++++ .../e2e/2-advanced-examples/location.cy.js | 32 ++ cypress/e2e/2-advanced-examples/misc.cy.js | 90 +++++ .../e2e/2-advanced-examples/navigation.cy.js | 55 +++ .../network_requests.cy.js | 163 +++++++++ .../e2e/2-advanced-examples/querying.cy.js | 114 +++++++ .../spies_stubs_clocks.cy.js | 204 +++++++++++ cypress/e2e/2-advanced-examples/storage.cy.js | 117 +++++++ .../e2e/2-advanced-examples/traversal.cy.js | 121 +++++++ .../e2e/2-advanced-examples/utilities.cy.js | 107 ++++++ .../e2e/2-advanced-examples/viewport.cy.js | 58 ++++ cypress/e2e/2-advanced-examples/waiting.cy.js | 30 ++ cypress/e2e/2-advanced-examples/window.cy.js | 22 ++ cypress/fixtures/example.json | 5 + cypress/support/commands.js | 25 ++ cypress/support/e2e.js | 17 + docker-compose.yml | 14 +- docker/novnc/supervisord.conf | 7 - 26 files changed, 2342 insertions(+), 11 deletions(-) create mode 100644 cypress.config.js create mode 100644 cypress/e2e/1-getting-started/todo.cy.js create mode 100644 cypress/e2e/2-advanced-examples/actions.cy.js create mode 100644 cypress/e2e/2-advanced-examples/aliasing.cy.js create mode 100644 cypress/e2e/2-advanced-examples/assertions.cy.js create mode 100644 cypress/e2e/2-advanced-examples/connectors.cy.js create mode 100644 cypress/e2e/2-advanced-examples/cookies.cy.js create mode 100644 cypress/e2e/2-advanced-examples/cypress_api.cy.js create mode 100644 cypress/e2e/2-advanced-examples/files.cy.js create mode 100644 cypress/e2e/2-advanced-examples/location.cy.js create mode 100644 cypress/e2e/2-advanced-examples/misc.cy.js create mode 100644 cypress/e2e/2-advanced-examples/navigation.cy.js create mode 100644 cypress/e2e/2-advanced-examples/network_requests.cy.js create mode 100644 cypress/e2e/2-advanced-examples/querying.cy.js create mode 100644 cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js create mode 100644 cypress/e2e/2-advanced-examples/storage.cy.js create mode 100644 cypress/e2e/2-advanced-examples/traversal.cy.js create mode 100644 cypress/e2e/2-advanced-examples/utilities.cy.js create mode 100644 cypress/e2e/2-advanced-examples/viewport.cy.js create mode 100644 cypress/e2e/2-advanced-examples/waiting.cy.js create mode 100644 cypress/e2e/2-advanced-examples/window.cy.js create mode 100644 cypress/fixtures/example.json create mode 100644 cypress/support/commands.js create mode 100644 cypress/support/e2e.js diff --git a/cypress.config.js b/cypress.config.js new file mode 100644 index 00000000..0969aae3 --- /dev/null +++ b/cypress.config.js @@ -0,0 +1,7 @@ +module.exports = { + e2e: { + setupNodeEvents(on, config) { + // implement node event listeners here + }, + }, +}; diff --git a/cypress/e2e/1-getting-started/todo.cy.js b/cypress/e2e/1-getting-started/todo.cy.js new file mode 100644 index 00000000..4768ff92 --- /dev/null +++ b/cypress/e2e/1-getting-started/todo.cy.js @@ -0,0 +1,143 @@ +/// + +// Welcome to Cypress! +// +// This spec file contains a variety of sample tests +// for a todo list app that are designed to demonstrate +// the power of writing tests in Cypress. +// +// To learn more about how Cypress works and +// what makes it such an awesome testing tool, +// please read our getting started guide: +// https://on.cypress.io/introduction-to-cypress + +describe('example to-do app', () => { + beforeEach(() => { + // Cypress starts out with a blank slate for each test + // so we must tell it to visit our website with the `cy.visit()` command. + // Since we want to visit the same URL at the start of all our tests, + // we include it in our beforeEach function so that it runs before each test + cy.visit('https://example.cypress.io/todo') + }) + + it('displays two todo items by default', () => { + // We use the `cy.get()` command to get all elements that match the selector. + // Then, we use `should` to assert that there are two matched items, + // which are the two default items. + cy.get('.todo-list li').should('have.length', 2) + + // We can go even further and check that the default todos each contain + // the correct text. We use the `first` and `last` functions + // to get just the first and last matched elements individually, + // and then perform an assertion with `should`. + cy.get('.todo-list li').first().should('have.text', 'Pay electric bill') + cy.get('.todo-list li').last().should('have.text', 'Walk the dog') + }) + + it('can add new todo items', () => { + // We'll store our item text in a variable so we can reuse it + const newItem = 'Feed the cat' + + // Let's get the input element and use the `type` command to + // input our new list item. After typing the content of our item, + // we need to type the enter key as well in order to submit the input. + // This input has a data-test attribute so we'll use that to select the + // element in accordance with best practices: + // https://on.cypress.io/selecting-elements + cy.get('[data-test=new-todo]').type(`${newItem}{enter}`) + + // Now that we've typed our new item, let's check that it actually was added to the list. + // Since it's the newest item, it should exist as the last element in the list. + // In addition, with the two default items, we should have a total of 3 elements in the list. + // Since assertions yield the element that was asserted on, + // we can chain both of these assertions together into a single statement. + cy.get('.todo-list li') + .should('have.length', 3) + .last() + .should('have.text', newItem) + }) + + it('can check off an item as completed', () => { + // In addition to using the `get` command to get an element by selector, + // we can also use the `contains` command to get an element by its contents. + // However, this will yield the