-
Notifications
You must be signed in to change notification settings - Fork 47
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
Show a warning when users don't run the correct PHPUnit version #71
Comments
One solution that could work might be to check for a class that was not present before PHPUnit 6 inside the |
@xabbuh that sounds good, but why not require it directly and IF someone like to use a .phar or a global installed version, it should work too, shouldn't it? |
@OskarStark Alas, if we require it directly, it will install the library as a project dependency. |
@xabbuh I'll see if there is something like a |
I guess this this error has to do with this? PHPUnit 5.7.12 by Sebastian Bergmann and contributors.
PHP Fatal error: Class 'PHPUnit\Framework\Constraint\Constraint' not found in /var/www/html/vendor/matthiasnoback/symfony-dependency-injection-test/PhpUnit/ContainerHasParameterConstraint.php on line 9 |
@lucasvanlierop It most likely does ;) |
:-) Which version do you recommend? |
@lucasvanlierop You could either use PHPUnit ^6.0 or switch to a previous major version of this library, e.g. 1.1.0. |
Just did the latter thanks for confirming! Btw thanks for still maintaining this package! Used it a lot at Ibuildings and now I'm using it again for my new project ;-) |
Cool, happy to hear that! |
I've been thinking about this, but I can't come up with a good point to verify that the PHPUnit version used to run tests is the right one. The problem here is: I'd love to add this check to a |
It would be nice if composer could check if a class is present (autoloadable) on install the same way it can check the presence of a php extension |
Closing this as I don't think there will be a solution. I'm sure with this item in the issue archive people will quickly figure out what's wrong when they encounter this situation :) |
See #70. Since we can't enforce a specific PHPUnit version using standard Composer techniques (e.g. in the
require
section), we need to warn the users about incompatible usage in another way.The text was updated successfully, but these errors were encountered: