Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

DevKit updates for 3.x branch #660

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ cache:
env:
global:
- PATH="$HOME/.local/bin:$PATH"
- SYMFONY_DEPRECATIONS_HELPER=max[self]=0
- TARGET=test
- UPSTREAM_URL=https://github.com/sonata-project/ecommerce.git
- PHPUNIT_VERSION=8

matrix:
fast_finish: true
Expand Down Expand Up @@ -55,6 +53,7 @@ install:
- if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi;

before_script:
- phpenv config-rm xdebug.ini
- if [ -x .travis/before_script_${TARGET}.sh ]; then .travis/before_script_${TARGET}.sh; fi;

script: make $TARGET
Expand Down
5 changes: 2 additions & 3 deletions .travis/install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ set -ev

mkdir --parents "${HOME}/bin"

wget "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" --output-document="${HOME}/bin/phpunit"
chmod u+x "${HOME}/bin/phpunit"

# Coveralls client install
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar --output-document="${HOME}/bin/coveralls"
chmod u+x "${HOME}/bin/coveralls"

pecl install pcov

composer update --prefer-dist --no-interaction --prefer-stable ${COMPOSER_FLAGS}
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,11 @@ cs-fix-xml:
build:
mkdir $@

HAS_XDEBUG=$(shell php --modules|grep --quiet xdebug;echo $$?)

build/xdebug-filter.php: phpunit.xml.dist build
ifeq ($(HAS_XDEBUG), 0)
phpunit --dump-xdebug-filter $@
endif

test: build/xdebug-filter.php
ifeq ($(HAS_XDEBUG), 0)
phpunit --prepend build/xdebug-filter.php -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
test:
ifeq ($(shell php --modules|grep --quiet pcov;echo $$?), 0)
vendor/bin/simple-phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
else
phpunit -c phpunit.xml.dist
vendor/bin/simple-phpunit -c phpunit.xml.dist
endif
.PHONY: test

Expand Down
9 changes: 4 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ It's auto-generated by sonata-project/dev-kit package.
</testsuite>
</testsuites>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>

<php>
<ini name="precision" value="8"/>
<ini name="precision" value="8" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
<env name="SYMFONY_PHPUNIT_REMOVE" value="symfony/yaml" />
<env name="SYMFONY_PHPUNIT_VERSION" value="8.5.0" />
</php>

</phpunit>