File: 0022-RequiresPhpunit-11-for-test-failing-with-PHPUnit-11.patch

package info (click to toggle)
shaarli 0.15.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,640 kB
  • sloc: php: 30,003; javascript: 2,061; makefile: 135; xml: 69; python: 42; sh: 35
file content (539 lines) | stat: -rw-r--r-- 21,852 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Wed, 15 Jan 2025 10:33:32 +0100
Subject: RequiresPhpunit('< 11') for test failing with PHPUnit 11

Bug-Debian: https://bugs.debian.org/1039855
---
 .../controller/admin/ManageTagControllerTest.php   |  3 ++
 .../controller/admin/PluginsControllerTest.php     |  2 ++
 .../AddOrDeleteTagTest.php                         |  3 ++
 .../ChangeVisibilityBookmarkTest.php               |  3 ++
 .../DeleteBookmarkTest.php                         |  3 ++
 .../ShaareManageControllerTest/PinBookmarkTest.php |  4 +--
 .../DisplayCreateFormTest.php                      |  3 ++
 .../SaveBookmarkTest.php                           |  3 ++
 .../visitor/BookmarkListControllerTest.php         |  3 ++
 .../controller/visitor/DailyControllerTest.php     |  3 ++
 .../controller/visitor/FeedControllerTest.php      |  4 +++
 .../visitor/PictureWallControllerTest.php          |  2 ++
 .../controller/visitor/TagCloudControllerTest.php  |  7 ++++
 tests/helper/DailyPageHelperTest.php               | 37 ++++++----------------
 tests/legacy/LegacyControllerTest.php              |  5 ++-
 15 files changed, 53 insertions(+), 32 deletions(-)

diff --git a/tests/front/controller/admin/ManageTagControllerTest.php b/tests/front/controller/admin/ManageTagControllerTest.php
index b5c92fc..67e6043 100644
--- a/tests/front/controller/admin/ManageTagControllerTest.php
+++ b/tests/front/controller/admin/ManageTagControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\BookmarkFilter;
 use Shaarli\Bookmark\SearchResult;
@@ -116,6 +117,7 @@ class ManageTagControllerTest extends TestCase
     /**
      * Test posting a tag update - rename tag - valid info provided.
      */
