Skip to content

Commit

Permalink
Merge pull request #142 from Majkl578/cs-4.0
Browse files Browse the repository at this point in the history
CS 4.0, version composer.lock, merge stages
  • Loading branch information
Ocramius authored Mar 5, 2018
2 parents 6a205be + ea01aa2 commit 9dafbaf
Show file tree
Hide file tree
Showing 16 changed files with 1,779 additions and 70 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.travis.yml export-ignore
phpunit.xml.dist export-ignore
/phpcs.xml.dist export-ignore
composer.lock export-ignore
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vendor/
composer.lock
build/
/phpcs.xml
/.phpcs-cache
22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ php:

before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- travis_retry composer self-update

install:
- rm composer.lock
- travis_retry composer -n --prefer-source install

script: ./vendor/bin/phpunit
Expand All @@ -24,21 +26,23 @@ jobs:
- php: nightly

include:
- stage: Coverage
- 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
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
- travis_retry php ocular.phar code-coverage:upload --format=php-clover clover.xml

- stage: Coding standard
script:
- ./vendor/bin/phpcs
- stage: Code Quality
env: CODING_STANDARDS
install: travis_retry composer install --prefer-dist
script: ./vendor/bin/phpcs

- stage: Lint
before_script:
- travis_retry composer require --dev --prefer-dist --prefer-stable phpstan/phpstan:^0.8
- stage: Code Quality
env: STATIC_ANALYSIS
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpstan analyse -l 3 lib
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"require-dev": {
"phpunit/phpunit": "^6.3",
"doctrine/coding-standard": "~2.1.0",
"squizlabs/php_codesniffer": "^3.0"
"doctrine/coding-standard": "^4.0",
"phpstan/phpstan-shim": "^0.9.2"
},
"autoload": {
"psr-4": { "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" }
Expand Down
Loading

0 comments on commit 9dafbaf

Please sign in to comment.