Giter Club home page Giter Club logo

phpunit-watcher's Introduction

Automatically rerun PHPUnit tests when source code changes

Latest Version on Packagist Tests Total Downloads

Wouldn't it be great if your PHPUnit tests would be automatically rerun whenever you change some code? This package can do exactly that.

With the package installed you can do this:

phpunit-watcher watch

Here's how it looks like:

watcher screenshot

This will run the tests and rerun them whenever a file in the app, src or tests directory is modified.

Want to pass some arguments to PHPUnit? No problem, just tack them on:

phpunit-watcher watch --filter=it_can_run_a_single_test

In his excellent talk at Laracon EU 2017 Amo Chohan shows our phpunit-watcher in action.

Amo Chohan demo

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install this package globally like this

composer global require spatie/phpunit-watcher

After that phpunit-watcher watch can be run in any directory on your system.

Alternatively you can install the package locally as a dev dependency in your project

composer require spatie/phpunit-watcher --dev

Locally installed you can run it with vendor/bin/phpunit-watcher watch

Usage

All the examples assume you've installed the package globally. If you opted for the local installation prepend vendor/bin/ everywhere where phpunit-watcher is mentioned.

You can start the watcher with:

phpunit-watcher watch

This will run the tests and rerun them whenever a file in the src or tests directory is modified.

Want to pass some arguments to PHPUnit? No problem, just tack them on:

phpunit-watcher watch --filter=it_can_run_a_single_test

Notes on interactive commands

When running phpunit-watcher from a Composer script, you may need to redirect input in order for the interactive commands to work and disabled the default timeout:

{
    "scripts": {
        "test:watch": [
            "Composer\\Config::disableProcessTimeout",
            "phpunit-watcher watch < /dev/tty"
        ]
    }
}

On Windows, Currently, TTY is not being supported, so any interaction has been disabled. While watching for changes works, any arguments for PHPUnit have to be provided when initially calling phpunit-watcher.

Customization

Certain aspects of the behaviour of the tool can be modified. The file for options may be named .phpunit-watcher.yml, phpunit-watcher.yml or phpunit-watcher.yml.dist. The tool will look for a file in that order.

If a config file does not exist in the project directory, the tool will check if a file exists in any of the parent directories of the project directory.

Here's some example content. Read on for a more detailed explanation of all the options.

watch:
  directories:
    - src
    - tests
  fileMask: '*.php'
notifications:
  passingTests: false
  failingTests: false
phpunit:
  binaryPath: vendor/bin/phpunit
  arguments: '--stop-on-failure'
  timeout: 180

Customize watched directories and files

You can customize the directories being watched by creating a file named .phpunit-watcher.yml in your project directory. Here's some example content:

watch:
  directories:
    - src
    - tests
  exclude:
    - lib
  fileMask: '*.php'
  ignoreDotFiles: true
  ignoreVCS: true
  ignoreVCSIgnored: false

See the documentation for Finder for more details.

If you experience performance delays with large repositories, try adding exclude entries for any large subdirectories that you don't need to watch. Enabling the ignore... options can also be helpful. It's also important to ensure you're also using the '*.php' file mask.

Desktop notifications

By default the tool will display desktop notifications whenever the tests pass or fail. If you want to disable certain desktop notifications update .phpunit-watcher.yml by adding a notifications key.

notifications:
  passingTests: false
  failingTests: false

Help messages

By default the tool will display a helper for keyboard actions after each run. You can hide these help messages by adding a hideManual key in the .phpunit-watcher.yml.

hideManual: true

Customize PHPUnit

Binary

By default the tool use vendor/bin/phpunit as default PHPUnit binary file, however, it may be useful to be able to customize this value for people who have a binary file in a different location.

You can specificy it in the .phpunit-watcher.yml config file. Here's an example:

phpunit:
  binaryPath: ./vendor/phpunit/phpunit/phpunit

Initial arguments

If you want to use pass the same arguments to PHPUnit everytime to watcher starts, you can specificy those in the .phpunit-watcher.yml config file. Here's an example:

phpunit:
  arguments: '--stop-on-failure'

When starting the tool with some arguments (eg phpunit-watcher watch --filter=my_favourite_test) those arguments will get used instead of the ones specified in the config file.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.

Postcardware

You're free to use this package (it's MIT-licensed), but if you use it often we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

We started creating this package after reading this excellent article by Christoper Pitt

Interactive commands were inspired by Jest.

License

The MIT License (MIT). Please see License File for more information.

phpunit-watcher's People

Contributors

adalessa avatar adrianmrn avatar akoepcke avatar bencarrr avatar binaryk avatar brendt avatar cameroncox avatar casperboone avatar chrisb9 avatar dkd-kaehm avatar freekmurze avatar iandunn avatar lucassabreu avatar maxgiting avatar maxklenk avatar mikeerickson avatar ntwb avatar obstschale avatar patinthehat avatar peter279k avatar raphaelstolt avatar romainnorberg avatar rubenvanassche avatar sg3s avatar sibprogrammer avatar svenluijten avatar thiagolcks avatar traubisoda avatar yjv-xcv avatar zedentox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpunit-watcher's Issues

Tests run too many times

The watcher sometimes runs the tests too many times.

Steps to reproduce:

  • start the watcher
  • change a watched file
  • manually trigger a test run

This will result in the tests being run multiple times...

phpunit-watcher failed to execute phpunit

Greetings,

This is the error I get

sh: /myprojectpath/vendor/bin/phpunit : No such file or directory
sh: line 0: exec: /myprojectpath/vendor/bin/phpunit : cannot execute: No such file or directory

It seem it state that my phpunit is not exists.
However, when I execute with /myprojectpath/vendor/bin/phpunit it works just fine.

I'd tried with default setting, and also use customised path for phpunit using phpunit-watcher.yml
with phpunit path set to
vendor/bin/phpunit
vendor/phpunit/phpunit/phpunit
Both are not working for phpunit-watcher, but when execute directly in cli, it worked.

Any idea what is going wrong?
Background:
installed locally with Laravel 5.8.*
vendor/bin/phpunit is working, and the execute permission is opened to all
composer version 1.8.6
phpunit/phpunit version ^7.5
spatie/phpunit-watcher version ^1.10
php 7.3.4 for CLI

Thanks in advance.

desktop notifications not working on OSX Mojave

I opened this issue already but figured I'd post here as well since you may know the answer

jolicode/JoliNotif#57

this is the contents of my .phpunit-watcher.yml

watch:
  directories:
    - app
    - modules
    - tests
  fileMask: '*.php'
notifications:
  passingTests: true
  failingTests: true
phpunit:
  arguments: '--stop-on-failure'%

and I'm using iTerm on OSX Mojave

Use `config.fileMask` if it exists

When running watcher, use the config.fileMask property when display info

PHPUnit Watcher

Tests will be rerun when *.php (should be fileMask) files are modified in the following directories:

image

Enter key not working when typing filters

When attempting to filter tests by test or file name pressing the "Enter" key has no effect.

Pressing "Enter" at the default screen correctly triggers a "test run" where all tests are run.

Use random seed

We use phpunit-watch in one of our projects. So first things first, Thank you!!!

Recently, we started to run our tests in random order (recommendation by Sebastian Bergmann). This showed us a lot of potential bugs, because some tests were depending each other.

It would be very helpful to use phpunit-watcher during decoupling those tests, but this requires to run tests in the same order given a random seed.

phpunit prints the seed before running the tests. Now I would like to enter this seed, so phpunit-watch uses it.

Can you tell me if this a) already possible and I missed it? or b) point me to the right direction and I will try to add this feature myself, if you think it fits :)

Do not halt on non-existing directories

Right now the tool halt when one of the watch directories does not exist. Maybe it's better to give an error but keep running. We could add app as a default watch directory to make Laravel users happy.

Ability to change binary and config locations/files

Right now the config file is hardcoded to .phpunit-watcher.yml and the binary is hardcoded to vendor/bin/phpunit

There are other programs that use phpunit and wrap custom functionality (or shortcuts) around it. An example is Laravel Dusk

It would be helpful if we could configure both the config file to use and the binary. Configuring the binary is also helpful for people who have the binary in a different location.

Let me know if this interests others. If so, I can whip up a PR.

only running once

Getting the following response when running vendor/bin/phpunit-watcher watch. I expect it to not exit after the first run.

PHPUnit Watcher
===============

 PHPUnit Watcher 1.5.0 by Spatie and contributors.

 Using options from configfile at `/Applications/MAMP/htdocs/wp-content/plugins/Archive-1/.phpunit-watcher.yml`

 Tests will be rerun when *.php files are modified in
 * /Applications/MAMP/htdocs/wp-content/plugins/Archive-1/.


PHPUnit 8.0.4 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.2
Configuration: /Applications/MAMP/htdocs/wp-content/plugins/Archive-1/phpunit.xml

.                                                                   1 / 1 (100%)

Time: 30 ms, Memory: 4.00MB

OK (1 test, 1 assertion)

In Process.php line 426:
                                                  
  The process has been signaled with signal "9".  
                                                  

watch [<phpunit-options>]

config:

watch:
  directories:
    - .
  fileMask: '*.php'
phpunit:
  binaryPath: vendor/bin/phpunit

Error "Unable to set stream resource to non-blocking mode" In ReadableResourceStream.php line 56:

  • Error output:
$ vendor/bin/phpunit-watcher watch


In ReadableResourceStream.php line 56:
                                                      
  Unable to set stream resource to non-blocking mode  
                                                      

watch [<phpunit-options>]
  • S.O.: Windows 10
  • How I installed the package: composer require spatie/phpunit-watcher --dev
  • Command (the result error is the same):
    • vendor/bin/phpunit-watcher watch (git-bash)
    • or vendor\bin\phpunit-watcher watch (cmd)
  • Using a configuration file: yes, .phpunit-watcher.yml
  • Content of configuration file:
watch:
  directories:
    - src
    - tests
  fileMask: '*.php'
notifications:
  passingTests: false
  failingTests: true
phpunit:
  binaryPath: vendor/bin/simple-phpunit
  arguments: '--testsuite unit'

References:

Issue with install latest version

As you can see by the screenshot below, something is amiss as it relates to using the --version flag.

image

During install, it appears that latest version (1.1.0 at the time of submission) however, checking version phpunit-watcher --version it still reports v1.0.4

wrong constructor paremeter for Symfony\Component\Process\Process


PHPUnit Watcher
===============

 PHPUnit Watcher 1.5.0 by Spatie and contributors.

 No config file detected. Using default options.

 Tests will be rerun when *.php files are modified in
 * /var/www/api/src



SCREAM:  Error suppression ignored for
Deprecated: Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell. in /var/www/api/vendor/symfony/process/Process.php on line 147

