Skip to content

Commit f9f4c52

Browse files
committed
Updated Rector to commit 71c186825d6c56464f05351e98ba9b269f85d023
rectorphp/rector-src@71c1868 Revert "Revert "Fix global require-dev phpunit 12 (#7475)" (#7476)" (#7480)
1 parent 28ce7a7 commit f9f4c52

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '8cccd99ceeedbb6efc430b705a6a1f17774ac0d3';
22+
public const PACKAGE_VERSION = '71c186825d6c56464f05351e98ba9b269f85d023';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-10-11 23:14:24';
27+
public const RELEASE_DATE = '2025-10-11 21:20:50';
2828
/**
2929
* @var int
3030
*/

src/Testing/PHPUnit/AbstractLazyTestCase.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace Rector\Testing\PHPUnit;
55

66
use PHPUnit\Framework\TestCase;
7+
use PHPUnit\Runner\Version;
78
use Rector\Config\RectorConfig;
89
use Rector\DependencyInjection\LazyContainerFactory;
910
abstract class AbstractLazyTestCase extends TestCase
@@ -52,7 +53,12 @@ private function includePreloadFilesAndScoperAutoload(): void
5253
{
5354
if (file_exists(__DIR__ . '/../../../preload.php')) {
5455
if (file_exists(__DIR__ . '/../../../vendor')) {
55-
require_once __DIR__ . '/../../../preload.php';
56+
/**
57+
* On PHPUnit 12+, when classmap autoloaded, it means preload already loaded early
58+
*/
59+
if (!class_exists(Version::class, \true) || (int) Version::id() < 12) {
60+
require_once __DIR__ . '/../../../preload.php';
61+
}
5662
// test case in rector split package
5763
} elseif (file_exists(__DIR__ . '/../../../../../../vendor')) {
5864
require_once __DIR__ . '/../../../preload-split-package.php';

0 commit comments

Comments
 (0)