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

Symfony process ProcessTimedOutException #63

Closed
beyondcompute opened this issue Apr 17, 2018 · 12 comments
Closed

Symfony process ProcessTimedOutException #63

beyondcompute opened this issue Apr 17, 2018 · 12 comments

Comments

@beyondcompute
Copy link

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

@mykeels
Copy link

mykeels commented Jul 9, 2018

@beyondcompute I got around this by wrapping phpunit-watcher with nodemon.

nodemon --watch ./app --watch ./tests/ -e php --exec composer watch

Where composer watch is defined in my composer.json scripts as

"watch": [
     "phpunit-watcher watch"
]

and nodemon is set to watch for changes in php files existing in my app and tests directories

@beyondcompute
Copy link
Author

Thank you, @mykeels! 🙌

@mykeels
Copy link

mykeels commented Jul 17, 2018

Hey, @beyondcompute ... I found that setting the --timeout flag to 0 makes it run forever, so you may not have to wrap it with nodemon after all.

./vendor/bin/phpunit-watcher watch --timeout 0

@beyondcompute
Copy link
Author

Thanks again @mykeels! Thatʼs really good advice!

@joaoeduardo
Copy link

This flag doesn't work for me

@freekmurze
Copy link
Member

Closing this, as this is solved for most people.

@iandunn
Copy link
Contributor

iandunn commented Oct 23, 2019

This worked for me in composer.json, for version 1.11.1:

"config" : {
	"process-timeout": 0
},

I tried setting the env var for just the test:watch task...

"scripts" : {
	"test"       : "phpunit",
	"test:watch" : "COMPOSER_PROCESS_TIMEOUT=0 vendor/bin/phpunit-watcher watch"
}

...but couldn't get that working 🤷‍♂

iandunn added a commit to iandunn/gutenberg that referenced this issue Nov 18, 2020
This provides similar features for PHP tests that Jest provides for JavaScript tests.

The `process-timeout` option is disabled so that phpunit-watcher can run indefinitely. See spatie/phpunit-watcher#63 (comment)".
draganescu pushed a commit to WordPress/gutenberg that referenced this issue Nov 23, 2020
This provides similar features for PHP tests that Jest provides for JavaScript tests.

The `process-timeout` option is disabled so that phpunit-watcher can run indefinitely. See spatie/phpunit-watcher#63 (comment)".
@crux
Copy link

crux commented Apr 7, 2022

nothing of the above works :(

  1. COMPOSER_PROCESS_TIMEOUT=0
    has no effect.

  2. ./vendor/bin/phpunit-watcher watch --timeout 0
    does not even exists:

....
PHPUnit 9.5.20 #StandWithUkraine
Unknown option "--timeout"

@iandunn
Copy link
Contributor

iandunn commented Apr 7, 2022

Did you try config.process-timeout in composer.json? That's still working for me.

@crux
Copy link

crux commented Apr 7, 2022

I do not even use composer for running the script. What was finally working was adding a config file setting:

$ cat >> .phpunit-watcher.yml
phpunit:
  timeout: 180
^D

interestingly, I could not find a way to set this option via any other means, like phpunit.xml for example.

I realy hate this ecosystem. So many packages, so unbelievable bad quality, so much crappy software,

@iandunn
Copy link
Contributor

iandunn commented Oct 12, 2022

The new advice from the README file also worked for me:

"test:watch": [
      "Composer\\Config::disableProcessTimeout",
      "phpunit-watcher watch"
],

@marcusorjames
Copy link

I do not even use composer for running the script. What was finally working was adding a config file setting:

$ cat >> .phpunit-watcher.yml
phpunit:
timeout: 180
^D
interestingly, I could not find a way to set this option via any other means, like phpunit.xml for example.

I realy hate this ecosystem. So many packages, so unbelievable bad quality, so much crappy software,

Why this has received down votes I have no idea, it is the only thing that worked for me.

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

No branches or pull requests

7 participants