@@ -51,14 +51,14 @@ isolated context, but they can share common bundles, configuration, and code if
5151desired. The optimal approach will depend on your specific needs and
5252requirements, so it's up to you to decide which best suits your project.
5353
54- First, create a new ``applications `` directory at the root of your project, which will
54+ First, create a new ``apps `` directory at the root of your project, which will
5555hold all the necessary applications. Each application will follow a simplified
5656directory structure like the one described in :ref: `Symfony Best Practice </best_practices >`:
5757
5858.. code-block :: text
5959
6060 your-project/
61- ├─ applications /
61+ ├─ apps /
6262 │ └─ api/
6363 │ ├─ config/
6464 │ │ ├─ bundles.php
@@ -77,7 +77,7 @@ directory structure like the one described in :ref:`Symfony Best Practice </best
7777
7878 Note that the ``config/ `` and ``src/ `` directories at the root of the
7979 project will represent the shared context among all applications within the
80- ``applications / `` directory. Therefore, you should carefully consider what is
80+ ``apps / `` directory. Therefore, you should carefully consider what is
8181 common and what should be placed in the specific application.
8282
8383.. tip ::
@@ -86,7 +86,7 @@ directory structure like the one described in :ref:`Symfony Best Practice </best
8686 ``App `` to ``Shared ``, as it will make it easier to distinguish and provide
8787 clearer meaning to this context.
8888
89- Since the new ``applications /api/src/ `` directory will host the PHP code related to the
89+ Since the new ``apps /api/src/ `` directory will host the PHP code related to the
9090API, you have to update the ``composer.json `` file to include it in the autoload
9191section:
9292
@@ -96,7 +96,7 @@ section:
9696 "autoload" : {
9797 "psr-4" : {
9898 "Shared\\ " : " src/" ,
99- "Api\\ " : " applications /api/src/"
99+ "Api\\ " : " apps /api/src/"
100100 }
101101 }
102102 }
@@ -135,7 +135,7 @@ resources::
135135
136136 public function getAppConfigDir(): string
137137 {
138- return $this->getProjectDir().'/applications /'.$this->id.'/config';
138+ return $this->getProjectDir().'/apps /'.$this->id.'/config';
139139 }
140140
141141 public function registerBundles(): iterable
@@ -229,7 +229,7 @@ but it should typically be added to your web server configuration.
229229 .. caution ::
230230
231231 The value of this variable must match the application directory within
232- ``applications / `` as it is used in the Kernel to load the specific application
232+ ``apps / `` as it is used in the Kernel to load the specific application
233233 configuration.
234234
235235Step 4) Update the Front Controllers
@@ -322,15 +322,15 @@ Let's consider that you need to create another app called ``admin``. If you
322322follow the :ref: `Symfony Best Practices </best_practices >`, the shared Kernel
323323templates will be located in the ``templates/ `` directory at the project's root.
324324For admin-specific templates, you can create a new directory
325- ``applications /admin/templates/ `` which you will need to manually configure under the
325+ ``apps /admin/templates/ `` which you will need to manually configure under the
326326Admin application:
327327
328328.. code-block :: yaml
329329
330- # applications /admin/config/packages/twig.yaml
330+ # apps /admin/config/packages/twig.yaml
331331 twig :
332332 paths :
333- ' %kernel.project_dir%/applications /admin/templates ' : Admin
333+ ' %kernel.project_dir%/apps /admin/templates ' : Admin
334334
335335 Then, use this Twig namespace to reference any template within the Admin
336336application only, for example ``@Admin/form/fields.html.twig ``.
@@ -345,7 +345,7 @@ default. Within its parent class, ``KernelTestCase``, there is a method called
345345the application during tests. However, the current logic of this method doesn't
346346include the new application ID argument, so you need to update it::
347347
348- // applications /api/tests/ApiTestCase.php
348+ // apps /api/tests/ApiTestCase.php
349349 namespace Api\Tests;
350350
351351 use Shared\Kernel;
@@ -368,7 +368,7 @@ include the new application ID argument, so you need to update it::
368368 This examples uses a hardcoded application ID value because the tests
369369 extending this ``ApiTestCase `` class will focus solely on the ``api `` tests.
370370
371- Now, create a ``tests/ `` directory inside the ``applications /api/ `` application. Then,
371+ Now, create a ``tests/ `` directory inside the ``apps /api/ `` application. Then,
372372update both the ``composer.json `` file and ``phpunit.xml `` configuration about
373373its existence:
374374
@@ -378,7 +378,7 @@ its existence:
378378 "autoload-dev" : {
379379 "psr-4" : {
380380 "Shared\\ Tests\\ " : " tests/" ,
381- "Api\\ Tests\\ " : " applications /api/tests/"
381+ "Api\\ Tests\\ " : " apps /api/tests/"
382382 }
383383 }
384384 }
@@ -394,7 +394,7 @@ And, here is the update needed for the ``phpunit.xml`` file:
394394 <directory >tests</directory >
395395 </testsuite >
396396 <testsuite name =" api" >
397- <directory >applications /api/tests</directory >
397+ <directory >apps /api/tests</directory >
398398 </testsuite >
399399 </testsuites >
400400
@@ -408,7 +408,7 @@ you will have to repeat the step 1 only:
408408.. code-block :: text
409409
410410 your-project/
411- ├─ applications /
411+ ├─ apps /
412412 │ ├─ admin/
413413 │ │ ├─ config/
414414 │ │ │ ├─ bundles.php
0 commit comments