Skip to content

Commit 8b48cc9

Browse files
committed
Remove bundle references
1 parent a4db8b8 commit 8b48cc9

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

components/form.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -398,17 +398,17 @@ is created from the form factory.
398398
399399
.. code-block:: php-symfony
400400
401-
// src/Acme/TaskBundle/Controller/DefaultController.php
402-
namespace Acme\TaskBundle\Controller;
401+
// src/Controller/TaskController.php
402+
namespace App\Controller;
403403
404404
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
405405
use Symfony\Component\HttpFoundation\Request;
406406
use Symfony\Component\Form\Extension\Core\Type\TextType;
407407
use Symfony\Component\Form\Extension\Core\Type\DateType;
408408
409-
class DefaultController extends Controller
409+
class TaskController extends Controller
410410
{
411-
public function newAction(Request $request)
411+
public function new(Request $request)
412412
{
413413
// createFormBuilder is a shortcut to get the "form factory"
414414
// and then call "createBuilder()" on it
@@ -418,7 +418,7 @@ is created from the form factory.
418418
->add('dueDate', DateType::class)
419419
->getForm();
420420
421-
return $this->render('@AcmeTask/Default/new.html.twig', array(
421+
return $this->render('task/new.html.twig', array(
422422
'form' => $form->createView(),
423423
));
424424
}
@@ -604,16 +604,16 @@ method:
604604
605605
.. code-block:: php-symfony
606606
607-
// src/Acme/TaskBundle/Controller/DefaultController.php
608-
namespace Acme\TaskBundle\Controller;
607+
// src/Controller/TaskController.php
608+
namespace App\Controller;
609609
610610
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
611611
use Symfony\Component\Form\Extension\Core\Type\DateType;
612612
use Symfony\Component\Form\Extension\Core\Type\TextType;
613613
614-
class DefaultController extends Controller
614+
class TaskController extends Controller
615615
{
616-
public function newAction(Request $request)
616+
public function new(Request $request)
617617
{
618618
$form = $this->createFormBuilder()
619619
->add('task', TextType::class)

components/http_kernel.rst

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ on the request's information.
256256
information is typically placed on the ``Request`` via the ``RouterListener``).
257257
This string is then transformed into a PHP callable by doing the following:
258258

259-
a) The ``AcmeDemoBundle:Default:index`` format of the ``_controller`` key
260-
is changed to another string that contains the full class and method
261-
name of the controller by following the convention used in Symfony - e.g.
262-
``Acme\DemoBundle\Controller\DefaultController::indexAction``. This transformation
263-
is specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver`
259+
a) If the ``_controller`` key doesn't follow the recommended PHP namespace
260+
format (e.g. ``App\Controller\DefaultController::index``) its format is
261+
transformed into it. For example, the legacy ``AppBundle:Default:index``
262+
format would be changed to ``Acme\AppBundle\Controller\DefaultController::indexAction``.
263+
This transformation is specific to the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver`
264264
sub-class used by the Symfony Framework.
265265

266266
b) A new instance of your controller class is instantiated with no
@@ -300,11 +300,10 @@ on the event object that's passed to listeners on this event.
300300
the Symfony Framework, and many deal with collecting profiler data when
301301
the profiler is enabled.
302302

303-
One interesting listener comes from the `SensioFrameworkExtraBundle`_,
304-
which is packaged with the Symfony Standard Edition. This listener's
305-
`@ParamConverter`_ functionality allows you to pass a full object (e.g. a
306-
``Post`` object) to your controller instead of a scalar value (e.g. an
307-
``id`` parameter that was on your route). The listener -
303+
One interesting listener comes from the `SensioFrameworkExtraBundle`_. This
304+
listener's `@ParamConverter`_ functionality allows you to pass a full object
305+
(e.g. a ``Post`` object) to your controller instead of a scalar value (e.g.
306+
an ``id`` parameter that was on your route). The listener -
308307
``ParamConverterListener`` - uses reflection to look at each of the
309308
arguments of the controller and tries to use different methods to convert
310309
those to objects, which are then stored in the ``attributes`` property of
@@ -423,12 +422,11 @@ return a ``Response``.
423422
.. sidebar:: ``kernel.view`` in the Symfony Framework
424423

425424
There is no default listener inside the Symfony Framework for the ``kernel.view``
426-
event. However, one core bundle - `SensioFrameworkExtraBundle`_ - *does*
427-
add a listener to this event. If your controller returns an array,
428-
and you place the `@Template`_ annotation above the controller, then this
429-
listener renders a template, passes the array you returned from your
430-
controller to that template, and creates a ``Response`` containing the
431-
returned content from that template.
425+
event. However, `SensioFrameworkExtraBundle`_ *does* add a listener to this
426+
event. If your controller returns an array, and you place the `@Template`_
427+
annotation above the controller, then this listener renders a template,
428+
passes the array you returned from your controller to that template, and
429+
creates a ``Response`` containing the returned content from that template.
432430

433431
Additionally, a popular community bundle `FOSRestBundle`_ implements
434432
a listener on this event which aims to give you a robust view layer
@@ -514,9 +512,9 @@ as possible to the client (e.g. sending emails).
514512

515513
.. sidebar:: ``kernel.terminate`` in the Symfony Framework
516514

517-
If you use the SwiftmailerBundle with Symfony and use ``memory`` spooling,
518-
then the `EmailSenderListener`_ is activated, which actually delivers
519-
any emails that you scheduled to send during the request.
515+
If you use the :ref:`memory spooling <email-spool-memory>` option of the
516+
default Symfony mailer, then the `EmailSenderListener`_ is activated, which
517+
actually delivers any emails that you scheduled to send during the request.
520518

521519
.. _component-http-kernel-kernel-exception:
522520

components/var_dumper.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ You can install the component in 2 different ways:
1919

2020
.. note::
2121

22-
If using it inside a Symfony application, make sure that the
23-
DebugBundle is enabled in your ``app/AppKernel.php`` file.
22+
If using it inside a Symfony application, make sure that the DebugBundle has
23+
been installed (or run ``composer required debug`` to install it).
2424

2525
.. _components-var-dumper-dump:
2626

email/spool.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ it somewhere such as a file. Another process can then read from the spool and
1515
take care of sending the emails in the spool. Currently only spooling to file or
1616
memory is supported.
1717

18+
.. _email-spool-memory:
19+
1820
Spool Using Memory
1921
------------------
2022

0 commit comments

Comments
 (0)