Skip to content

Commit c4e07cc

Browse files
committed
Merge branch '2.7'
2 parents e84182d + 56a80f8 commit c4e07cc

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

best_practices/creating-the-project.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ ProductBundle, InvoiceBundle, etc.
9494

9595
But a bundle is *meant* to be something that can be reused as a stand-alone
9696
piece of software. If UserBundle cannot be used *"as is"* in other Symfony
97-
apps, then it shouldn't be its own bundle. Moreover InvoiceBundle depends on
97+
apps, then it shouldn't be its own bundle. Moreover, if InvoiceBundle depends on
9898
ProductBundle, then there's no advantage to having two separate bundles.
9999

100100
.. best-practice::

book/controller.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Controller
55
==========
66

77
A controller is a PHP callable you create that takes information from the
8-
HTTP request and constructs and returns an HTTP response (as a Symfony
8+
HTTP request and creates and returns an HTTP response (as a Symfony
99
``Response`` object). The response could be an HTML page, an XML document,
1010
a serialized JSON array, an image, a redirect, a 404 error or anything else
1111
you can dream up. The controller contains whatever arbitrary logic *your
@@ -34,7 +34,7 @@ common examples:
3434
for the homepage of the site.
3535

3636
* *Controller B* reads the ``slug`` parameter from the request to load a
37-
blog entry from the database and create a ``Response`` object displaying
37+
blog entry from the database and creates a ``Response`` object displaying
3838
that blog. If the ``slug`` can't be found in the database, it creates and
3939
returns a ``Response`` object with a 404 status code.
4040

@@ -201,7 +201,7 @@ to the controller:
201201
202202
return $collection;
203203
204-
Now, you can go to ``/hello/ryan`` (e.g. ``http://localhost:8000/app_dev.php/hello/ryan``
204+
Now, you can go to ``/hello/ryan`` (e.g. ``http://localhost:8000/hello/ryan``
205205
if you're using the :doc:`built-in web server </cookbook/web_server/built_in>`)
206206
and Symfony will execute the ``HelloController::indexAction()`` controller
207207
and pass in ``ryan`` for the ``$name`` variable. Creating a "page" means
@@ -490,7 +490,9 @@ You can also put templates in deeper sub-directories. Just try to avoid creating
490490
unnecessarily deep structures::
491491

492492
// renders app/Resources/views/hello/greetings/index.html.twig
493-
return $this->render('hello/greetings/index.html.twig', array('name' => $name));
493+
return $this->render('hello/greetings/index.html.twig', array(
494+
'name' => $name
495+
));
494496

495497
The Symfony templating engine is explained in great detail in the
496498
:doc:`Templating </book/templating>` chapter.
@@ -525,7 +527,7 @@ via the ``get()`` method. Here are several common services you might need::
525527

526528
$mailer = $this->get('mailer');
527529

528-
What other services exist? You can list all services, use the ``debug:container``
530+
What other services exist? To list all services, use the ``debug:container``
529531
console command:
530532

531533
.. code-block:: bash

cookbook/form/data_transformers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ by calling ``addModelTransformer`` (or ``addViewTransformer`` - see
130130

131131
// the "em" is an option that you pass when creating your form. Check out
132132
// the 3rd argument to createForm in the next code block to see how this
133-
// is passed to the form (also see setDefaultOptions).
133+
// is passed to the form (see also configureOptions).
134134
$entityManager = $options['em'];
135135
$transformer = new IssueToNumberTransformer($entityManager);
136136

cookbook/security/entity_provider.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ interface requires three methods: ``loadUserByUsername($username)``,
435435
->setParameter('username', $username)
436436
->setParameter('email', $username)
437437
->getQuery()
438-
->getOneOrNullResult()
438+
->getOneOrNullResult();
439439

440-
if ($user) {
440+
if (null === $user) {
441441
$message = sprintf(
442442
'Unable to find an active admin AppBundle:User object identified by "%s".',
443443
$username

cookbook/serializer.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@ Here is an example on how to load the
7474

7575
.. code-block:: yaml
7676
77-
# app/config/config.yml
78-
services:
79-
get_set_method_normalizer:
80-
class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
81-
tags:
82-
- { name: serializer.normalizer }
77+
# app/config/services.yml
78+
services:
79+
get_set_method_normalizer:
80+
class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
81+
tags:
82+
- { name: serializer.normalizer }
8383
8484
.. code-block:: xml
8585
86-
<!-- app/config/config.xml -->
86+
<!-- app/config/services.xml -->
8787
<services>
8888
<service id="get_set_method_normalizer" class="Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer">
8989
<tag name="serializer.normalizer" />
@@ -92,7 +92,7 @@ Here is an example on how to load the
9292
9393
.. code-block:: php
9494
95-
// app/config/config.php
95+
// app/config/services.php
9696
use Symfony\Component\DependencyInjection\Definition;
9797
9898
$definition = new Definition(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy