mikeerickson / phpunit-pretty-result-printer

PHPUnit Pretty Result Printer -- make your PHPUnit tests look pretty!
MIT License
1.2k stars 71 forks source link

socket_create() error in docker CI #146

Closed patrickomeara closed 5 years ago

patrickomeara commented 5 years ago

I've solved my issue, but thought I'd leave it here for others.

As of 0.25.1 anybar is enabled by default. If you are using the official PHP Docker image, sockets aren't enabled by default.

Phanybar tries to use socket_create() which was marking our test suite as passed when there were errors in the tests. Producing a false positive in our CI deployment.

Phanybar.php line 24:

Call to undefined function socket_create()  

sockets can either be turned on

RUN docker-php-ext-install sockets

or, if you don't need sockets for any other reason you can add cd-printer-anybar:false to phpunit-printer.yml

options:
  cd-printer-anybar: false

I recommend the latter option.

mikeerickson commented 5 years ago

Hmmm, this was resolved in a previous build but perhaps there was a regression. All code passes through Travis before it is deployed, something else must of triggered this.

I will take a closer look tomorrow and patch if necessary.