Skip to content

Commit

Permalink
Update PHPStan config (#205)
Browse files Browse the repository at this point in the history
* Update dependencies

* Ignore flow steps return type in phpstan checks

* Add phpstan-doctrine

* Include unit tests in phpstan analysis

* Add phpstan-phpunit plugin

* Add Symfony phpstan plugin

* Move phpstan includes to the top of the config

* Change phpstan symfony config to include test container

* Run PHPStan after PHPUnit

PHPStan requires access to a full warmed-up container, so running PHPStan after PHPUnit gives it access to the full container after unit tests has run

* Update path to test container xml

* Update PHPStan to the latest version

* Remove phpstan-phpunit

* Add php nightly to allowed failures in travis

* Remove phpstan-phpunit from the phpstan config

* Fix path to test container xml for phpstan

* Enable security checker in travis

* Update dependencies

* Fix path to coveralls script

* Remove r.js from bin folder

* Fix travis script to load npmassets

* Remove hipchat form travis config

* Add PHP 7.1 as a build stage in travis and enable slack notifications
  • Loading branch information
pierredup committed Sep 3, 2018
1 parent 84a39fc commit 5c25b2e
Show file tree
Hide file tree
Showing 11 changed files with 1,911 additions and 30,116 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ build/
vendor
bin/*
!bin/console
!bin/r.js
composer.phar
web/uploads/*
!web/uploads/.gitkeep
Expand Down
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ addons:

before_install:
- composer self-update
- composer global require "fxp/composer-asset-plugin"
- mysql -e 'create database solidinvoice_test;'

install:
- composer install -n
- rm bin/r.js && composer install -n --no-scripts # Hack to get npm-assets working after first composer install
- sed -i 's/base_url:\ null/base_url:\ http:\/\/127.0.0.1:9001/g' app/config/parameters.yml
- sed -i 's/database_name:\ solidinvoice/database_name:\ solidinvoice_test/g' app/config/parameters.yml

Expand All @@ -39,18 +41,23 @@ before_script:

jobs:
fast_finish: true
allow_failures:
- php: nightly
include:
- stage: unit
php: 7.2
php: 7.1
script:
- composer validate
#- php bin/console security:check
- ./bin/phpstan analyse ./src -vvv --level=1 -c phpstan.neon
- php bin/console security:check
- bash travis/phpunit.sh
- ./bin/phpstan analyse ./src -vvv --level=1 -c phpstan.neon
after_script:
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
- travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- travis_retry php ./bin/coveralls -v
- travis_retry php ./bin/php-coveralls -v
- stage: unit
php: 7.2
script: bash travis/phpunit.sh
- stage: unit
php: nightly
script: bash travis/phpunit.sh
Expand All @@ -63,16 +70,13 @@ jobs:
jwt:
secure: "bFt4pHewWZzmtSH4cKg3L9CRylqAPuVnBDTYGAFsWemLHx+kXHtB8JMCVEOg4M/Q1cUedB2kYJTr+H2/ZkEREIGWg76d+ODZaqKBz1vsU/s86QVZ92XhkCbr1lchwU6/cs/UxcVfkyfs9Bhh/lzSss42X/5Y50gxeE1eGXXVxoQ="
before_install:
- composer self-update
- mysql -e 'create database solidinvoice_test;'
- composer global require "fxp/composer-asset-plugin"
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq yarn=0.24.6-1
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout $(git describe --abbrev=0 --tags)) && source ~/.nvm/nvm.sh && nvm install 8.0
install:
- composer install -n
- sed -i 's/base_url:\ null/base_url:\ http:\/\/127.0.0.1:9001/g' app/config/parameters.yml
- sed -i 's/database_name:\ solidinvoice/database_name:\ solidinvoice_test/g' app/config/parameters.yml
- yarn
Expand Down Expand Up @@ -225,6 +229,5 @@ jobs:
# env: TEST_SUITE=saucelabs_ie_windows81

notifications:
hipchat:
rooms:
secure: Wc5cg/o//7DW9G0mosA5wmmECr9+R7S/FmVFvZU2mBBpfaE5nY873hePRrMK/Dhiu2aD5R/ll6d7b3mT7oiWzO/rMgQ+U/DcMmgqHYiYrtEz4umi+1EuSLURDAxyv3rDiXHhEWwbYcHfE1Tcfs07Aj4JWSZheploBRpg3iqzMbw=
slack:
secure: jAXgCz5/ZxAnFN/x73gH8may6Vd5OJsfg4bX/1/QcAybP5J77P7vBBnJNVU3vsjTBrl24cAyfqwE/bUz9ZqLGKb1P3RglLmZAIhE92V76QDE+zpbPxt2rGCBIdGFrkRCFsR4AthfjroTWg4cWA9GGxISkNj4+K3hcbKQZzs0nz7VzrXLX2IywwlcHV75XHy8SpAeGCG1ZqYqc6vVhO3E777kz9n+b5HoTYp8GiRbh7X0FKQ9CdzRdpvc217+0XoL+v6MWBWjAV2YOm7XcXsfe79U3Iip7Cs42q23G7KGNoF3292W+CiZ2w25B6YFvxiep+tcioCx2xMaWPZ7lYAApjh7O/mgJKBtd3hQUWNm0KKKyKnJ3g9b5ZX0qagkv3DFYo7vU/Y+41HIm1D2EckgBYTKkcnprCb9nmf19l6h+SKwiVZfJdQS8ScNfUtADBd7s8csjaM3jG7KCK4yKU4JQLvEQmlzyPE3ngXMjlb3U9NoloMZuN2ukhDF2oRedL4mP8j4S9JbyhTBytXXyzr5wMBzdpXgI3TZngbZM0d1wbbuGm9VEWLQG5PJQtW3WkX9bs7dzu5iRttjDyRfyKXF7ZVYmW59Ox3J54c8zNSQVy/uVdwrX4nvh8jPQ4oh3BJvsQwX+HbW9+tdRhyKBsH9l8JALRCfY4AP4TxziohMsMw=
Loading

0 comments on commit 5c25b2e

Please sign in to comment.