@@ -98,13 +98,58 @@ of deprecated features:
9898Test your Bundle in Symfony 3
9999-----------------------------
100100
101- .. TODO
101+ Now that your bundle has removed all deprecations, it's time to test it for real
102+ in a Symfony 3 application. Assuming that you already have a Symfony 3 application,
103+ you can test the updated bundle locally without having to install it through
104+ Composer.
102105
103- * Upgrade a test app to Sf3 or create an empty app (symfony new my_app 3.0)
104- * Use the "ln -s my_bundle vendor/.../my_bundle" trick to use the new code in the 3.0 app
105- * Configure Travis CI to test your bundle in both 2 and 3 versions.
106+ If your operating system supports symbolic lings, just point the appropriate
107+ vendor directory to your local bundle root directory:
108+
109+ .. code-block :: bash
110+
111+ $ ln -s /path/to/your/local/bundle/ vendor/you-vendor-name/your-buncle-name
112+
113+ If your operating system doesn't support symbolic links, you'll need to copy
114+ your local bundle directory into the appropriate directory inside ``vendor/ ``.
115+
116+ Update the Travis CI Configuration
117+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118+
119+ In addition to running tools locally, it's recommended to set-up Travis CI service
120+ to run the tests of your bundle using different Symfony configurations. Use the
121+ following recommended configuration as the starting point of your own configuration:
122+
123+ .. code-block :: yaml
124+
125+ language : php
126+ sudo : false
127+ php :
128+ - 5.3
129+ - 5.6
130+ - 7.0
131+
132+ matrix :
133+ include :
134+ - php : 5.3.3
135+ env : COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak
136+ - php : 5.6
137+ env : SYMFONY_VERSION='2.3.*'
138+ - php : 5.6
139+ env : DEPENDENCIES='dev' SYMFONY_VERSION='2.8.*@dev'
140+ - php : 5.6
141+ env : SYMFONY_VERSION='3.0.*@dev'
142+
143+ before_install :
144+ - composer self-update
145+ - if [ "$DEPENDENCIES" == "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
146+ - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION}; fi;
147+
148+ install : composer update $COMPOSER_FLAGS
149+
150+ script : phpunit -v
106151
107152 .. _`PHPUnit Bridge` : https://github.com/symfony/phpunit-bridge
108153.. _`Official Symfony Guide to Upgrade from 2.x to 3.0` : https://github.com/symfony/symfony/blob/2.8/UPGRADE-3.0.md
109154.. _`SensioLabs DeprecationDetector` : https://github.com/sensiolabs-de/deprecation-detector
110- .. _`Symfony Upgrade Fixer` : https://github.com/umpirsky/Symfony-Upgrade-Fixer
155+ .. _`Symfony Upgrade Fixer` : https://github.com/umpirsky/Symfony-Upgrade-Fixer
0 commit comments