diff --git a/build.xml b/build.xml index a4a2a95..594cf4b 100644 --- a/build.xml +++ b/build.xml @@ -1,28 +1,30 @@ + - + - + - + + depends="build:app, + build:tests" + /> - - + + - - + + diff --git a/phing/app.xml b/phing/app.xml index 464a2f1..5688569 100644 --- a/phing/app.xml +++ b/phing/app.xml @@ -1,107 +1,104 @@ + - + - + - + - + + /> + depends="app:clean, + app:composer:self-update, + app:composer:install, + app:composer:validate, + app:checkout" + /> - - - + - + + + - - - - + - + - + + + - - - - - - + + + + + - - + - + - - - - - + - + - - + - + @@ -121,40 +118,24 @@ - - - - - - - - - - - + + - - + - - - + - - - - @@ -164,9 +145,7 @@ - - - + @@ -174,16 +153,14 @@ - - - + - + diff --git a/phing/composer-install.sh b/phing/composer-install.sh new file mode 100644 index 0000000..1a951a2 --- /dev/null +++ b/phing/composer-install.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +EXPECTED_SIGNATURE="$(curl -L https://composer.github.io/installer.sig)" +# Original line (with wget): +# EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)" + +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +ACTUAL_SIGNATURE="$(php -r "echo hash_file('SHA384', 'composer-setup.php');")" + +if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] +then + >&2 echo 'ERROR: Invalid installer signature' + rm composer-setup.php + exit 1 +fi + +php composer-setup.php --quiet +RESULT=$? +rm composer-setup.php +exit $RESULT diff --git a/phing/filesets.xml b/phing/filesets.xml index 13dcb7f..c3aea0c 100644 --- a/phing/filesets.xml +++ b/phing/filesets.xml @@ -1,4 +1,5 @@ + diff --git a/phing/properties.dist b/phing/properties.dist index 9d5cf43..5c2c662 100644 --- a/phing/properties.dist +++ b/phing/properties.dist @@ -1,19 +1,3 @@ -# -------------------------------------------------------------------------------- -# Information -# -------------------------------------------------------------------------------- - -# Property files contain key/value pairs -# key = value -# -# Property keys may contain alphanumeric chars and colons, but -# not special chars. This way you can create pseudo-namespaces -# -# You can refer to values of other properties by enclosing their keys in "${}". -# Example: dir.js = ${dir.public}/js -# -# Everything behind the equal sign is the value, you do -# not have to enclose strings: text=This is some text, Your OS is ${php.os} - # -------------------------------------------------------------------------------- # Common, e.g. default environment # -------------------------------------------------------------------------------- @@ -36,20 +20,18 @@ cache.clearWithWarmup = false # Composer # -------------------------------------------------------------------------------- -composer.download_command = php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" - -# Path to composer executable or composer.phar file +# Command used to download Composer # -composer.path = composer.phar +composer.download_command = bash ${project.basedir}/phing/composer-install.sh + +# Path to composer executable or downloaded composer.phar file +# +composer.path = ${project.basedir}/composer.phar # Path to php executable used by composer # composer.php = php -# Self update of the composer -# -composer.self-update = false - # -------------------------------------------------------------------------------- # Directories # -------------------------------------------------------------------------------- @@ -67,7 +49,7 @@ dir.tests = ${project.basedir}/tests # Build directories # dir.build = ${project.basedir}/build -dir.reports = ${dir.build}/logs +dir.reports = ${dir.build}/reports dir.reports.pdepend = ${dir.reports}/pdepend dir.reports.coverage = ${dir.reports}/phpunit_coverage @@ -88,12 +70,15 @@ dir.docker.logs = ${dir.docker}/logs/nginx # Path of the PHP Coding Standards Fixer (http://cs.sensiolabs.org) # -tests.cs_fixer.path = ./vendor/bin/php-cs-fixer +tests.cs_fixer.command = ./vendor/bin/php-cs-fixer fix --verbose # Test database path # tests.database = ${dir.data.temporary}/database.sqlite -# Path of the framework used to run unit tests +# Paths of frameworks used to run tests: +# - PHPUnit (unit tests) +# - Infection (mutation tests) # -tests.framework.path = ./vendor/bin/phpunit --verbose --no-coverage +tests.phpunit.command = ./vendor/bin/phpunit --verbose --no-coverage +tests.mutation.command = ./vendor/bin/infection --threads=5 diff --git a/phing/tests.xml b/phing/tests.xml index 6eba11b..39de5a6 100644 --- a/phing/tests.xml +++ b/phing/tests.xml @@ -1,230 +1,136 @@ - - - + + - + - + - + - - - - - - + + + + + + - + - + depends="build:fix-coding-standards, + build:clean, + build:prepare, + build:check, + build:test, + app:checkout" + /> - - - - - - + + - - - - - - + depends="check:cs, + check:md, + check:cpd, + check:depend, + check:loc" + /> + depends="test:phpunit, + test:infection" + /> - - - - + + - - - - - - + + + - - - - - - + - - - - + + + + - - + - - + + - - - - + - - - + + + - - + - - - - + + + + - - + - + - - - - - - + + + + + + + + - + - - - + + +