File tree Expand file tree Collapse file tree 9 files changed +45
-15
lines changed
components/http_foundation Expand file tree Collapse file tree 9 files changed +45
-15
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ bundle configuration would look like:
8383 <?xml version =" 1.0" ?>
8484
8585 <container xmlns =" http://symfony.com/schema/dic/services"
86- xmlns : acme-social =" http://example.org/dic/ schema/acme_social"
86+ xmlns : acme-social =" http://example.org/schema/dic /acme_social"
8787 xsi : schemaLocation =" http://symfony.com/schema/dic/services
8888 http://symfony.com/schema/dic/services/services-1.0.xsd" >
8989
Original file line number Diff line number Diff line change @@ -139,6 +139,20 @@ the ``php.ini`` directive ``session.gc_maxlifetime``. The meaning in this contex
139139that any stored session that was saved more than ``gc_maxlifetime `` ago should be
140140deleted. This allows one to expire records based on idle time.
141141
142+ However, some operating systems do their own session handling and set the
143+ ``session.gc_probability `` variable to ``0 `` to stop PHP doing garbage
144+ collection. That's why Symfony now overwrites this value to ``1 ``.
145+
146+ If you wish to use the original value set in your ``php.ini ``, add the following
147+ configuration:
148+
149+ .. code-block :: yaml
150+
151+ # config.yml
152+ framework :
153+ session :
154+ gc_probability : null
155+
142156 You can configure these settings by passing ``gc_probability ``, ``gc_divisor ``
143157and ``gc_maxlifetime `` in an array to the constructor of
144158:class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ NativeSessionStorage `
Original file line number Diff line number Diff line change @@ -436,14 +436,14 @@ read any flash messages from the session:
436436 <!-- app/Resources/views/base.html.php -->
437437
438438 // you can read and display just one flash message type...
439- <?php foreach ($view['session']->getFlash ('notice') as $message): ?>
439+ <?php foreach ($view['session']->getFlashBag()->get ('notice') as $message): ?>
440440 <div class="flash-notice">
441441 <?php echo $message ?>
442442 </div>
443443 <?php endforeach ?>
444444
445445 // ...or you can read and display every flash message available
446- <?php foreach ($view['session']->getFlashes () as $type => $flash_messages): ?>
446+ <?php foreach ($view['session']->getFlashBag()->all () as $type => $flash_messages): ?>
447447 <?php foreach ($flash_messages as $flash_message): ?>
448448 <div class="flash-<?php echo $type ?>">
449449 <?php echo $message ?>
Original file line number Diff line number Diff line change @@ -707,19 +707,17 @@ to easily fetch objects based on multiple conditions::
707707
708708.. tip ::
709709
710- When you render any page, you can see how many queries were made in the
711- bottom right corner of the web debug toolbar.
710+ When rendering a page requires to make some database calls, the web debug
711+ toolbar at the bottom of the page displays the number of queries and the
712+ time it took to execute them:
712713
713- .. image :: /_images/doctrine/web_debug_toolbar .png
714+ .. image :: /_images/doctrine/doctrine_web_debug_toolbar .png
714715 :align: center
715- :scale: 50
716- :width: 350
716+ :class: with-browser
717717
718- If you click the icon, the profiler will open, showing you the exact
719- queries that were made.
720-
721- The icon will turn yellow if there were more than 50 queries on the
722- page. This could indicate that something is not correct.
718+ If the number of database queries is too high, the icon will turn yellow to
719+ indicate that something may not be correct. Click on the icon to open the
720+ Symfony Profiler and see the exact queries that were executed.
723721
724722Updating an Object
725723~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ The following configuration attributes are available:
8686* ``delivery_addresses `` (an array of email addresses where to send ALL emails)
8787* ``disable_delivery `` (set to true to disable delivery completely)
8888
89+ .. caution ::
90+
91+ Starting from SwiftMailer 5.4.5, the ``mail `` transport is deprecated
92+ and will be removed in version 6. Consider using another transport like
93+ ``smtp ``, ``sendmail `` or ``gmail ``.
94+
8995Sending Emails
9096--------------
9197
Original file line number Diff line number Diff line change @@ -308,6 +308,15 @@ option of your handler to ``rotating_file``:
308308 ),
309309 ));
310310
311+ Using a Logger inside a Service
312+ -------------------------------
313+
314+ To use a logger in your own services, add the ``@logger `` service as an argument
315+ of those services. If you want to use a pre-configured logger which uses a
316+ specific channel (``app `` by default), use the ``monolog.logger `` tag with the
317+ ``channel `` property as explained in the
318+ :ref: `Dependency Injection reference <dic_tags-monolog >`.
319+
311320Adding extra Data to each Log (e.g. a unique request token)
312321-----------------------------------------------------------
313322
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ Required
2222--------
2323
2424* PHP needs to be a minimum version of PHP 5.5.9
25- * JSON needs to be enabled
26- * ctype needs to be enabled
25+ * ` JSON extension `_ needs to be enabled
26+ * ` ctype extension `_ needs to be enabled
2727* Your ``php.ini `` needs to have the ``date.timezone `` setting
2828
2929Optional
@@ -50,3 +50,6 @@ Doctrine
5050If you want to use Doctrine, you will need to have PDO installed. Additionally,
5151you need to have the PDO driver installed for the database server you want
5252to use.
53+
54+ .. _`JSON extension` : https://php.net/manual/book.json.php
55+ .. _`ctype extension` : https://php.net/manual/book.ctype.php
You can’t perform that action at this time.
0 commit comments