From dc03668ed3b9be440a118f4b22984ac4016121de Mon Sep 17 00:00:00 2001 From: Niklas Natter Date: Mon, 7 Oct 2019 09:11:22 +0200 Subject: [PATCH] Add scripts to composer json, Execute phpstan in travis ci --- .travis.yml | 8 +++----- composer.json | 13 ++++++++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2de4ecc..020a397 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ matrix: - php: 7.3 env: - COMPOSER_FLAGS="--prefer-dist --no-interaction" + - PHPSTAN=true before_install: - echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini @@ -25,8 +26,5 @@ before_script: - COMPOSER_MEMORY_LIMIT=-1 travis_retry composer update $COMPOSER_FLAGS script: - - vendor/bin/phpunit - -notifications: - slack: - secure: "Gd3/1e0pBKvJv1UhWpBkWijJpmSWlarg6uPBJO0h4z1IpkZjd++jOjhmOQ7n+yMfuapQuJTcVOK0yIWu7orJoGAKFkBlMEIrLk1xMAG9phjjMLUO0FWgcQ3eVW5mTyfMBtClz4OL5wXckw17ohtXHDK8qnI0Hz9Qj8Rqgf2OZhM=" + - if [[ $PHPSTAN = true ]]; then composer phpstan; fi + - composer phpunit diff --git a/composer.json b/composer.json index 1d0b5d7..c1be09b 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,10 @@ "type": "sulu-bundle", "description": "The Sulu Bundle which provides themes", "license": "MIT", - "keywords": ["sulu", "theme"], + "keywords": [ + "sulu", + "theme" + ], "authors": [ { "name": "Sulu Community", @@ -33,5 +36,13 @@ "psr-4": { "Sulu\\Bundle\\ThemeBundle\\": "" } + }, + "scripts": { + "phpstan": [ + "vendor/bin/phpstan analyse" + ], + "phpunit": [ + "vendor/bin/phpunit" + ] } }