|
|
|
language: php
|
|
|
|
php:
|
|
|
|
- 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
|
|
|
|
|
|
|
|
script:
|
|
|
|
- phpenv rehash
|
|
|
|
- find . -not -path "./lib/JSON.php" -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
|
|
|
|
- if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
|
|
|
|
- |
|
|
|
|
if [[ $VALIDATE_STANDARD == yes ]]; then
|
|
|
|
COMPOSER_BIN=$(composer global config --absolute bin-dir)
|
|
|
|
$COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
|
|
|
|
fi
|
|
|
|
- |
|
|
|
|
if [[ $CHECK_TRANSLATION == yes ]]; then
|
|
|
|
php cli/check.translation.php -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
env:
|
|
|
|
- CHECK_TRANSLATION=no VALIDATE_STANDARD=yes
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
Require PHP 5.5+ (#2495)
* Require PHP 5.5+
https://github.com/FreshRSS/FreshRSS/issues/2469#issuecomment-522255093
I think it would be reasonable to require PHP 5.5+ for the core of
FreshRSS after all.
As Frenzie said, WordPress currently requires PHP 5.6.20+, and it is the
most popular PHP application.
We would loose about 20% of the PHP servers according to
https://w3techs.com/technologies/details/pl-php/5/all but I expect this
number to drop fast after the release of CentOS 8 (CentOS accounts for
17% of Linux servers
https://w3techs.com/technologies/details/os-linux/all/all ).
Distributions:
* no impact on Ubuntu, Fedora, Alpine, OpenWRT, FreeBSD, OpenSuze,
Mageia, as all active versions have PHP > 7
* no impact on OpenSuze, Synology, as all active versions have PHP > 5.5
* we drop Debian 8 Jessie (-2020) - we keep supporting Debian 9 Stretch
(2017-06) - current is Debian 10 Buster
* we drop Red Hat 7 (-2024) - we keep supporting RHEL 8 (2019-05)
* we drop CentOS 7 (-2024) - we will support CentOS 8 (to be released
soonish)
When dropping older versions, I can better like when it is for a good
reason, and there is actually one with PHP 5.5, namely generators
(yield) https://php.net/language.generators.overview which I consider
using.
* Version note for JSON.php
* hex2bin
* Update .travis.yml
Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
5 years ago
|
|
|
# PHP 5.5 only runs on Travis in 14.04 (trusty), not 16.04 (xenial)
|
|
|
|
- php: "5.5"
|
|
|
|
dist: trusty
|
|
|
|
- php: "7.2"
|
|
|
|
env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
|
|
|
|
- language: node_js
|
|
|
|
node_js:
|
|
|
|
- "node"
|
|
|
|
php:
|
|
|
|
# none
|
|
|
|
env:
|
|
|
|
- HADOLINT="$HOME/hadolint"
|
|
|
|
install:
|
|
|
|
- npm install --save-dev jshint stylelint stylelint-order stylelint-scss stylelint-config-recommended-scss
|
|
|
|
- curl -sLo "$HADOLINT" $(curl -s https://api.github.com/repos/hadolint/hadolint/releases/latest?access_token="$GITHUB_TOKEN" | jq -r '.assets | .[] | select(.name=="hadolint-Linux-x86_64") | .browser_download_url') && chmod 700 ${HADOLINT}
|
|
|
|
script:
|
|
|
|
- node_modules/jshint/bin/jshint .
|
|
|
|
# check SCSS separately
|
|
|
|
- stylelint --syntax scss "**/*.scss"
|
|
|
|
- stylelint "**/*.css"
|
|
|
|
- bash tests/shellchecks.sh
|
|
|
|
- git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT"
|
|
|
|
allow_failures:
|
|
|
|
- env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
|
|
|
|
- dist: precise
|