Skip to content

Commit 2096a0e

Browse files
authored
Merge pull request #2016 from FriendsOfSymfony/remove-outdated-doc
Remove outdated doc
2 parents 733f85f + 7f22748 commit 2096a0e

16 files changed

+16
-68
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ matrix:
1515
include:
1616
# lowest dependencies
1717
- php: 7.1
18-
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
18+
env: COMPOSER_FLAGS="--prefer-lowest"
1919
# Symfony 3 LTS
2020
- php: 7.2
2121
env: SYMFONY_LTS='^3'
@@ -30,7 +30,7 @@ matrix:
3030

3131
before_install:
3232
- echo "memory_limit=4G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
33-
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini || true; fi
33+
- phpenv config-rm xdebug.ini || true
3434
- if [ "$DEPENDENCIES" != "" ]; then composer config minimum-stability $DEPENDENCIES; fi
3535
- if [ "$SYMFONY_LTS" != "" ]; then composer require --dev --no-update symfony/lts=$SYMFONY_LTS; fi
3636

Controller/TemplatingExceptionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(
3939
* @param int $statusCode
4040
* @param bool $showException
4141
*
42-
* @return TemplateReferenceInterface
42+
* @return string|TemplateReferenceInterface
4343
*/
4444
abstract protected function findTemplate(Request $request, $statusCode, $showException);
4545
}