Call Stack:
    0.0002     396624   1. {main}() /var/www/api/vendor/spatie/phpunit-watcher/phpunit-watcher:0
    0.0116    1414720   2. Spatie\PhpUnitWatcher\ConsoleApplication->run() /var/www/api/vendor/spatie/phpunit-watcher/phpunit-watcher:15
    0.0189    1686664   3. Spatie\PhpUnitWatcher\ConsoleApplication->doRun() /var/www/api/vendor/symfony/console/Application.php:149
    0.0202    1690040   4. Spatie\PhpUnitWatcher\ConsoleApplication->doRunCommand() /var/www/api/vendor/symfony/console/Application.php:273
    0.0202    1690040   5. Spatie\PhpUnitWatcher\WatcherCommand->run() /var/www/api/vendor/symfony/console/Application.php:921
    0.0210    1691872   6. Spatie\PhpUnitWatcher\WatcherCommand->execute() /var/www/api/vendor/symfony/console/Command/Command.php:255
    0.0347    2552880   7. Spatie\PhpUnitWatcher\Watcher->startWatching() /var/www/api/vendor/spatie/phpunit-watcher/src/WatcherCommand.php:30
    0.0353    2579416   8. Spatie\PhpUnitWatcher\Terminal->displayScreen() /var/www/api/vendor/spatie/phpunit-watcher/src/Watcher.php:39
    0.0354    2581184   9. Spatie\PhpUnitWatcher\Screens\Phpunit->draw() /var/www/api/vendor/spatie/phpunit-watcher/src/Terminal.php:90
    0.0363    2582376  10. Spatie\PhpUnitWatcher\Screens\Phpunit->runTests() /var/www/api/vendor/spatie/phpunit-watcher/src/Screens/Phpunit.php:34
    0.0380    2786624  11. Symfony\Component\Process\Process->__construct() /var/www/api/vendor/spatie/phpunit-watcher/src/Screens/Phpunit.php:93
    0.0380    2787136  12. trigger_error() /var/www/api/vendor/symfony/process/Process.php:147


