mikeerickson / phpunit-pretty-result-printer

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

phpunit-printer.yml should not be in .gitignore #162

Closed arjenm closed 4 years ago

arjenm commented 4 years ago

Today I ran into a similar issue as #118

We use Satis to cache php-packages. And phpunit-printer.yml for version 0.27 was missing.

It seems Satis uses the composer "packaging" code, which honors .gitignore files by default: https://github.com/composer/satis/issues/601

Given that phpunit-printer.yml is actually an important part of this package, I'd think it should not be part of the .gitignore anyway...

mikeerickson commented 4 years ago

@arjenm This has been corrected in https://github.com/mikeerickson/phpunit-pretty-result-printer/releases/tag/0.28.0 but I am still a little puzzled as to why this is happening for a small subset of users. The aforementioned #118 comparison does not seem related, but we can confirm after you try this version.

arjenm commented 4 years ago

@mikeerickson Thanks for the quick response. The 0.28-zipfile from our Satis does have both phpunit-printer.yml files (root and src), in constrast to 0.27. So it does fix my issue :)

I agree its probably only similar due to the eventual error message; i.e. a message that phpunit-printer.yml was not found. The cause of why those files weren't there was probably very different.

I initially installed the 0.27 version outside of Satis; that way (the github way) Composer did install phpunit-printer.yml. Only after I realized our Satis wasn't correctly configured (it was limited to 0.26.*) did I discover that via that route, the file was missing.

I'm also not sure how new this behavior of either Satis or Composer is or what previous changes to .gitignore were relevant here. For instance our cached 0.26.2 zip-file from the 4th of april 2019 does have src/phpunit-printer.yml although, not the root phpunit-printer.yml.

So you'd have to find the subset of people that use Satis (or some other way of Composer packaged zip files), this package and "recently" updated it to a newer version. That's probably not a whole lot of people :)

mikeerickson commented 4 years ago

@arjenm well, at any rate I am glad it has fixed your issue. Quite an edge case, but that is software in a nutshell. Enjoy 🤓