Skip to content

Commit

Permalink
Merge branch '8.5' into 9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 24, 2022
2 parents 630725f + 0869792 commit 94fbab8
Show file tree
Hide file tree
Showing 28 changed files with 40 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@
'multiline_whitespace_before_semicolons' => true,
'native_constant_invocation' => false,
'native_function_casing' => false,
'native_function_invocation' => false,
'native_function_invocation' => [
'include' => [
'@internal',
],
],
'native_function_type_declaration_casing' => true,
'new_with_braces' => [
'named_class' => false,
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Assert/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace PHPUnit\Framework;

use function func_get_args;
use function function_exists;
use ArrayAccess;
use Countable;
use DOMDocument;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
namespace PHPUnit\Framework\MockObject;

use function array_diff_assoc;
use function array_unique;
use function implode;
use function sprintf;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
namespace PHPUnit\Framework\MockObject;

use function get_class;
use function gettype;
use function is_object;
use function sprintf;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
namespace PHPUnit\Framework\MockObject;

use function sprintf;

/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Framework/MockObject/Invocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
use function explode;
use function get_class;
use function implode;
use function in_array;
use function interface_exists;
use function is_object;
use function sprintf;
use function strpos;
Expand Down
2 changes: 2 additions & 0 deletions src/Framework/TestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
namespace PHPUnit\Framework;

use const PHP_EOL;
use function class_exists;
use function count;
use function extension_loaded;
use function function_exists;
use function get_class;
use function sprintf;
Expand Down
1 change: 1 addition & 0 deletions src/Framework/TestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use function array_keys;
use function array_map;
use function array_merge;
use function array_slice;
use function array_unique;
use function basename;
use function call_user_func;
Expand Down
1 change: 1 addition & 0 deletions src/Runner/DefaultTestResultCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use function is_file;
use function json_decode;
use function json_encode;
use function sprintf;
use PHPUnit\Util\Filesystem;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Runner/Extension/PharLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Runner\Extension;

use function is_file;
use PharIo\Manifest\ApplicationName;
use PharIo\Manifest\Exception as ManifestException;
use PharIo\Manifest\ManifestLoader;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use function getcwd;
use function ini_get;
use function ini_set;
use function is_array;
use function is_callable;
use function is_dir;
use function is_file;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
namespace PHPUnit\TextUI\XmlConfiguration;

use function assert;
use function in_array;
use DOMDocument;
use DOMElement;
use PHPUnit\Util\Xml\SnapshotNodeList;
Expand Down
1 change: 1 addition & 0 deletions src/Util/Xml/SnapshotNodeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Util\Xml;

use function count;
use ArrayIterator;
use Countable;
use DOMNode;
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/regression/4663/Issue4663Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public function testTestThatExpectsAnErrorPassesWhenTheErrorOccurs(): void
{
$this->expectError();

implode('', [new stdClass]);
\implode('', [new stdClass]);
}
}
2 changes: 1 addition & 1 deletion tests/end-to-end/regression/873/Issue873Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/
if (\extension_loaded('xdebug') && \version_compare(\phpversion('xdebug'), '3', '<')) {
\xdebug_disable();
xdebug_disable();
}

throw new Exception(
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/Constraint/ClassHasAttributeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework\Constraint;

use function sprintf;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestFailure;
use PHPUnit\TestFixture\ClassWithNonPublicAttributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework\Constraint;

use function sprintf;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestFailure;
use PHPUnit\TestFixture\ClassWithNonPublicAttributes;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/Constraint/IsIdenticalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework\Constraint;

use function sprintf;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestFailure;
use stdClass;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/Constraint/IsInstanceOfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework\Constraint;

use function sprintf;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestFailure;
use ReflectionException;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/Constraint/IsTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use function fopen;
use function is_resource;
use function preg_replace;
use function sprintf;
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestFailure;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/Constraint/ObjectHasAttributeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework\Constraint;

use function sprintf;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestFailure;
use PHPUnit\TestFixture\ClassWithNonPublicAttributes;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/ConstraintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace PHPUnit\Framework;

use function preg_replace;
use function sprintf;
use ArrayObject;
use Countable;
use PHPUnit\Framework\Constraint\Count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
namespace PHPUnit\Framework\MockObject;

use function sprintf;
use PHPUnit\Framework\Constraint\IsEqual;
use PHPUnit\Framework\MockObject\Builder\InvocationMocker;
use PHPUnit\Framework\MockObject\Stub\ReturnSelf;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/MockObject/MockBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework\MockObject;

use function sprintf;
use ACustomClassName;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\Mockable;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/MockObject/MockObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use function func_get_args;
use function get_class;
use function get_parent_class;
use function sprintf;
use Exception;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/TestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use function getcwd;
use function ini_get;
use function ini_set;
use function sprintf;
use function trigger_error;
use DependencyInputTest;
use InvalidArgumentException;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Framework/TestSuiteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use const DIRECTORY_SEPARATOR;
use const PHP_EOL;
use function array_pop;
use function sprintf;
use MultiDependencyTest;
use PHPUnit\TestFixture\BeforeAndAfterTest;
use PHPUnit\TestFixture\BeforeClassAndAfterClassTest;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/Runner/TestSuiteSorterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace PHPUnit\Runner;

use function mt_srand;
use function sprintf;
use MultiDependencyTest;
use NotReorderableTest;
use PHPUnit\Framework\TestCase;
Expand Down

0 comments on commit 94fbab8

Please sign in to comment.