+    #[RequiresPhpunit('< 11')]
     public function testSaveRenameTagValid(): void
     {
         $session = [];
@@ -180,6 +182,7 @@ class ManageTagControllerTest extends TestCase
     /**
      * Test posting a tag update - delete tag - valid info provided.
      */
+    #[RequiresPhpunit('< 11')]
     public function testSaveDeleteTagValid(): void
     {
         $session = [];
diff --git a/tests/front/controller/admin/PluginsControllerTest.php b/tests/front/controller/admin/PluginsControllerTest.php
index fbec319..5a6891b 100644
--- a/tests/front/controller/admin/PluginsControllerTest.php
+++ b/tests/front/controller/admin/PluginsControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Config\ConfigManager;
 use Shaarli\Front\Exception\WrongTokenException;
 use Shaarli\Plugin\PluginManager;
@@ -123,6 +124,7 @@ class PluginsControllerTest extends TestCase
     /**
      * Test save plugin parameters
      */
+    #[RequiresPhpunit('< 11')]
     public function testSavePluginParameters(): void
     {
         $parameters = [
diff --git a/tests/front/controller/admin/ShaareManageControllerTest/AddOrDeleteTagTest.php b/tests/front/controller/admin/ShaareManageControllerTest/AddOrDeleteTagTest.php
index cd76491..effd33e 100644
--- a/tests/front/controller/admin/ShaareManageControllerTest/AddOrDeleteTagTest.php
+++ b/tests/front/controller/admin/ShaareManageControllerTest/AddOrDeleteTagTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin\ShaareManageControllerTest;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
 use Shaarli\Formatter\BookmarkFormatter;
@@ -84,6 +85,7 @@ class AddOrDeleteTagTest extends TestCase
     /**
      * Add 2 tags to 2 bookmarks
      */
+    #[RequiresPhpunit('< 11')]
     public function testAddTwoTagsOnTwoBookmarks(): void
     {
         $parameters = ['id' => '123 456', 'tag' => 'newtag@othertag', 'action' => 'add'];
@@ -189,6 +191,7 @@ class AddOrDeleteTagTest extends TestCase
     /**
      * Delete 2 tags to 2 bookmarks
      */
+    #[RequiresPhpunit('< 11')]
     public function testDeleteTwoTagOnTwoBookmarks(): void
     {
         $parameters = ['id' => '123 456', 'tag' => 'second@first', 'action' => 'delete'];
diff --git a/tests/front/controller/admin/ShaareManageControllerTest/ChangeVisibilityBookmarkTest.php b/tests/front/controller/admin/ShaareManageControllerTest/ChangeVisibilityBookmarkTest.php
index 28b1c02..6ec566b 100644
--- a/tests/front/controller/admin/ShaareManageControllerTest/ChangeVisibilityBookmarkTest.php
+++ b/tests/front/controller/admin/ShaareManageControllerTest/ChangeVisibilityBookmarkTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin\ShaareManageControllerTest;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
 use Shaarli\Formatter\BookmarkFormatter;
@@ -175,6 +176,7 @@ class ChangeVisibilityBookmarkTest extends TestCase
     /**
      * Change bookmark visibility - Set multiple bookmarks private
      */
+    #[RequiresPhpunit('< 11')]
     public function testSetMultipleBookmarksPrivate(): void
     {
         $parameters = ['id' => '123 456 789', 'newVisibility' => 'private'];
@@ -280,6 +282,7 @@ class ChangeVisibilityBookmarkTest extends TestCase
     /**
      * Change bookmark visibility - Multiple bookmarks with one not found.
      */
+    #[RequiresPhpunit('< 11')]
     public function testChangeVisibilityMultipleBookmarksOneNotFound(): void
     {
         $parameters = ['id' => '123 456 789', 'newVisibility' => 'public'];
diff --git a/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php b/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php
index 42d0c0d..3227538 100644
--- a/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php
+++ b/tests/front/controller/admin/ShaareManageControllerTest/DeleteBookmarkTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin\ShaareManageControllerTest;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
 use Shaarli\Formatter\BookmarkFormatter;
@@ -88,6 +89,7 @@ class DeleteBookmarkTest extends TestCase
     /**
      * Delete bookmark - Multiple bookmarks with valid parameters
      */
+    #[RequiresPhpunit('< 11')]
     public function testDeleteMultipleBookmarks(): void
     {
         $parameters = ['id' => '123 456 789'];
@@ -211,6 +213,7 @@ class DeleteBookmarkTest extends TestCase
     /**
      * Delete bookmark - Multiple bookmarks with one not found in the data store
      */
+    #[RequiresPhpunit('< 11')]
     public function testDeleteMultipleBookmarksOneNotFound(): void
     {
         $parameters = ['id' => '123 456 789'];
diff --git a/tests/front/controller/admin/ShaareManageControllerTest/PinBookmarkTest.php b/tests/front/controller/admin/ShaareManageControllerTest/PinBookmarkTest.php
index 42f6e95..fa03503 100644
--- a/tests/front/controller/admin/ShaareManageControllerTest/PinBookmarkTest.php
+++ b/tests/front/controller/admin/ShaareManageControllerTest/PinBookmarkTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin\ShaareManageControllerTest;
 
+use PHPUnit\Framework\Attributes\DataProvider;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
 use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
@@ -31,9 +32,8 @@ class PinBookmarkTest extends TestCase
 
     /**
      * Test pin bookmark - with valid input
-     *
-     * @dataProvider initialStickyValuesProvider()
      */
+    #[DataProvider('initialStickyValuesProvider')]
     public function testPinBookmarkIsStickyNull(?bool $sticky, bool $expectedValue): void
     {
         $id = 123;
diff --git a/tests/front/controller/admin/ShaarePublishControllerTest/DisplayCreateFormTest.php b/tests/front/controller/admin/ShaarePublishControllerTest/DisplayCreateFormTest.php
index 964773d..42e2050 100644
--- a/tests/front/controller/admin/ShaarePublishControllerTest/DisplayCreateFormTest.php
+++ b/tests/front/controller/admin/ShaarePublishControllerTest/DisplayCreateFormTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin\ShaarePublishControllerTest;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Config\ConfigManager;
 use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
@@ -34,6 +35,7 @@ class DisplayCreateFormTest extends TestCase
      * Test displaying bookmark create form
      * Ensure that every step of the standard workflow works properly.
      */
+    #[RequiresPhpunit('< 11')]
     public function testDisplayCreateFormWithUrlAndWithMetadataRetrieval(): void
     {
         $this->container->environment = [
@@ -116,6 +118,7 @@ class DisplayCreateFormTest extends TestCase
     /**
      * Test displaying bookmark create form without any external metadata retrieval attempt
      */
+    #[RequiresPhpunit('< 11')]
     public function testDisplayCreateFormWithUrlAndWithoutMetadata(): void
     {
         $this->container->environment = [
diff --git a/tests/front/controller/admin/ShaarePublishControllerTest/SaveBookmarkTest.php b/tests/front/controller/admin/ShaarePublishControllerTest/SaveBookmarkTest.php
index 91c377e..128a622 100644
--- a/tests/front/controller/admin/ShaarePublishControllerTest/SaveBookmarkTest.php
+++ b/tests/front/controller/admin/ShaarePublishControllerTest/SaveBookmarkTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Admin\ShaarePublishControllerTest;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Config\ConfigManager;
 use Shaarli\Front\Controller\Admin\FrontAdminControllerMockHelper;
@@ -34,6 +35,7 @@ class SaveBookmarkTest extends TestCase
     /**
      * Test save a new bookmark
      */
+    #[RequiresPhpunit('< 11')]
     public function testSaveBookmark(): void
     {
         $id = 21;
@@ -119,6 +121,7 @@ class SaveBookmarkTest extends TestCase
     /**
      * Test save an existing bookmark
      */
+    #[RequiresPhpunit('< 11')]
     public function testSaveExistingBookmark(): void
     {
         $id = 21;
diff --git a/tests/front/controller/visitor/BookmarkListControllerTest.php b/tests/front/controller/visitor/BookmarkListControllerTest.php
index cd2740c..5f5b59a 100644
--- a/tests/front/controller/visitor/BookmarkListControllerTest.php
+++ b/tests/front/controller/visitor/BookmarkListControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Visitor;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\Exception\BookmarkNotFoundException;
 use Shaarli\Bookmark\SearchResult;
@@ -332,6 +333,7 @@ class BookmarkListControllerTest extends TestCase
      * Test getting link list with thumbnail updates.
      *   -> 2 thumbnails update, only 1 datastore write
      */
+    #[RequiresPhpunit('< 11')]
     public function testThumbnailUpdateFromLinkList(): void
     {
         $request = $this->createMock(Request::class);
@@ -388,6 +390,7 @@ class BookmarkListControllerTest extends TestCase
     /**
      * Test getting a permalink with thumbnail update.
      */
+    #[RequiresPhpunit('< 11')]
     public function testThumbnailUpdateFromPermalink(): void
     {
         $request = $this->createMock(Request::class);
diff --git a/tests/front/controller/visitor/DailyControllerTest.php b/tests/front/controller/visitor/DailyControllerTest.php
index a0dd54e..5cbada8 100644
--- a/tests/front/controller/visitor/DailyControllerTest.php
+++ b/tests/front/controller/visitor/DailyControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Visitor;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\SearchResult;
 use Shaarli\Feed\CachedPage;
@@ -26,6 +27,7 @@ class DailyControllerTest extends TestCase
         DailyController::$DAILY_RSS_NB_DAYS = 2;
     }
 
+    #[RequiresPhpunit('< 11')]
     public function testValidIndexControllerInvokeDefault(): void
     {
         $currentDay = new \DateTimeImmutable('2020-05-13');
@@ -171,6 +173,7 @@ class DailyControllerTest extends TestCase
     /**
      * Daily page - test that everything goes fine with no future or past bookmarks
      */
+    #[RequiresPhpunit('< 11')]
     public function testValidIndexControllerInvokeNoFutureOrPast(): void
     {
         $currentDay = new \DateTimeImmutable('2020-05-13');
diff --git a/tests/front/controller/visitor/FeedControllerTest.php b/tests/front/controller/visitor/FeedControllerTest.php
index 4ae7c92..d21878e 100644
--- a/tests/front/controller/visitor/FeedControllerTest.php
+++ b/tests/front/controller/visitor/FeedControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Visitor;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Feed\FeedBuilder;
 use Shaarli\TestCase;
 use Slim\Http\Request;
@@ -28,6 +29,7 @@ class FeedControllerTest extends TestCase
     /**
      * Feed Controller - RSS default behaviour
      */
+    #[RequiresPhpunit('< 11')]
     public function testDefaultRssController(): void
     {
         $request = $this->createMock(Request::class);
@@ -69,6 +71,7 @@ class FeedControllerTest extends TestCase
     /**
      * Feed Controller - ATOM default behaviour
      */
+    #[RequiresPhpunit('< 11')]
     public function testDefaultAtomController(): void
     {
         $request = $this->createMock(Request::class);
@@ -110,6 +113,7 @@ class FeedControllerTest extends TestCase
     /**
      * Feed Controller - ATOM with parameters
      */
+    #[RequiresPhpunit('< 11')]
     public function testAtomControllerWithParameters(): void
     {
         $request = $this->createMock(Request::class);
diff --git a/tests/front/controller/visitor/PictureWallControllerTest.php b/tests/front/controller/visitor/PictureWallControllerTest.php
index 429e99a..5bde7de 100644
--- a/tests/front/controller/visitor/PictureWallControllerTest.php
+++ b/tests/front/controller/visitor/PictureWallControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Visitor;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\SearchResult;
 use Shaarli\Config\ConfigManager;
@@ -27,6 +28,7 @@ class PictureWallControllerTest extends TestCase
         $this->controller = new PictureWallController($this->container);
     }
 
+    #[RequiresPhpunit('< 11')]
     public function testValidControllerInvokeDefault(): void
     {
         $request = $this->createMock(Request::class);
diff --git a/tests/front/controller/visitor/TagCloudControllerTest.php b/tests/front/controller/visitor/TagCloudControllerTest.php
index f250946..283de23 100644
--- a/tests/front/controller/visitor/TagCloudControllerTest.php
+++ b/tests/front/controller/visitor/TagCloudControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Front\Controller\Visitor;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use Shaarli\Bookmark\BookmarkFilter;
 use Shaarli\TestCase;
 use Slim\Http\Request;
@@ -26,6 +27,7 @@ class TagCloudControllerTest extends TestCase
     /**
      * Tag Cloud - default parameters
      */
+    #[RequiresPhpunit('< 11')]
     public function testValidCloudControllerInvokeDefault(): void
     {
         $allTags = [
@@ -92,6 +94,7 @@ class TagCloudControllerTest extends TestCase
      *   - visibility private
      *   - search tags: `ghi` and `def` (note that filtered tags are not displayed anymore)
      */
+    #[RequiresPhpunit('< 11')]
     public function testValidCloudControllerInvokeWithParameters(): void
     {
         $request = $this->createMock(Request::class);
@@ -159,6 +162,7 @@ class TagCloudControllerTest extends TestCase
     /**
      * Tag Cloud - empty
      */
+    #[RequiresPhpunit('< 11')]
     public function testEmptyCloud(): void
     {
         $request = $this->createMock(Request::class);
@@ -207,6 +211,7 @@ class TagCloudControllerTest extends TestCase
     /**
      * Tag List - Default sort is by usage DESC
      */
+    #[RequiresPhpunit('< 11')]
     public function testValidListControllerInvokeDefault(): void
     {
         $allTags = [
@@ -269,6 +274,7 @@ class TagCloudControllerTest extends TestCase
      *   - search tags: `ghi` and `def` (note that filtered tags are not displayed anymore)
      *   - sort alphabetically
      */
+    #[RequiresPhpunit('< 11')]
     public function testValidListControllerInvokeWithParameters(): void
     {
         $request = $this->createMock(Request::class);
@@ -334,6 +340,7 @@ class TagCloudControllerTest extends TestCase
     /**
      * Tag List - empty
      */
+    #[RequiresPhpunit('< 11')]
     public function testEmptyList(): void
     {
         $request = $this->createMock(Request::class);
diff --git a/tests/helper/DailyPageHelperTest.php b/tests/helper/DailyPageHelperTest.php
index 595357a..5b5aa11 100644
--- a/tests/helper/DailyPageHelperTest.php
+++ b/tests/helper/DailyPageHelperTest.php
@@ -7,15 +7,14 @@ namespace Shaarli\Helper;
 use DateTime;
 use DateTimeImmutable;
 use DateTimeInterface;
+use PHPUnit\Framework\Attributes\DataProvider;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\TestCase;
 use Slim\Http\Request;
 
 class DailyPageHelperTest extends TestCase
 {
-    /**
-     * @dataProvider getRequestedTypes
-     */
+    #[DataProvider('getRequestedTypes')]
     public function testExtractRequestedType(array $queryParams, string $expectedType): void
     {
         $request = $this->createMock(Request::class);
@@ -28,9 +27,7 @@ class DailyPageHelperTest extends TestCase
         static::assertSame($type, $expectedType);
     }
 
-    /**
-     * @dataProvider getRequestedDateTimes
-     */
+    #[DataProvider('getRequestedDateTimes')]
     public function testExtractRequestedDateTime(
         string $type,
         string $input,
@@ -51,9 +48,7 @@ class DailyPageHelperTest extends TestCase
         DailyPageHelper::extractRequestedDateTime('nope', null, null);
     }
 
-    /**
-     * @dataProvider getFormatsByType
-     */
+    #[DataProvider('getFormatsByType')]
     public function testGetFormatByType(string $type, string $expectedFormat): void
     {
         $format = DailyPageHelper::getFormatByType($type);
@@ -69,9 +64,7 @@ class DailyPageHelperTest extends TestCase
         DailyPageHelper::getFormatByType('nope');
     }
 
-    /**
-     * @dataProvider getStartDatesByType
-     */
+    #[DataProvider('getStartDatesByType')]
     public function testGetStartDatesByType(
         string $type,
         DateTimeImmutable $dateTime,
@@ -90,9 +83,7 @@ class DailyPageHelperTest extends TestCase
         DailyPageHelper::getStartDateTimeByType('nope', new DateTimeImmutable());
     }
 
-    /**
-     * @dataProvider getEndDatesByType
-     */
+    #[DataProvider('getEndDatesByType')]
     public function testGetEndDatesByType(
         string $type,
         DateTimeImmutable $dateTime,
@@ -111,9 +102,7 @@ class DailyPageHelperTest extends TestCase
         DailyPageHelper::getEndDateTimeByType('nope', new DateTimeImmutable());
     }
 
-    /**
-     * @dataProvider getDescriptionsByType
-     */
+    #[DataProvider('getDescriptionsByType')]
     public function testGeDescriptionsByType(
         string $type,
         DateTimeImmutable $dateTime,
@@ -124,9 +113,7 @@ class DailyPageHelperTest extends TestCase
         static::assertEquals($expectedDescription, $description);
     }
 
-    /**
-     * @dataProvider getDescriptionsByTypeNotIncludeRelative
-     */
+    #[DataProvider('getDescriptionsByTypeNotIncludeRelative')]
     public function testGeDescriptionsByTypeNotIncludeRelative(
         string $type,
         \DateTimeImmutable $dateTime,
@@ -145,9 +132,7 @@ class DailyPageHelperTest extends TestCase
         DailyPageHelper::getDescriptionByType('nope', new DateTimeImmutable());
     }
 
-    /**
-     * @dataProvider getRssLengthsByType
-     */
+    #[DataProvider('getRssLengthsByType')]
     public function testGeRssLengthsByType(string $type): void
     {
         $length = DailyPageHelper::getRssLengthByType($type);
@@ -163,9 +148,7 @@ class DailyPageHelperTest extends TestCase
         DailyPageHelper::getRssLengthByType('nope');
     }
 
-    /**
-     * @dataProvider getCacheDatePeriodByType
-     */
+    #[DataProvider('getCacheDatePeriodByType')]
     public function testGetCacheDatePeriodByType(
         string $type,
         DateTimeImmutable $requested,
diff --git a/tests/legacy/LegacyControllerTest.php b/tests/legacy/LegacyControllerTest.php
index 4bcfb7b..0963ac6 100644
--- a/tests/legacy/LegacyControllerTest.php
+++ b/tests/legacy/LegacyControllerTest.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Shaarli\Legacy;
 
+use PHPUnit\Framework\Attributes\DataProvider;
 use Shaarli\Front\Controller\Visitor\FrontControllerMockHelper;
 use Shaarli\TestCase;
 use Slim\Http\Request;
@@ -23,9 +24,7 @@ class LegacyControllerTest extends TestCase
         $this->controller = new LegacyController($this->container);
     }
 
-    /**
-     * @dataProvider getProcessProvider
-     */
+    #[DataProvider('getProcessProvider')]
     public function testProcess(string $legacyRoute, array $queryParameters, string $slimRoute, bool $isLoggedIn): void
     {
         $request = $this->createMock(Request::class);