Comments (5)
Fixed in latest version.
from phpunit-watcher.
I have the same issue. I'm using PHP 7.2, everything ele is the same as @yjv-XCV.
from phpunit-watcher.
I actually found where the problems came from, but have no idea how to fix it.
in vendor/symfony/process/Process.php:229
$commandline = 'exec '.$commandline;
The command line is received from
vendor/spatie/phpunit-watcher/src/Screens/Phpunit.php:93
which is combination of phpunitBinaryPath and phpunitArguments.
However the problem lies when it execute exec, it take the space, and the arguments as part of the file name.
When I didn't apply any phpunit arguments, it will have a space after the phpunitBinaryPath in the $commandline, and it works after I remove the space from it.
From
$commandline; // output: "exec /myprojectPath/vendor/bin/phpunit "
change to
$commandline; // output: "exec /myprojectPath/vendor/bin/phpunit"
Please advise, if any setting need to be done to make the execution will escape the space, and treat the arguments properly.
from phpunit-watcher.
After I modify
vendor/spatie/phpunit-watcher/src/Screens/Phpunit.php:93
from
$result = (new Process(["{$this->phpunitBinaryPath} {$this->phpunitArguments}"]))
to
$result = (new Process(["{$this->phpunitBinaryPath}", "{$this->phpunitArguments}"]))
it works fine.
Not sure if it will break other logic of the application.
from phpunit-watcher.
That's great @yjv-XCV. This change works for me too.
I dug a little deeper in the docs for Symfony Process and according to the documentation since v3.4 that's how it should be, the command separate from the arguments. Only from v3.3 below do we find the signature that is in phpunit-watcher.
I would suggest you open a PR with the change, although we no longer need the string wrap on the arguments:
$result = (new Process([$this->phpunitBinaryPath, $this->phpunitArguments]));
from phpunit-watcher.
Related Issues (20)
- Shortcuts for interactive filters would be convenient HOT 1
- What is the limit on how many files it can watch without freezing? HOT 1
- PHP 8 HOT 4
- Watching is extremely slow with Xdebug enabled, and it can't be disabled HOT 3
- PHPUnit arguments from config are wiped out when changing group HOT 8
- combine arguments with default arguments HOT 2
- Fatal error: Cannot redeclare composerRequireccc446ee119412ee86368ef685c2dae8 HOT 1
- Feature Request: 'Press f to run failed tests' HOT 1
- latest version 1.23.2 shows 1.12.1 HOT 1
- PHP 8.1 compatibility HOT 1
- [BUG] Array to string conversion in WatcherCommand on line 121 HOT 1
- Laravel 9 & PHP 8.1 Support HOT 4
- Cannot redeclare composerRequired346c5441e2a9b0583ced00554218f59() HOT 2
- Can't install in a Laravel 9 project HOT 2
- Timeout - PHP 8.1 and Composer 2.1.9 HOT 2
- Installation failed Laravel 9 PHP 8.1 HOT 7
- Installation failed Symfony 6.2.4 PHP 8.2.1 HOT 5
- Path coverage is ignored after first act HOT 3
- Add suport for PHP 8.2 HOT 7
- Update package dep for symfony console HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpunit-watcher.