File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -468,6 +468,14 @@ serves at dumping the compiled container::
468
468
file_put_contents($file, $dumper->dump());
469
469
}
470
470
471
+ .. tip ::
472
+
473
+ The ``file_put_contents() `` function is not atomic. That could cause issues
474
+ in a production environment with multiple concurrent requests. Instead, use
475
+ the :ref: `dumpFile() method <filesystem-dumpfile >` from Symfony Filesystem
476
+ component or other methods provided by Symfony (e.g. ``$containerConfigCache->write() ``)
477
+ which are atomic.
478
+
471
479
``ProjectServiceContainer `` is the default name given to the dumped container
472
480
class. However, you can change this with the ``class `` option when you
473
481
dump it::
Original file line number Diff line number Diff line change @@ -287,6 +287,8 @@ exception on failure::
287
287
// returns a path like : /tmp/prefix_wyjgtF.png
288
288
$filesystem->tempnam('/tmp', 'prefix_', '.png');
289
289
290
+ .. _filesystem-dumpfile :
291
+
290
292
``dumpFile ``
291
293
~~~~~~~~~~~~
292
294
Original file line number Diff line number Diff line change @@ -442,16 +442,6 @@ possible paths:
442
442
data is passed to it, you can
443
443
:doc: `use the submit() method to handle form submissions </form/direct_submit >`.
444
444
445
- .. tip ::
446
-
447
- If you need to render and process the same form in different templates,
448
- use the ``render() `` function to :ref: `embed the controller <templates-embed-controllers >`
449
- that processes the form:
450
-
451
- .. code-block :: twig
452
-
453
- {{ render(controller('App\\Controller\\TaskController::new')) }}
454
-
455
445
.. _validating-forms :
456
446
457
447
Validating Forms
You can’t perform that action at this time.
0 commit comments