Skip to content

Commit

Permalink
Merge pull request #107 from Dealerdirect/feature/allow-use-with-phpc…
Browse files Browse the repository at this point in the history
…s-4.x

Test with PHPCS 4.x and allow installation when using PHPCS 4.x
  • Loading branch information
Potherca committed Apr 6, 2020
2 parents 3d902fb + 89761e7 commit 7c75210
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Expand Up @@ -77,12 +77,16 @@ jobs:
dist: precise
env: PHPCS_VERSION="2.0.0"

- php: 7.4
env: PHPCS_VERSION="4.0.x-dev as 3.9.99"

- php: nightly
env: PHPCS_VERSION="dev-master" LINT=1

allow_failures:
# Allow failures for unstable builds.
- php: "nightly"
- env: PHPCS_VERSION="4.0.x-dev as 3.9.99"

fast_finish: true

Expand All @@ -91,7 +95,7 @@ before_install:
phpenv config-rm xdebug.ini || echo 'No xdebug config.'

install:
- composer require --no-update --no-suggest --no-scripts squizlabs/php_codesniffer:${PHPCS_VERSION}
- composer require --no-update --no-suggest --no-scripts squizlabs/php_codesniffer:"${PHPCS_VERSION}"
- |
if [[ ${PHPCS_VERSION:0:3} < "2.2" ]]; then
# Install PHPCompatibility 7.x for PHPCS < 2.2.
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Expand Up @@ -25,13 +25,15 @@
"require": {
"php": ">=5.3",
"composer-plugin-api": "^1.0",
"squizlabs/php_codesniffer": "^2 || ^3"
"squizlabs/php_codesniffer": "^2 || ^3 || 4.0.x-dev"
},
"require-dev": {
"composer/composer": "*",
"sensiolabs/security-checker": "^4.1.0",
"phpcompatibility/php-compatibility": "^9.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
Expand Down

0 comments on commit 7c75210

Please sign in to comment.