Skip to content

Commit e7afb7a

Browse files
committed
Merge pull request #930 from javiereguiluz/transform_md_doc_to_rest
Switched the documentation from Markdown to ReStructuredText
2 parents 6c8b756 + 30514a7 commit e7afb7a

21 files changed

+2085
-1934
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Documentation
2323
The bulk of the documentation is stored in the `Resources/doc/index.md`
2424
file in this bundle:
2525

26-
[Read the Documentation for master](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/index.md)
26+
[Read the Documentation for master](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/index.rst)
2727

2828
Please see the [UPGRADING.md](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/UPGRADING.md) for any
2929
relevant instructions when upgrading to a newer version.
@@ -32,7 +32,7 @@ relevant instructions when upgrading to a newer version.
3232
Installation
3333
------------
3434

35-
All the installation instructions are located in the [documentation](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/index.md).
35+
All the installation instructions are located in the [documentation](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/index.rst).
3636

3737
License
3838
-------

Resources/doc/1-setting_up_the_bundle.md

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Step 1: Setting up the bundle
2+
=============================
3+
4+
A) Install FOSRestBundle
5+
------------------------
6+
7+
.. note::
8+
9+
This bundle recommends using `JMSSerializer`_ which is integrated into Symfony
10+
via `JMSSerializerBundle`_.
11+
12+
If you want to use JMSSerializer, take a look into the instructions of the
13+
bundle to install it and set it up. You can also use `Symfony Serializer`_.
14+
But in this case, you need to manually set it up and configure FOSRestBundle
15+
to use it via the ``service`` section in the app config
16+
17+
Simply run assuming you have installed ``composer.phar`` or ``composer`` binary:
18+
19+
.. code-block:: bash
20+
21+
$ composer require friendsofsymfony/rest-bundle
22+
23+
B) Enable the bundle
24+
--------------------
25+
26+
Finally, enable the bundle in the kernel:
27+
28+
.. code-block:: php
29+
30+
<?php
31+
// app/AppKernel.php
32+
33+
public function registerBundles()
34+
{
35+
$bundles = array(
36+
// ...
37+
new FOS\RestBundle\FOSRestBundle(),
38+
39+
// if you choose to use JMSSerializer, make sure that it is registered in your application
40+
41+
// new JMS\SerializerBundle\JMSSerializerBundle(),
42+
);
43+
}
44+
45+
That was it!
46+
47+
.. _`JMSSerializer`: https://github.com/schmittjoh/serializer
48+
.. _`JMSSerializerBundle`: https://github.com/schmittjoh/JMSSerializerBundle
49+
.. _`Symfony Serializer`: https://github.com/symfony/Serializer

0 commit comments

Comments
 (0)