Install PHPStan and PHPUnit via dev dependencies

This commit is contained in:
Dylan K. Taylor 2020-01-27 12:04:42 +00:00
parent 156ecd9bd8
commit 41d02003c2
4 changed files with 99 additions and 11 deletions

View File

@ -16,9 +16,12 @@ before_script:
- make install
- cd ..
- echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- composer install
script:
- composer install
- ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G
- ./vendor/bin/phpunit --bootstrap vendor/autoload.php --fail-on-warning tests/phpunit
- composer install --no-dev
- ./tests/travis.sh -t4
notifications:

View File

@ -73,5 +73,9 @@
"type": "vcs",
"url": "https://github.com/pmmp/Snooze"
}
]
],
"require-dev": {
"phpstan/phpstan": "^0.12.8",
"irstea/phpunit-shim": "^7.5"
}
}

92
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f693f278b3bb9c1d266079fa17644dcb",
"content-hash": "38e3ec606dda17c95dd5456b24af547b",
"packages": [
{
"name": "adhocore/json-comment",
@ -305,7 +305,95 @@
"time": "2020-01-14T16:23:26+00:00"
}
],
"packages-dev": [],
"packages-dev": [
{
"name": "irstea/phpunit-shim",
"version": "7.5.20",
"source": {
"type": "git",
"url": "https://gitlab.irstea.fr/pole-is/tools/phpunit-shim.git",
"reference": "81cd2d11e12165fddd2731033187dce4fbe8e013"
},
"require": {
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"php": "^7.1"
},
"replace": {
"phpunit/phpunit": "self.version"
},
"suggest": {
"ext-soap": "*",
"ext-xdebug": "*"
},
"bin": [
"phpunit"
],
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Shim repository for phpunit/phpunit",
"homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"shim",
"testing",
"xunit"
],
"time": "2020-01-09T03:20:19+00:00"
},
{
"name": "phpstan/phpstan",
"version": "0.12.8",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "62a552602b7586d82826231f2fd4cbfe39fe0b1d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/62a552602b7586d82826231f2fd4cbfe39fe0b1d",
"reference": "62a552602b7586d82826231f2fd4cbfe39fe0b1d",
"shasum": ""
},
"require": {
"php": "^7.1"
},
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.12-dev"
}
},
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"time": "2020-01-26T23:36:48+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {

View File

@ -14,13 +14,6 @@ while getopts "p:t:" OPTION 2> /dev/null; do
esac
done
[ ! -f phpstan.phar ] && echo "Downloading PHPStan..." && curl -sSLO https://github.com/phpstan/phpstan/releases/download/0.12.8/phpstan.phar
"$PHP_BINARY" phpstan.phar analyze --no-progress --memory-limit=2G || exit 1
echo "PHPStan scan succeeded"
[ ! -f phpunit.phar ] && echo "Downloading PHPUnit..." && curl https://phar.phpunit.de/phpunit-7.phar --silent --location -o phpunit.phar
"$PHP_BINARY" phpunit.phar --bootstrap vendor/autoload.php --fail-on-warning tests/phpunit || exit 1
#Run-the-server tests
DATA_DIR="test_data"
PLUGINS_DIR="$DATA_DIR/plugins"