File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -267,13 +267,12 @@ has one file in it::
267
267
}
268
268
}
269
269
270
- Template files should live in the ``Resources/views/ `` directory of whatever directory
271
- your *kernel * lives in. Since ``Kernel `` lives in ``src/ ``, this template lives
272
- at ``src/Resources/views/micro/random.html.twig ``:
270
+ Template files should live in the ``templates/ `` directory at the root of your project.
271
+ This template lives at ``templates/micro/random.html.twig ``:
273
272
274
273
.. code-block :: html+twig
275
274
276
- <!-- src/Resources/views /micro/random.html.twig -->
275
+ <!-- templates /micro/random.html.twig -->
277
276
<!DOCTYPE html>
278
277
<html>
279
278
<head>
@@ -311,13 +310,12 @@ this:
311
310
├─ public/
312
311
| └─ index.php
313
312
├─ src/
314
- | ├─ Kernel.php
315
313
| ├─ Controller
316
314
| | └─ MicroController.php
317
- │ └─ Resources
318
- | └─ views
319
- | └─ micro
320
- | └─ random.html.twig
315
+ | └─ Kernel.php
316
+ ├─ templates/
317
+ | └─ micro/
318
+ | └─ random.html.twig
321
319
├─ var/
322
320
| ├─ cache/
323
321
│ └─ log/
Original file line number Diff line number Diff line change @@ -256,6 +256,10 @@ The default directory where Symfony will look for Twig templates.
256
256
paths
257
257
~~~~~
258
258
259
+ .. versionadded :: 4.2
260
+ The templates directory ``src/Resources/views/ `` was deprecated in Symfony 4.2,
261
+ use the directory defined in the ``default_path `` option (``templates/ `` by default).
262
+
259
263
**type **: ``array `` **default **: ``null ``
260
264
261
265
This option defines the directories where Symfony will look for Twig templates
You can’t perform that action at this time.
0 commit comments