Skip to content

Commit aa74470

Browse files
authored
Replace PHPDoc dataProvider with attribute syntax
The attribute syntax is supported in PHPUnit v10, v11, and v12. It should be encouraged in Symfony 8.x.
1 parent 0a3e2c1 commit aa74470

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

best_practices.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,11 @@ checks that all application URLs load successfully::
404404
namespace App\Tests;
405405

406406
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
407+
use PHPUnit\Framework\Attributes\DataProvider;
407408

408409
class ApplicationAvailabilityFunctionalTest extends WebTestCase
409410
{
410-
/**
411-
* @dataProvider urlProvider
412-
*/
411+
#[DataProvider('urlProvider')]
413412
public function testPageIsSuccessful($url): void
414413
{
415414
$client = self::createClient();

0 commit comments

Comments
 (0)