From 2aac74ad689b73ccec52988a631517e75d267eeb Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 7 Dec 2020 22:20:45 +0100 Subject: [PATCH 1/2] Travis: line length tweaks Use multi-line conditions to reduce line-length. Note: this doesn't solve all the "warnings" and AFAICS, the other warnings can't really be solved anyhow as it would necessitate breaking up command to multiple lines which would break the command. --- .travis.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a5d3fd1..cc5217d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -123,7 +123,10 @@ install: fi script: - - if [[ "$LINT" == "1" ]]; then if find . -path ./vendor -prune -o -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi; fi + - | + if [[ "$LINT" == "1" ]]; then + if find . -path ./vendor -prune -o -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi; + fi - composer install-codestandards - ./vendor/bin/phpcs -i - | @@ -137,4 +140,7 @@ script: # Test that an external standard has been registered correctly by running it against the codebase. ./vendor/bin/phpcs -ps ./src/ --standard=PHPCompatibility --runtime-set testVersion "${TRAVIS_PHP_VERSION:0:3}" --sniffs=PHPCompatibility.FunctionUse.RemovedFunctions fi - - if [[ "$SECURITY" == "1" ]];then ./vendor/bin/security-checker -n security:check --end-point=http://security.symfony.com/check_lock; fi + - | + if [[ "$SECURITY" == "1" ]]; then + ./vendor/bin/security-checker -n security:check --end-point=http://security.symfony.com/check_lock + fi From 9954c677230bb4b6a4b0bfe592031c0f9d3ed587 Mon Sep 17 00:00:00 2001 From: Ben Peachey Date: Sun, 31 Jan 2021 12:53:18 +0100 Subject: [PATCH 2/2] Change long lines in .travis.yml to not exceed 120 chars. --- .travis.yml | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index cc5217d2..8479eae2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,12 +111,27 @@ install: fi - | if [[ $TRAVIS_PHP_VERSION != "nightly" && $TRAVIS_PHP_VERSION != "8.0" ]]; then - travis_wait composer install --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose + travis_wait composer install \ + --no-interaction \ + --no-progress \ + --no-scripts \ + --no-suggest \ + --optimize-autoloader \ + --prefer-dist --verbose else composer require --no-update --no-suggest --no-scripts phpcompatibility/php-compatibility - travis_wait composer install --no-dev --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose --ignore-platform-reqs + travis_wait composer install \ + --ignore-platform-reqs \ + --no-dev \ + --no-interaction \ + --no-progress \ + --no-scripts \ + --no-suggest \ + --optimize-autoloader \ + --prefer-dist \ + --verbose fi - - | + - > if [[ ${PHPCS_VERSION:0:3} < "2.2" ]]; then # Rename the PHPCompatibility directory as PHPCompatibility 7.x wasn't fully compatible with Composer yet. mv ./vendor/phpcompatibility/php-compatibility ./vendor/phpcompatibility/PHPCompatibility @@ -125,7 +140,9 @@ install: script: - | if [[ "$LINT" == "1" ]]; then - if find . -path ./vendor -prune -o -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi; + if find . -path ./vendor -prune -o -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then + exit 1 + fi fi - composer install-codestandards - ./vendor/bin/phpcs -i @@ -135,10 +152,16 @@ script: ./vendor/bin/phpcs elif [[ ${PHPCS_VERSION:0:3} < "2.3" ]]; then # Test that an external standard has been registered correctly by running it against the codebase on PHPCS < 2.3. - ./vendor/bin/phpcs -ps ./src/ --standard=PHPCompatibility --runtime-set testVersion "${TRAVIS_PHP_VERSION:0:3}" --sniffs=PHPCompatibility.PHP.DeprecatedFunctions + ./vendor/bin/phpcs -ps ./src/ \ + --runtime-set testVersion "${TRAVIS_PHP_VERSION:0:3}" \ + --sniffs=PHPCompatibility.PHP.DeprecatedFunctions \ + --standard=PHPCompatibility else # Test that an external standard has been registered correctly by running it against the codebase. - ./vendor/bin/phpcs -ps ./src/ --standard=PHPCompatibility --runtime-set testVersion "${TRAVIS_PHP_VERSION:0:3}" --sniffs=PHPCompatibility.FunctionUse.RemovedFunctions + ./vendor/bin/phpcs -ps ./src/ \ + --runtime-set testVersion "${TRAVIS_PHP_VERSION:0:3}" \ + --sniffs=PHPCompatibility.FunctionUse.RemovedFunctions \ + --standard=PHPCompatibility fi - | if [[ "$SECURITY" == "1" ]]; then