Skip to content

Commit

Permalink
DevKit updates (#5220)
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Sep 12, 2018
1 parent b65e62c commit 9aa22d4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Expand Up @@ -61,6 +61,10 @@ matrix:
env: SONATA_BLOCK=3.*
- php: '7.2'
env: SONATA_BLOCK='dev-master as 3.x-dev'
- php: '7.2'
env: SYMFONY_MAKER=1.7.*
- php: '7.2'
env: SYMFONY_MAKER='dev-master as 1.7.x-dev'
- php: '7.2'
env: SYMFONY_DEPRECATIONS_HELPER=0
allow_failures:
Expand All @@ -69,6 +73,7 @@ matrix:
- env: SYMFONY='dev-master as 3.4.x-dev'
- env: SONATA_CORE='dev-master as 3.x-dev'
- env: SONATA_BLOCK='dev-master as 3.x-dev'
- env: SYMFONY_MAKER='dev-master as 1.7.x-dev'

before_install:
- git remote add upstream ${UPSTREAM_URL} && git fetch --all
Expand Down
17 changes: 13 additions & 4 deletions .travis/before_install_test.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
set -ev

PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/"
Expand All @@ -9,6 +9,15 @@ echo "memory_limit=3072M" >> "$TRAVIS_INI_FILE"

sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
if [ "$SONATA_CORE" != "" ]; then composer require "sonata-project/core-bundle:$SONATA_CORE" --no-update; fi;
if [ "$SONATA_BLOCK" != "" ]; then composer require "sonata-project/block-bundle:$SONATA_BLOCK" --no-update; fi;
if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
if [ "$SONATA_CORE" != "" ]; then composer require "sonata-project/core-bundle:$SONATA_CORE" --no-update; fi;
if [ "$SONATA_BLOCK" != "" ]; then composer require "sonata-project/block-bundle:$SONATA_BLOCK" --no-update; fi;
# TODO: remove when drop PHP 5 support
# symfony/maker-bundle only works with PHP 7 and higher
if [ "${TRAVIS_PHP_VERSION:0:3}" != "5.6" ]; then
# but only with Symfony 3.4 and higher
if [[ -z "${SYMFONY}" || ("${SYMFONY:0:3}" != "2.8" && "${SYMFONY:0:3}" != "3.3") ]]; then
composer require "symfony/maker-bundle:${SYMFONY_MAKER:=1.7}" --no-update
fi
fi

7 changes: 6 additions & 1 deletion .travis/install_test.sh
Expand Up @@ -4,7 +4,12 @@ set -ev
mkdir --parents "${HOME}/bin"

# PHPUnit install
wget "https://phar.phpunit.de/phpunit-5.7.phar" --output-document="${HOME}/bin/phpunit"
if [ "${TRAVIS_BRANCH}" = 'master' ]; then
PHPUNIT_VERSION=7
else
PHPUNIT_VERSION=5.7
fi
wget "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" --output-document="${HOME}/bin/phpunit"
chmod u+x "${HOME}/bin/phpunit"

# Coveralls client install
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Expand Up @@ -14,7 +14,6 @@ It's auto-generated by sonata-project/dev-kit package.
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
Expand Down

0 comments on commit 9aa22d4

Please sign in to comment.