Variables in local scope (#11):
  $command = 'vendor/bin/phpunit '
  $cwd = NULL
  $env = NULL
  $input = NULL
  $timeout = 60

PHPUnit 8.2.4 by Sebastian Bergmann and contributors.

{
  "scripts": {
    "fix": "php-cs-fixer fix",
    "length": "bash check_length.sh",
    "phpunit": "phpunit --colors=always",
    "test": [
      "@fix",
      "@phpunit"
    ],
    "watch": "phpunit-watcher watch"
  },
  "autoload": {
    "psr-4": {
      "App\\": "src/"
    }
  },
  "require": {
    "slim/slim": "^3.12"
  },
  "require-dev": {
    "symfony/process": "~4.1.0",
    "friendsofphp/php-cs-fixer": "^2.15",
    "phpunit/phpunit": "^8.2",
    "spatie/phpunit-watcher": "^1.8"
  }
}

similar issue

FEATURE: Display path to config file used

@freekmurze Would you consider adding the display of the config file that is used?

PHPUnit Watcher
===============
Config file <pathHere>

 Tests will be rerun when *.php files are modified in
 * /Users/merickson/Documents/code/oss/php/phpunit-watcher/src
 * /Users/merickson/Documents/code/oss/php/phpunit-watcher/tests

Show desktop notifications

It would be nice if the tool were to send a notification when the tests succeed/fail.

Integrating JoliNotif seems like the way to go.

There also should be a config option in the phpunit-watcher.yml to turn off notifications.

Crash when attempting to use

  • Install version 1.10 with composer
  • Add a phpunit-watcher.yml
watch:
  directories:
    - blah/tests
  fileMask: '*.php'
  • phpunit-watcher presents options
  • Press p
  • Nothing happens
  • Press Enter

Crash:

PHP Error:  Call to private method Clue\React\Stdio\Readline::deleteChar() from context 'Spatie\PhpUnitWatcher\Terminal' in /vagrant/vendor/spatie/phpunit-watcher/src/Terminal.php on line 37
PHP Stack trace:
PHP   1. {main}() /vagrant/vendor/spatie/phpunit-watcher/phpunit-watcher:0
PHP   2. Spatie\PhpUnitWatcher\ConsoleApplication->run() /vagrant/vendor/spatie/phpunit-watcher/phpunit-watcher:15
PHP   3. Spatie\PhpUnitWatcher\ConsoleApplication->doRun() /vagrant/vendor/symfony/console/Application.php:145
PHP   4. Spatie\PhpUnitWatcher\ConsoleApplication->doRunCommand() /vagrant/vendor/symfony/console/Application.php:269
PHP   5. Spatie\PhpUnitWatcher\WatcherCommand->run() /vagrant/vendor/symfony/console/Application.php:917
PHP   6. Spatie\PhpUnitWatcher\WatcherCommand->execute() /vagrant/vendor/symfony/console/Command/Command.php:255
PHP   7. Spatie\PhpUnitWatcher\Watcher->startWatching() /vagrant/vendor/spatie/phpunit-watcher/src/WatcherCommand.php:30
PHP   8. React\EventLoop\StreamSelectLoop->run() /vagrant/vendor/spatie/phpunit-watcher/src/Watcher.php:57
PHP   9. React\EventLoop\StreamSelectLoop->waitForStreamActivity() /vagrant/vendor/react/event-loop/src/StreamSelectLoop.php:212
PHP  10. React\Stream\ReadableResourceStream->handleData() /vagrant/vendor/react/event-loop/src/StreamSelectLoop.php:245
PHP  11. React\Stream\ReadableResourceStream->emit() /vagrant/vendor/react/stream/src/ReadableResourceStream.php:146
PHP  12. Clue\React\Term\ControlCodeParser->handleData() /vagrant/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
PHP  13. Clue\React\Term\ControlCodeParser->emit() /vagrant/vendor/clue/term-react/src/ControlCodeParser.php:136
PHP  14. Clue\React\Stdio\Readline->Clue\React\Stdio\{closure:/vagrant/vendor/clue/stdio-react/src/Readline.php:71-99}() /vagrant/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
PHP  15. Clue\React\Stdio\Readline->onKeyEnter() /vagrant/vendor/clue/stdio-react/src/Readline.php:96
PHP  16. Clue\React\Stdio\Readline->processLine() /vagrant/vendor/clue/stdio-react/src/Readline.php:713
PHP  17. Clue\React\Stdio\Readline->emit() /vagrant/vendor/clue/stdio-react/src/Readline.php:862
PHP  18. Clue\React\Stdio\Stdio->Clue\React\Stdio\{closure:/vagrant/vendor/clue/stdio-react/src/Stdio.php:47-51}() /vagrant/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
PHP  19. Clue\React\Stdio\Stdio->emit() /vagrant/vendor/clue/stdio-react/src/Stdio.php:50
PHP  20. Spatie\PhpUnitWatcher\Terminal->Spatie\PhpUnitWatcher\{closure:/vagrant/vendor/spatie/phpunit-watcher/src/Terminal.php:36-39}() /vagrant/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:131
PHP Fatal error:  Uncaught Error: Call to private method Clue\React\Stdio\Readline::deleteChar() from context 'Spatie\PhpUnitWatcher\Terminal' in /vagrant/vendor/spatie/phpunit-watcher/src/Terminal.php:37
Stack trace:
#0 /vagrant/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(131): Spatie\PhpUnitWatcher\Terminal->Spatie\PhpUnitWatcher\{closure}('p\n')
#1 /vagrant/vendor/clue/stdio-react/src/Stdio.php(50): Evenement\EventEmitter->emit('data', Array)
#2 /vagrant/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): Clue\React\Stdio\Stdio->Clue\React\Stdio\{closure}('p\n')
#3 /vagrant/vendor/clue/stdio-react/src/Readline.php(862): Evenement\EventEmitter->emit('data', Array)
#4 /vagrant/vendor/clue/stdio-react/src/Readline.php(713): Clue\React\Stdio\Readline->processLine('\n')
#5 /vagrant/vendor/clue/stdio-react/src/Readline.php(96): Clue\React\Stdio\Readline->onKeyEnter('\n')
#6 /vagrant/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): Clue\React\Stdio\Readline->Clue\React\Stdio\ in /vagrant/vendor/spatie/phpunit-watcher/src/Terminal.php on line 37

Consider support --include-group and --exclude-group in configuration file

In addition to the testSuites would also be nice to have --include-group and --exclude-group options as part of the default execution (as configured in .phpunit-watcher.yml).

Currently, I have this configured for each project (in the package composer.json) but I often have grouping and suites running.

watch:
directories:
- src
- tests
fileMask: '*.php'
testSuites:
- unit
- feature
excludeGroups:
- group1
- group2
includeGroups:
- group3
- group4

PHPUnit arguments configured are wiped if 'a' is used

Due to a line in option a all arguments configured are wiped. I believe this is inconsistent and it should not be the case.

The following line causes the arguments to be wiped from a run, and all subsequent runs:
https://github.com/spatie/phpunit-watcher/blob/master/src/Screens/Phpunit.php#L41

If you use 'Enter' to re-run the initial tests it does not wipe the arguments. But if you use 'a' once you will not be able to get the arguments back until you restart the watcher.

Either the option is inconsistent, or the purpose of 'a' vs 'Enter' is not clear to me/my team.

Notice while running watcher

I've been working with the watcher for the past 30 mins and multiple times I've seen this notice in the result. First time was after using the filter function ( below key t ) and for the second time was after running all the tests.

The notice is the following:

PHP Notice: Undefined index: notifications in /Users/ricardocino/.composer/vendor/spatie/phpunit-watcher/src/Screens/Phpunit.php on line 110

Stacktrace:
screen shot 2017-09-01 at 15 50 14

Edit:

  • Package was installed globally instead of in the project.

Use memory cache

That cache file is kinda sucky. Let's see if the tool work stable when using in memory cache.

Could not start watcher

Hello,
When I try to run the phpunit-watcher watch it returns an error:

PHP Fatal error:  Uncaught Error: Call to undefined method Clue\React\Stdio\Stdio::getInput() in /home/benoit/PhpStorm/itrocks/bappli-sfkgroup/vendor/spatie/phpunit-watcher/src/Terminal.php:36
Stack trace:

With return 255 code.

There is a configuration to make it work?

Thank you.

Watcher queue changes during test

Hello there,

Awesome package, thanks for it, i completely love it ๐Ÿ‘

Issue:
I don't know if this issue come from any other package but I will post it here for now.
When executing a pretty slow test suite on a project, it seems like the watcher is taking into account the change I made even when the whole test suite is up and running, which can cause some issue as I hit save a lot and sometimes led to the entire test suite to execute again without letting me the time to check the result.

How to reproduct:

<?php

namespace Spatie\PhpUnitWatcher\Test;

use PHPUnit\Framework\TestCase;

class SlowTest extends TestCase
{
    /** @test */
    public function run_a_test_for_5_secondes()
    {
        sleep(5);
        $this->assertTrue(true);
    }
}

With this test added to the package test suite I was able to replicate the issue by spamming multiple time save on my own editor for 1 or two seconds.

Solution:
I think preventing any input to be handle while PHPUnit is running might be a solution.

Thanks again for the amazing work :)

