1+ # Ensure that PHP is installed in Travis' build environment. Travis provides several versions of
2+ # PHP like 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, etc., each of them including XDebug and PHPUnit.
13language : php
24
5+ # Travis can cache content between builds. This speeds up the build process and saves resources.
36cache :
47 yarn : true
58 directories :
9+ # Cache composer packages so "composer install" is faster.
610 - $HOME/.composer/cache/files
11+ # Cache the directory where Symfony stores its slightly modified version of PHPUnit.
712 - ./bin/.phpunit
13+ # Cache the Symfony binary's directory so that it does not have to be reinstalled.
14+ - $HOME/.symfony
815
916env :
1017 global :
18+ # Symfony's PHPUnit bridge provides a modified version of PHPUnit. The modified PHPUnit is
19+ # written to a directory that can be configured by the SYMFONY_PHPUNIT_DIR env var, or in
20+ # the same directory as the simple-phpunit if it is not provided. It's also possible to set
21+ # this env var in the phpunit.xml.dist file.
1122 - SYMFONY_PHPUNIT_DIR=./bin/.phpunit
1223 - SYMFONY_DEPRECATIONS_HELPER=9
1324 - ACTION="install"
25+ # Add the Symfony binary's path to PATH.
26+ - PATH="$HOME/.symfony/bin:$PATH"
1427
28+ # Defines all jobs which Travis will run in parallel. For each PHP version we support we will run one job.
1529matrix :
30+ # With fast finishing enabled, Travis CI will mark your build as finished as soon as one of two
31+ # conditions are met: The only remaining jobs are allowed to fail, or a job has already failed. In
32+ # these cases, the status of the build can already be determined, so there’s no need to wait around
33+ # until the other jobs finish.
1634 fast_finish : true
1735 include :
1836 - php : 7.2
@@ -23,39 +41,39 @@ matrix:
2341
2442before_install :
2543 - ' [[ "$TRAVIS_PHP_VERSION" == "7.4snapshot" ]] || phpenv config-rm xdebug.ini'
26- - composer self-update
27- # Set memory to max (memory fail)
44+ # Set memory to max (memory fail).
2845 - ' [[ "$ACTION" == "install" ]] || echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini'
29- # Set stability to dev to allow 4.4dev and 5.0dev
46+ # Set stability to dev to allow 4.4dev and 5.0dev.
3047 - ' [[ "$ACTION" == "install" ]] || composer config minimum-stability dev'
31- # Change version of symfony when need
48+ # Change version of symfony when need.
3249 - ' [[ "$ACTION" == "install" ]] || composer config extra.symfony.require $SYMFONY'
50+ # If it is available update the Symfony binary, if not install it.
51+ - if symfony self:version; then symfony self:update ; else wget https://get.symfony.com/cli/installer -O - | bash ; fi
3352
3453install :
3554 - php -r "echo ini_get('memory_limit').PHP_EOL;"
36- # install or update
55+ # Install or update Composer packages including dev dependencies listed in require-dev.
3756 - composer $ACTION
3857 - ./bin/phpunit install
3958
4059script :
41- # there 's no need to load data fixtures before running tests because the project
42- # repository already includes a test database with all the fixtures needed to run the tests
60+ # There 's no need to load data fixtures before running tests because the project
61+ # repository already includes a test database with all the fixtures needed to run the tests.
4362 - ./bin/phpunit
44- # this checks that the source code follows the Symfony Code Syntax rules
63+ # This checks that the source code follows the Symfony Code Syntax rules.
4564 - ' [[ "$TRAVIS_PHP_VERSION" == "7.4" ]] || ./vendor/bin/php-cs-fixer fix --diff --dry-run -v'
46- # this checks that the YAML config files contain no syntax errors
65+ # This checks that the YAML config files contain no syntax errors.
4766 - ./bin/console lint:yaml config --parse-tags
48- # this checks that the Twig template files contain no syntax errors
67+ # This checks that the Twig template files contain no syntax errors.
4968 - ./bin/console lint:twig templates --env=prod
50- # this checks that the XLIFF translations contain no syntax errors
69+ # This checks that the XLIFF translations contain no syntax errors.
5170 - ./bin/console lint:xliff translations
52- # this checks that arguments injected into services match type declarations
71+ # This checks that arguments injected into services match type declarations.
5372 - ./bin/console lint:container
54- # TODO: replace the old security checker by the new checker provided by the 'symfony' binary
55- # this checks that the application doesn't use dependencies with known security vulnerabilities
56- # - ./bin/console security:check
57- # this checks that Doctrine's mapping configurations are valid
73+ # This checks that the application doesn't use dependencies with known security vulnerabilities.
74+ - symfony check:security
75+ # This checks that Doctrine's mapping configurations are valid.
5876 - ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
59- # Fail CI if the repo is in a dirty state after building assets (only for current release ie install)
77+ # Fail CI if the repo is in a dirty state after building assets (only for current release ie install).
6078 # - if [[ "$ACTION" == "install" ]]; then yarn install && yarn encore production && git add --all && git diff --staged --exit-code; fi
6179 - composer validate --strict
0 commit comments