Skip to content

Commit 4cd6dc2

Browse files
committed
Merge branch '2.8' into 3.0
Conflicts: book/service_container.rst
2 parents a6ed958 + b2b1239 commit 4cd6dc2

14 files changed

+198
-190
lines changed

best_practices/creating-the-project.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ to create files and execute the following commands:
3434
c:\> cd projects/
3535
c:\projects\> php symfony new blog
3636
37+
.. note::
38+
39+
If the installer doesn't work for you or doesn't output anything, make sure
40+
that the `Phar extension`_ is installed and enabled on your computer.
41+
3742
This command creates a new directory called ``blog`` that contains a fresh new
3843
project based on the most recent stable Symfony version available. In addition,
3944
the installer checks if your system meets the technical requirements to execute
@@ -169,3 +174,4 @@ structure of Symfony, you can
169174
.. _`Composer download page`: https://getcomposer.org/download/
170175
.. _`public checksums repository`: https://github.com/sensiolabs/checksums
171176
.. _`these steps`: http://fabien.potencier.org/signing-project-releases.html
177+
.. _`Phar extension`: http://php.net/manual/en/intro.phar.php

book/controller.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ Controllers are also called *actions*.
116116

117117
This controller is pretty straightforward:
118118

119-
* *line 4*: Symfony takes advantage of PHP's namespace functionality to
120-
namespace the entire controller class. The ``use`` keyword imports the
119+
* *line 2*: Symfony takes advantage of PHP's namespace functionality to
120+
namespace the entire controller class.
121+
122+
* *line 4*: Symfony again takes advantage of PHP's namespace functionality: the ``use`` keyword imports the
121123
``Response`` class, which the controller must return.
122124

123125
* *line 6*: The class name is the concatenation of a name for the controller

book/from_flat_php_to_symfony2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ them for you. Here's the same sample application, now built in Symfony::
554554
{
555555
$posts = $this->get('doctrine')
556556
->getManager()
557-
->createQuery('SELECT p FROM AcmeBlogBundle:Post p')
557+
->createQuery('SELECT p FROM AppBundle:Post p')
558558
->execute();
559559

560560
return $this->render('Blog/list.html.php', array('posts' => $posts));

book/includes/_service_container_my_mailer.rst.inc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
# app/config/services.yml
66
services:
7-
my_mailer:
8-
class: Acme\HelloBundle\Mailer
7+
app.mailer:
8+
class: AppBundle\Mailer
99
arguments: [sendmail]
1010

1111
.. code-block:: xml
@@ -15,10 +15,10 @@
1515
<container xmlns="http://symfony.com/schema/dic/services"
1616
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1717
xsi:schemaLocation="http://symfony.com/schema/dic/services
18-
http://symfony.com/schema/dic/services/services-1.0.xsd"
19-
>
18+
http://symfony.com/schema/dic/services/services-1.0.xsd">
19+
2020
<services>
21-
<service id="my_mailer" class="Acme\HelloBundle\Mailer">
21+
<service id="app.mailer" class="AppBundle\Mailer">
2222
<argument>sendmail</argument>
2323
</service>
2424
</services>
@@ -29,7 +29,7 @@
2929
// app/config/services.php
3030
use Symfony\Component\DependencyInjection\Definition;
3131

32-
$container->setDefinition('my_mailer', new Definition(
33-
'Acme\HelloBundle\Mailer',
32+
$container->setDefinition('app.mailer', new Definition(
33+
'AppBundle\Mailer',
3434
array('sendmail')
3535
));

book/installation.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ to meet those requirements.
8383
distributing them. If you want to verify the integrity of any Symfony
8484
version, follow the steps `explained in this post`_.
8585

86+
.. note::
87+
88+
If the installer doesn't work for you or doesn't output anything, make sure
89+
that the `Phar extension`_ is installed and enabled on your computer.
90+
8691
Basing your Project on a Specific Symfony Version
8792
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8893

@@ -419,3 +424,4 @@ a wide variety of articles about solving specific problems with Symfony.
419424
.. _`Symfony REST Edition`: https://github.com/gimler/symfony-rest-edition
420425
.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle
421426
.. _`Git`: http://git-scm.com/
427+
.. _`Phar extension`: http://php.net/manual/en/intro.phar.php

book/routing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,9 +1186,9 @@ Notice that Symfony adds the string ``Controller`` to the class name (``Blog``
11861186
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction``).
11871187

11881188
You could also refer to this controller using its fully-qualified class name
1189-
and method: ``AppBundle\Controller\BlogController::showAction``.
1190-
But if you follow some simple conventions, the logical name is more concise
1191-
and allows more flexibility.
1189+
and method: ``AppBundle\Controller\BlogController::showAction``. But if you
1190+
follow some simple conventions, the logical name is more concise and allows
1191+
more flexibility.
11921192

11931193
.. note::
11941194

0 commit comments

Comments
 (0)