Conflict with Valet dependencies when installing globally

Hi,

When I tried to install it globally I get the following error:

Changed current directory to /Users/thiago/.composer
Using version ^1.22 for spatie/phpunit-watcher
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove symfony/console v5.0.1
    - Conclusion: don't install symfony/console v5.0.1
    - symfony/process v3.3.0 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.1 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.10 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.11 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.12 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.13 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.14 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.15 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.16 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.17 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.18 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.2 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.3 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.4 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.5 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.6 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.7 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.8 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.3.9 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.0 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.1 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.10 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.11 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.12 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.13 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.14 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.15 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.16 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.17 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.18 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.19 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.2 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.20 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.21 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.22 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.23 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.24 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.25 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.26 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.27 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.28 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.29 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.3 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.30 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.31 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.32 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.33 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.34 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.35 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.36 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.4 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.5 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.6 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.7 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.8 conflicts with symfony/console[v5.0.1].
    - symfony/process v3.4.9 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.0 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.1 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.10 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.11 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.12 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.13 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.14 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.15 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.2 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.3 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.4 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.5 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.6 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.7 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.8 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.0.9 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.0 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.1 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.10 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.11 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.12 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.2 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.3 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.4 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.5 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.6 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.7 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.8 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.1.9 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.0 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.1 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.10 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.11 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.12 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.2 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.3 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.4 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.5 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.6 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.7 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.8 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.2.9 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.0 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.1 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.2 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.3 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.4 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.5 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.6 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.7 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.8 conflicts with symfony/console[v5.0.1].
    - symfony/process v4.3.9 conflicts with symfony/console[v5.0.1].
    - Installation request for symfony/console (locked at v5.0.1) -> satisfiable by symfony/console[v5.0.1].
    - Installation request for spatie/phpunit-watcher ^1.22 -> satisfiable by spatie/phpunit-watcher[1.22.0].
    - Conclusion: don't install symfony/process v5.0.1|install symfony/process v3.3.0|install symfony/process v3.3.1|install symfony/process v3.3.10|install symfony/process v3.3.11|install symfony/process v3.3.12|install symfony/process v3.3.13|install symfony/process v3.3.14|install symfony/process v3.3.15|install symfony/process v3.3.16|install symfony/process v3.3.17|install symfony/process v3.3.18|install symfony/process v3.3.2|install symfony/process v3.3.3|install symfony/process v3.3.4|install symfony/process v3.3.5|install symfony/process v3.3.6|install symfony/process v3.3.7|install symfony/process v3.3.8|install symfony/process v3.3.9|install symfony/process v3.4.0|install symfony/process v3.4.1|install symfony/process v3.4.10|install symfony/process v3.4.11|install symfony/process v3.4.12|install symfony/process v3.4.13|install symfony/process v3.4.14|install symfony/process v3.4.15|install symfony/process v3.4.16|install symfony/process v3.4.17|install symfony/process v3.4.18|install symfony/process v3.4.19|install symfony/process v3.4.2|install symfony/process v3.4.20|install symfony/process v3.4.21|install symfony/process v3.4.22|install symfony/process v3.4.23|install symfony/process v3.4.24|install symfony/process v3.4.25|install symfony/process v3.4.26|install symfony/process v3.4.27|install symfony/process v3.4.28|install symfony/process v3.4.29|install symfony/process v3.4.3|install symfony/process v3.4.30|install symfony/process v3.4.31|install symfony/process v3.4.32|install symfony/process v3.4.33|install symfony/process v3.4.34|install symfony/process v3.4.35|install symfony/process v3.4.36|install symfony/process v3.4.4|install symfony/process v3.4.5|install symfony/process v3.4.6|install symfony/process v3.4.7|install symfony/process v3.4.8|install symfony/process v3.4.9|install symfony/process v4.0.0|install symfony/process v4.0.1|install symfony/process v4.0.10|install symfony/process v4.0.11|install symfony/process v4.0.12|install symfony/process v4.0.13|install symfony/process v4.0.14|install symfony/process v4.0.15|install symfony/process v4.0.2|install symfony/process v4.0.3|install symfony/process v4.0.4|install symfony/process v4.0.5|install symfony/process v4.0.6|install symfony/process v4.0.7|install symfony/process v4.0.8|install symfony/process v4.0.9|install symfony/process v4.1.0|install symfony/process v4.1.1|install symfony/process v4.1.10|install symfony/process v4.1.11|install symfony/process v4.1.12|install symfony/process v4.1.2|install symfony/process v4.1.3|install symfony/process v4.1.4|install symfony/process v4.1.5|install symfony/process v4.1.6|install symfony/process v4.1.7|install symfony/process v4.1.8|install symfony/process v4.1.9|install symfony/process v4.2.0|install symfony/process v4.2.1|install symfony/process v4.2.10|install symfony/process v4.2.11|install symfony/process v4.2.12|install symfony/process v4.2.2|install symfony/process v4.2.3|install symfony/process v4.2.4|install symfony/process v4.2.5|install symfony/process v4.2.6|install symfony/process v4.2.7|install symfony/process v4.2.8|install symfony/process v4.2.9|install symfony/process v4.3.0|install symfony/process v4.3.1|install symfony/process v4.3.2|install symfony/process v4.3.3|install symfony/process v4.3.4|install symfony/process v4.3.5|install symfony/process v4.3.6|install symfony/process v4.3.7|install symfony/process v4.3.8|install symfony/process v4.3.9
    - Conclusion: remove symfony/process v5.0.1|install symfony/process v3.3.0|install symfony/process v3.3.1|install symfony/process v3.3.10|install symfony/process v3.3.11|install symfony/process v3.3.12|install symfony/process v3.3.13|install symfony/process v3.3.14|install symfony/process v3.3.15|install symfony/process v3.3.16|install symfony/process v3.3.17|install symfony/process v3.3.18|install symfony/process v3.3.2|install symfony/process v3.3.3|install symfony/process v3.3.4|install symfony/process v3.3.5|install symfony/process v3.3.6|install symfony/process v3.3.7|install symfony/process v3.3.8|install symfony/process v3.3.9|install symfony/process v3.4.0|install symfony/process v3.4.1|install symfony/process v3.4.10|install symfony/process v3.4.11|install symfony/process v3.4.12|install symfony/process v3.4.13|install symfony/process v3.4.14|install symfony/process v3.4.15|install symfony/process v3.4.16|install symfony/process v3.4.17|install symfony/process v3.4.18|install symfony/process v3.4.19|install symfony/process v3.4.2|install symfony/process v3.4.20|install symfony/process v3.4.21|install symfony/process v3.4.22|install symfony/process v3.4.23|install symfony/process v3.4.24|install symfony/process v3.4.25|install symfony/process v3.4.26|install symfony/process v3.4.27|install symfony/process v3.4.28|install symfony/process v3.4.29|install symfony/process v3.4.3|install symfony/process v3.4.30|install symfony/process v3.4.31|install symfony/process v3.4.32|install symfony/process v3.4.33|install symfony/process v3.4.34|install symfony/process v3.4.35|install symfony/process v3.4.36|install symfony/process v3.4.4|install symfony/process v3.4.5|install symfony/process v3.4.6|install symfony/process v3.4.7|install symfony/process v3.4.8|install symfony/process v3.4.9|install symfony/process v4.0.0|install symfony/process v4.0.1|install symfony/process v4.0.10|install symfony/process v4.0.11|install symfony/process v4.0.12|install symfony/process v4.0.13|install symfony/process v4.0.14|install symfony/process v4.0.15|install symfony/process v4.0.2|install symfony/process v4.0.3|install symfony/process v4.0.4|install symfony/process v4.0.5|install symfony/process v4.0.6|install symfony/process v4.0.7|install symfony/process v4.0.8|install symfony/process v4.0.9|install symfony/process v4.1.0|install symfony/process v4.1.1|install symfony/process v4.1.10|install symfony/process v4.1.11|install symfony/process v4.1.12|install symfony/process v4.1.2|install symfony/process v4.1.3|install symfony/process v4.1.4|install symfony/process v4.1.5|install symfony/process v4.1.6|install symfony/process v4.1.7|install symfony/process v4.1.8|install symfony/process v4.1.9|install symfony/process v4.2.0|install symfony/process v4.2.1|install symfony/process v4.2.10|install symfony/process v4.2.11|install symfony/process v4.2.12|install symfony/process v4.2.2|install symfony/process v4.2.3|install symfony/process v4.2.4|install symfony/process v4.2.5|install symfony/process v4.2.6|install symfony/process v4.2.7|install symfony/process v4.2.8|install symfony/process v4.2.9|install symfony/process v4.3.0|install symfony/process v4.3.1|install symfony/process v4.3.2|install symfony/process v4.3.3|install symfony/process v4.3.4|install symfony/process v4.3.5|install symfony/process v4.3.6|install symfony/process v4.3.7|install symfony/process v4.3.8|install symfony/process v4.3.9
    - spatie/phpunit-watcher 1.22.0 requires jolicode/jolinotif ^2.0 -> satisfiable by jolicode/jolinotif[v2.0.0, v2.0.1, v2.0.2].
    - jolicode/jolinotif v2.0.2 requires symfony/process ~3.3|~4.0 -> satisfiable by symfony/process[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.1, v4.4.2].
    - jolicode/jolinotif v2.0.1 requires symfony/process ~3.3|~4.0 -> satisfiable by symfony/process[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.1, v4.4.2].
    - jolicode/jolinotif v2.0.0 requires symfony/process ~3.3|~4.0 -> satisfiable by symfony/process[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.1, v4.4.2].
    - Can only install one of: symfony/process[v4.4.0, v5.0.1].
    - Can only install one of: symfony/process[v4.4.1, v5.0.1].
    - Can only install one of: symfony/process[v4.4.2, v5.0.1].
    - Installation request for symfony/process (locked at v5.0.1) -> satisfiable by symfony/process[v5.0.1].