Negotiation/FormatNegotiator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class FormatNegotiator extends BaseNegotiator
2525
{
2626
private $map = [];
2727
private $requestStack;
28+
private $mimeTypes;
2829

2930
public function __construct(RequestStack $requestStack, array $mimeTypes = array())
3031
{

Request/ParameterBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getParams(Request $request)
3636
if (!isset($this->params[$requestId]) || empty($this->params[$requestId]['controller'])) {
3737
throw new \InvalidArgumentException('Controller and method needs to be set via setController.');
3838
}
39-
if ($this->params[$requestId]['params'] === null) {
39+
if (null === $this->params[$requestId]['params']) {
4040
return $this->initParams($requestId);
4141
}
4242

Resources/doc/2-the-view-layer.rst

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ the important ones for configuring the view:
168168
* ``setResponse(Response $response)`` - The response instance that is populated
169169
by the ``ViewHandler``.
170170

171-
See `this example code`_ for more details.
172-
173171
Forms and Views
174172
---------------
175173

@@ -310,7 +308,6 @@ default of ``twig``:
310308

311309
.. code-block:: yaml
312310
313-
# app/config/config.yml
314311
fos_rest:
315312
view:
316313
formats:
@@ -323,8 +320,6 @@ default of ``twig``:
323320
failed_validation: HTTP_BAD_REQUEST
324321
default_engine: twig
325322
326-
See `this example configuration`_ for more details.
327-
328323
Custom handler
329324
--------------
330325

@@ -348,12 +343,7 @@ Note there are several public methods on the ``ViewHandler`` which can be helpfu
348343
* ``createRedirectResponse()``
349344
* ``renderTemplate()``
350345

351-
There is an example inside LiipHelloBundle to show how to register a custom handler
352-
(for an RSS feed):
353-
https://github.com/liip/LiipHelloBundle/blob/master/View/RSSViewHandler.php
354-
https://github.com/liip/LiipHelloBundle/blob/master/Resources/config/config.yml
355-
356-
There is another example in ``Resources\doc\examples``:
346+
There is an example for how to register a custom handler (for an RSS feed) in ``Resources\doc\examples``:
357347
https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/examples/RssHandler.php
358348

359349
Here is an example using a closure registered inside a Controller action:
@@ -418,7 +408,6 @@ Simply add the following to your configuration
418408

419409
.. code-block:: yaml
420410
421-
# app/config/config.yml
422411
fos_rest:
423412
view:
424413
jsonp_handler: ~
@@ -429,7 +418,6 @@ is valid or not.
429418

430419
.. code-block:: yaml
431420
432-
# app/config/config.yml
433421
fos_rest:
434422
view:
435423
jsonp_handler:
@@ -439,7 +427,6 @@ Finally the filter can also be disabled by setting it to false.
439427

440428
.. code-block:: yaml
441429
442-
# app/config/config.yml
443430
fos_rest:
444431
view:
445432
jsonp_handler:
@@ -469,8 +456,6 @@ That was it!
469456
.. _`Symfony Serializer Component`: http://symfony.com/doc/current/components/serializer.html
470457
.. _`serializer`: https://github.com/schmittjoh/serializer
471458
.. _`JMSSerializerBundle`: https://github.com/schmittjoh/JMSSerializerBundle
472-
.. _`this example code`: https://github.com/liip/LiipHelloBundle/blob/master/Controller/HelloController.php
473-
.. _`this example configuration`: https://github.com/liip-forks/symfony-standard/blob/techtalk/app/config/config.yml
474459
.. _`CVE-2014-4671`: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-4671
475460
.. _`Abusing JSONP with Rosetta Flash`: http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
476461
.. _`NelmioSecurityBundle`: https://github.com/nelmio/NelmioSecurityBundle

Resources/doc/3-listener-support.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ to enable a few additional listeners:
1717

1818
.. code-block:: yaml
1919
20-
# app/config/config.yml
2120
fos_rest:
2221
param_fetcher_listener: true
2322
body_listener: true
@@ -37,7 +36,6 @@ appropriate event:
3736

3837
.. code-block:: yaml
3938
40-
# app/config/config.yml
4139
fos_rest:
4240
body_listener:
4341
service: my_body_listener
@@ -120,7 +118,6 @@ since 2.5.
120118

121119
.. code-block:: yaml
122120
123-
# app/config/config.yml
124121
fos_rest:
125122
view:
126123
mime_types: {'jsonp': ['application/javascript+jsonp']}
@@ -210,7 +207,6 @@ rules on the request ``path``, ``host``, ``methods`` and ``ip``.
210207

211208
.. code-block:: yaml
212209
213-
# app/config/config.yml
214210
fos_rest:
215211
zone:
216212
- { path: ^/api/* }

Resources/doc/4-exception-controller-support.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ configuration:
1212

1313
.. code-block:: yaml
1414
15-
# app/config/config.yml
1615
fos_rest:
1716
exception:
1817
enabled: true
@@ -38,7 +37,6 @@ constant of the ``Symfony\Component\HttpFoundation\Response`` class:
3837

3938
.. code-block:: yaml
4039
41-
# app/config/config.yml
4240
fos_rest:
4341
exception:
4442
codes:

Resources/doc/5-automatic-route-generation_single-restful-controller.rst

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ You may specify a ``default_format`` that the routing loader will use for the
1111

1212
.. code-block:: yaml
1313
14-
# app/config/config.yml
1514
fos_rest:
1615
routing_loader:
1716
default_format: json
1817
19-
Many of the features explained below are used in the following example code:
20-
https://github.com/liip/LiipHelloBundle/blob/master/Controller/RestController.php
21-
2218
Single RESTful controller routes
2319
--------------------------------
2420

@@ -28,7 +24,6 @@ are explained in the next section.
2824

2925
.. code-block:: yaml
3026
31-
# app/config/routing.yml
3227
users:
3328
type: rest
3429
host: m.example.com
@@ -351,7 +346,6 @@ some configuration:
351346

352347
.. code-block:: yaml
353348
354-
# app/config/config.yml
355349
fos_rest:
356350
routing_loader:
357351
include_format: false
@@ -412,15 +406,15 @@ Example class implementing ``InflectorInterface``:
412406
}
413407
}
414408
415-
Define your service in ``config.yml``:
409+
Define your service:
416410

417411
.. code-block:: yaml
418412
419413
services:
420414
acme.hellobundle.util.inflector:
421415
class: Acme\HelloBundle\Util\Inflector\NoopInflector
422416
423-
Tell ``fos_rest`` to use your own service as inflector, also in ``config.yml``:
417+
Tell ``fos_rest`` to use your own service as inflector:
424418

425419
.. code-block:: yaml
426420

Resources/doc/6-automatic-route-generation_multiple-restful-controllers.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ XML collection:
4040
Notice ``parent: users`` option in the second case. This option specifies that
4141
the comments resource is child of the users resource.
4242

43-
It is also necessary to add ``type: rest`` to the ``routing.yml`` file:
43+
It is also necessary to add ``type: rest`` to the ``routes.yaml`` file:
4444

4545
.. code-block:: yaml
4646
47-
# app/config/routing.yml
4847
acme_hello:
4948
type: rest
5049
host: hostname.example.com
@@ -112,11 +111,10 @@ resources of ``UsersController::getUser()`` resource.
112111
Include resource collections in application routing
113112
---------------------------------------------------
114113

115-
Last step is mapping of your collection routes into the application ``routing.yml``:
114+
Last step is mapping of your collection routes into the application ``routes.yaml``:
116115

117116
.. code-block:: yaml
118117
119-
# app/config/routing.yml
120118
users:
121119
type: rest
122120
resource: "@AcmeHelloBundle/Resources/config/users_routes.yml"
@@ -151,7 +149,7 @@ a file loaded by the rest loader.):
151149

152150
.. code-block:: yaml
153151
154-
# app/config/routing.yml
152+
# config/routes.yaml
155153
users:
156154
type: rest # Required for ``RestYamlLoader`` to process imported routes
157155
prefix: /api

Resources/doc/body_listener.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ decoder is explicitly kept to its default service):
1717

1818
.. code-block:: yaml
1919
20-
# app/config/config.yml
2120
fos_rest:
2221
body_listener:
2322
decoders:
@@ -51,7 +50,6 @@ to camel cased ones, you can use the ``camel_keys`` array normalizer:
5150

5251
.. code-block:: yaml
5352
54-
# app/config/config.yml
5553
fos_rest:
5654
body_listener:
5755
array_normalizer: fos_rest.normalizer.camel_keys
@@ -77,7 +75,6 @@ You can also create your own array normalizer by implementing the
7775

7876
.. code-block:: yaml
7977
80-
# app/config/config.yml
8178
fos_rest:
8279
body_listener:
8380
array_normalizer: acme.normalizer.custom
@@ -87,7 +84,6 @@ If you want form data to be normalized, you can use the ``forms`` flag:
8784

8885
.. code-block:: yaml
8986
90-
# app/config/config.yml
9187
fos_rest:
9288
body_listener:
9389
array_normalizer:

0 commit comments

Comments
 (0)