diff --git a/.gitignore b/.gitignore index f8270881..7aa9b49e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,6 @@ -build/phar -build/SebastianBergmann -build/phpcpd.bat -build/phpcpd.php -build/*.phar* -build/*.tgz -.idea -cache.properties -composer.phar -composer.lock -vendor +/build/phar +/build/*.phar* +/.idea +/composer.lock +/vendor +/tools diff --git a/.travis.yml b/.travis.yml index 6ebdd323..cd959e02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,28 @@ language: php -install: - - travis_retry composer install --no-interaction --prefer-source - php: - 5.6 - 7.0 - - hhvm + - 7.1 + - nightly + +env: + matrix: + - DEPENDENCIES="high" + - DEPENDENCIES="low" -script: phpunit --configuration ./build/travis-ci.xml +sudo: false + +before_install: + - composer self-update + - composer clear-cache + +install: + - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable; fi + - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable --prefer-lowest; fi -matrix: - allow_failures: - - php: hhvm +script: + - phpunit notifications: email: false diff --git a/build.xml b/build.xml index 7aa88e6c..044db3d6 100644 --- a/build.xml +++ b/build.xml @@ -1,151 +1,117 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/travis-ci.xml b/build/travis-ci.xml deleted file mode 100644 index 278acef8..00000000 --- a/build/travis-ci.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - ../tests - - - - - - - - - ../src - - - - diff --git a/composer.json b/composer.json index 5f8a12a0..bcfe8b9c 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,12 @@ "issues": "https://github.com/sebastianbergmann/phpcpd/issues" }, "require": { - "php": ">=5.6", - "sebastian/finder-facade": "~1.1", - "sebastian/version": "~1.0|~2.0", - "symfony/console": "~2.7|^3.0", - "phpunit/php-timer": ">=1.0.6", - "theseer/fdomdocument": "~1.4" + "php": "^5.6|^7.0", + "sebastian/finder-facade": "^1.1", + "sebastian/version": "^2.0", + "symfony/console": "^3.0", + "phpunit/php-timer": "^1.0.6", + "theseer/fdomdocument": "^1.4" }, "autoload": { "classmap": [ diff --git a/composer/bin/phpcpd b/composer/bin/phpcpd deleted file mode 100755 index 5fea6f25..00000000 --- a/composer/bin/phpcpd +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -$files = array( - __DIR__ . '/../../vendor/autoload.php', - __DIR__ . '/../../../../autoload.php' -); - -$found = FALSE; - -foreach ($files as $file) { - if (file_exists($file)) { - require $file; - - $found = TRUE; - - break; - } -} - -if (!$found) { - die( - 'You need to set up the project dependencies using the following commands:' . PHP_EOL . - 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . - 'php composer.phar install' . PHP_EOL - ); -} - -$application = new SebastianBergmann\PHPCPD\CLI\Application; -$application->run(); diff --git a/phive.xml b/phive.xml new file mode 100644 index 00000000..f89b7581 --- /dev/null +++ b/phive.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/build/phpunit.xml b/phpunit.xml similarity index 72% rename from build/phpunit.xml rename to phpunit.xml index 002e8c5b..c401ba82 100644 --- a/build/phpunit.xml +++ b/phpunit.xml @@ -1,21 +1,20 @@ - ../tests + tests - ../src + src