Skip to content

Commit

Permalink
Fix dependencies (#540)
Browse files Browse the repository at this point in the history
- Move back PHPUnit as a dev dependency: as a tool executing the project code, it must be compatible with the code it runs
- To avoid any potential common package version mismatch between the Symfony bridge and alice (e.g. for `symfony/yaml`), the dependencies must be run as a whole
  • Loading branch information
theofidry authored Sep 6, 2016
1 parent 52b9756 commit 2c09e71
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 30 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ install:
script:
- |
if [ -n "$COVERAGE" ]; then
phpdbg -qrr vendor/bin/phpunit -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS --testdox --coverage-text --exclude-group=integration,symfony
phpdbg -qrr bin/phpunit -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS --testdox --coverage-text --exclude-group=integration,symfony
if [ -n "$SYMFONY_VERSION" ]; then
phpdbg -qrr vendor/bin/phpunit -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS --coverage-text --group=symfony
phpdbg -qrr bin/phpunit -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS --coverage-text --group=symfony
else
phpdbg -qrr vendor/bin/phpunit -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS --coverage-text --group=integration --exclude-group=symfony
phpdbg -qrr bin/phpunit -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS --coverage-text --group=integration --exclude-group=symfony
fi
else
if [ -n "$SYMFONY_VERSION" ]; then
vendor/bin/phpunit -c $PHPUNIT_CONFIG --stop-on-failure --group=symfony
bin/phpunit -c $PHPUNIT_CONFIG --stop-on-failure --group=symfony
else
vendor/bin/phpunit -c $PHPUNIT_CONFIG --stop-on-failure --exclude-group=symfony
bin/phpunit -c $PHPUNIT_CONFIG --stop-on-failure --exclude-group=symfony
fi
fi
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
"require": {
"php": "^7.0",
"fzaninotto/faker": "^1.0",
"symfony/yaml": "^2.0||^3.0",
"myclabs/deep-copy": "^1.5",
"symfony/phpunit-bridge": "^3.1",
"symfony/property-access": "^2.2||^3.0",
"myclabs/deep-copy": "^1.5"
"symfony/yaml": "^2.0||^3.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^0.0.1"
"bamarni/composer-bin-plugin": "^0.0.1",
"phpunit/phpunit": "^5.5"
},
"scripts": {
"post-install-cmd": ["@composer bin all install --ansi"]
Expand Down
2 changes: 1 addition & 1 deletion phpunit_symfony.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
backupGlobals="false"
bootstrap="tests/Bridge/Symfony/autoload.php"
bootstrap="vendor-bin/symfony/vendor/autoload.php"
colors="true"
enforceTimeLimit="true"
>
Expand Down
13 changes: 0 additions & 13 deletions tests/Bridge/Symfony/autoload.php

This file was deleted.

7 changes: 0 additions & 7 deletions vendor-bin/phpunit/composer.json

This file was deleted.

3 changes: 2 additions & 1 deletion vendor-bin/symfony/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"require": {
"symfony/symfony": "^3.1"
"symfony/symfony": "^3.1",
"nelmio/alice": "dev-master"
}
}

0 comments on commit 2c09e71

Please sign in to comment.