File tree 9 files changed +45
-15
lines changed
components/http_foundation
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:
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 @@ -436,14 +436,14 @@ read any flash messages from the session:
436
436
<!-- app/Resources/views/base.html.php -->
437
437
438
438
// 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): ?>
440
440
<div class="flash-notice">
441
441
<?php echo $message ?>
442
442
</div>
443
443
<?php endforeach ?>
444
444
445
445
// ...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): ?>
447
447
<?php foreach ($flash_messages as $flash_message): ?>
448
448
<div class="flash-<?php echo $type ?>">
449
449
<?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::
707
707
708
708
.. tip ::
709
709
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:
712
713
713
- .. image :: /_images/doctrine/web_debug_toolbar .png
714
+ .. image :: /_images/doctrine/doctrine_web_debug_toolbar .png
714
715
:align: center
715
- :scale: 50
716
- :width: 350
716
+ :class: with-browser
717
717
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.
723
721
724
722
Updating an Object
725
723
~~~~~~~~~~~~~~~~~~
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.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
27
27
* Your ``php.ini `` needs to have the ``date.timezone `` setting
28
28
29
29
Optional
@@ -50,3 +50,6 @@ Doctrine
50
50
If you want to use Doctrine, you will need to have PDO installed. Additionally,
51
51
you need to have the PDO driver installed for the database server you want
52
52
to 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