Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis: line length tweaks #128

Merged
merged 2 commits into from Jan 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 36 additions & 7 deletions .travis.yml
Expand Up @@ -111,19 +111,39 @@ 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
- |
- >
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll work but I think you are right that it is not correct (i.e. could lead to trouble later). I'll add a fix before tagging and including it in the upcoming minor release.

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
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
- |
Expand All @@ -132,9 +152,18 @@ 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
./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