Skip to content

Commit

Permalink
Merge branch '2.8' into 3.0
Browse files Browse the repository at this point in the history
Conflicts:
	book/service_container.rst
  • Loading branch information
wouterj committed Dec 18, 2015
2 parents a6ed958 + b2b1239 commit 4cd6dc2
Show file tree
Hide file tree
Showing 14 changed files with 198 additions and 190 deletions.
6 changes: 6 additions & 0 deletions best_practices/creating-the-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ to create files and execute the following commands:
c:\> cd projects/
c:\projects\> php symfony new blog
.. note::

If the installer doesn't work for you or doesn't output anything, make sure
that the `Phar extension`_ is installed and enabled on your computer.

This command creates a new directory called ``blog`` that contains a fresh new
project based on the most recent stable Symfony version available. In addition,
the installer checks if your system meets the technical requirements to execute
Expand Down Expand Up @@ -169,3 +174,4 @@ structure of Symfony, you can
.. _`Composer download page`: https://getcomposer.org/download/
.. _`public checksums repository`: https://github.com/sensiolabs/checksums
.. _`these steps`: http://fabien.potencier.org/signing-project-releases.html
.. _`Phar extension`: http://php.net/manual/en/intro.phar.php
6 changes: 4 additions & 2 deletions book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ Controllers are also called *actions*.

This controller is pretty straightforward:

* *line 4*: Symfony takes advantage of PHP's namespace functionality to
namespace the entire controller class. The ``use`` keyword imports the
* *line 2*: Symfony takes advantage of PHP's namespace functionality to
namespace the entire controller class.

* *line 4*: Symfony again takes advantage of PHP's namespace functionality: the ``use`` keyword imports the
``Response`` class, which the controller must return.

* *line 6*: The class name is the concatenation of a name for the controller
Expand Down
2 changes: 1 addition & 1 deletion book/from_flat_php_to_symfony2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ them for you. Here's the same sample application, now built in Symfony::
{
$posts = $this->get('doctrine')
->getManager()
->createQuery('SELECT p FROM AcmeBlogBundle:Post p')
->createQuery('SELECT p FROM AppBundle:Post p')
->execute();

return $this->render('Blog/list.html.php', array('posts' => $posts));
Expand Down
14 changes: 7 additions & 7 deletions book/includes/_service_container_my_mailer.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# app/config/services.yml
services:
my_mailer:
class: Acme\HelloBundle\Mailer
app.mailer:
class: AppBundle\Mailer
arguments: [sendmail]

.. code-block:: xml
Expand All @@ -15,10 +15,10 @@
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd"
>
http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="my_mailer" class="Acme\HelloBundle\Mailer">
<service id="app.mailer" class="AppBundle\Mailer">
<argument>sendmail</argument>
</service>
</services>
Expand All @@ -29,7 +29,7 @@
// app/config/services.php
use Symfony\Component\DependencyInjection\Definition;

$container->setDefinition('my_mailer', new Definition(
'Acme\HelloBundle\Mailer',
$container->setDefinition('app.mailer', new Definition(
'AppBundle\Mailer',
array('sendmail')
));
6 changes: 6 additions & 0 deletions book/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ to meet those requirements.
distributing them. If you want to verify the integrity of any Symfony
version, follow the steps `explained in this post`_.

.. note::

If the installer doesn't work for you or doesn't output anything, make sure
that the `Phar extension`_ is installed and enabled on your computer.

Basing your Project on a Specific Symfony Version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -419,3 +424,4 @@ a wide variety of articles about solving specific problems with Symfony.
.. _`Symfony REST Edition`: https://github.com/gimler/symfony-rest-edition
.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle
.. _`Git`: http://git-scm.com/
.. _`Phar extension`: http://php.net/manual/en/intro.phar.php
6 changes: 3 additions & 3 deletions book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1186,9 +1186,9 @@ Notice that Symfony adds the string ``Controller`` to the class name (``Blog``
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction``).

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

.. note::

Expand Down
Loading

0 comments on commit 4cd6dc2

Please sign in to comment.