Installation failed, reverting ./composer.json to its original content.

The only package that I've installed globally was Valet (and its dependencies):

illuminate/container      v6.10.0 The Illuminate Container package.
illuminate/contracts      v6.10.0 The Illuminate Contracts package.
laravel/valet             v2.8.1  A more enjoyable local development experience for Mac.
mnapoli/silly             1.7.2   Silly CLI micro-framework based on Symfony Console
nategood/httpful          0.3.0   A Readable, Chainable, REST friendly, PHP HTTP Client
php-di/invoker            2.0.0   Generic and extensible callable invoker
psr/container             1.0.0   Common Container Interface (PHP FIG PSR-11)
psr/simple-cache          1.0.1   Common interfaces for simple caching
symfony/console           v5.0.2  Symfony Console Component
symfony/polyfill-mbstring v1.13.1 Symfony polyfill for the Mbstring extension
symfony/polyfill-php73    v1.13.1 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/process           v5.0.2  Symfony Process Component
symfony/service-contracts v2.0.1  Generic abstractions related to writing services
symfony/var-dumper        v5.0.2  Symfony mechanism for exploring and dumping PHP variables
tightenco/collect         v6.9.0  Collect - Illuminate Collections as a separate package.

Only run tests for changed files ?

Hi,

i just found this package. First of all thank you for that. Looks promising.

