From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Wed, 12 Feb 2025 18:24:27 +0100
Subject: Compatibility with recent PHPUnit (12)

---
 tests/DeepCopyTest/DeepCopyTest.php                              | 3 +++
 tests/DeepCopyTest/Filter/ReplaceFilterTest.php                  | 2 ++
 tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php | 2 ++
 tests/DeepCopyTest/Matcher/PropertyMatcherTest.php               | 2 ++
 tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php           | 2 ++
 tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php           | 2 ++
 tests/DeepCopyTest/Reflection/ReflectionHelperTest.php           | 2 ++
 tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php               | 2 ++
 8 files changed, 17 insertions(+)

diff --git a/tests/DeepCopyTest/DeepCopyTest.php b/tests/DeepCopyTest/DeepCopyTest.php
index a4cf8e1..7e3157e 100644
--- a/tests/DeepCopyTest/DeepCopyTest.php
+++ b/tests/DeepCopyTest/DeepCopyTest.php
@@ -33,6 +33,7 @@ use DeepCopy\Matcher\PropertyTypeMatcher;
 use DeepCopy\TypeFilter\ReplaceFilter;
 use DeepCopy\TypeFilter\ShallowCopyFilter;
 use DeepCopy\TypeMatcher\TypeMatcher;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 use RecursiveArrayIterator;
 use SplDoublyLinkedList;
@@ -47,6 +48,7 @@ class DeepCopyTest extends TestCase
     /**
      * @dataProvider provideScalarValues
      */
+    #[DataProvider('provideScalarValues')]
     public function test_it_can_copy_scalar_values($value)
     {
         $copy = deep_copy($value);
@@ -95,6 +97,7 @@ class DeepCopyTest extends TestCase
     /**
      * @dataProvider provideObjectWithScalarValues
      */
+    #[DataProvider('provideObjectWithScalarValues')]
     public function test_it_can_copy_an_object_with_scalar_properties($object, $expectedVal)
     {
         $copy = deep_copy($object);
diff --git a/tests/DeepCopyTest/Filter/ReplaceFilterTest.php b/tests/DeepCopyTest/Filter/ReplaceFilterTest.php
index f0e0c21..57bc390 100644
--- a/tests/DeepCopyTest/Filter/ReplaceFilterTest.php
+++ b/tests/DeepCopyTest/Filter/ReplaceFilterTest.php
@@ -3,6 +3,7 @@
 namespace DeepCopyTest\Filter;
 
 use DeepCopy\Filter\ReplaceFilter;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 use stdClass;
 
@@ -14,6 +15,7 @@ class ReplaceFilterTest extends TestCase
     /**
      * @dataProvider provideCallbacks
      */
+    #[DataProvider('provideCallbacks')]
     public function test_it_applies_the_callback_to_the_specified_property(callable $callback, array $expected)
     {
         $object = new stdClass();
diff --git a/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php b/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php
index 30196cf..f05f195 100644
--- a/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/Doctrine/DoctrineProxyMatcherTest.php
@@ -5,6 +5,7 @@ namespace DeepCopyTest\Matcher\Doctrine;
 use BadMethodCallException;
 use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher;
 use Doctrine\Persistence\Proxy;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 use stdClass;
 
@@ -16,6 +17,7 @@ class DoctrineProxyMatcherTest extends TestCase
     /**
      * @dataProvider providePairs
      */
+    #[DataProvider('providePairs')]
     public function test_it_matches_the_given_objects($object, $expected)
     {
         $matcher = new DoctrineProxyMatcher();
diff --git a/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php b/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php
index 5bcb184..aa8991a 100644
--- a/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/PropertyMatcherTest.php
@@ -3,6 +3,7 @@
 namespace DeepCopyTest\Matcher;
 
 use DeepCopy\Matcher\PropertyMatcher;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 
 /**
@@ -13,6 +14,7 @@ class PropertyMatcherTest extends TestCase
     /**
      * @dataProvider providePairs
      */
+    #[DataProvider('providePairs')]
     public function test_it_matches_the_given_objects($object, $prop, $expected)
     {
         $matcher = new PropertyMatcher(X::class, 'foo');
diff --git a/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php b/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php
index 2eef4e8..356b387 100644
--- a/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/PropertyNameMatcherTest.php
@@ -3,6 +3,7 @@
 namespace DeepCopyTest\Matcher;
 
 use DeepCopy\Matcher\PropertyNameMatcher;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 use stdClass;
 
@@ -14,6 +15,7 @@ class PropertyNameMatcherTest extends TestCase
     /**
      * @dataProvider providePairs
      */
+    #[DataProvider('providePairs')]
     public function test_it_matches_the_given_property($object, $prop, $expected)
     {
         $matcher = new PropertyNameMatcher('foo');
diff --git a/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php b/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php
index 269884c..697ebcb 100644
--- a/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php
+++ b/tests/DeepCopyTest/Matcher/PropertyTypeMatcherTest.php
@@ -4,6 +4,7 @@ namespace DeepCopyTest\Matcher;
 
 use DeepCopy\f009;
 use DeepCopy\Matcher\PropertyTypeMatcher;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 use stdClass;
 
@@ -15,6 +16,7 @@ class PropertyTypeMatcherTest extends TestCase
     /**
      * @dataProvider providePairs
      */
+    #[DataProvider('providePairs')]
     public function test_it_matches_the_given_property($object, $expected)
     {
         $matcher = new PropertyTypeMatcher(PropertyTypeMatcherTestFixture2::class);
diff --git a/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php b/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php
index 34800d9..a6fcfea 100644
--- a/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php
+++ b/tests/DeepCopyTest/Reflection/ReflectionHelperTest.php
@@ -4,6 +4,7 @@ namespace DeepCopyTest\Reflection;
 
 use DeepCopy\Exception\PropertyException;
 use DeepCopy\Reflection\ReflectionHelper;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 use ReflectionClass;
 use ReflectionProperty;
@@ -41,6 +42,7 @@ class ReflectionHelperTest extends TestCase
     /**
      * @dataProvider provideProperties
      */
+    #[DataProvider('provideProperties')]
     public function test_it_can_retrieve_an_object_property($name)
     {
         $object = new ReflectionHelperTestChild();
diff --git a/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php b/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php
index 2f18be1..c2e332a 100644
--- a/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php
+++ b/tests/DeepCopyTest/TypeMatcher/TypeMatcherTest.php
@@ -3,6 +3,7 @@
 namespace DeepCopyTest\TypeMatcher;
 
 use DeepCopy\TypeMatcher\TypeMatcher;
+use PHPUnit\Framework\Attributes\DataProvider;
 use PHPUnit\Framework\TestCase;
 use stdClass;
 
@@ -14,6 +15,7 @@ class TypeMatcherTest extends TestCase
     /**
      * @dataProvider provideElements
      */
+    #[DataProvider('provideElements')]
     public function test_it_retrieves_the_object_properties($type, $element, $expected)
     {
         $matcher = new TypeMatcher($type);
