@@ -194,55 +194,108 @@ Installation Instructions
194
194
In order to ease the installation of third-party bundles, consider using the
195
195
following standardized instructions in your ``README.md `` file.
196
196
197
- .. code -block :: text
197
+ .. configuration -block ::
198
198
199
- Installation
200
- ============
199
+ .. code-block :: markdown
201
200
202
- Step 1: Download the Bundle
203
- ---------------------------
201
+ Installation
202
+ ============
204
203
205
- Open a command console, enter your project directory and execute the
206
- following command to download the latest stable version of this bundle:
204
+ Step 1: Download the Bundle
205
+ ---------------------------
207
206
208
- ```bash
209
- $ composer require <package-name> "~1"
210
- ```
207
+ Open a command console, enter your project directory and execute the
208
+ following command to download the latest stable version of this bundle:
211
209
212
- This command requires you to have Composer installed globally, as explained
213
- in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
214
- of the Composer documentation.
210
+ ```bash
211
+ $ composer require <package-name> "~1"
212
+ ```
215
213
216
- Step 2: Enable the Bundle
217
- -------------------------
214
+ This command requires you to have Composer installed globally, as explained
215
+ in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
216
+ of the Composer documentation.
218
217
219
- Then, enable the bundle by adding the following in the `app/AppKernel.php`
220
- file of your project:
218
+ Step 2: Enable the Bundle
219
+ -------------------------
221
220
222
- ```php
223
- <?php
224
- // app/AppKernel.php
221
+ Then, enable the bundle by adding it to the list of registered bundles
222
+ in the `app/AppKernel.php` file of your project:
225
223
226
- // ...
227
- class AppKernel extends Kernel
228
- {
229
- public function registerBundles()
224
+ ```php
225
+ <?php
226
+ // app/AppKernel.php
227
+
228
+ // ...
229
+ class AppKernel extends Kernel
230
230
{
231
- $bundles = array(
232
- // ...
231
+ public function registerBundles()
232
+ {
233
+ $bundles = array(
234
+ // ...
235
+
236
+ new <vendor>\<bundle-name>\<bundle-long-name>(),
237
+ );
233
238
234
- new <vendor>\<bundle-name>\<bundle-long-name>(),
235
- );
239
+ // ...
240
+ }
236
241
237
242
// ...
238
243
}
244
+ ```
239
245
240
- // ...
241
- }
242
- ```
246
+ .. code-block :: rst
247
+
248
+ Installation
249
+ ============
250
+
251
+ Step 1: Download the Bundle
252
+ ---------------------------
253
+
254
+ Open a command console, enter your project directory and execute the
255
+ following command to download the latest stable version of this bundle:
256
+
257
+ .. code-block:: bash
258
+
259
+ $ composer require <package-name> "~1"
260
+
261
+ This command requires you to have Composer installed globally, as explained
262
+ in the `installation chapter`_ of the Composer documentation.
263
+
264
+ Step 2: Enable the Bundle
265
+ -------------------------
266
+
267
+ Then, enable the bundle by adding it to the list of registered bundles
268
+ in the ``app/AppKernel.php`` file of your project:
269
+
270
+ .. code-block:: php
271
+
272
+ <?php
273
+ // app/AppKernel.php
274
+
275
+ // ...
276
+ class AppKernel extends Kernel
277
+ {
278
+ public function registerBundles()
279
+ {
280
+ $bundles = array(
281
+ // ...
282
+
283
+ new <vendor>\<bundle-name>\<bundle-long-name>(),
284
+ );
285
+
286
+ // ...
287
+ }
288
+
289
+ // ...
290
+ }
291
+
292
+ .. _`installation chapter`: https://getcomposer.org/doc/00-intro.md
243
293
244
- This template assumes that your bundle is in its ``1.x `` version. If not, change
245
- the ``"~1" `` installation version accordingly (``"~2" ``, ``"~3" ``, etc.)
294
+ The example above assumes that you are installing the latest stable version of
295
+ the bundle, where you don't have to provide the package version number
296
+ (e.g. ``composer require friendsofsymfony/user-bundle ``). If the installation
297
+ instructions refer to some past bundle version or to some unstable version,
298
+ include the version constraint (e.g. ``composer require friendsofsymfony/user-bundle "~2.0@dev" ``).
246
299
247
300
Optionally, you can add more installation steps (*Step 3 *, *Step 4 *, etc.) to
248
301
explain other required installation tasks, such as registering routes or
0 commit comments