-
-
Notifications
You must be signed in to change notification settings - Fork 27
Pre-install PHPUnit 8 with simple-phpunit #116
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
Conversation
Works as expected for me 👍 |
@@ -719,10 +719,11 @@ | |||
"links": {"%target-dir%/simple-phpunit": "simple-phpunit"} | |||
}, | |||
"sh": { | |||
"command": "simple-phpunit install" | |||
"command": "simple-phpunit install && SYMFONY_PHPUNIT_VERSION=8.2 simple-phpunit install" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to run the install command twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, see https://travis-ci.com/jakzal/toolbox/jobs/208386006#L611
this ensures it installs both v7/v8 given the current defaults of SYMFONY_PHPUNIT_VERSION (which depends on PHP version) today.
So currently you can invoke
simple-phpunit # 7.4
SYMFONY_PHPUNIT_VERSION=7.4 simple-phpunit
SYMFONY_PHPUNIT_VERSION=8.2 simple-phpunit
without any additional installation required (that's what's solved here ultimately). Invoking any other version SYMFONY_PHPUNIT_VERSION=x.y ...
will trigger a custom installation on user's side. Nevertheless, defaults should be sane; supporting the last 2 majors.
As of november 2019, when we'll install symfony/phpunit-bridge@4.4
we can remove it, unless we decide to keep phpunit v7 or any version wanted then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing is invoking simple-phpunit
without setting SYMFONY_PHPUNIT_VERSION
anywhere, let's Symfony decide the defaults (they are now bumped in symfony/symfony#32059).
So perhaps we should always set SYMFONY_PHPUNIT_VERSION=7|8 simple-phpunit install
explicit during install, and a default in the image as well when the user invokes simple-phpunit
this way Toolbox is in full control of the PHPUnit version defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure it's big a deal for now, worst case simple-phpunit install && SYMFONY_PHPUNIT_VERSION=8.2 simple-phpunit install
will install 8.2 twice, once symfony/symfony#32059 is merged upstream. Then we should clean it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a look at this PR when I have a bit more time. Bare with me :)
Finally found time to give it a go, works as expected 👍 Thank you 🍺 |
* simple-phpunit is now bundled with two versions of PHPUnit (7.x and 8.2) jakzal/toolbox#116 (thanks @ro0NL)
See symfony/symfony#32059 (comment) for relevant info.
simple-phpunit
will start installing PHPunit 8 (e.g. latest major) by default as ofsymfony/phpunit-bridge@4.4
, that's November 2019 :(It should be used using
SYMFONY_PHPUNIT_VERSION=8.2 simple-phpunit
, but currently you wont benefit from a default installation available on the image :(Eventually the cycle can start over, if we want to keep installing e.g. 2 latest majors.
(As a side effect simple-phpunit is now excluded on PHP 7.1, personally i'm fine with that)