Skip to content

Commit

Permalink
Merge branch '9.6' into 10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jul 28, 2024
2 parents 1967d7a + 9c42d47 commit b64e39d
Show file tree
Hide file tree
Showing 68 changed files with 94 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => true,
'native_constant_invocation' => false,
'native_constant_invocation' => true,
'native_function_casing' => false,
'native_function_invocation' => [
'include' => [
Expand Down
1 change: 1 addition & 0 deletions src/Event/Dispatcher/DirectDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Event;

use const PHP_EOL;
use function array_key_exists;
use function dirname;
use function sprintf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Event\Test;

use const PHP_EOL;
use function sprintf;
use PHPUnit\Event\Code;
use PHPUnit\Event\Code\Throwable;
Expand Down
1 change: 1 addition & 0 deletions src/Event/Events/Test/PrintedUnexpectedOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Event\Test;

use const PHP_EOL;
use function sprintf;
use PHPUnit\Event\Event;
use PHPUnit\Event\Telemetry;
Expand Down
6 changes: 6 additions & 0 deletions src/Framework/Constraint/String/IsJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
*/
namespace PHPUnit\Framework\Constraint;

use const JSON_ERROR_CTRL_CHAR;
use const JSON_ERROR_DEPTH;
use const JSON_ERROR_NONE;
use const JSON_ERROR_STATE_MISMATCH;
use const JSON_ERROR_SYNTAX;
use const JSON_ERROR_UTF8;
use function is_string;
use function json_decode;
use function json_last_error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace PHPUnit\Framework\Constraint;

use const DIRECTORY_SEPARATOR;
use const PHP_EOL;
use function explode;
use function implode;
use function preg_match;
Expand Down
1 change: 1 addition & 0 deletions src/Logging/EventLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use const FILE_APPEND;
use const LOCK_EX;
use const PHP_EOL;
use const PHP_OS_FAMILY;
use function file_put_contents;
use function implode;
use function preg_split;
Expand Down
1 change: 1 addition & 0 deletions src/Logging/JUnit/JunitXmlLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Logging\JUnit;

use const PHP_EOL;
use function assert;
use function basename;
use function is_int;
Expand Down
2 changes: 2 additions & 0 deletions src/Metadata/Api/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
namespace PHPUnit\Metadata\Api;

use const JSON_ERROR_NONE;
use const PREG_OFFSET_CAPTURE;
use function array_key_exists;
use function assert;
use function explode;
Expand Down
1 change: 1 addition & 0 deletions src/Runner/Baseline/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Runner\Baseline;

use const FILE_IGNORE_NEW_LINES;
use function assert;
use function file;
use function is_file;
Expand Down
1 change: 1 addition & 0 deletions src/Runner/Baseline/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Runner\Baseline;

use const DIRECTORY_SEPARATOR;
use function assert;
use function dirname;
use function file_exists;
Expand Down
1 change: 1 addition & 0 deletions src/Runner/Extension/ExtensionBootstrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Runner\Extension;

use const PHP_EOL;
use function assert;
use function class_exists;
use function class_implements;
Expand Down
1 change: 1 addition & 0 deletions src/Runner/ResultCache/DefaultResultCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace PHPUnit\Runner\ResultCache;

use const DIRECTORY_SEPARATOR;
use const LOCK_EX;
use function array_keys;
use function assert;
use function dirname;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace PHPUnit\TextUI;

use const PHP_EOL;
use const PHP_VERSION;
use function is_file;
use function is_readable;
use function printf;
Expand Down
2 changes: 2 additions & 0 deletions src/TextUI/Command/Commands/GenerateConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use const STDIN;
use function fgets;
use function file_put_contents;
use function getcwd;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Command/Commands/ListGroupsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use function sort;
use function sprintf;
use function str_starts_with;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Command/Commands/ListTestSuitesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use function sprintf;
use PHPUnit\TextUI\Configuration\Registry;
use PHPUnit\TextUI\Configuration\TestSuiteCollection;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Command/Commands/ListTestsAsTextCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use function sprintf;
use function str_replace;
use PHPUnit\Framework\TestCase;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Command/Commands/ListTestsAsXmlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use function file_put_contents;
use function implode;
use function sprintf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use function copy;
use function file_put_contents;
use function sprintf;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Command/Commands/VersionCheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Command;

use const PHP_EOL;
use function file_get_contents;
use function sprintf;
use function version_compare;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Configuration/Cli/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\CliArguments;

use const DIRECTORY_SEPARATOR;
use function array_map;
use function basename;
use function explode;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Configuration/Merger.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace PHPUnit\TextUI\Configuration;

use const DIRECTORY_SEPARATOR;
use const PATH_SEPARATOR;
use function array_diff;
use function assert;
use function dirname;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Configuration/TestSuiteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Configuration;

use const PHP_EOL;
use function assert;
use function count;
use function is_dir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\XmlConfiguration;

use const PHP_EOL;
use function sprintf;
use function trim;
use LibXMLError;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Output/Facade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Output;

use const PHP_EOL;
use function assert;
use PHPUnit\Event\EventFacadeIsSealedException;
use PHPUnit\Event\Facade as EventFacade;
Expand Down
1 change: 1 addition & 0 deletions src/TextUI/Output/SummaryPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TextUI\Output;

use const PHP_EOL;
use function sprintf;
use PHPUnit\TestRunner\TestResult\TestResult;
use PHPUnit\Util\Color;
Expand Down
1 change: 1 addition & 0 deletions src/Util/ExcludeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Util;

use const PHP_OS_FAMILY;
use function class_exists;
use function defined;
use function dirname;
Expand Down
1 change: 1 addition & 0 deletions src/Util/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Util;

use const DIRECTORY_SEPARATOR;
use function basename;
use function dirname;
use function is_dir;
Expand Down
1 change: 1 addition & 0 deletions src/Util/Xml/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Util\Xml;

use const PHP_OS_FAMILY;
use function chdir;
use function dirname;
use function error_reporting;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TestFixture\Baseline;

use const E_USER_DEPRECATED;
use function trigger_error;
use PHPUnit\Framework\TestCase;

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

use const E_USER_DEPRECATED;
use const E_USER_NOTICE;
use const E_USER_WARNING;
use function trigger_error;
use PHPUnit\Framework\TestCase;
use Serializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
namespace PHPUnit\TestFixture\Baseline;

use const E_USER_DEPRECATED;
use const E_USER_NOTICE;
use const E_USER_WARNING;
use function trigger_error;
use PHPUnit\Framework\TestCase;
use Serializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*/
namespace PHPUnit\TestFixture\Baseline;

use const E_USER_DEPRECATED;
use const E_USER_NOTICE;
use const E_USER_WARNING;
use function trigger_error;
use PHPUnit\Framework\TestCase;
use Serializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TestFixture\Baseline;

use const E_USER_DEPRECATED;
use function trigger_error;
use PHPUnit\Framework\TestCase;

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

use const E_USER_DEPRECATED;
use function trigger_error;
use PHPUnit\Framework\TestCase;

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/_files/baseline/use-baseline/baseline.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<files version="1">
<file path="tests/Test.php">
<line number="19" hash="a1022fb62c4705938dd2c6df5ff35b2621f9e97d">
<line number="20" hash="a1022fb62c4705938dd2c6df5ff35b2621f9e97d">
<issue><![CDATA[deprecation]]></issue>
</line>
</file>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TestFixture\Baseline;

use const E_USER_DEPRECATED;
use function trigger_error;
use PHPUnit\Framework\TestCase;

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

use const E_USER_DEPRECATED;
use function trigger_error;
use PHPUnit\Framework\TestCase;

Expand Down
1 change: 1 addition & 0 deletions tests/end-to-end/_files/stop-on-fail-on/NoticeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TestFixture\TestRunnerStopping;

use const E_USER_NOTICE;
use function trigger_error;
use PHPUnit\Framework\TestCase;

Expand Down
1 change: 1 addition & 0 deletions tests/end-to-end/_files/stop-on-fail-on/WarningTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\TestFixture\TestRunnerStopping;

use const E_USER_WARNING;
use function trigger_error;
use PHPUnit\Framework\TestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ Baseline written to %sbaseline.xml.
<?xml version="1.0"?>
<files version="1">
<file path="tests/Test.php">
<line number="20" hash="d830ec28e59b9f13d697e91ea3944db52a4aa5c8">
<line number="23" hash="d830ec28e59b9f13d697e91ea3944db52a4aa5c8">
<issue><![CDATA[deprecation]]></issue>
</line>
<line number="27" hash="e2e96bace350722203be87b5c9990c68149e7880">
<line number="30" hash="e2e96bace350722203be87b5c9990c68149e7880">
<issue><![CDATA[notice]]></issue>
</line>
<line number="34" hash="53788ca16bdbb84598d44aa0efc6c022e02e9525">
<line number="37" hash="53788ca16bdbb84598d44aa0efc6c022e02e9525">
<issue><![CDATA[warning]]></issue>
</line>
<line number="41" hash="0c40db3a94679d19bdb71313ad8987f6a7df542f">
<line number="44" hash="0c40db3a94679d19bdb71313ad8987f6a7df542f">
<issue><![CDATA[Serializable@anonymous implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary)]]></issue>
</line>
<line number="62" hash="2c83752a707cb31226e122e9f697a7e69773903e">
<line number="65" hash="2c83752a707cb31226e122e9f697a7e69773903e">
<issue><![CDATA[Accessing static property class@anonymous::$a as non static]]></issue>
<issue><![CDATA[Undefined property: class@anonymous::$a]]></issue>
</line>
Expand Down
10 changes: 5 additions & 5 deletions tests/end-to-end/baseline/generate-baseline.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ Baseline written to %sbaseline.xml.
<?xml version="1.0"?>
<files version="1">
<file path="tests/Test.php">
<line number="20" hash="a1022fb62c4705938dd2c6df5ff35b2621f9e97d">
<line number="23" hash="a1022fb62c4705938dd2c6df5ff35b2621f9e97d">
<issue><![CDATA[deprecation]]></issue>
</line>
<line number="27" hash="fff8be75c2fbcbc4d395247e58fbbe6541189cf0">
<line number="30" hash="fff8be75c2fbcbc4d395247e58fbbe6541189cf0">
<issue><![CDATA[notice]]></issue>
</line>
<line number="34" hash="a5b91c0a182bedb089007e5bc0d0f462637bc904">
<line number="37" hash="a5b91c0a182bedb089007e5bc0d0f462637bc904">
<issue><![CDATA[warning]]></issue>
</line>
<line number="41" hash="76474d8e27ebd1f5fd11fcf0cbb60a777576df9a">
<line number="44" hash="76474d8e27ebd1f5fd11fcf0cbb60a777576df9a">
<issue><![CDATA[Serializable@anonymous implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary)]]></issue>
</line>
<line number="62" hash="653ed54b2a16d4fa980fde9f70c38edbab099477">
<line number="65" hash="653ed54b2a16d4fa980fde9f70c38edbab099477">
<issue><![CDATA[Accessing static property class@anonymous::$a as non static]]></issue>
<issue><![CDATA[Undefined property: class@anonymous::$a]]></issue>
</line>
Expand Down
Loading

0 comments on commit b64e39d

Please sign in to comment.