I already found that there is a pull request for not running the tests on initial startup, which is great.

But what i found out is, that phpunit-watcher re-runs all of my tests whenever any test changes. Having lots of tests this is rather time-consuming.

I'm aware that i could set a filter. But during development various tests may change. Is there any way to only re-run the tests for the files that actually changed ?

Keystroke options dont work when watcher executed from composer script

As developer, if I launch the Watcher command from a composer.json script, the keyboard watcher does not work

...
  "scripts": {
    "test": "vendor/bin/phpunit --colors=always",
    "watch-tickets": "vendor/bin/phpunit-watcher watch --testsuite Tickets"
  }
...
Press a to run all tests.
Press t to filter by test name.
Press p to filter by file name.
Press q to quit the watcher.
Press Enter to trigger a test run.

The actual keystroke is sent to the console, but the actions are not triggered

image

Fail to detect the phpunit path if composer `bin-dir` config is used

It seems that phpunit-watcher is failling to detect the phpunit path when composer is configured to move the binaries outside the vendor directory:

"config": {
  "bin-dir": "bin"
}

The phpunit-watcher will output:

sh: vendor/bin/phpunit: No such file or directory

It could be a good idea to use the config.bin-dir value to determine the composer binary direcotry path

Symfony process ProcessTimedOutException

Hello!

I am getting this while running phpunit-watcher:

  [Symfony\Component\Process\Exception\ProcessTimedOutException]               
  The process "phpunit-watcher watch --colors=always --testdox --bootstrap ve  
  ndor/autoload.php *Test.php" exceeded the timeout of 300 seconds. 

Symfony 4.0.0

exceeded the timeout of 300 seconds

 [Symfony\Component\Process\Exception\ProcessTimedOutException]                                                                   
  The process "vendor/bin/phpunit-watcher watch 'tests/src/Builders/CS15XmlBuilderTest.php'" exceeded the timeout of 300 seconds. 

This was talked about in #63, the thread was closed but there was no resolution, the proposed solution did not work on version 1.60:

$ vendor/bin/phpunit-watcher --timeout 0

 The "--timeout" option does not exist. 

Allowing testdox after filtering

When I pass in the --testdox flag into the initial command from the CLI, I get my results shown in the nice testdox format. When I use a filter, I then lose that flag and it reverts back to the standard PHPUnit output.

I can see two options for a feature here:

  • Preserving all none filter flags from the initial command line argument
  • Adding a testdox screen

Happy to have a crack at this myself, but was wondering what the maintainers/community thought the best path to tackle this from was?

I can see the argument preservation has been mentioned once before in #35 so I guess that's 1 vote for that?

Remove help messages

Hi,

Any way to hide the help messages shown at the end of the phpunit execution?

I want to have it running in a vscode terminal and that messages takes the half of the panel height :)

image

Thanks.

High-ish CPU load when idle

Hello! Thanks for this awesome utility. I've really enjoyed having it in my workflow.

Background: Running phpunit-watcher without any custom config, inside a php 7.1/ubuntu16-based Docker container.

While troubleshooting some PHPStorm sluggishness, I noticed that when watch idles between test runs, the CPU usage for that container as reported by docker stats ranges between 15-20%. Quitting watch drops usage to ~0%.

I'm curious if others are seeing this much idle CPU usage as well, or if I might have some other issue going on?

Version info does not match tagged version

Hey there, just a soft nudge that the version is out of sync again :-)

FWIW, I store the version in composer.json and then directly read from there. I know it is a pain to keep them in sync with what packagist.org shows, guess that is part of software development.
Thanks for this package though, I have gotten great use from it!

Let me know if you want a contribution on this item.

class ConsoleApplication extends Application
{
    public function __construct()
    {
        parent::__construct('PHPUnit Watcher', '1.3.1'); 

        $this->add(new WatcherCommand());
    }

    public function getLongVersion()
    {
        return parent::getLongVersion().' by <comment>Spatie</comment>';
    }
}

Fatal error: Uncaught Error: Call to private method Clue\React\Stdio\Readline::deleteCha

I am getting this error while trying to run the tests.
Can anyone help me?

I have phpunit-watcher installed locally.

