Skip to content

Commit a167029

Browse files
author
gary houbre
committed
Add Missing namespace and review filepath
1 parent c4f9bf1 commit a167029

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

controller/argument_value_resolver.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ In the next example, you'll create a value resolver to inject the object that
6565
represents the current user whenever a controller method type-hints an argument
6666
with the ``User`` class::
6767

68+
// src/Controller/UserController.php
6869
namespace App\Controller;
6970

7071
use App\Entity\User;

controller/service.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ a service like: ``App\Controller\HelloController::index``:
2626
.. code-block:: php-annotations
2727
2828
// src/Controller/HelloController.php
29+
namespace App\Controller;
30+
2931
use Symfony\Component\Routing\Annotation\Route;
3032
3133
class HelloController
@@ -87,6 +89,8 @@ which is a common practice when following the `ADR pattern`_
8789
.. code-block:: php-annotations
8890
8991
// src/Controller/Hello.php
92+
namespace App\Controller;
93+
9094
use Symfony\Component\HttpFoundation\Response;
9195
use Symfony\Component\Routing\Annotation\Route;
9296

controller/soap_web_service.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Finally, below is an example of a controller that is capable of handling a SOAP
5757
request. Because ``index()`` is accessible via ``/soap``, the WSDL document
5858
can be retrieved via ``/soap?wsdl``::
5959

60+
// src/Controller/HelloServiceController.php
6061
namespace App\Controller;
6162

6263
use App\Service\HelloService;

controller/upload_file.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ Then, define a service for this class:
332332
Now you're ready to use this service in the controller::
333333

334334
// src/Controller/ProductController.php
335+
namespace App\Controller;
336+
335337
use App\Service\FileUploader;
336338
use Symfony\Component\HttpFoundation\Request;
337339

doctrine/dbal.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ if you *don't* want to use the Doctrine ORM.
4444
You can then access the Doctrine DBAL connection by autowiring the ``Connection``
4545
object::
4646

47+
// src/Controller/UserController.php
48+
namespace App\Controller;
49+
4750
use Doctrine\DBAL\Driver\Connection;
4851

4952
class UserController extends AbstractController

0 commit comments

Comments
 (0)