Skip to content

Commit 7c75210

Browse files
authored
Merge pull request #107 from Dealerdirect/feature/allow-use-with-phpcs-4.x
Test with PHPCS 4.x and allow installation when using PHPCS 4.x
2 parents 3d902fb + 89761e7 commit 7c75210

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,16 @@ jobs:
7777
dist: precise
7878
env: PHPCS_VERSION="2.0.0"
7979

80+
- php: 7.4
81+
env: PHPCS_VERSION="4.0.x-dev as 3.9.99"
82+
8083
- php: nightly
8184
env: PHPCS_VERSION="dev-master" LINT=1
8285

8386
allow_failures:
8487
# Allow failures for unstable builds.
8588
- php: "nightly"
89+
- env: PHPCS_VERSION="4.0.x-dev as 3.9.99"
8690

8791
fast_finish: true
8892

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

9397
install:
94-
- composer require --no-update --no-suggest --no-scripts squizlabs/php_codesniffer:${PHPCS_VERSION}
98+
- composer require --no-update --no-suggest --no-scripts squizlabs/php_codesniffer:"${PHPCS_VERSION}"
9599
- |
96100
if [[ ${PHPCS_VERSION:0:3} < "2.2" ]]; then
97101
# Install PHPCompatibility 7.x for PHPCS < 2.2.

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@
2525
"require": {
2626
"php": ">=5.3",
2727
"composer-plugin-api": "^1.0",
28-
"squizlabs/php_codesniffer": "^2 || ^3"
28+
"squizlabs/php_codesniffer": "^2 || ^3 || 4.0.x-dev"
2929
},
3030
"require-dev": {
3131
"composer/composer": "*",
3232
"sensiolabs/security-checker": "^4.1.0",
3333
"phpcompatibility/php-compatibility": "^9.0"
3434
},
35+
"minimum-stability": "dev",
36+
"prefer-stable": true,
3537
"autoload": {
3638
"psr-4": {
3739
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"

0 commit comments

Comments
 (0)