phpunit
phpunit copied to clipboard
use current directory for default cache path
As phpunit command path seems a poor default:
- will result on vendor/bin/phpunit in most case
- will result on some global directory when global phpunit is used (phar) thus being used for "all" projects.
Open against master, but will be nice to have a better default in 8.x and 9.x
P.S. seems minor, as will only affects project without configuration file, as in most case path to configuration will be used.
Codecov Report
Merging #4300 into master will increase coverage by
0.01%
. The diff coverage is66.66%
.
@@ Coverage Diff @@
## master #4300 +/- ##
============================================
+ Coverage 84.70% 84.71% +0.01%
Complexity 4562 4562
============================================
Files 257 257
Lines 11484 11484
============================================
+ Hits 9727 9729 +2
+ Misses 1757 1755 -2
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
src/TextUI/TestRunner.php | 63.80% <66.66%> (+0.16%) |
218.00 <0.00> (ø) |
|
src/Runner/DefaultTestResultCache.php | 93.65% <0.00%> (+1.58%) |
29.00% <0.00%> (ø%) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5d5b6ec...34d04e1. Read the comment docs.
master
is what will become PHPUnit 9.3 in August. I am open to have this is in 8.5
for PHPUnit 8.5 as well.
May result in some error such as:
Warning: file_put_contents(/usr/bin/.phpunit.result.cache): failed to open stream: Permission denied in ...
@remicollet I agree that we should try to address this, and thank you for sending this pull request. But please note that the PHPUnit documentation explicitly advises against installing PHPUnit globally:
Please note that it is not recommended to install PHPUnit globally, as
/usr/bin/phpunit
or/usr/local/bin/phpunit
, for instance.
@remicollet thanks for looking into this, I will have a good look. I'm in favour of cleaner solutions for the cache file management.
Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.