Skip to content

Commit

Permalink
FIX Move phpcs to composer dependency, update Travis for it, add 7.2 …
Browse files Browse the repository at this point in the history
…to Travis
  • Loading branch information
robbieaverill committed Oct 15, 2018
1 parent b85c549 commit ab259af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ matrix:
env: DB=PGSQL PHPUNIT_TEST=1
- php: 7.1.2
env: DB=MYSQL PDO=1 PHPUNIT_TEST=1
- php: 7.2
env: DB=MYSQL PHPUNIT_TEST=1

before_script:
# Init PHP
Expand All @@ -28,11 +30,9 @@ before_script:
- echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

# Install composer dependencies
- export PATH=~/.composer/vendor/bin:$PATH
- composer require --no-update --prefer-dist silverstripe/recipe-cms:4.3.x-dev
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.1.x-dev --prefer-dist; fi
- if [[ $DB == SQLITE ]]; then composer require --no-update silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
"silverstripe/vendor-plugin": "^1.0"
},
"require-dev": {
"phpunit/PHPUnit": "~5.7"
"phpunit/phpunit": "~5.7",
"squizlabs/php_codesniffer": "^3.0"
},
"extra": [],
"scripts": {
"lint": "phpcs -s src/ tests/"
"lint": "vendor/bin/phpcs -s src/ tests/"
},
"autoload": {
"psr-4": {
Expand All @@ -38,4 +39,4 @@
},
"minimum-stability": "dev",
"prefer-stable": true
}
}

0 comments on commit ab259af

Please sign in to comment.