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::
468468 file_put_contents($file, $dumper->dump());
469469 }
470470
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+
471479``ProjectServiceContainer `` is the default name given to the dumped container
472480class. However, you can change this with the ``class `` option when you
473481dump it::
Original file line number Diff line number Diff line change @@ -287,6 +287,8 @@ exception on failure::
287287 // returns a path like : /tmp/prefix_wyjgtF.png
288288 $filesystem->tempnam('/tmp', 'prefix_', '.png');
289289
290+ .. _filesystem-dumpfile :
291+
290292``dumpFile ``
291293~~~~~~~~~~~~
292294
Original file line number Diff line number Diff line change @@ -442,16 +442,6 @@ possible paths:
442442 data is passed to it, you can
443443 :doc: `use the submit() method to handle form submissions </form/direct_submit >`.
444444
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-
455445.. _validating-forms :
456446
457447Validating Forms
You can’t perform that action at this time.
0 commit comments