Fatal error: Uncaught Error: Call to private method Clue\React\Stdio\Readline::deleteChar() from context 'Spatie\PhpUnitWatcher\Terminal' in /Users/didac/repos/php-kata-boilerplate/vendor/spatie/phpunit-watcher/src/Terminal.php:37
Stack trace:
#0 /Users/didac/repos/php-kata-boilerplate/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(131): Spatie\PhpUnitWatcher\Terminal->Spatie\PhpUnitWatcher\{closure}('a\n')
#1 /Users/didac/repos/php-kata-boilerplate/vendor/clue/stdio-react/src/Stdio.php(50): Evenement\EventEmitter->emit('data', Array)
#2 /Users/didac/repos/php-kata-boilerplate/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): Clue\React\Stdio\Stdio->Clue\React\Stdio\{closure}('a\n')
#3 /Users/didac/repos/php-kata-boilerplate/vendor/clue/stdio-react/src/Readline.php(862): Evenement\EventEmitter->emit('data', Array)
#4 /Users/didac/repos/php-kata-boilerplate/vendor/clue/stdio-react/src/Readline.php(713): Clue\React\Stdio\Readline->processLine('\n')
#5 /Users/didac/repos/php-kata-boilerplat in /Users/didac/repos/php-kata-boilerplate/vendor/spatie/phpunit-watcher/src/Terminal.php on line 37

No notification on Windows system?

Hi, can anyone confirm that there is no notification on windows system, and the only way to quit the watcher is close the terrminal panel as there is no interaction supported? Thanks.

can't install globaly

Hi,

Trying to install your package for the first time. I wanted to inststal with
composer global require spatie/phpunit-watcher

But I am getting an error:

Using version ^1.5 for spatie/phpunit-watcher
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install spatie/phpunit-watcher 1.5.1
    - Conclusion: don't install symfony/process v4.1.1
    - Conclusion: remove symfony/process v3.1.0
    - Conclusion: don't install symfony/process v4.1.0
    - Installation request for spatie/phpunit-watcher ^1.5 -> satisfiable by spatie/phpunit-watcher[1.5.0, 1.5.1].
    - Conclusion: don't install symfony/process v3.1.0
    - spatie/phpunit-watcher 1.5.0 requires jolicode/jolinotif ^2.0 -> satisfiable by jolicode/jolinotif[v2.0.0, v2.0.1].
    - jolicode/jolinotif v2.0.0 requires symfony/process ~3.3|~4.0 -> satisfiable by symfony/process[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1].
    - jolicode/jolinotif v2.0.1 requires symfony/process ~3.3|~4.0 -> satisfiable by symfony/process[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1].
    - Can only install one of: symfony/process[v3.3.0, v3.1.0].
    - Can only install one of: symfony/process[v3.3.1, v3.1.0].
    - Can only install one of: symfony/process[v3.3.10, v3.1.0].
    - Can only install one of: symfony/process[v3.3.11, v3.1.0].
    - Can only install one of: symfony/process[v3.3.12, v3.1.0].
    - Can only install one of: symfony/process[v3.3.13, v3.1.0].
    - Can only install one of: symfony/process[v3.3.14, v3.1.0].
    - Can only install one of: symfony/process[v3.3.15, v3.1.0].
    - Can only install one of: symfony/process[v3.3.16, v3.1.0].
    - Can only install one of: symfony/process[v3.3.17, v3.1.0].
    - Can only install one of: symfony/process[v3.3.2, v3.1.0].
    - Can only install one of: symfony/process[v3.3.3, v3.1.0].
    - Can only install one of: symfony/process[v3.3.4, v3.1.0].
    - Can only install one of: symfony/process[v3.3.5, v3.1.0].
    - Can only install one of: symfony/process[v3.3.6, v3.1.0].
    - Can only install one of: symfony/process[v3.3.7, v3.1.0].
    - Can only install one of: symfony/process[v3.3.8, v3.1.0].
    - Can only install one of: symfony/process[v3.3.9, v3.1.0].
    - Can only install one of: symfony/process[v3.4.0, v3.1.0].
    - Can only install one of: symfony/process[v3.4.1, v3.1.0].
    - Can only install one of: symfony/process[v3.4.10, v3.1.0].
    - Can only install one of: symfony/process[v3.4.11, v3.1.0].
    - Can only install one of: symfony/process[v3.4.12, v3.1.0].
    - Can only install one of: symfony/process[v3.4.2, v3.1.0].
    - Can only install one of: symfony/process[v3.4.3, v3.1.0].
    - Can only install one of: symfony/process[v3.4.4, v3.1.0].
    - Can only install one of: symfony/process[v3.4.5, v3.1.0].
    - Can only install one of: symfony/process[v3.4.6, v3.1.0].
    - Can only install one of: symfony/process[v3.4.7, v3.1.0].
    - Can only install one of: symfony/process[v3.4.8, v3.1.0].
    - Can only install one of: symfony/process[v3.4.9, v3.1.0].
    - Can only install one of: symfony/process[v4.0.0, v3.1.0].
    - Can only install one of: symfony/process[v4.0.1, v3.1.0].
    - Can only install one of: symfony/process[v4.0.10, v3.1.0].
    - Can only install one of: symfony/process[v4.0.11, v3.1.0].
    - Can only install one of: symfony/process[v4.0.12, v3.1.0].
    - Can only install one of: symfony/process[v4.0.2, v3.1.0].
    - Can only install one of: symfony/process[v4.0.3, v3.1.0].
    - Can only install one of: symfony/process[v4.0.4, v3.1.0].
    - Can only install one of: symfony/process[v4.0.5, v3.1.0].
    - Can only install one of: symfony/process[v4.0.6, v3.1.0].
    - Can only install one of: symfony/process[v4.0.7, v3.1.0].
    - Can only install one of: symfony/process[v4.0.8, v3.1.0].
    - Can only install one of: symfony/process[v4.0.9, v3.1.0].
    - Installation request for symfony/process (locked at v3.1.0) -> satisfiable by symfony/process[v3.1.0].


Installation failed, reverting ./composer.json to its original content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.