Skip to content

Commit 2924920

Browse files
committed
6654: Upgrade to PHPUnit 13
1 parent 41c2fa3 commit 2924920

9 files changed

Lines changed: 345 additions & 337 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"phpstan/phpstan-doctrine": "^2.0",
5353
"phpstan/phpstan-phpunit": "^2.0",
5454
"phpstan/phpstan-symfony": "^2.0",
55-
"phpunit/phpunit": "^11.3",
55+
"phpunit/phpunit": "^13.0",
5656
"rector/rector": "^2.0",
5757
"symfony/css-selector": "^7.2",
5858
"symfony/debug-bundle": "^7.2",

composer.lock

Lines changed: 336 additions & 322 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Handler/DockerImageHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function getPhpVersionFromContainers(array $containers): string
9797
$matches = [];
9898
foreach ($containers as $container) {
9999
if (self::PHP_CONTAINER === $container->name) {
100-
\preg_match('/\d.+\d/', $container->image, $matches);
100+
\preg_match('/\d.+\d/', (string) $container->image, $matches);
101101
}
102102
}
103103

src/Handler/NginxHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function handleResult(DetectionResult $detectionResult): void
4141
$data = \json_decode($detectionResult->getData(), false, 512, JSON_THROW_ON_ERROR);
4242

4343
// Nginx 'default' sites should not be indexed.
44-
if (str_ends_with($data->config, self::NGINX_DEFAULT)) {
44+
if (str_ends_with((string) $data->config, self::NGINX_DEFAULT)) {
4545
return;
4646
}
4747

src/Serializer/Normalizer/CustomNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CustomNormalizer implements NormalizerInterface
1212
{
1313
public function __construct(
1414
#[Autowire(service: 'serializer.normalizer.object')]
15-
private NormalizerInterface $normalizer,
15+
private readonly NormalizerInterface $normalizer,
1616
) {
1717
}
1818

src/Service/DockerImageTagFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function setDockerImageTags(Installation $installation, array $containers
3232
$dockerImageTags = new ArrayCollection();
3333
$images = [];
3434
foreach ($containersKeyed as $container) {
35-
$parts = explode('/', $container->image);
35+
$parts = explode('/', (string) $container->image);
3636
$organization = $parts[0];
3737
$repository = $parts[1] ?? '';
3838

src/Service/PackageVersionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function setPackageVersions(Installation $installation, array $installedP
2828
{
2929
$packageVersions = new ArrayCollection();
3030
foreach ($installedPackages as $installed) {
31-
[$vendor, $name] = explode('/', $installed->name);
31+
[$vendor, $name] = explode('/', (string) $installed->name);
3232

3333
$package = $this->getPackage($vendor, $name);
3434

symfony.lock

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,6 @@
268268
"sebastian/cli-parser": {
269269
"version": "1.0.1"
270270
},
271-
"sebastian/code-unit": {
272-
"version": "1.0.8"
273-
},
274-
"sebastian/code-unit-reverse-lookup": {
275-
"version": "2.0.3"
276-
},
277271
"sebastian/comparator": {
278272
"version": "4.0.6"
279273
},

tests/MessageHandler/ProcessDetectionResultHandlerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ protected function setUp(): void
2828
parent::setUp();
2929

3030
$this->detectionResultRepositoryMock = $this->createMock(DetectionResultRepository::class);
31-
$this->entityManagerMock = $this->createMock(EntityManagerInterface::class);
32-
$connectionMock = $this->createMock(Connection::class);
33-
$this->entityManagerMock->expects($this->any())->method('getConnection')->willReturn($connectionMock);
31+
$this->entityManagerMock = $this->createStub(EntityManagerInterface::class);
32+
$connectionMock = $this->createStub(Connection::class);
33+
$this->entityManagerMock->method('getConnection')->willReturn($connectionMock);
3434

3535
$this->dirResultHandler = $this->createMock(DetectionResultHandlerInterface::class);
3636
$this->nginxResultHandler = $this->createMock(DetectionResultHandlerInterface::class);

0 commit comments

Comments
 (0)