aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Frans de Jonge <fransdejonge@gmail.com> 2019-04-01 23:49:32 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-04-01 23:49:32 +0200
commit9fab63765e20932852cb2bebaa4cca32c27d96de (patch)
tree19ad5c4f04e5613f666514f1663a7ed2e5f7b4f1
parentc2a339f2f8a5a9a44d5feaaa8a000f027873d7da (diff)
[CI] Add PHP 7.3 to Travis configuration (#2317)
This also requires an update of phpcs, since the old version won't run on PHP 7.3. By setting setting the tab-width to 40 it works around the behavior introduced in https://github.com/squizlabs/PHP_CodeSniffer/pull/1404 which erroneously interprets positioning spaces as indentation. ("If the line started with tabs, but had spaces after that, no error was thrown at all.") That makes any line lengths checks ineffective, but I think line length checks aren't very useful anyway. They're basically just a (very!) rough indication that you might want to consider some refactoring.
-rw-r--r--.travis.yml15
-rw-r--r--phpcs.xml7
2 files changed, 12 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index 1ec2aeb65..dbd4eb8f6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,16 @@
language: php
php:
- - '5.4'
- - '5.5'
- - '5.6'
- - '7.0'
- - '7.1'
- - '7.2'
+ - 5.4
+ - 5.5
+ - 5.6
+ - 7.0
+ - 7.1
+ - 7.2
+ - 7.3
install:
# newest version without https://github.com/squizlabs/PHP_CodeSniffer/pull/1404
- - composer global require squizlabs/php_codesniffer "<=3.0.0RC4"
+ - composer global require squizlabs/php_codesniffer
script:
- phpenv rehash
diff --git a/phpcs.xml b/phpcs.xml
index d79e2a4d9..c6cc44e80 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,7 +2,7 @@
<ruleset name="FreshRSS Ruleset">
<description>Created with the PHP Coding Standard Generator. https://edorian.github.com/php-coding-standard-generator/</description>
<!-- to circumvent https://github.com/squizlabs/PHP_CodeSniffer/pull/1404 -->
- <!--<arg name="tab-width" value="10"/>-->
+ <arg name="tab-width" value="40"/>
<exclude-pattern>./static</exclude-pattern>
<exclude-pattern>./vendor</exclude-pattern>
<exclude-pattern>./lib/SimplePie/</exclude-pattern>
@@ -33,8 +33,9 @@
<exclude-pattern>./app/SQL/install.sql.mysql.php</exclude-pattern>
<exclude-pattern>./app/SQL/install.sql.pgsql.php</exclude-pattern>
<properties>
- <property name="lineLimit" value="80"/>
- <property name="absoluteLineLimit" value="180"/>
+ <property name="lineLimit" value="100"/>
+ <!-- needs to be large to accomodate extra large tab width to circumvent https://github.com/squizlabs/PHP_CodeSniffer/pull/1404 -->
+ <property name="absoluteLineLimit" value="500"/>
</properties>
</rule>
<!-- When calling a function: -->