diff --git a/CHANGELOG.md b/CHANGELOG.md
index c345ef8..d352b74 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,22 @@
All Notable changes to the **Quality Assurance - Drupal** package.
+## [5.0.2]
+
+### Fixed
+
+- Limited extension PHPUnit test and source discovery to project paths. The
+ shared configuration now discovers tests from the `tests/src` root rather
+ than requiring every optional test-type directory. This prevents both
+ recursive Composer-dependency scans and errors for absent test directories.
+
+## [5.0.1]
+
+### Fixed
+
+- Select the PHPUnit 11.5 extension and site configuration templates when the
+ installed test runner is PHPUnit 11.
+
## [5.0.0]
### Added
@@ -177,6 +193,8 @@ Older releases (2.x.x) see [CHANGELOG-2.x.md](CHANGELOG-1.x.md).
Older releases (1.x.x) see [CHANGELOG-1.x.md](CHANGELOG-1.x.md).
+[5.0.2]: https://github.com/district09/php_package_qa-drupal/compare/5.0.1...5.0.2
+[5.0.1]: https://github.com/district09/php_package_qa-drupal/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/district09/php_package_qa-drupal/compare/4.1.4...5.0.0
[4.1.4]: https://github.com/district09/php_package_qa-drupal/compare/4.1.3...4.1.4
[4.1.3]: https://github.com/district09/php_package_qa-drupal/compare/4.1.2...4.1.3
diff --git a/configs/phpunit-extension-11.xml b/configs/phpunit-extension-11.xml
index e3b964b..07903fc 100644
--- a/configs/phpunit-extension-11.xml
+++ b/configs/phpunit-extension-11.xml
@@ -25,25 +25,9 @@
-
- **/tests/src/Unit
- vendor
-
-
- **/tests/src/Kernel
- vendor
-
-
- **/tests/src/Functional
- vendor
-
-
- **/tests/src/FunctionalJavascript
- vendor
-
-
- **/tests/src/Build
- vendor
+
+ tests/src
+ modules/**/tests/src
@@ -57,7 +41,6 @@
./src
- ./**/src
./modules/**/src
diff --git a/configs/phpunit-extension.xml b/configs/phpunit-extension.xml
index ea4be7c..ceb747a 100644
--- a/configs/phpunit-extension.xml
+++ b/configs/phpunit-extension.xml
@@ -25,25 +25,9 @@
-
- **/tests/src/Unit
- vendor
-
-
- **/tests/src/Kernel
- vendor
-
-
- **/tests/src/Functional
- vendor
-
-
- **/tests/src/FunctionalJavascript
- vendor
-
-
- **/tests/src/Build
- vendor
+
+ tests/src
+ modules/**/tests/src
@@ -57,7 +41,6 @@
./src
- ./**/src
./modules/**/src
diff --git a/tests/src/Unit/GrumPHP/ConfigFileMergerTest.php b/tests/src/Unit/GrumPHP/ConfigFileMergerTest.php
index edda19c..8d41d82 100644
--- a/tests/src/Unit/GrumPHP/ConfigFileMergerTest.php
+++ b/tests/src/Unit/GrumPHP/ConfigFileMergerTest.php
@@ -110,6 +110,21 @@ public function testPhpunitConfigurationUsesCurrentRunnerSchema(): void {
);
}
+ /**
+ * Tests that extension test discovery is limited to project code.
+ */
+ public function testExtensionPhpunitConfigurationExcludesVendorPaths(): void {
+ $task = (new \ReflectionClass(Phpunit::class))->newInstanceWithoutConstructor();
+ (new ConfigFileMerger())->mergeTaskConfig($task, TRUE);
+
+ $configuration = (string) file_get_contents('phpunit.qa-drupal.xml');
+ $document = new \DOMDocument();
+ self::assertTrue($document->loadXML($configuration));
+ self::assertStringContainsString('tests/src', $configuration);
+ self::assertStringNotContainsString('tests/src/Kernel', $configuration);
+ self::assertStringNotContainsString('./**/src', $configuration);
+ }
+
/**
* Runs the configuration merger with a PHPStan task instance.
*/