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

Commit

Permalink
Merge 2.x into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Mar 17, 2020
2 parents f104ec7 + da097a2 commit 36ff420
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
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/SonataDoctrinePhpcrAdminBundle.git
- PHPUNIT_VERSION=8

matrix:
fast_finish: true
Expand Down Expand Up @@ -65,6 +63,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
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
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
2 changes: 0 additions & 2 deletions composer.json
Expand Up @@ -53,8 +53,6 @@
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"phpcr/phpcr": "^2.1",
"phpcr/phpcr-utils": "^1.4.0",
"sebastian/environment": "^1.3.4",
"sebastian/exporter": "^2.0",
"sonata-project/core-bundle": "^3.14",
"symfony-cmf/resource": "^1.0",
"symfony-cmf/resource-bundle": "^1.0",
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Expand Up @@ -33,6 +33,9 @@
<php>
<ini name="precision" value="8"/>
<env name="KERNEL_CLASS" value="Sonata\DoctrinePHPCRAdminBundle\Tests\Fixtures\App\Kernel" />
<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>
5 changes: 5 additions & 0 deletions tests/Fixtures/App/config/config.php
Expand Up @@ -17,6 +17,11 @@
$loader->import(CMF_TEST_CONFIG_DIR.'/default.php');
$loader->import(__DIR__.'/sonata_phpcr_admin.yml');
$loader->import(CMF_TEST_CONFIG_DIR.'/phpcr_odm.php');

$container->loadFromExtension('framework', [
'assets' => null,
]);

if (version_compare(Kernel::VERSION, '4.2', '<')) {
$container->loadFromExtension('framework', [
'fragments' => ['enabled' => true],
Expand Down

0 comments on commit 36ff420

Please sign in to comment.