-
Notifications
You must be signed in to change notification settings - Fork 66
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
Allow to install Fastest in global mode #119
Allow to install Fastest in global mode #119
Conversation
That's a good improvement but what if someone has installed phpunit globally not through composer? Something like
|
Maybe in this case, use or add an environment variable to define the binary to use? |
Sorry, use directly the |
It make sense. Could you please provide a working solution here? |
Yes, of course. |
It's done. |
src/Process/ProcessFactory.php
Outdated
return ('\\' === DIRECTORY_SEPARATOR) | ||
? 'bin\phpunit {}' | ||
: 'bin/phpunit {}'; | ||
if (null === self::$cacheBinCmd) { |
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.
Could you adopt an "early exit" here to compact the code?
Something like
if (null !== self::$cacheBinCmd) {
return self::$cacheBinCmd
}
src/Process/ProcessFactory.php
Outdated
if (null === self::$cacheBinCmd) { | ||
self::$cacheBinCmd = 'phpunit {}'; | ||
|
||
if ('\\' === DIRECTORY_SEPARATOR) { |
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.
Can you extract this and the else in more semantic methods? Something like isRunningOnWindows
, setWindowsBinCmd
and isRunningOnUnix
, setUnixBinCmd
or whatever you like but more communicative.
Thank you.
The requested changes are made. |
Last one thing, could you document this behavior? |
It's done. I don't really know what to add! |
LGTM, thanks a lot again |
Thank you for your speed. When do you expect to create a stable release like 1.5.2? |
Not 1.6? However as soon as I can integrate #116 (I'll ask for your review) |
Personally, I will upgrade to version 1.6.0 because there is a new feature. In this case, update the composer branch alias in composer.json file. |
I've already done in #116 last win commit, take a look |
The Symfony's team strongly recommend in Symfony 4 Flex should not add in the Phpunit dependencies in our projects, even in dev. So, it is recommended to install Phpunit globally. However, Fastest is not able to work in global mode.
This PR allow to install/use the Fastest in global mode with Phpunit.