Skip to content

Commit

Permalink
Try to install codesniffer with composer global
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Jul 20, 2017
1 parent bc621e8 commit 118dd37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@ before_script:
- composer self-update --snapshot

# Install composer dependencies
- export PATH=~/.composer/vendor/bin:$PATH
- composer validate
- composer install --prefer-dist --no-interaction --no-progress --no-suggest
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist --no-interaction --no-progress --no-suggest; fi
- if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist --no-interaction --no-progress --no-suggest; fi
- composer require silverstripe/config:1.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --prefer-dist --no-interaction --no-progress --no-suggest
- if [[ $PHPUNIT_TEST == cms ]] || [[ $BEHAT_TEST == cms ]]; then composer require silverstripe/cms:4.0.x-dev silverstripe/campaign-admin:1.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/reports:4.0.x-dev --prefer-dist --no-interaction --no-progress --no-suggest; fi
- composer dump-autoload --optimize
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi

# Bootstrap dependencies
- if [[ $PHPUNIT_TEST == cms ]] || [[ $BEHAT_TEST == cms ]]; then php ./cms/tests/bootstrap/mysite.php; fi
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
"silverstripe/versioned": "^1.0@dev",
"silverstripe/behat-extension": "^3",
"silverstripe/serve": "dev-master",
"se/selenium-server-standalone": "2.41.0",
"squizlabs/php_codesniffer": "^3"
"se/selenium-server-standalone": "2.41.0"
},
"provide": {
"psr/container-implementation": "1.0.0"
Expand Down Expand Up @@ -95,8 +94,8 @@
"thirdparty/"
],
"scripts": {
"lint": "vendor/bin/phpcs src/ tests/php",
"lint-clean": "vendor/bin/phpcbf src/ tests/php",
"lint": "phpcs src/ tests/php",
"lint-clean": "phpcbf src/ tests/php",
"php-peg": "php thirdparty/php-peg/cli.php src/View/SSTemplateParser.peg > src/View/SSTemplateParser.php"
},
"minimum-stability": "dev",
Expand Down

0 comments on commit 118dd37

Please sign in to comment.