Skip to content

Commit 6405a21

Browse files
committed
Merge branch '2.5'
* 2.5: Some fixes thanks to @stof Clarifying that the bundles best practices entry is for reusable bundles, not for app bundles routing example fixed with routing.xml file [Cookbook][Doctrine] Fix typo in XML configuration for custom SQL function Fixed broken external link to DemoController Test
2 parents b6286fd + 6c6aecf commit 6405a21

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

book/http_fundamentals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ by adding an entry for ``/contact`` to your routing configuration file:
435435
436436
.. code-block:: xml
437437
438-
<!-- app/config/config.xml -->
438+
<!-- app/config/routing.xml -->
439439
<?xml version="1.0" encoding="UTF-8" ?>
440440
<routes xmlns="http://symfony.com/schema/routing"
441441
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

book/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,6 @@ Learn more
867867
* :doc:`/cookbook/testing/profiling`
868868
* :doc:`/cookbook/testing/bootstrap`
869869

870-
.. _`DemoControllerTest`: https://github.com/symfony/symfony-standard/blob/master/src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
870+
.. _`DemoControllerTest`: https://github.com/sensiolabs/SensioDistributionBundle/blob/master/Resources/skeleton/acme-demo-bundle/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
871871
.. _`$_SERVER`: http://php.net/manual/en/reserved.variables.server.php
872872
.. _`documentation`: http://phpunit.de/manual/current/en/

cookbook/bundles/best_practices.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
.. index::
22
single: Bundle; Best practices
33

4-
How to Use best Practices for Structuring Bundles
5-
=================================================
4+
Best Practices for Reusable Bundles
5+
===================================
66

7-
A bundle is a directory that has a well-defined structure and can host anything
8-
from classes to controllers and web resources. Even if bundles are very
9-
flexible, you should follow some best practices if you want to distribute them.
7+
There are 2 types of bundles:
8+
9+
* Application-specific bundles: only used to build your application;
10+
* Reusable bundles: meant to be shared across many projects.
11+
12+
This article is all about how to structure your **reusable bundles** so that
13+
they're easy to configure and extend. Many of these recommendations do not
14+
apply to application bundles because you'll want to keep those as simple
15+
as possible. For application bundles, just follow the practices shown throughout
16+
the book and cookbook.
1017

1118
.. index::
1219
pair: Bundle; Naming conventions

cookbook/doctrine/custom_dql_functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ In Symfony, you can register your custom DQL functions as follows:
3939
<doctrine:orm>
4040
<!-- ... -->
4141
<doctrine:dql>
42-
<doctrine:string-function name="test_string>Acme\HelloBundle\DQL\StringFunction</doctrine:string-function>
43-
<doctrine:string-function name="second_string>Acme\HelloBundle\DQL\SecondStringFunction</doctrine:string-function>
44-
<doctrine:numeric-function name="test_numeric>Acme\HelloBundle\DQL\NumericFunction</doctrine:numeric-function>
45-
<doctrine:datetime-function name="test_datetime>Acme\HelloBundle\DQL\DatetimeFunction</doctrine:datetime-function>
42+
<doctrine:string-function name="test_string">Acme\HelloBundle\DQL\StringFunction</doctrine:string-function>
43+
<doctrine:string-function name="second_string">Acme\HelloBundle\DQL\SecondStringFunction</doctrine:string-function>
44+
<doctrine:numeric-function name="test_numeric">Acme\HelloBundle\DQL\NumericFunction</doctrine:numeric-function>
45+
<doctrine:datetime-function name="test_datetime">Acme\HelloBundle\DQL\DatetimeFunction</doctrine:datetime-function>
4646
</doctrine:dql>
4747
</doctrine:orm>
4848
</doctrine:config>

0 commit comments

Comments
 (0)