-
-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Labels
enhancementExisting documentation can be improvedExisting documentation can be improved
Description
<?php
class FooTest extends \PHPUnit\Framework\TestCase
{
/**
* @requires PHP 8.1
**/
public function test1() { self::assertTrue(true); }
#[\PHPUnit\Framework\Attributes\RequiresPhp('8.1')]
public function test2() { self::assertTrue(true); }
}
$ phpunit test.php --display-skipped
PHPUnit 11.5.7 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.3
S. 2 / 2 (100%)
Time: 00:00.016, Memory: 18.00 MB
There was 1 skipped test:
1) FooTest::test2
PHP 8.1 is required.
The ^
is needed in the attribute to make it work the same as PHPDoc. Is this expected behaviour or a bug?
Metadata
Metadata
Assignees
Labels
enhancementExisting documentation can be improvedExisting documentation can be improved