2222namespace Test \Thrift \Integration \Lib \Protocol ;
2323
2424use PHPUnit \Framework \TestCase ;
25+ use PHPUnit \Framework \Attributes \DataProvider ;
2526use Thrift \Protocol \TJSONProtocol ;
2627use Thrift \Transport \TMemoryBuffer ;
2728use Basic \ThriftTest \Insanity ;
@@ -64,9 +65,7 @@ public function testMessageReadWrite()
6465 $ this ->assertSame ('successResponse ' , $ result );
6566 }
6667
67- /**
68- * @dataProvider writeDataProvider
69- */
68+ #[DataProvider('writeDataProvider ' )]
7069 public function testWrite (
7170 $ argsClassName ,
7271 $ argsValues ,
@@ -80,7 +79,7 @@ public function testWrite(
8079 $ this ->assertEquals ($ expected , $ actual );
8180 }
8281
83- public function writeDataProvider ()
82+ public static function writeDataProvider ()
8483 {
8584 if (!is_dir (__DIR__ . '/../../../Resources/packages/php ' )) {
8685 throw new \RuntimeException (
@@ -316,9 +315,7 @@ public function writeDataProvider()
316315 ];
317316 }
318317
319- /**
320- * @dataProvider readDataProvider
321- */
318+ #[DataProvider('readDataProvider ' )]
322319 public function testRead (
323320 $ buffer ,
324321 $ argsClassName ,
@@ -343,7 +340,7 @@ public function testRead(
343340 }
344341 }
345342
346- public function readDataProvider ()
343+ public static function readDataProvider ()
347344 {
348345 yield 'void ' => [
349346 'buffer ' => '{} ' ,
0 commit comments