Skip to content

Commit 03057c0

Browse files
committed
minor #14351 Fix wording and add missing wording (TheGarious)
This PR was submitted for the master branch but it was squashed and merged into the 4.4 branch instead. Discussion ---------- Fix wording and add missing wording <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- b9b89c0 Fix wording and add missing wording
2 parents 70c96fb + b9b89c0 commit 03057c0

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
@@ -76,6 +76,7 @@ In the next example, you'll create a value resolver to inject the object that
7676
represents the current user whenever a controller method type-hints an argument
7777
with the ``User`` class::
7878

79+
// src/Controller/UserController.php
7980
namespace App\Controller;
8081

8182
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
@@ -327,6 +327,8 @@ Then, define a service for this class:
327327
Now you're ready to use this service in the controller::
328328

329329
// src/Controller/ProductController.php
330+
namespace App\Controller;
331+
330332
use App\Service\FileUploader;
331333
use Symfony\Component\HttpFoundation\Request;
332334

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
@@ -230,6 +230,9 @@ When working with multiple entity managers to generate migrations:
230230
If you *do* omit the entity manager's name when asking for it,
231231
the default entity manager (i.e. ``default``) is returned::
232232

233+
// src/Controller/UserController.php
234+
namespace App\Controller;
235+
233236
// ...
234237

235238
use Doctrine\ORM\EntityManagerInterface;
@@ -256,6 +259,9 @@ entity manager to persist and fetch its entities.
256259

257260
The same applies to repository calls::
258261

262+
// src/Controller/UserController.php
263+
namespace App\Controller;
264+
259265
use AcmeStoreBundle\Entity\Customer;
260266
use AcmeStoreBundle\Entity\Product;
261267
// ...

0 commit comments

Comments
 (0)