File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -326,8 +326,6 @@ You are now able to serialize only attributes in the groups you want::
326
326
);
327
327
// $obj2 = MyObj(foo: 'foo', bar: 'bar')
328
328
329
- .. include :: /_includes/_rewrite_rule_tip.rst.inc
330
-
331
329
.. _ignoring-attributes-when-serializing :
332
330
333
331
Selecting Specific Attributes
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ a second array argument to ``PdoSessionHandler``:
151
151
))
152
152
;
153
153
154
- These are parameters that you must configure:
154
+ These are parameters that you can configure:
155
155
156
156
``db_table `` (default ``sessions ``):
157
157
The name of the session table in your database;
@@ -227,8 +227,18 @@ Preparing the Database to Store Sessions
227
227
----------------------------------------
228
228
229
229
Before storing sessions in the database, you must create the table that stores
230
- the information. The following sections contain some examples of the SQL statements
231
- you may use for your specific database engine.
230
+ the information. The session handler provides a method called
231
+ :method: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ Handler::createTable `
232
+ to set up this table for you according to the database engine used::
233
+
234
+ try {
235
+ $sessionHandlerService->createTable();
236
+ } catch (\PDOException $e) {
237
+ // the table could not be created for some reason
238
+ }
239
+
240
+ If you prefer to set up the table yourself, these are some examples of the SQL
241
+ statements you may use according to your specific database engine.
232
242
233
243
MySQL
234
244
~~~~~
Original file line number Diff line number Diff line change @@ -55,9 +55,13 @@ using APC and ``opcache_reset()`` when using OPcache).
55
55
56
56
In PHP, the CLI and the web processes don't share the same OPcache. This
57
57
means that you cannot clear the web server OPcache by executing some command
58
- in your terminal. You either need to restart the web server or call the
59
- ``apc_clear_cache() `` or ``opcache_reset() `` functions via the web server
60
- (i.e. by having these in a script that you execute over the web).
58
+ in your terminal. These are some of the possible solutions:
59
+
60
+ #. Restart the web server;
61
+ #. Call the :phpfunction: `apc_clear_cache ` or :phpfunction: `opcache_reset `
62
+ functions via the web server (i.e. by having these in a script that
63
+ you execute over the web);
64
+ #. Use the `cachetool `_ utility to control APC and OPcache from the CLI.
61
65
62
66
Optimizing all the Files Used by Symfony
63
67
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -134,3 +138,4 @@ Learn more
134
138
.. _`APC` : http://php.net/manual/en/book.apc.php
135
139
.. _`APCu Polyfill component` : https://github.com/symfony/polyfill-apcu
136
140
.. _`APCu PHP functions` : http://php.net/manual/en/ref.apcu.php
141
+ .. _`cachetool` : https://github.com/gordalina/cachetool
You can’t perform that action at this time.
0 commit comments