diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 1787a33416a..e634591ec24 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -250,7 +250,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
- php-version: 8.3
+ php-version: 8.4
coverage: none
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}
diff --git a/.phive/phars.xml b/.phive/phars.xml
index b46defffd10..20bb8d24f59 100644
--- a/.phive/phars.xml
+++ b/.phive/phars.xml
@@ -1,8 +1,8 @@
-
-
+
+
-
-
+
+
diff --git a/ChangeLog-8.5.md b/ChangeLog-8.5.md
index b5fc901808c..20943b8402e 100644
--- a/ChangeLog-8.5.md
+++ b/ChangeLog-8.5.md
@@ -2,6 +2,13 @@
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
+## [8.5.42] - 2025-05-02
+
+### Changed
+
+* [#5956](https://github.com/sebastianbergmann/phpunit/issues/5956): Improved handling of deprecated `E_STRICT` constant
+* Improved message when test is considered risky for printing unexpected output
+
## [8.5.41] - 2024-12-05
### Fixed
@@ -320,6 +327,7 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
+[8.5.42]: https://github.com/sebastianbergmann/phpunit/compare/8.5.41...8.5.42
[8.5.41]: https://github.com/sebastianbergmann/phpunit/compare/8.5.40...8.5.41
[8.5.40]: https://github.com/sebastianbergmann/phpunit/compare/8.5.39...8.5.40
[8.5.39]: https://github.com/sebastianbergmann/phpunit/compare/8.5.38...8.5.39
diff --git a/LICENSE b/LICENSE
index bdb57ec66f0..b687f39ac47 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
BSD 3-Clause License
-Copyright (c) 2001-2024, Sebastian Bergmann
+Copyright (c) 2001-2025, Sebastian Bergmann
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/build/config/github-ci-fail.xml b/build/config/github-ci-fail.xml
deleted file mode 100644
index 94d1cda5331..00000000000
--- a/build/config/github-ci-fail.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- ../../tests/fail
-
-
-
-
-
-
-
diff --git a/composer.json b/composer.json
index e6835eb8ba3..972b34615b4 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
"ext-xml": "*",
"ext-xmlwriter": "*",
"doctrine/instantiator": "^1.5.0",
- "myclabs/deep-copy": "^1.12.1",
+ "myclabs/deep-copy": "^1.13.1",
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"phpunit/php-code-coverage": "^7.0.17",
@@ -51,6 +51,7 @@
"platform": {
"php": "7.2.0"
},
+ "classmap-authoritative": true,
"optimize-autoloader": true,
"sort-packages": true
},
diff --git a/composer.lock b/composer.lock
index c3382f1dc02..68a324f6aac 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f19db84218d192790d6cc390ee1136e9",
+ "content-hash": "0b893070cab673cede448769c2770397",
"packages": [
{
"name": "doctrine/instantiator",
@@ -78,16 +78,16 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.12.1",
+ "version": "1.13.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845"
+ "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845",
- "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c",
+ "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c",
"shasum": ""
},
"require": {
@@ -126,7 +126,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1"
},
"funding": [
{
@@ -134,7 +134,7 @@
"type": "tidelift"
}
],
- "time": "2024-11-08T17:47:46+00:00"
+ "time": "2025-04-29T12:36:36+00:00"
},
{
"name": "phar-io/manifest",
diff --git a/src/Framework/SelfDescribing.php b/src/Framework/SelfDescribing.php
index 73034f650ab..6513f143915 100644
--- a/src/Framework/SelfDescribing.php
+++ b/src/Framework/SelfDescribing.php
@@ -10,7 +10,7 @@
namespace PHPUnit\Framework;
/**
- * @internal This class is not covered by the backward compatibility promise for PHPUnit
+ * @internal This interface is not covered by the backward compatibility promise for PHPUnit
*/
interface SelfDescribing
{
diff --git a/src/Framework/TestResult.php b/src/Framework/TestResult.php
index ce01001888f..dc9ba1dc065 100644
--- a/src/Framework/TestResult.php
+++ b/src/Framework/TestResult.php
@@ -930,7 +930,7 @@ function_exists('xdebug_start_function_monitor');
$test,
new OutputError(
sprintf(
- 'This test printed output: %s',
+ 'Test code or tested code printed unexpected output: %s',
$test->getActualOutput()
)
),
diff --git a/src/Runner/Version.php b/src/Runner/Version.php
index 2ad08edc839..3e26f830720 100644
--- a/src/Runner/Version.php
+++ b/src/Runner/Version.php
@@ -38,7 +38,7 @@ public static function id(): string
}
if (self::$version === '') {
- self::$version = (new VersionId('8.5.41', dirname(__DIR__, 2)))->getVersion();
+ self::$version = (new VersionId('8.5.42', dirname(__DIR__, 2)))->getVersion();
}
return self::$version;
diff --git a/src/Util/ErrorHandler.php b/src/Util/ErrorHandler.php
index 0a42327f15a..a5555e74a88 100644
--- a/src/Util/ErrorHandler.php
+++ b/src/Util/ErrorHandler.php
@@ -11,7 +11,6 @@
use const E_DEPRECATED;
use const E_NOTICE;
-use const E_STRICT;
use const E_USER_DEPRECATED;
use const E_USER_NOTICE;
use const E_USER_WARNING;
@@ -99,7 +98,7 @@ public function __invoke(int $errorNumber, string $errorString, string $errorFil
*
* @see https://github.com/sebastianbergmann/phpunit/issues/5956
*/
- if (defined('E_STRICT') && $errorNumber === @E_STRICT) {
+ if (defined('E_STRICT') && $errorNumber === 2048) {
$errorNumber = E_NOTICE;
}
diff --git a/tests/end-to-end/generic/phar-extension-suppressed.phpt b/tests/end-to-end/generic/phar-extension-suppressed.phpt
index 2175e444efb..c020cd6b65c 100644
--- a/tests/end-to-end/generic/phar-extension-suppressed.phpt
+++ b/tests/end-to-end/generic/phar-extension-suppressed.phpt
@@ -10,5 +10,4 @@ $_SERVER['argv'][] = '--no-extensions';
require_once __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
-Fatal error: Trait %sPHPUnit\ExampleExtension\TestCaseTrait%s not found in %s
-
+Fatal error:%sTrait %sPHPUnit\ExampleExtension\TestCaseTrait%s not found in %A
diff --git a/tests/unit/Framework/AssertTest.php b/tests/unit/Framework/AssertTest.php
index 7418147d4fb..cd798eef0e0 100644
--- a/tests/unit/Framework/AssertTest.php
+++ b/tests/unit/Framework/AssertTest.php
@@ -738,7 +738,7 @@ public function testAssertObjectHasAttributeNumericAttribute(): void
public function testAssertObjectHasAttributeMultiByteAttribute(): void
{
- $object = new stdClass;
+ $object = new stdClass;
$object->{'東京'} = 2020;
$this->assertObjectHasAttribute('東京', $object);
@@ -773,7 +773,7 @@ public function testAssertObjectNotHasAttributeNumericAttribute(): void
public function testAssertObjectNotHasAttributeMultiByteAttribute(): void
{
- $object = new stdClass;
+ $object = new stdClass;
$object->{'東京'} = 2020;
$this->assertObjectNotHasAttribute('長野', $object);
diff --git a/tools/composer b/tools/composer
index f5d9d1ab15e..7a3bef9dffd 100755
Binary files a/tools/composer and b/tools/composer differ
diff --git a/tools/phive b/tools/phive
index 27e468dad1c..da56a9d34e0 100755
--- a/tools/phive
+++ b/tools/phive
@@ -352,34 +352,33 @@ spl_autoload_register(
Phar::mapPhar('phive.phar');
-$rc = (new Factory(new Cli\Request($_SERVER['argv']), new StaticPhiveVersion('0.15.3')))->getRunner()->run();
+$rc = (new Factory(new Cli\Request($_SERVER['argv']), new StaticPhiveVersion('0.16.0')))->getRunner()->run();
exit($rc);
__HALT_COMPILER(); ?>
nX =
- phive.phar + vendor/phar-io/filesystem/src/Directory.php f 4 vendor/phar-io/filesystem/src/DirectoryException.php f =v" + vendor/phar-io/filesystem/src/Exception.phpf f^ $ &