-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require PHP 7.1, add phpstan, Doctrine coding standards, add scrutini…
…zer and update travis ci.
- Loading branch information
Showing
15 changed files
with
3,051 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# PhpStorm | ||
/.idea | ||
|
||
vendor | ||
composer.lock | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
build: | ||
nodes: | ||
analysis: | ||
environment: | ||
php: | ||
version: 7.1 | ||
cache: | ||
disabled: false | ||
directories: | ||
- ~/.composer/cache | ||
project_setup: | ||
override: true | ||
tests: | ||
override: | ||
- php-scrutinizer-run | ||
- phpcs-run | ||
dependencies: | ||
override: | ||
- composer install --ignore-platform-reqs --no-interaction | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
|
||
build_failure_conditions: | ||
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed | ||
- 'issues.label("coding-style").new.exists' # No new coding style issues allowed | ||
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity | ||
- 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,56 @@ | ||
dist: trusty | ||
sudo: false | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
- nightly | ||
|
||
before_script: composer install | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
matrix: | ||
before_install: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available" | ||
- travis_retry composer self-update | ||
- travis_retry composer config --unset platform.php | ||
|
||
install: | ||
- rm composer.lock | ||
- travis_retry composer update --prefer-dist | ||
|
||
script: | ||
- ./vendor/bin/phpunit | ||
|
||
jobs: | ||
allow_failures: | ||
- php: hhvm | ||
- php: nightly | ||
fast_finish: true | ||
|
||
include: | ||
- stage: Test | ||
env: DEPENDENCIES=low | ||
install: | ||
- rm composer.lock | ||
- travis_retry composer update --prefer-dist --prefer-lowest | ||
|
||
- stage: Test | ||
env: COVERAGE | ||
before_script: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} | ||
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi | ||
script: | ||
- ./vendor/bin/phpunit --coverage-clover clover.xml | ||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover clover.xml | ||
|
||
- stage: Code Quality | ||
env: CODING_STANDARDS | ||
install: travis_retry composer install --prefer-dist | ||
script: ./vendor/bin/phpcs | ||
|
||
- stage: Code Quality | ||
env: STATIC_ANALYSIS | ||
install: travis_retry composer install --prefer-dist | ||
script: vendor/bin/phpstan analyse -l 7 -c phpstan.neon src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.