Skip to content

Commit 7064286

Browse files
committed
Some manual tweaks to the automated migrations
1 parent 9e5cd17 commit 7064286

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+232
-233
lines changed

bundles/extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Other available loaders are the ``YamlFileLoader``, ``PhpFileLoader`` and
116116
.. caution::
117117

118118
If you removed the default file with service definitions (i.e.
119-
``app/config/services.yaml``), make sure to also remove it from the
119+
``config/services.yaml``), make sure to also remove it from the
120120
``imports`` key in ``app/config/config.yml``.
121121

122122
Using Configuration to Change the Services

bundles/override.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Routing
2626

2727
Routing is never automatically imported in Symfony. If you want to include
2828
the routes from any bundle, then they must be manually imported from somewhere
29-
in your application (e.g. ``app/config/routes.yaml``).
29+
in your application (e.g. ``config/routes.yml``).
3030

3131
The easiest way to "override" a bundle's routing is to never import it at
3232
all. Instead of importing a third-party bundle's routing, simply copy

console.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ useful one is the :class:`Symfony\\Component\\Console\\Tester\\CommandTester`
226226
class. It uses special input and output classes to ease testing without a real
227227
console::
228228

229-
// tests/AppBundle/Command/CreateUserCommandTest.php
230-
namespace Tests\App\Command;
229+
// tests/Command/CreateUserCommandTest.php
230+
namespace App\Tests\Command;
231231

232232
use App\Command\CreateUserCommand;
233233
use Symfony\Bundle\FrameworkBundle\Console\Application;

controller.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ controller's service config:
282282

283283
.. code-block:: yaml
284284
285-
# app/config/services.yaml
285+
# config/services.yaml
286286
services:
287287
# ...
288288
@@ -299,7 +299,7 @@ controller's service config:
299299
300300
.. code-block:: xml
301301
302-
<!-- app/config/services.xml -->
302+
<!-- config/services.xml -->
303303
<?xml version="1.0" encoding="UTF-8" ?>
304304
<container xmlns="http://symfony.com/schema/dic/services"
305305
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -323,7 +323,7 @@ controller's service config:
323323
324324
.. code-block:: php
325325
326-
// app/config/services.php
326+
// config/services.php
327327
use App\Controller\LuckyController;
328328
329329
$container->register(LuckyController::class)

controller/argument_value_resolver.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ and adding a priority.
148148

149149
.. code-block:: yaml
150150
151-
# app/config/services.yaml
151+
# config/services.yaml
152152
services:
153153
_defaults:
154154
# ... be sure autowiring is enabled
@@ -161,7 +161,7 @@ and adding a priority.
161161
162162
.. code-block:: xml
163163
164-
<!-- app/config/services.xml -->
164+
<!-- config/services.xml -->
165165
<?xml version="1.0" encoding="UTF-8" ?>
166166
<container xmlns="http://symfony.com/schema/dic/services"
167167
xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
@@ -181,7 +181,7 @@ and adding a priority.
181181
182182
.. code-block:: php
183183
184-
// app/config/services.php
184+
// config/services.php
185185
use App\ArgumentResolver\UserValueResolver;
186186
187187
$container->autowire(UserValueResolver::class)

controller/error_pages.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ In that case, you might want to override one or both of the ``showAction()`` and
268268

269269
.. code-block:: yaml
270270
271-
# app/config/services.yaml
271+
# config/services.yaml
272272
services:
273273
_defaults:
274274
# ... be sure autowiring is enabled
@@ -282,7 +282,7 @@ In that case, you might want to override one or both of the ``showAction()`` and
282282
283283
.. code-block:: xml
284284
285-
<!-- app/config/services.xml -->
285+
<!-- config/services.xml -->
286286
<?xml version="1.0" encoding="UTF-8" ?>
287287
<container xmlns="http://symfony.com/schema/dic/services"
288288
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -303,7 +303,7 @@ In that case, you might want to override one or both of the ``showAction()`` and
303303
304304
.. code-block:: php
305305
306-
// app/config/services.php
306+
// config/services.php
307307
use App\Controller\CustomExceptionController;
308308
309309
$container->autowire(CustomExceptionController::class)

controller/service.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ syntax:
5151
5252
.. code-block:: xml
5353
54-
<!-- app/config/routing.xml -->
54+
<!-- config/routes.xml -->
5555
<?xml version="1.0" encoding="UTF-8" ?>
5656
<routes xmlns="http://symfony.com/schema/routing"
5757
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -66,7 +66,7 @@ syntax:
6666
6767
.. code-block:: php
6868
69-
// app/config/routing.php
69+
// config/routes.php
7070
$collection->add('hello', new Route('/hello', array(
7171
'_controller' => 'app.hello_controller:indexAction',
7272
)));

controller/upload_file.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Then, define a service for this class:
256256

257257
.. code-block:: yaml
258258
259-
# app/config/services.yaml
259+
# config/services.yaml
260260
services:
261261
# ...
262262
@@ -266,7 +266,7 @@ Then, define a service for this class:
266266
267267
.. code-block:: xml
268268
269-
<!-- app/config/services.xml -->
269+
<!-- config/services.xml -->
270270
<?xml version="1.0" encoding="UTF-8" ?>
271271
<container xmlns="http://symfony.com/schema/dic/services"
272272
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -281,7 +281,7 @@ Then, define a service for this class:
281281
282282
.. code-block:: php
283283
284-
// app/config/services.php
284+
// config/services.php
285285
use App\Service\FileUploader;
286286
287287
$container->autowire(FileUploader::class)
@@ -372,7 +372,7 @@ Now, register this class as a Doctrine listener:
372372

373373
.. code-block:: yaml
374374
375-
# app/config/services.yaml
375+
# config/services.yaml
376376
services:
377377
_defaults:
378378
# ... be sure autowiring is enabled
@@ -405,7 +405,7 @@ Now, register this class as a Doctrine listener:
405405
406406
.. code-block:: php
407407
408-
// app/config/services.php
408+
// config/services.php
409409
use App\EventListener\BrochureUploaderListener;
410410
411411
$container->autowire(BrochureUploaderListener::class)

deployment/azure-website.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ below:
294294

295295
The code of the Symfony application has now been deployed to the Azure Website
296296
which you can browse from the file explorer of the Kudu application. You should
297-
see the ``app/``, ``src/`` and ``public/`` directories under your ``site/wwwroot``
297+
see the ``config/``, ``src/`` and ``public/`` directories under your ``site/wwwroot``
298298
directory on the Azure Website filesystem.
299299

300300
Configure the Symfony Application

doctrine/registration_form.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ the :ref:`user password encoding <security-encoding-user-password>` article.
320320
321321
.. code-block:: xml
322322
323-
<!-- app/config/routing.xml -->
323+
<!-- config/routes.xml -->
324324
<?xml version="1.0" encoding="UTF-8" ?>
325325
<routes xmlns="http://symfony.com/schema/routing"
326326
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -333,7 +333,7 @@ the :ref:`user password encoding <security-encoding-user-password>` article.
333333
334334
.. code-block:: php
335335
336-
// app/config/routing.php
336+
// config/routes.php
337337
use Symfony\Component\Routing\RouteCollection;
338338
use Symfony\Component\Routing\Route;
339339

email/testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Start with an easy controller action that sends an email::
2828
In your functional test, use the ``swiftmailer`` collector on the profiler
2929
to get information about the messages sent on the previous request::
3030

31-
// tests/AppBundle/Controller/MailControllerTest.php
32-
namespace Tests\App\Controller;
31+
// tests/Controller/MailControllerTest.php
32+
namespace App\Tests\Controller;
3333

3434
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
3535

event_dispatcher.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ using a special "tag":
7575

7676
.. code-block:: yaml
7777
78-
# app/config/services.yaml
78+
# config/services.yaml
7979
services:
8080
App\EventListener\ExceptionListener:
8181
tags:
8282
- { name: kernel.event_listener, event: kernel.exception }
8383
8484
.. code-block:: xml
8585
86-
<!-- app/config/services.xml -->
86+
<!-- config/services.xml -->
8787
<?xml version="1.0" encoding="UTF-8" ?>
8888
<container xmlns="http://symfony.com/schema/dic/services"
8989
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -101,7 +101,7 @@ using a special "tag":
101101
102102
.. code-block:: php
103103
104-
// app/config/services.php
104+
// config/services.php
105105
use App\EventListener\ExceptionListener;
106106
107107
$container

form/form_dependencies.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ manually and tag it with ``form.type``:
105105

106106
.. code-block:: yaml
107107
108-
# src/Resources/config/services.yaml
108+
# config/services.yaml
109109
services:
110110
App\Form\TaskType:
111111
arguments: ['@doctrine.orm.entity_manager']
112112
tags: [form.type]
113113
114114
.. code-block:: xml
115115
116-
<!-- src/Resources/config/services.xml -->
116+
<!-- config/services.xml -->
117117
<?xml version="1.0" encoding="UTF-8" ?>
118118
<container xmlns="http://symfony.com/schema/dic/services"
119119
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -130,7 +130,7 @@ manually and tag it with ``form.type``:
130130
131131
.. code-block:: php
132132
133-
// src/Resources/config/services.php
133+
// config/services.php
134134
use App\Form\TaskType;
135135
use Symfony\Component\DependencyInjection\Reference;
136136

form/type_guesser.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ and tag it with ``form.type_guesser``:
184184

185185
.. code-block:: yaml
186186
187-
# app/config/services.yaml
187+
# config/services.yaml
188188
services:
189189
# ...
190190
@@ -193,7 +193,7 @@ and tag it with ``form.type_guesser``:
193193
194194
.. code-block:: xml
195195
196-
<!-- app/config/services.xml -->
196+
<!-- config/services.xml -->
197197
<?xml version="1.0" encoding="UTF-8" ?>
198198
<container xmlns="http://symfony.com/schema/dic/services"
199199
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -209,7 +209,7 @@ and tag it with ``form.type_guesser``:
209209
210210
.. code-block:: php
211211
212-
// app/config/services.php
212+
// config/services.php
213213
use App\Form\TypeGuesser\PHPDocTypeGuesser;
214214
215215
$container->register(PHPDocTypeGuesser::class)

form/unit_testing.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ The Basics
3131

3232
The simplest ``TypeTestCase`` implementation looks like the following::
3333

34-
// tests/AppBundle/Form/Type/TestedTypeTest.php
35-
namespace Tests\App\Form\Type;
34+
// tests/Form/Type/TestedTypeTest.php
35+
namespace App\Tests\Form\Type;
3636

3737
use App\Form\Type\TestedType;
3838
use App\Model\TestObject;
@@ -114,8 +114,8 @@ To solve this, you have to mock the injected dependencies, instantiate your own
114114
form type and use the :class:`Symfony\\Component\\Form\\PreloadedExtension` to
115115
make sure the ``FormRegistry`` uses the created instance::
116116

117-
// tests/AppBundle/Form/Type/TestedTypeTests.php
118-
namespace Tests\App\Form\Type;
117+
// tests/Form/Type/TestedTypeTests.php
118+
namespace App\Tests\Form\Type;
119119

120120
use App\Form\Type\TestedType;
121121
use Doctrine\Common\Persistence\ObjectManager;
@@ -168,8 +168,8 @@ will be raised if you try to test a class that depends on other extensions.
168168
The :method:`Symfony\\Component\\Form\\Test\\TypeTestCase::getExtensions` method
169169
allows you to return a list of extensions to register::
170170

171-
// tests/AppBundle/Form/Type/TestedTypeTests.php
172-
namespace Tests\App\Form\Type;
171+
// tests/Form/Type/TestedTypeTests.php
172+
namespace App\Tests\Form\Type;
173173

174174
// ...
175175
use App\Form\Type\TestedType;
@@ -219,8 +219,8 @@ Testing against Different Sets of Data
219219
If you are not familiar yet with PHPUnit's `data providers`_, this might be
220220
a good opportunity to use them::
221221

222-
// tests/AppBundle/Form/Type/TestedTypeTests.php
223-
namespace Tests\App\Form\Type;
222+
// tests/Form/Type/TestedTypeTests.php
223+
namespace App\Tests\Form\Type;
224224

225225
use App\Form\Type\TestedType;
226226
use Symfony\Component\Form\Test\TypeTestCase;

frontend/custom_version_strategy.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ After creating the strategy PHP class, register it as a Symfony service.
118118

119119
.. code-block:: yaml
120120
121-
# app/config/services.yaml
121+
# config/services.yaml
122122
services:
123123
App\Asset\VersionStrategy\GulpBusterVersionStrategy:
124124
arguments:
@@ -128,7 +128,7 @@ After creating the strategy PHP class, register it as a Symfony service.
128128
129129
.. code-block:: xml
130130
131-
<!-- app/config/services.xml -->
131+
<!-- config/services.xml -->
132132
<?xml version="1.0" encoding="UTF-8" ?>
133133
<container xmlns="http://symfony.com/schema/dic/services"
134134
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -145,7 +145,7 @@ After creating the strategy PHP class, register it as a Symfony service.
145145
146146
.. code-block:: php
147147
148-
// app/config/services.php
148+
// config/services.php
149149
use Symfony\Component\DependencyInjection\Definition;
150150
use App\Asset\VersionStrategy\GulpBusterVersionStrategy;
151151

http_cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ changes to ``index.php`` to add caching to the ``dev`` environment::
8888
use Symfony\Component\HttpFoundation\Request;
8989

9090
// ...
91-
$kernel = new Kernel('prod', false);
91+
$kernel = new AppKernel('prod', false);
9292
$kernel->loadClassCache();
9393

9494
// add (or uncomment) this new line!

logging/formatter.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ configure your handler to use it:
1414

1515
.. code-block:: yaml
1616
17-
# app/config/services.yaml
17+
# config/services.yaml
1818
services:
1919
# ...
2020
@@ -30,7 +30,7 @@ configure your handler to use it:
3030
3131
.. code-block:: xml
3232
33-
<!-- app/config/services.xml -->
33+
<!-- config/services.xml -->
3434
<?xml version="1.0" encoding="UTF-8" ?>
3535
<container xmlns="http://symfony.com/schema/dic/services"
3636
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -60,7 +60,7 @@ configure your handler to use it:
6060
// app/config/config.php
6161
use Monolog\Formatter\JsonFormatter;
6262
63-
// app/config/services.php
63+
// config/services.php
6464
$container->register(JsonFormatter::class);
6565
6666
// app/config/config_prod.php (or config_dev.php)

0 commit comments

Comments
 (0)