Closed kinglozzer closed 8 years ago
@kinglozzer, thanks for your PR! By analyzing the blame information on this pull request, I identified @sminnee and @chillu to be potential reviewers
@@ master #35 diff @@
===================================
Files 1 1
Lines 115 115
Methods 12 12
Messages 0 0
Branches 0 0
===================================
Hits 115 115
Misses 0 0
Partials 0 0
Powered by Codecov. Last updated by b49a345...17763e3
This patch seems completely reasonable though i suspect you problem is the prefer-stable setting :/
Note: this didn’t actually solve the problem below for me (as
--prefer-source
failed and fell back to dist, I’m looking into why - I think it may be a caching thing), but I thought this might be worth proposing anyway.Problem: I have two packages, lets say Package A and Package B. Package A has a
tests/TestCase.php
, Package B depends on Package A and Package B’s test classes extend Package A’sTestCase
:N.b: I’m not sure if this is a strange pattern? Doesn’t seem unreasonable to me...
If Package A has a
.gitattributes
that excludes thetests
directory from exports, thencomposer install --prefer-dist
will not include that directory either, so Package B’s tests will fail asTestCase
doesn’t exist.This PR adds the option to use
--prefer-source
for Composer installs, which clones the git repo so will include everything (it defaults to the current behaviour of--prefer-dist
).