Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 58e694f

Browse filesBrowse files
committed
Tweaks thanks for great reviews!
1 parent 8974c48 commit 58e694f
Copy full SHA for 58e694f

7 files changed

+27
-20
lines changed

‎controller/error_pages.rst

Copy file name to clipboardExpand all lines: controller/error_pages.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ In that case, you might want to override one or both of the ``showAction()`` and
297297
// app/config/services.php
298298
use AppBundle\Controller\CustomExceptionController;
299299
300-
$$container->autowire(CustomExceptionController::class)
301-
setArgument('$debug', '%kernel.debug%');
300+
$container->autowire(CustomExceptionController::class)
301+
->setArgument('$debug', '%kernel.debug%');
302302
303303
.. tip::
304304

‎controller/soap_web_service.rst

Copy file name to clipboardExpand all lines: controller/soap_web_service.rst
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ In this case, the SOAP service will allow the client to call a method called
5151
}
5252

5353
Next, make sure that your new class is registered as a service. If you use
54-
:doc:`autowiring </service_container/autowiring>` (enabled by default), this is easy:
54+
:doc:`autowiring </service_container/autowiring>` (enabled by default in the Symfony
55+
Standard Edition), this is easy:
5556

5657
.. configuration-block::
5758

@@ -60,10 +61,11 @@ Next, make sure that your new class is registered as a service. If you use
6061
# app/config/services.yml
6162
services:
6263
_defaults:
63-
# be sure autowire is enabled
64+
# ...
65+
# be sure autowiring is enabled
6466
autowire: true
6567
66-
# load services from the Service directory
68+
# add Service/ to the list of directories to load services from
6769
AppBundle\:
6870
resource: '../../src/AppBundle/{Service,Updates,Command,Form,EventSubscriber,Twig,Security}'
6971
@@ -77,9 +79,9 @@ Next, make sure that your new class is registered as a service. If you use
7779
http://symfony.com/schema/dic/services/services-1.0.xsd">
7880
7981
<services>
80-
<defaults autowire="true" autoconfigure="true" />
82+
<defaults autowire="true" ... />
8183
82-
<!-- load services from the Service directory -->
84+
<!-- add Service/ to the list of directories to load services from -->
8385
<prototype namespace="AppBundle\" resource="../../src/AppBundle/{Service,Updates,Command,Form,EventSubscriber,Twig,Security}" />
8486
</services>
8587
</container>
@@ -93,7 +95,7 @@ Next, make sure that your new class is registered as a service. If you use
9395
->setPublic(false);
9496
9597
Below is an example of a controller that is capable of handling a SOAP
96-
request. BEcause ``indexAction()`` is accessible via ``/soap``, the WSDL document
98+
request. Because ``indexAction()`` is accessible via ``/soap``, the WSDL document
9799
can be retrieved via ``/soap?wsdl``::
98100

99101
namespace AppBundle\Controller;

‎controller/upload_file.rst

Copy file name to clipboardExpand all lines: controller/upload_file.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Creating an Uploader Service
221221
To avoid logic in controllers, making them big, you can extract the upload
222222
logic to a separate service::
223223

224-
// src/AppBundle/Service\FileUploader.php
224+
// src/AppBundle/Service/FileUploader.php
225225
namespace AppBundle\Service;
226226

227227
use Symfony\Component\HttpFoundation\File\UploadedFile;
@@ -293,6 +293,7 @@ Then, define a service for this class:
293293
Now you're ready to use this service in the controller::
294294

295295
// src/AppBundle/Controller/ProductController.php
296+
use Symfony\Component\HttpFoundation\Request;
296297
use AppBundle\Service\FileUploader;
297298

298299
// ...

‎doctrine/associations.rst

Copy file name to clipboardExpand all lines: doctrine/associations.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ following method to the ``ProductRepository`` class::
369369
// src/AppBundle/Repository/ProductRepository.php
370370
use Doctrine\ORM\EntityManagerInterface;
371371

372-
public function findOneByIdJoinedToCategory($productId, EntityManagerInterface $em)
372+
public function findOneByIdJoinedToCategory($productId)
373373
{
374374
$query = $em->createQuery(
375375
'SELECT p, c FROM AppBundle:Product p

‎doctrine/event_listeners_subscribers.rst

Copy file name to clipboardExpand all lines: doctrine/event_listeners_subscribers.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ managers that use this connection.
5151
<container xmlns="http://symfony.com/schema/dic/services"
5252
xmlns:doctrine="http://symfony.com/schema/dic/doctrine">
5353
<services>
54-
<!-- ... --
54+
<!-- ... -->
5555
5656
<service id="AppBundle\EventListener\SearchIndexer">
5757
<tag name="doctrine.event_listener" event="postPersist" />

‎doctrine/pdo_session_storage.rst

Copy file name to clipboardExpand all lines: doctrine/pdo_session_storage.rst
+12-8Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,12 @@ a second array argument to ``PdoSessionHandler``:
110110
use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
111111
// ...
112112
113-
$container->register(PdoSessionHandler::class)->setArguments(array(
114-
'mysql:dbname=mydatabase',
115-
array('db_table' => 'sessions', 'db_username' => 'myuser', 'db_password' => 'mypassword')
116-
));
113+
$container->register(PdoSessionHandler::class)
114+
->setArguments(array(
115+
'mysql:dbname=mydatabase',
116+
array('db_table' => 'sessions', 'db_username' => 'myuser', 'db_password' => 'mypassword')
117+
))
118+
;
117119
118120
These are parameters that you must configure:
119121

@@ -170,10 +172,12 @@ of your project's data, you can use the connection settings from the
170172
.. code-block:: php
171173
172174
// ...
173-
$container->register(PdoSessionHandler::class)->setArguments(array(
174-
'mysql:host=%database_host%;port=%database_port%;dbname=%database_name%',
175-
array('db_username' => '%database_user%', 'db_password' => '%database_password%')
176-
));
175+
$container->register(PdoSessionHandler::class)
176+
->setArguments(array(
177+
'mysql:host=%database_host%;port=%database_port%;dbname=%database_name%',
178+
array('db_username' => '%database_user%', 'db_password' => '%database_password%')
179+
))
180+
;
177181
178182
.. _example-sql-statements:
179183

‎event_dispatcher.rst

Copy file name to clipboardExpand all lines: event_dispatcher.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ the ``EventSubscriber`` directory. Symfony takes care of the rest.
184184
If your methods are *not* called when an exception is thrown, double-check that
185185
you're :ref:`loading services <service-container-services-load-example>` from
186186
the ``EventSubscriber`` directory and have :ref:`autoconfigure <services-autoconfigure>`
187-
enabled. You can also manually tag with ``kernel.event_subscriber``.
187+
enabled. You can also manually add the ``kernel.event_subscriber`` tag.
188188

189189
Request Events, Checking Types
190190
------------------------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.