Skip to content

Commit 8f1d9d2

Browse files
Merge branch '3.4' into 4.3
* 3.4: Run the phpunit-bridge from a PR
2 parents 1b56d7f + 5d0711f commit 8f1d9d2

File tree

6 files changed

+21
-434
lines changed

6 files changed

+21
-434
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,22 @@ before_install:
181181
fi
182182
183183
install:
184+
- |
185+
# Install the phpunit-bridge from a PR if required
186+
#
187+
# To run a PR with a patched phpunit-bridge, first submit the path for the
188+
# phpunit-bridge as a separate PR against the next feature-branch then
189+
# uncomment and update the following line with that PR number
190+
#SYMFONY_PHPUNIT_BRIDGE_PR=32886
191+
192+
if [[ $SYMFONY_PHPUNIT_BRIDGE_PR ]]; then
193+
git fetch origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head
194+
git rm -rq src/Symfony/Bridge/PhpUnit
195+
git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit
196+
SYMFONY_VERSION=$(cat src/Symfony/Bridge/PhpUnit/composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
197+
sed -i 's/"symfony\/phpunit-bridge": ".*"/"symfony\/phpunit-bridge": "'$SYMFONY_VERSION'.x@dev"/' composer.json
198+
fi
199+
184200
- |
185201
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
186202
if [[ ! $deps ]]; then
@@ -193,6 +209,10 @@ install:
193209
mv composer.json composer.json.phpunit &&
194210
mv composer.json.orig composer.json
195211
fi
212+
if [[ $SYMFONY_PHPUNIT_BRIDGE_PR ]]; then
213+
git rm -fq -- src/Symfony/Bridge/PhpUnit/composer.json
214+
git diff --staged -- src/Symfony/Bridge/PhpUnit/ | git apply -R --index
215+
fi
196216
197217
- |
198218
# 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

Lines changed: 0 additions & 35 deletions
This file was deleted.

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

Lines changed: 0 additions & 306 deletions
This file was deleted.

0 commit comments

Comments
 (0)