-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from jwage/code-cleanup
Add phpstan, doctrine cs standards, travis ci updates, scrutinizer ci
- Loading branch information
Showing
25 changed files
with
3,275 additions
and
787 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,4 +1,5 @@ | ||
vendor | ||
composer.lock | ||
data/public-suffix-list.txt | ||
phpunit.xml | ||
.phpcs-cache | ||
|
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 | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
- nightly | ||
|
||
matrix: | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
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: nightly | ||
|
||
include: | ||
- php: 5.3 | ||
dist: precise | ||
- 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 | ||
|
||
before_script: composer install | ||
- 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
Oops, something went wrong.