diff --git a/.gitignore b/.gitignore index 3441887..a6c2b5a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,17 +5,4 @@ composer.lock # Tests tests/cov/ tests/.phpunit.result.cache - -# Composer binaries -bin/phpunit -bin/php-cs-fixer -bin/phpstan -bin/phpstan.phar - -# Vim -.*.swp - -# IDEs -/.idea - .php_cs.cache diff --git a/.travis.yml b/.travis.yml index db5298e..a72ecf6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,10 @@ php: matrix: fast_finish: true -install: - - composer require --dev phpstan/phpstan:^0.12 - before_script: - composer install script: - - ./bin/php-cs-fixer fix lib/ --dry-run --diff - - ./bin/phpstan.phar analyse -c phpstan.neon lib - - ./bin/phpunit --configuration tests/phpunit.xml + - php vendor/bin/php-cs-fixer fix --dry-run --diff + - php vendor/bin/phpstan.phar analyse -c phpstan.neon lib tests + - php vendor/bin/phpunit --configuration tests/phpunit.xml diff --git a/composer.json b/composer.json index 2579abc..e021ff4 100644 --- a/composer.json +++ b/composer.json @@ -29,9 +29,23 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.16.1", + "phpstan/phpstan": "^0.12", "phpunit/phpunit" : "^7 || ^8" }, - "config" : { - "bin-dir" : "bin/" + "scripts": { + "phpstan": [ + "@php vendor/bin/phpstan analyse lib tests" + ], + "cs-fixer": [ + "@php vendor/bin/php-cs-fixer fix" + ], + "phpunit": [ + "@php vendor/bin/phpunit --configuration tests/phpunit.xml" + ], + "test": [ + "composer phpstan", + "composer cs-fixer", + "composer phpunit" + ] } } diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 04004c4..0e616fe 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -6,7 +6,6 @@ convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutOutputDuringTests="true" - enforceTimeLimit="true" >