Skip to content

Commit 84612d5

Browse files
add php-cs-fixer only in 7.0, 7.1 and 7.2. Removed from PHP 7.3. Updated .travis.yml (now checks style
1 parent 4f15fb2 commit 84612d5

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ before_script:
4242

4343
script:
4444
- make tests TARGET=$TARGET
45+
- if [ "$TARGET" == "72" ] ; then make check-style ; fi
4546

4647
after_script:
4748
- cat /var/log/elasticsearch/*.log

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ doc:
8181
lint:
8282
${RUN_ENV} php-cs-fixer fix --allow-risky=yes
8383

84+
.PHONY: check-style
85+
check-style:
86+
${RUN_ENV} php-cs-fixer fix --allow-risky=yes --dry-run
87+
8488
.PHONY: loc
8589
loc:
8690
${RUN_ENV} cloc --by-file --xml --exclude-dir=build -out=build/cloc.xml .

env/elastica/Docker70

+2
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,7 @@ ENV PATH=/root/composer/vendor/bin:$PATH
3434

3535
COPY composer.json /root/composer/
3636

37+
RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0
38+
3739
# Install development tools, prefer source removed as automatic fallback now
3840
RUN composer global install

env/elastica/Docker71

+2
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,7 @@ ENV PATH=/root/composer/vendor/bin:$PATH
3434

3535
COPY composer.json /root/composer/
3636

37+
RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0
38+
3739
# Install development tools, prefer source removed as automatic fallback now
3840
RUN composer global install

env/elastica/Docker72

+2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ ENV PATH=/root/composer/vendor/bin:$PATH
3232

3333
COPY composer.json /root/composer/
3434

35+
RUN composer global require --no-update friendsofphp/php-cs-fixer:^2.0
36+
3537
# Install development tools, prefer source removed as automatic fallback now
3638
RUN composer global install

env/elastica/composer.json

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
],
1414
"require": {
1515
"php": "^7.0",
16-
"friendsofphp/php-cs-fixer": "^2.0",
1716
"mayflower/php-codebrowser": "~1.1",
1817
"pdepend/pdepend": "^2.5",
1918
"phploc/phploc": "^4.0",

0 commit comments

Comments
 (0)