Skip to content

Commit

Permalink
Merge branch '11.4' into 11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 23, 2024
2 parents ac2a438 + c396291 commit 1f9de10
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<phar name="php-cs-fixer" version="^3.64" installed="3.64.0" location="./tools/php-cs-fixer" copy="true"/>
<phar name="humbug/php-scoper" version="^0.18" installed="0.18.15" location="./tools/php-scoper" copy="true"/>
<phar name="composer" version="^2.8" installed="2.8.3" location="./tools/composer" copy="true"/>
<phar name="phpstan" version="^1.12" installed="1.12.11" location="./tools/phpstan" copy="true"/>
<phar name="phpstan" version="^2.0" installed="2.0.2" location="./tools/phpstan" copy="true"/>
</phive>
4 changes: 0 additions & 4 deletions src/Framework/Constraint/IsAnything.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\ExpectationFailedException;

/**
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
*/
Expand All @@ -25,8 +23,6 @@ final class IsAnything extends Constraint
* If $returnResult is true, the result of the evaluation is returned as
* a boolean value instead: true in case of success, false in case of a
* failure.
*
* @throws ExpectationFailedException
*/
public function evaluate(mixed $other, string $description = '', bool $returnResult = false): ?bool
{
Expand Down
6 changes: 4 additions & 2 deletions src/Framework/MockObject/Generator/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,9 @@ private function generateCodeForTestDoubleClass(string $type, bool $mockObject,
}

/** @var trait-string[] $traits */
$traits = [];
$traits = [];

/** @phpstan-ignore identical.alwaysTrue */
$isPhp82 = PHP_MAJOR_VERSION === 8 && PHP_MINOR_VERSION === 2;

if (!$isReadonly && $isPhp82) {
Expand Down Expand Up @@ -1103,7 +1105,7 @@ private function instantiateProxyTarget(?object $proxyTarget, object $object, st
*
* @throws ReflectionException
*
* @phpstan-ignore missingType.generics
* @phpstan-ignore missingType.generics, throws.unusedType
*/
private function reflectClass(string $className): ReflectionClass
{
Expand Down
1 change: 1 addition & 0 deletions src/Framework/TestRunner/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use function assert;
use function extension_loaded;
use function sprintf;
use function xdebug_is_debugger_active;
use AssertionError;
use PHPUnit\Event\Facade;
use PHPUnit\Metadata\Api\CodeCoverage as CodeCoverageMetadataApi;
Expand Down
6 changes: 0 additions & 6 deletions src/Logging/JUnit/JunitXmlLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,11 @@ public function testPreparationStarted(PreparationStarted $event): void
$this->createTestCase($event);
}

/**
* @throws InvalidArgumentException
*/
public function testPreparationFailed(): void
{
$this->preparationFailed = true;
}

/**
* @throws InvalidArgumentException
*/
public function testPrepared(): void
{
$this->prepared = true;
Expand Down
1 change: 1 addition & 0 deletions src/Util/PHP/DefaultJobRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use function tempnam;
use function trim;
use function unlink;
use function xdebug_is_debugger_active;
use PHPUnit\Event\Facade;
use PHPUnit\Runner\CodeCoverage;
use SebastianBergmann\Environment\Runtime;
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/skip-if-requires-code-coverage-driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
print 'skip: This test requires a code coverage driver';
}

if (\version_compare(\phpversion('xdebug'), '3.1', '>=') && \in_array('coverage', xdebug_info('mode'), true)) {
if (\version_compare(\phpversion('xdebug'), '3.1', '>=') && \in_array('coverage', \xdebug_info('mode'), true)) {
return;
}

Expand Down
Binary file modified tools/phpstan
Binary file not shown.

0 comments on commit 1f9de10

Please sign in to comment.