Skip to content

Commit 7bdd8ff

Browse files
Run the phpunit-bridge from a PR
1 parent 8173daf commit 7bdd8ff

6 files changed

+21
-434
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ vendor/
22
composer.lock
33
phpunit.xml
44
.php_cs.cache
5+
.phpunit.result.cache
56
composer.phar
67
package.tar
78
/packages.json

.travis.yml

+20
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,22 @@ before_install:
194194
fi
195195
196196
install:
197+
- |
198+
# Install the phpunit-bridge from a PR if required
199+
#
200+
# To run a PR with a patched phpunit-bridge, first submit the path for the
201+
# phpunit-bridge as a separate PR against the next feature-branch then
202+
# uncomment and update the following line with that PR number
203+
#SYMFONY_PHPUNIT_BRIDGE_PR=32886
204+
205+
if [[ $SYMFONY_PHPUNIT_BRIDGE_PR ]]; then
206+
git fetch origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head
207+
git rm -rq src/Symfony/Bridge/PhpUnit
208+
git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit
209+
SYMFONY_VERSION=$(cat src/Symfony/Bridge/PhpUnit/composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
210+
sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_VERSION'.x@dev"/' composer.json
211+
fi
212+
197213
- |
198214
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
199215
if [[ ! $deps ]]; then
@@ -206,6 +222,10 @@ install:
206222
mv composer.json composer.json.phpunit &&
207223
mv composer.json.orig composer.json
208224
fi
225+
if [[ $SYMFONY_PHPUNIT_BRIDGE_PR ]]; then
226+
git rm -fq -- src/Symfony/Bridge/PhpUnit/composer.json
227+
git diff --staged -- src/Symfony/Bridge/PhpUnit/ | git apply -R --index
228+
fi
209229
210230
- |
211231
# For the master branch, when deps=high, the version before master is checked out and tested with the locally patched components

src/Symfony/Bridge/PhpUnit/ForwardCompatTestTrait.php

-35
This file was deleted.

src/Symfony/Bridge/PhpUnit/Legacy/ForwardCompatTestTraitForV5.php

-306
This file was deleted.

0 commit comments

Comments
 (0)