From 2cd779cbe9b75832170bee75bc4703b872769e42 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 24 Sep 2024 13:54:42 +0200 Subject: Don't autoload test cases using composer. Introduces a bootstrap file that ensures that the base test case classes are loaded and available instead. This reduces the number of warnings when running composer install. --- composer.json | 5 ----- composer.lock | 10 ++++++---- tests/phpunit.xml | 2 +- tests/unit/bootstrap.php | 9 +++++++++ 4 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 tests/unit/bootstrap.php diff --git a/composer.json b/composer.json index 7ed537c39..a90a52db0 100644 --- a/composer.json +++ b/composer.json @@ -73,11 +73,6 @@ "Zotlabs\\": "Zotlabs/" } }, - "autoload-dev": { - "psr-4": { - "Zotlabs\\Tests\\Unit\\": "tests/unit" - } - }, "minimum-stability": "stable", "config": { "notify-on-install": false, diff --git a/composer.lock b/composer.lock index 67bcf53b8..f4c1af599 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a3d39881eecda53834cbcb595100e00e", + "content-hash": "e15f86e41cc765cbdd319fc2cc5311fb", "packages": [ { "name": "blueimp/jquery-file-upload", @@ -4534,12 +4534,12 @@ "version": "3.6.2", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", "shasum": "" }, @@ -5280,6 +5280,8 @@ "ext-sodium": "*", "ext-bcmath": "*" }, - "platform-dev": [], + "platform-dev": { + "ext-yaml": "*" + }, "plugin-api-version": "2.6.0" } diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 3531cd05c..44ee9c2ee 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -1,5 +1,5 @@ - + .. diff --git a/tests/unit/bootstrap.php b/tests/unit/bootstrap.php new file mode 100644 index 000000000..296e1b9b6 --- /dev/null +++ b/tests/unit/bootstrap.php @@ -0,0 +1,9 @@ +