File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 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::
267267 }
268268 }
269269
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 ``:
273272
274273.. code-block :: html+twig
275274
276- <!-- src/Resources/views /micro/random.html.twig -->
275+ <!-- templates /micro/random.html.twig -->
277276 <!DOCTYPE html>
278277 <html>
279278 <head>
@@ -311,13 +310,12 @@ this:
311310 ├─ public/
312311 | └─ index.php
313312 ├─ src/
314- | ├─ Kernel.php
315313 | ├─ Controller
316314 | | └─ MicroController.php
317- │ └─ Resources
318- | └─ views
319- | └─ micro
320- | └─ random.html.twig
315+ | └─ Kernel.php
316+ ├─ templates/
317+ | └─ micro/
318+ | └─ random.html.twig
321319 ├─ var/
322320 | ├─ cache/
323321 │ └─ 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.
256256paths
257257~~~~~
258258
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+
259263**type **: ``array `` **default **: ``null ``
260264
261265This option defines the directories where Symfony will look for Twig templates
You can’t perform that action at this time.
0 commit comments