-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotations in single-line doc-comments are not handled correctly #4692
Comments
|
I replied too quickly, sorry. I thought you were refering to I agree that /** @requires PHP 8 */ should work just like /**
* @requires PHP 8
*/ and consider the fact that is does not to be a bug. A patch that fixes this would be appreciated. |
I could fix it, but can you tell me where should the test case go? I'm not familiar with your setup. |
For PHPUnit 10 ( I suggest you send a pull request against |
Summary
PHPUnit seems to require multiline docblocks for its annotations, eg.
@requires
. Some users prefer single line docblocks though and this is also now set in doctrine/coding-standard. We had this problem in https://github.com/doctrine/DoctrineBundle/pull/1365/files#diff-6c0dba5076ce8a2e9ff3e1e07f6661e095a18f80e32ad9766945f55c0414f8a2.This seems to be because in your regexes you don't expect
/**
to be on same line as meat of the regex atphpunit/src/Util/Annotation/DocBlock.php
Lines 73 to 87 in dba1e6c
How to reproduce
Doesn't have any effect. Test case is not skipped on PHP < 8.
But with
It works.
Expected behavior
Both examples should work the same way.
The text was updated successfully, but these errors were encountered: