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
No way to require PHP 7.0 only (not a later version) using an annotation #2386
Comments
So a possible solution would be to use version constraints (like for example used by Composer). In your case that would be: /**
* @requires PHP ~7.0
*/
public function testRunsOnlyOn70 { /*… */ } In order to maintain BC |
Re: #2386 (comment) I think you mean |
Of course, thanks. Fixed the typo. |
Use phar-io/version to parse and compare version constraints to PHP version. See sebastianbergmann#2386
Use phar-io/version to parse and compare version constraints to PHP version. See sebastianbergmann#2386
In order to maintain BC, existing keys are no longer used. Instead a new key is introduced. See sebastianbergmann#2386
* Check version constraint compliance also for PHPUnit requirements * Refactor method name and signature of Util\Test::semanticPhpVersion()
Use phar-io/version to parse and compare version constraints to PHP version. See #2386
In order to maintain BC, existing keys are no longer used. Instead a new key is introduced. See #2386
* Check version constraint compliance also for PHPUnit requirements * Refactor method name and signature of Util\Test::semanticPhpVersion()
Hello,
there's no way to require a test to run on PHP 7.0 and not on PHP 7.1 if I have a test that tests specifically a situation that makes sense only on PHP 7.0. The @requires annotation means "this version and all later versions" so I have to use a custom if condition with markTestSkipped.
The text was updated successfully, but these errors were encountered: