Skip to content

Commit 0cef856

Browse files
Merge branch '9.6' into 10.5
2 parents 6a42e5e + 66c160d commit 0cef856

26 files changed

+83
-44
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
'explicit_string_variable' => true,
104104
'fopen_flag_order' => true,
105105
'full_opening_tag' => true,
106-
'fully_qualified_strict_types' => true,
106+
'fully_qualified_strict_types' => ['import_symbols' => true],
107107
'function_declaration' => true,
108108
'function_to_constant' => true,
109109
'get_class_to_class_keyword' => true,

src/Framework/Constraint/Traversable/TraversableContainsOnly.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
namespace PHPUnit\Framework\Constraint;
1111

12+
use PHPUnit\Framework\Exception;
1213
use PHPUnit\Framework\ExpectationFailedException;
1314

1415
/**
@@ -20,7 +21,7 @@ final class TraversableContainsOnly extends Constraint
2021
private readonly string $type;
2122

2223
/**
23-
* @throws \PHPUnit\Framework\Exception
24+
* @throws Exception
2425
*/
2526
public function __construct(string $type, bool $isNativeType = true)
2627
{

src/Framework/MockObject/MockBuilder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use function array_merge;
1313
use function assert;
1414
use function trait_exists;
15+
use PHPUnit\Framework\Exception;
1516
use PHPUnit\Framework\InvalidArgumentException;
1617
use PHPUnit\Framework\MockObject\Generator\ClassAlreadyExistsException;
1718
use PHPUnit\Framework\MockObject\Generator\ClassIsEnumerationException;
@@ -120,7 +121,7 @@ public function getMock(): MockObject
120121
*
121122
* @psalm-return MockObject&MockedType
122123
*
123-
* @throws \PHPUnit\Framework\Exception
124+
* @throws Exception
124125
* @throws ReflectionException
125126
* @throws RuntimeException
126127
*
@@ -151,7 +152,7 @@ public function getMockForAbstractClass(): MockObject
151152
*
152153
* @psalm-return MockObject&MockedType
153154
*
154-
* @throws \PHPUnit\Framework\Exception
155+
* @throws Exception
155156
* @throws ReflectionException
156157
* @throws RuntimeException
157158
*

src/Framework/TestRunner.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
use PHPUnit\Util\PHP\AbstractPhpProcess;
3838
use ReflectionClass;
3939
use SebastianBergmann\CodeCoverage\Exception as OriginalCodeCoverageException;
40+
use SebastianBergmann\CodeCoverage\InvalidArgumentException;
4041
use SebastianBergmann\CodeCoverage\StaticAnalysisCacheNotConfiguredException;
4142
use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException;
4243
use SebastianBergmann\Invoker\Invoker;
@@ -59,8 +60,8 @@ public function __construct()
5960

6061
/**
6162
* @throws \PHPUnit\Runner\Exception
62-
* @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException
6363
* @throws CodeCoverageException
64+
* @throws InvalidArgumentException
6465
* @throws MoreThanOneDataSetFromDataProviderException
6566
* @throws UnintentionallyCoveredCodeException
6667
*/

src/Framework/TestSuite.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
use PHPUnit\Util\Test as TestUtil;
4545
use ReflectionClass;
4646
use ReflectionMethod;
47+
use SebastianBergmann\CodeCoverage\InvalidArgumentException;
4748
use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException;
4849
use Throwable;
4950

@@ -308,10 +309,10 @@ public function groupDetails(): array
308309
}
309310

310311
/**
311-
* @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException
312312
* @throws CodeCoverageException
313313
* @throws Event\RuntimeException
314314
* @throws Exception
315+
* @throws InvalidArgumentException
315316
* @throws NoPreviousThrowableException
316317
* @throws UnintentionallyCoveredCodeException
317318
*/

src/Metadata/Exception/AnnotationsAreNotSupportedForInternalClassesException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
namespace PHPUnit\Metadata;
1111

1212
use function sprintf;
13+
use PHPUnit\Exception;
1314
use RuntimeException;
1415

1516
/**
1617
* @internal This class is not covered by the backward compatibility promise for PHPUnit
1718
*/
18-
final class AnnotationsAreNotSupportedForInternalClassesException extends RuntimeException implements \PHPUnit\Exception
19+
final class AnnotationsAreNotSupportedForInternalClassesException extends RuntimeException implements Exception
1920
{
2021
/**
2122
* @psalm-param class-string $className

src/Metadata/Exception/ReflectionException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
*/
1010
namespace PHPUnit\Metadata;
1111

12+
use PHPUnit\Exception;
1213
use RuntimeException;
1314

1415
/**
1516
* @internal This class is not covered by the backward compatibility promise for PHPUnit
1617
*/
17-
final class ReflectionException extends RuntimeException implements \PHPUnit\Exception
18+
final class ReflectionException extends RuntimeException implements Exception
1819
{
1920
}

src/Runner/PhptTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
use PHPUnit\Util\PHP\AbstractPhpProcess;
5858
use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData;
5959
use SebastianBergmann\CodeCoverage\InvalidArgumentException;
60+
use SebastianBergmann\CodeCoverage\ReflectionException;
6061
use SebastianBergmann\CodeCoverage\StaticAnalysisCacheNotConfiguredException;
6162
use SebastianBergmann\CodeCoverage\Test\TestSize\TestSize;
6263
use SebastianBergmann\CodeCoverage\Test\TestStatus\TestStatus;
@@ -106,11 +107,11 @@ public function count(): int
106107
* Runs a test and collects its result in a TestResult instance.
107108
*
108109
* @throws \PHPUnit\Framework\Exception
109-
* @throws \SebastianBergmann\CodeCoverage\ReflectionException
110110
* @throws \SebastianBergmann\Template\InvalidArgumentException
111111
* @throws Exception
112112
* @throws InvalidArgumentException
113113
* @throws NoPreviousThrowableException
114+
* @throws ReflectionException
114115
* @throws StaticAnalysisCacheNotConfiguredException
115116
* @throws TestIdMissingException
116117
* @throws UnintentionallyCoveredCodeException

src/TextUI/Configuration/Merger.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use PHPUnit\Event\Facade as EventFacade;
2121
use PHPUnit\Runner\TestSuiteSorter;
2222
use PHPUnit\TextUI\CliArguments\Configuration as CliConfiguration;
23+
use PHPUnit\TextUI\CliArguments\Exception;
2324
use PHPUnit\TextUI\XmlConfiguration\Configuration as XmlConfiguration;
2425
use PHPUnit\TextUI\XmlConfiguration\LoadedFromFileConfiguration;
2526
use PHPUnit\TextUI\XmlConfiguration\SchemaDetector;
@@ -35,8 +36,8 @@
3536
final class Merger
3637
{
3738
/**
38-
* @throws \PHPUnit\TextUI\CliArguments\Exception
3939
* @throws \PHPUnit\TextUI\XmlConfiguration\Exception
40+
* @throws Exception
4041
* @throws NoCustomCssFileException
4142
*/
4243
public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlConfiguration): Configuration

src/TextUI/Configuration/Registry.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use function unserialize;
1717
use PHPUnit\Event\Facade as EventFacade;
1818
use PHPUnit\TextUI\CliArguments\Configuration as CliConfiguration;
19+
use PHPUnit\TextUI\CliArguments\Exception;
1920
use PHPUnit\TextUI\XmlConfiguration\Configuration as XmlConfiguration;
2021
use PHPUnit\Util\VersionComparisonOperator;
2122

@@ -89,8 +90,8 @@ public static function get(): Configuration
8990
}
9091

9192
/**
92-
* @throws \PHPUnit\TextUI\CliArguments\Exception
9393
* @throws \PHPUnit\TextUI\XmlConfiguration\Exception
94+
* @throws Exception
9495
* @throws NoCustomCssFileException
9596
*/
9697
public static function init(CliConfiguration $cliConfiguration, XmlConfiguration $xmlConfiguration): Configuration

0 commit comments

Comments
 (0)