From 465d702457c982a8ee8dbff7945681845c35fd12 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sun, 19 Nov 2017 14:43:44 +0200 Subject: [PATCH 01/15] Added a good example travis file --- bundles/best_practices.rst | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index cc5392f7807..fafa2ba6b04 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -166,6 +166,69 @@ the ``Tests/`` directory. Tests should follow the following principles: A test suite must not contain ``AllTests.php`` scripts, but must rely on the existence of a ``phpunit.xml.dist`` file. +Travis +------ + +A popular way to test open source bundles is by using `Travis CI`_. A good practice +is to support at least the two latest LTS versions of symfony. One should also test +test latest beta release. Here is a recommended configuration file (``.travis.yml``). + +.. code-block:: yaml + + language: php + sudo: false + cache: + directories: + - $HOME/.composer/cache/files + env: + global: + - TEST_COMMAND="phpunit" + + matrix: + fast_finish: true + include: + # Minimum supported PHP and Symfony version + - php: 5.5 + env: DEPENDENCIES="minimum" COVERAGE=true TEST_COMMAND="phpunit --coverage-text" + + # Test the latest stable release + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: 7.2 + + # Test LTS versions + - php: 7.2 + env: DEPENDENCIES="symfony/lts:v2" + - php: 7.2 + env: DEPENDENCIES="symfony/lts:v3" + + # Latest beta release + - php: 7.2 + env: DEPENDENCIES="beta" + + allow_failures: + # Latest beta is allowed to fail. + - php: 7.2 + env: DEPENDENCIES="beta" + + before_install: + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi + - if [ "$DEPENDENCIES" = "minimum" ]; then COMPOSER_FLAGS="--prefer-stable --prefer-lowest"; fi; + - if [ "$DEPENDENCIES" = "beta" ]; then composer config minimum-stability beta; fi; + - if [[ $DEPENDENCIES == *"/"* ]]; then composer require --no-update $DEPENDENCIES; fi; + + install: + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi + - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + + script: + - $TEST_COMMAND + + + Installation ------------ @@ -476,3 +539,4 @@ Learn more .. _`Packagist`: https://packagist.org/ .. _`choose any license`: http://choosealicense.com/ .. _`valid license identifier`: https://spdx.org/licenses/ +.. _`Travis-CI`: travis-ci.org From c990feafeff6281a764857e71afa752f6aff7dc0 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sun, 19 Nov 2017 14:52:29 +0200 Subject: [PATCH 02/15] Typo --- bundles/best_practices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index fafa2ba6b04..b5161d92629 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -539,4 +539,4 @@ Learn more .. _`Packagist`: https://packagist.org/ .. _`choose any license`: http://choosealicense.com/ .. _`valid license identifier`: https://spdx.org/licenses/ -.. _`Travis-CI`: travis-ci.org +.. _`Travis CI`: travis-ci.org From aa3283af48e7892992b8e3838d896ce74b1cfd7f Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 25 Nov 2017 09:50:39 +0100 Subject: [PATCH 03/15] Updated according to feedback --- bundles/best_practices.rst | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index b5161d92629..ebd4e80a144 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -182,18 +182,16 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym - $HOME/.composer/cache/files env: global: - - TEST_COMMAND="phpunit" + - TEST_COMMAND="./vendor/bin/simple-phpunit" matrix: fast_finish: true include: # Minimum supported PHP and Symfony version - - php: 5.5 - env: DEPENDENCIES="minimum" COVERAGE=true TEST_COMMAND="phpunit --coverage-text" + - php: 7.2 + env: DEPENDENCIES="minimum" COVERAGE=true TEST_COMMAND="phpunit --coverage-text" SYMFONY_DEPRECATIONS_HELPER="weak" # Test the latest stable release - - php: 5.5 - - php: 5.6 - php: 7.0 - php: 7.1 - php: 7.2 @@ -204,30 +202,33 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym - php: 7.2 env: DEPENDENCIES="symfony/lts:v3" - # Latest beta release + # Latest commit to master - php: 7.2 - env: DEPENDENCIES="beta" + env: DEPENDENCIES="dev" allow_failures: # Latest beta is allowed to fail. - php: 7.2 - env: DEPENDENCIES="beta" + env: DEPENDENCIES="dev" before_install: + - composer require --no-update "symfony/phpunit-bridge:^3.3 || ^4" - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi - if [ "$DEPENDENCIES" = "minimum" ]; then COMPOSER_FLAGS="--prefer-stable --prefer-lowest"; fi; - - if [ "$DEPENDENCIES" = "beta" ]; then composer config minimum-stability beta; fi; + - if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi; - if [[ $DEPENDENCIES == *"/"* ]]; then composer require --no-update $DEPENDENCIES; fi; install: # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 - - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi + - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction script: + - composer validate --strict --no-check-lock - $TEST_COMMAND - +When configuring travis you should also enable `Travis cron`_ to make sure your +project is build even if there is no new pull requests or commits. Installation ------------ @@ -539,4 +540,5 @@ Learn more .. _`Packagist`: https://packagist.org/ .. _`choose any license`: http://choosealicense.com/ .. _`valid license identifier`: https://spdx.org/licenses/ -.. _`Travis CI`: travis-ci.org +.. _`Travis CI`: https://travis-ci.org/ +.. _`Travis Cron`: https://docs.travis-ci.com/user/cron-jobs/ From 6b805cfe70571709031f064d46f47b6d2d54b2cf Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 25 Nov 2017 10:16:47 +0100 Subject: [PATCH 04/15] Use tilde or composer validate will never pass --- bundles/best_practices.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index ebd4e80a144..37e12928417 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -198,9 +198,9 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym # Test LTS versions - php: 7.2 - env: DEPENDENCIES="symfony/lts:v2" + env: DEPENDENCIES="symfony/lts:^2" - php: 7.2 - env: DEPENDENCIES="symfony/lts:v3" + env: DEPENDENCIES="symfony/lts:^3" # Latest commit to master - php: 7.2 From 5803fd080286aa6e953fec5ccbb804c054c69829 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 28 Nov 2017 09:02:27 +0100 Subject: [PATCH 05/15] Added comment and install simple-phpunit deps --- bundles/best_practices.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 37e12928417..f9fb34aa98c 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -180,14 +180,17 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym cache: directories: - $HOME/.composer/cache/files + - $HOME/symfony-bridge/.phpunit + env: global: - TEST_COMMAND="./vendor/bin/simple-phpunit" + - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" matrix: fast_finish: true include: - # Minimum supported PHP and Symfony version + # Minimum supported Symfony version - php: 7.2 env: DEPENDENCIES="minimum" COVERAGE=true TEST_COMMAND="phpunit --coverage-text" SYMFONY_DEPRECATIONS_HELPER="weak" @@ -196,7 +199,8 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym - php: 7.1 - php: 7.2 - # Test LTS versions + # Test LTS versions. This makes sure we do not use symfony packages with version greater + # than 2 or 3 respectively. Read more at https://github.com/symfony/lts - php: 7.2 env: DEPENDENCIES="symfony/lts:^2" - php: 7.2 @@ -222,6 +226,7 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + - vendor/bin/simple-phpunit install script: - composer validate --strict --no-check-lock From 5848ff6f7196f416c923913e7ae4709dd540af7b Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 11:01:12 +0100 Subject: [PATCH 06/15] Fixed typos and created more variables --- bundles/best_practices.rst | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index f9fb34aa98c..c06bcd12ac9 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -170,7 +170,7 @@ Travis ------ A popular way to test open source bundles is by using `Travis CI`_. A good practice -is to support at least the two latest LTS versions of symfony. One should also test +is to support at least the two latest LTS versions of Symfony. One should also test test latest beta release. Here is a recommended configuration file (``.travis.yml``). .. code-block:: yaml @@ -190,16 +190,15 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym matrix: fast_finish: true include: - # Minimum supported Symfony version - - php: 7.2 - env: DEPENDENCIES="minimum" COVERAGE=true TEST_COMMAND="phpunit --coverage-text" SYMFONY_DEPRECATIONS_HELPER="weak" + # Minimum supported Symfony version with the latest PHP version + - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="./vendor/bin/simple-phpunit --coverage-text" SYMFONY_DEPRECATIONS_HELPER="weak" # Test the latest stable release - php: 7.0 - php: 7.1 - php: 7.2 - # Test LTS versions. This makes sure we do not use symfony packages with version greater + # Test LTS versions. This makes sure we do not use Symfony packages with version greater # than 2 or 3 respectively. Read more at https://github.com/symfony/lts - php: 7.2 env: DEPENDENCIES="symfony/lts:^2" @@ -208,19 +207,18 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym # Latest commit to master - php: 7.2 - env: DEPENDENCIES="dev" + env: STABILITY="dev" allow_failures: # Latest beta is allowed to fail. - php: 7.2 - env: DEPENDENCIES="dev" + env: STABILITY="dev" before_install: - composer require --no-update "symfony/phpunit-bridge:^3.3 || ^4" - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi - - if [ "$DEPENDENCIES" = "minimum" ]; then COMPOSER_FLAGS="--prefer-stable --prefer-lowest"; fi; - - if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi; - - if [[ $DEPENDENCIES == *"/"* ]]; then composer require --no-update $DEPENDENCIES; fi; + - if [[ -v $STABILITY ]]; then composer config minimum-stability $STABILITY; fi; + - if [[ -v $DEPENDENCIES ]]; then composer require --no-update $DEPENDENCIES; fi; install: # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 From f1a04398d17e764d68d1a287b98c75b7901925aa Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 11:31:35 +0100 Subject: [PATCH 07/15] Fixed minor things --- bundles/best_practices.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index c06bcd12ac9..111c48ee11e 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -206,13 +206,11 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym env: DEPENDENCIES="symfony/lts:^3" # Latest commit to master - - php: 7.2 - env: STABILITY="dev" + - env: STABILITY="dev" allow_failures: - # Latest beta is allowed to fail. - - php: 7.2 - env: STABILITY="dev" + # Dev-master is allowed to fail. + - env: STABILITY="dev" before_install: - composer require --no-update "symfony/phpunit-bridge:^3.3 || ^4" From 83daf5d2e31d2f4ac892e9600faad20fe513fb0b Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 16:41:54 +0100 Subject: [PATCH 08/15] Moved coverage to PHP 7.2 with latest deps --- bundles/best_practices.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 111c48ee11e..8974407ad44 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -191,12 +191,13 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym fast_finish: true include: # Minimum supported Symfony version with the latest PHP version - - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="./vendor/bin/simple-phpunit --coverage-text" SYMFONY_DEPRECATIONS_HELPER="weak" + - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" # Test the latest stable release - php: 7.0 - php: 7.1 - php: 7.2 + env: COVERAGE=true TEST_COMMAND="./vendor/bin/simple-phpunit --coverage-text" # Test LTS versions. This makes sure we do not use Symfony packages with version greater # than 2 or 3 respectively. Read more at https://github.com/symfony/lts From 33aa6a7c60f59ec7476093e75a4e60088eceda7b Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 20:08:42 +0100 Subject: [PATCH 09/15] Added back php-versions --- bundles/best_practices.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 8974407ad44..f7f2b8bb5a9 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -191,7 +191,8 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym fast_finish: true include: # Minimum supported Symfony version with the latest PHP version - - env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" + - php: 7.2 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" # Test the latest stable release - php: 7.0 @@ -207,14 +208,14 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym env: DEPENDENCIES="symfony/lts:^3" # Latest commit to master - - env: STABILITY="dev" + - php: 7.2 + env: STABILITY="dev" allow_failures: # Dev-master is allowed to fail. - env: STABILITY="dev" before_install: - - composer require --no-update "symfony/phpunit-bridge:^3.3 || ^4" - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi - if [[ -v $STABILITY ]]; then composer config minimum-stability $STABILITY; fi; - if [[ -v $DEPENDENCIES ]]; then composer require --no-update $DEPENDENCIES; fi; From 3671cbda9150f23809f4da3050fd1d6982a3faa1 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 20:35:26 +0100 Subject: [PATCH 10/15] Using PHPUNIT_FLAGS --- bundles/best_practices.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index f7f2b8bb5a9..0d8e4c2f17a 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -184,7 +184,7 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym env: global: - - TEST_COMMAND="./vendor/bin/simple-phpunit" + - PHPUNIT_FLAGS="-v" - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" matrix: @@ -198,7 +198,7 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym - php: 7.0 - php: 7.1 - php: 7.2 - env: COVERAGE=true TEST_COMMAND="./vendor/bin/simple-phpunit --coverage-text" + env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" # Test LTS versions. This makes sure we do not use Symfony packages with version greater # than 2 or 3 respectively. Read more at https://github.com/symfony/lts @@ -228,7 +228,7 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym script: - composer validate --strict --no-check-lock - - $TEST_COMMAND + - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS When configuring travis you should also enable `Travis cron`_ to make sure your project is build even if there is no new pull requests or commits. From 8613f1d26902675a588a47818868c2af6de00002 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 21:51:36 +0100 Subject: [PATCH 11/15] Using better cache syntax --- bundles/best_practices.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 0d8e4c2f17a..cfde503eefb 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -217,8 +217,8 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym before_install: - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi - - if [[ -v $STABILITY ]]; then composer config minimum-stability $STABILITY; fi; - - if [[ -v $DEPENDENCIES ]]; then composer require --no-update $DEPENDENCIES; fi; + - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; + - if ! [ -v $DEPENDENCIES ]; then composer require --no-update ${DEPENDENCIES}; fi; install: # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 From e11b67795a660e40da377190f75ce7dd78127007 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 22:01:25 +0100 Subject: [PATCH 12/15] typo --- bundles/best_practices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index cfde503eefb..187a9431b5d 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -218,7 +218,7 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym before_install: - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; - - if ! [ -v $DEPENDENCIES ]; then composer require --no-update ${DEPENDENCIES}; fi; + - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; install: # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 From 5bacbd5dca07016705de1f51662ba3fa1d93c907 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 29 Nov 2017 22:52:49 +0100 Subject: [PATCH 13/15] use ./ before vendor --- bundles/best_practices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 187a9431b5d..5f09f431e4b 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -224,7 +224,7 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction - - vendor/bin/simple-phpunit install + - ./vendor/bin/simple-phpunit install script: - composer validate --strict --no-check-lock From 14f96a97deba6ae89c81eed873e679f82506ea3c Mon Sep 17 00:00:00 2001 From: Nyholm Date: Sat, 13 Jan 2018 12:18:20 +0100 Subject: [PATCH 14/15] Minor updates --- bundles/best_practices.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 5f09f431e4b..dc0b3319103 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -190,9 +190,11 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym matrix: fast_finish: true include: - # Minimum supported Symfony version with the latest PHP version + # Minimum supported dependencies with the latest and oldest PHP version - php: 7.2 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" + - php: 7.0 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" # Test the latest stable release - php: 7.0 From 165bcf7cd3889876a727500946491af42c986ef3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 13 Jan 2018 16:34:46 +0100 Subject: [PATCH 15/15] Rewords --- bundles/best_practices.rst | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index dc0b3319103..77b78f808de 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -166,12 +166,17 @@ the ``Tests/`` directory. Tests should follow the following principles: A test suite must not contain ``AllTests.php`` scripts, but must rely on the existence of a ``phpunit.xml.dist`` file. -Travis ------- +Continuous Integration +---------------------- -A popular way to test open source bundles is by using `Travis CI`_. A good practice -is to support at least the two latest LTS versions of Symfony. One should also test -test latest beta release. Here is a recommended configuration file (``.travis.yml``). +Testing bundle code continuously, including all its commits and pull requests, +is a good practice called Continuous Integration. There are several services +providing this feature for free for open source projects. The most popular +service for Symfony bundles is called `Travis CI`_. + +Here is the recommended configuration file (``.travis.yml``) for Symfony bundles, +which test the two latest :doc:`LTS versions ` +of Symfony and the latest beta release: .. code-block:: yaml @@ -232,8 +237,8 @@ test latest beta release. Here is a recommended configuration file (``.travis.ym - composer validate --strict --no-check-lock - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS -When configuring travis you should also enable `Travis cron`_ to make sure your -project is build even if there is no new pull requests or commits. +Consider using `Travis cron`_ too to make sure your project is built even if +there are no new pull requests or commits. Installation ------------