Skip to content

Commit 067be86

Browse files
committed
run tests using PHPUnit 11.5
1 parent 2bfba63 commit 067be86

File tree

4 files changed

+24
-16
lines changed

4 files changed

+24
-16
lines changed

Tests/LegacyLazyGhostTraitTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\VarExporter\Tests;
1313

14+
use PHPUnit\Framework\Attributes\Group;
15+
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
1416
use PHPUnit\Framework\TestCase;
1517
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1618
use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
@@ -29,9 +31,8 @@
2931
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\HookedWithDefaultValue;
3032
use Symfony\Component\VarExporter\Tests\Fixtures\SimpleObject;
3133

32-
/**
33-
* @group legacy
34-
*/
34+
#[IgnoreDeprecations]
35+
#[Group('legacy')]
3536
class LegacyLazyGhostTraitTest extends TestCase
3637
{
3738
public function testGetPublic()

Tests/LegacyLazyProxyTraitTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111

1212
namespace Symfony\Component\VarExporter\Tests;
1313

14+
use PHPUnit\Framework\Attributes\Group;
15+
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
16+
use PHPUnit\Framework\Attributes\RequiresPhp;
1417
use Symfony\Component\VarExporter\LazyProxyTrait;
1518
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\FinalPublicClass;
1619
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestClass;
1720
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestOverwritePropClass;
1821

19-
/**
20-
* @requires PHP < 8.4
21-
*
22-
* @group legacy
23-
*/
22+
#[IgnoreDeprecations]
23+
#[Group('legacy')]
24+
#[RequiresPhp('<8.4')]
2425
class LegacyLazyProxyTraitTest extends LazyProxyTraitTest
2526
{
2627
public function testLazyDecoratorClass()

Tests/LegacyProxyHelperTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111

1212
namespace Symfony\Component\VarExporter\Tests;
1313

14+
use PHPUnit\Framework\Attributes\Group;
15+
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
16+
use PHPUnit\Framework\Attributes\RequiresPhp;
1417
use Symfony\Component\VarExporter\Exception\LogicException;
1518
use Symfony\Component\VarExporter\ProxyHelper;
1619
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\Php82NullStandaloneReturnType;
1720
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\StringMagicGetClass;
1821

19-
/**
20-
* @requires PHP < 8.4
21-
*
22-
* @group legacy
23-
*/
22+
#[IgnoreDeprecations]
23+
#[Group('legacy')]
24+
#[RequiresPhp('<8.4')]
2425
class LegacyProxyHelperTest extends ProxyHelperTest
2526
{
2627
public function testGenerateLazyProxy()

phpunit.xml.dist

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.3/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
77
bootstrap="vendor/autoload.php"
8+
failOnDeprecation="true"
89
failOnRisky="true"
910
failOnWarning="true"
1011
>
@@ -18,7 +19,7 @@
1819
</testsuite>
1920
</testsuites>
2021

21-
<coverage>
22+
<source ignoreSuppressionOfDeprecations="true">
2223
<include>
2324
<directory>./</directory>
2425
</include>
@@ -27,5 +28,9 @@
2728
<directory>./Tests</directory>
2829
<directory>./vendor</directory>
2930
</exclude>
30-
</coverage>
31+
</source>
32+
33+
<extensions>
34+
<bootstrap class="Symfony\Bridge\PhpUnit\SymfonyExtension" />
35+
</extensions>
3136
</phpunit>

0 commit comments

Comments
 (0)