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

Composer "test" not running #388

Closed
090809 opened this issue Feb 11, 2020 · 8 comments
Closed

Composer "test" not running #388

090809 opened this issue Feb 11, 2020 · 8 comments
Assignees
Labels

Comments

@090809
Copy link

090809 commented Feb 11, 2020

Composer run-script test not running, but "test" is present in composer.json.
Previously (yesterday) it work's fine.

SMTH goes wrong?

@dzuelke
Copy link
Contributor

dzuelke commented Feb 13, 2020

Sorry but this is info is a bit meager... please provide more info, otherwise this is a useless bug report that we can't do anything about.

  • are you using Heroku CI?
  • what does "not running" mean?
  • is Heroku CI erroring, or failing?
  • what's the error message?
  • what stack are you on?
  • what version of PHP are you on?
  • what version of PHP were you on previously?
  • is this failure on the same app that worked before, or a new app?
  • etc etc etc

@090809
Copy link
Author

090809 commented Feb 13, 2020

Using Gitlab Ci
Not running, doesn't found anything
Using - php (7.4.2)
No any updates was done. It's start crash at test in 2 different projects at same time.
And it crash in any new project

crash error

Thanks for reply

@dzuelke
Copy link
Contributor

dzuelke commented Feb 14, 2020

So it's using Herokuish or something, on Gitlab CI?

Sorry, can't provide support for that. You need to figure it out yourself. Might be PHP 7.4 related.

@dzuelke dzuelke closed this as completed Feb 14, 2020
@mkopinsky
Copy link

I'm getting the same problem on heroku, with PHP 7.4.

-----> Running PHP buildpack tests...
Trying to auto-detect test framework; first match will be found. You may use composer script 'test', or app.json, to specify what to run.
No tests found. Please use composer script 'test', or app.json, to specify what to run.
-----> PHP buildpack tests failed with exit status 1

My composer does have a test script in composer.json and this used to work. Forcing PHP <7.4.0 (i.e. using 7.3.14) it does work.

If you have heroku sudo power and want to look at logs, feel free: https://dashboard.heroku.com/pipelines/d8323639-09f9-4e7e-b697-212bc21c3418/tests/335

Otherwise I'm happy to share whatever else would help debug.

@dzuelke
Copy link
Contributor

dzuelke commented Jul 21, 2020

Is this still an issue for people? I can't reproduce it; it works fine in our CI tests too (there's a bunch of test cases just for this stuff).

@dzuelke dzuelke reopened this Jul 21, 2020
@dzuelke dzuelke added the bug label Jul 21, 2020
@dzuelke dzuelke self-assigned this Jul 21, 2020
@090809
Copy link
Author

090809 commented Jul 21, 2020

After v174 this error didn't appear

@dzuelke
Copy link
Contributor

dzuelke commented Jul 21, 2020

Bizarre. Nothing changed other than the usual PHP version bumps. But who knows, might have been a runtime bug. Glad to hear it's sorted!

@dzuelke dzuelke closed this as completed Jul 21, 2020
@dzuelke dzuelke reopened this Aug 13, 2020
@dzuelke
Copy link
Contributor

dzuelke commented Aug 13, 2020

Found out the reason.

In PHP 7.4, fwrite() now returns a falsey status more often. This can sometimes happen when e.g. running program | grep -q thismatches, then grep closes stdin upon a match and program will not be able to write output, causing an error.

This is worked around in Symfony: symfony/symfony#36222, but internally, Composer uses really old versions of course for BC with older PHP releases.

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

No branches or pull requests

3 participants