Skip to content
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

Add Windows support #13

Merged
merged 4 commits into from
Jan 27, 2017
Merged

Add Windows support #13

merged 4 commits into from
Jan 27, 2017

Conversation

spyric
Copy link
Contributor

@spyric spyric commented Jan 14, 2017

This PR add Windows support.

I have no chance to test it on linux or mac, but hope It should work

return base_path('vendor\bin\phpunit.bat');
}

return 'php vendor/bin/phpunit';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not also use the base_path() function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was from first version. I tried to keep all that is not connected with windows unchanged. If you have linux or macOS can you check if it work with base_path()?

@KKSzymanowski
Copy link
Contributor

KKSzymanowski commented Jan 15, 2017

Works for me on Windows 10. 👍

@alex-LE
Copy link
Contributor

alex-LE commented Jan 15, 2017

For me too. Windows 10 64 Bit


protected static function initChromeDriver(){
static::$chromeProcess = (new ProcessBuilder())
->setPrefix(realpath(__DIR__.'/../bin/chromedriver-' . static::getOSSuffix() . '.exe'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That .exe extension should happen only when is WINNT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I have moved it to getOSSuffix() so it should work for non WINNT platforms

@ghost
Copy link

ghost commented Jan 15, 2017

does not work on windows 2.0 pls help

@KKSzymanowski
Copy link
Contributor

@Deejavu What's Windows 2.0?

@ghost
Copy link

ghost commented Jan 16, 2017

@KKSzymanowski Windows from 1987

@KKSzymanowski
Copy link
Contributor

giphy 1

@taylorotwell
Copy link
Member

Breaks on my Mac: sh: php vendor/bin/phpunit: No such file or directory ... Worked before.

@taylorotwell
Copy link
Member

Also please revert all unrelated spacing changes that were made.

@KKSzymanowski
Copy link
Contributor

I have no way to test it on a Mac. Can you give us more info?

@spyric
Copy link
Contributor Author

spyric commented Jan 20, 2017

@taylorotwell Can you check it now? I have made rebase to add #10 fix. I will try to check it on ubuntu

@spyric
Copy link
Contributor Author

spyric commented Jan 20, 2017

Have checked on Ubuntu 16.04 x64. All work fine

@spyric spyric closed this Jan 21, 2017
@spyric spyric reopened this Jan 21, 2017
@KKSzymanowski
Copy link
Contributor

I have managed to install Mac OS X and I can confirm that the newest version works.

@spyric
Copy link
Contributor Author

spyric commented Jan 25, 2017

@taylorotwell have you tested it? Is it works for you now?

@KKSzymanowski
Copy link
Contributor

I too am curious. I'd like to see this merged as soon as possible. Can we help you with anything?

@luisadame
Copy link

It works on Windows 10

@alex-LE
Copy link
Contributor

alex-LE commented Jan 25, 2017

@spyric could you please fix the conflict? It might be "better" for @taylorotwell to merge it ;-)

@spyric
Copy link
Contributor Author

spyric commented Jan 26, 2017

@alex-LE Conflict is resolved

@rawzone
Copy link

rawzone commented Jan 27, 2017

Can confirm that this made dusk work on my Arch Linux desktop as well.

@lasselehtinen
Copy link

Confirmed to work on Windows 10.

What guys you are getting as execution time? Because I am getting closer to six seconds just with the provided example. I was watching the Laracast video about Dusk and Jeffrey has something like less than one second.

PHPUnit 5.7.8 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 5.72 seconds, Memory: 8.00MB

OK (1 test, 1 assertion)

@taylorotwell
Copy link
Member

I still don't understand why unrelated spacing changes are being made. It halts the inclusion of this PR.

@taylorotwell
Copy link
Member

The rest of the Laravel framework has doc-blocks on every method.

@taylorotwell taylorotwell merged commit da7508e into laravel:master Jan 27, 2017
@taylorotwell
Copy link
Member

Cleaned up all the spacing and other formatting issues. Thanks for the help with Windows debugging!

@jcwirko
Copy link

jcwirko commented Mar 22, 2017

I need help. I have laravel 5.4 and windows 10.

if I execute php artisan dusk I get:
\vendor\bin\phpunit.bat"' is not recognized as an internal or external command, operable program or batch file.

@@ -18,17 +19,15 @@
*/
public static function startChromeDriver()
{
if (PHP_OS === 'Darwin') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`

@pildit
Copy link

pildit commented Oct 26, 2017

Hi! how can I make it work on Windows 7 ?
I get this error 'TTY mode is not supported on Windows platform' when i run php artisan dusk
Laravel 5.4
Thank you !

@deleugpn
Copy link
Contributor

That's just a warning.

@pildit
Copy link

pildit commented Oct 26, 2017

Well, maybe it's just a warning, but why php artisan dusk not displays antyhing besides this ?
looks like a Symfony Runtime Exception

@wangyaoxu
Copy link

Works for me on Windows 7. 👍

@pildit
Copy link

pildit commented Nov 13, 2017

Works for me too, I copied the files from github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.