Skip to content

Commit dcf0a15

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Fix wording and add missing wording
2 parents b6b0dc9 + 03057c0 commit dcf0a15

23 files changed

+64
-16
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/error_pages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ JSON/XML/CSV/YAML encoders. When your application throws an exception, Symfony
208208
can output it in one of those formats. If you want to change the output
209209
contents, create a new Normalizer that supports the ``FlattenException`` input::
210210

211-
# src/App/Serializer/MyCustomProblemNormalizer.php
211+
# src/Serializer/MyCustomProblemNormalizer.php
212212
namespace App\Serializer;
213213

214214
use Symfony\Component\ErrorHandler\Exception\FlattenException;

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

deployment/fortrabbit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Deploying to fortrabbit
99
For details on deploying to fortrabbit, see their official documentation:
1010
`Install Symfony`_
1111

12-
.. _`Install Symfony`: https://help.fortrabbit.com/install-symfony-3-uni
12+
.. _`Install Symfony`: https://help.fortrabbit.com/install-symfony-5-uni

doctrine/associations.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ What about *removing* a ``Product`` from a ``Category``? The ``make:entity`` com
548548
also generated a ``removeProduct()`` method::
549549

550550
// src/Entity/Category.php
551+
namespace App\Entity;
551552

552553
// ...
553554
class Category

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

doctrine/events.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ define a callback for the ``prePersist`` Doctrine event:
5656
.. code-block:: php-annotations
5757
5858
// src/Entity/Product.php
59+
namespace App\Entity;
60+
5961
use Doctrine\ORM\Mapping as ORM;
6062
6163
// When using annotations, don't forget to add @ORM\HasLifecycleCallbacks()

doctrine/multiple_entity_managers.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ When working with multiple entity managers to generate migrations:
237237
If you *do* omit the entity manager's name when asking for it,
238238
the default entity manager (i.e. ``default``) is returned::
239239

240+
// src/Controller/UserController.php
241+
namespace App\Controller;
242+
240243
// ...
241244

242245
use Doctrine\ORM\EntityManagerInterface;
@@ -263,6 +266,9 @@ entity manager to persist and fetch its entities.
263266

264267
The same applies to repository calls::
265268

269+
// src/Controller/UserController.php
270+
namespace App\Controller;
271+
266272
use AcmeStoreBundle\Entity\Customer;
267273
use AcmeStoreBundle\Entity\Product;
268274
// ...

0 commit comments

Comments
 (0)