Skip to content

Commit c53383c

Browse files
Closes #5073
1 parent 70fc8be commit c53383c

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

ChangeLog-9.6.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 9.6 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [9.6.1] - 2023-MM-DD
6+
7+
### Fixed
8+
9+
* [#5073](https://github.com/sebastianbergmann/phpunit/issues/5073): `--no-extensions` CLI option only prevents extension PHARs from being loaded
10+
511
## [9.6.0] - 2023-02-03
612

713
### Changed
@@ -11,4 +17,5 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil
1117
* [#5064](https://github.com/sebastianbergmann/phpunit/issues/5064): Deprecate `PHPUnit\Framework\TestCase::getMockClass()`
1218
* [#5132](https://github.com/sebastianbergmann/phpunit/issues/5132): Deprecate `Test` suffix for abstract test case classes
1319

20+
[9.6.1]: https://github.com/sebastianbergmann/phpunit/compare/9.6.0...9.6
1421
[9.6.0]: https://github.com/sebastianbergmann/phpunit/compare/9.5.28...9.6.0

src/TextUI/TestRunner.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,17 +1008,19 @@ private function handleConfiguration(array &$arguments): void
10081008
$arguments['excludeGroups'] = array_diff($groupConfiguration->exclude()->asArrayOfStrings(), $groupCliArgs);
10091009
}
10101010

1011-
$extensionHandler = new ExtensionHandler;
1011+
if (!isset($this->arguments['noExtensions'])) {
1012+
$extensionHandler = new ExtensionHandler;
10121013

1013-
foreach ($arguments['configurationObject']->extensions() as $extension) {
1014-
$extensionHandler->registerExtension($extension, $this);
1015-
}
1014+
foreach ($arguments['configurationObject']->extensions() as $extension) {
1015+
$extensionHandler->registerExtension($extension, $this);
1016+
}
10161017

1017-
foreach ($arguments['configurationObject']->listeners() as $listener) {
1018-
$arguments['listeners'][] = $extensionHandler->createTestListenerInstance($listener);
1019-
}
1018+
foreach ($arguments['configurationObject']->listeners() as $listener) {
1019+
$arguments['listeners'][] = $extensionHandler->createTestListenerInstance($listener);
1020+
}
10201021

1021-
unset($extensionHandler);
1022+
unset($extensionHandler);
1023+
}
10221024

10231025
foreach ($arguments['unavailableExtensions'] as $extension) {
10241026
$arguments['warnings'][] = sprintf(

0 commit comments

Comments
 (0)