File tree 9 files changed +44
-15
lines changed
components/http_foundation
9 files changed +44
-15
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ bundle configuration would look like:
83
83
<?xml version =" 1.0" ?>
84
84
85
85
<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"
87
87
xsi : schemaLocation =" http://symfony.com/schema/dic/services
88
88
http://symfony.com/schema/dic/services/services-1.0.xsd" >
89
89
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
139
139
that any stored session that was saved more than ``gc_maxlifetime `` ago should be
140
140
deleted. This allows one to expire records based on idle time.
141
141
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
+
142
156
You can configure these settings by passing ``gc_probability ``, ``gc_divisor ``
143
157
and ``gc_maxlifetime `` in an array to the constructor of
144
158
:class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ NativeSessionStorage `
Original file line number Diff line number Diff line change @@ -444,14 +444,14 @@ read any flash messages from the session:
444
444
<!-- app/Resources/views/base.html.php -->
445
445
446
446
// you can read and display just one flash message type...
447
- <?php foreach ($view['session']->getFlash ('notice') as $message): ?>
447
+ <?php foreach ($view['session']->getFlashBag()->get ('notice') as $message): ?>
448
448
<div class="flash-notice">
449
449
<?php echo $message ?>
450
450
</div>
451
451
<?php endforeach ?>
452
452
453
453
// ...or you can read and display every flash message available
454
- <?php foreach ($view['session']->getFlashes () as $type => $flash_messages): ?>
454
+ <?php foreach ($view['session']->getFlashBag()->all () as $type => $flash_messages): ?>
455
455
<?php foreach ($flash_messages as $flash_message): ?>
456
456
<div class="flash-<?php echo $type ?>">
457
457
<?php echo $message ?>
Original file line number Diff line number Diff line change @@ -662,19 +662,17 @@ to easily fetch objects based on multiple conditions::
662
662
663
663
.. tip ::
664
664
665
- When you render any page, you can see how many queries were made in the
666
- bottom right corner of the web debug toolbar.
665
+ When rendering a page requires to make some database calls, the web debug
666
+ toolbar at the bottom of the page displays the number of queries and the
667
+ time it took to execute them:
667
668
668
- .. image :: /_images/doctrine/web_debug_toolbar .png
669
+ .. image :: /_images/doctrine/doctrine_web_debug_toolbar .png
669
670
:align: center
670
- :scale: 50
671
- :width: 350
671
+ :class: with-browser
672
672
673
- If you click the icon, the profiler will open, showing you the exact
674
- queries that were made.
675
-
676
- The icon will turn yellow if there were more than 50 queries on the
677
- page. This could indicate that something is not correct.
673
+ If the number of database queries is too high, the icon will turn yellow to
674
+ indicate that something may not be correct. Click on the icon to open the
675
+ Symfony Profiler and see the exact queries that were executed.
678
676
679
677
Updating an Object
680
678
~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ The following configuration attributes are available:
86
86
* ``delivery_addresses `` (an array of email addresses where to send ALL emails)
87
87
* ``disable_delivery `` (set to true to disable delivery completely)
88
88
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
+
89
95
Sending Emails
90
96
--------------
91
97
Original file line number Diff line number Diff line change @@ -308,6 +308,15 @@ option of your handler to ``rotating_file``:
308
308
),
309
309
));
310
310
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
+
311
320
Adding extra Data to each Log (e.g. a unique request token)
312
321
-----------------------------------------------------------
313
322
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ Required
22
22
--------
23
23
24
24
* PHP needs to be a minimum version of PHP 5.3.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
27
27
* Your ``php.ini `` needs to have the ``date.timezone `` setting
28
28
29
29
.. caution ::
@@ -57,3 +57,5 @@ you need to have the PDO driver installed for the database server you want
57
57
to use.
58
58
59
59
.. _`Requirements section of the README` : https://github.com/symfony/symfony/blob/2.8/README.md#requirements
60
+ .. _`JSON extension` : https://php.net/manual/book.json.php
61
+ .. _`ctype extension` : https://php.net/manual/book.ctype.php
You can’t perform that action at this time.
0 commit comments