File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -130,11 +130,16 @@ when all items are successfully deleted)::
130
130
.. code-block :: terminal
131
131
132
132
$ php bin/console cache:pool:clear <cache-pool-name>
133
-
133
+
134
134
# clears the "cache.app" pool
135
135
$ php bin/console cache:pool:clear cache.app
136
136
137
137
# clears the "cache.validation" and "cache.app" pool
138
138
$ php bin/console cache:pool:clear cache.validation cache.app
139
139
140
+ .. versionadded :: 3.4
141
+ Starting from Symfony 3.4, the ``cache:clear `` command no longer clears
142
+ the cache pools, so you must use the ``cache:pool:clear `` command to
143
+ delete them.
144
+
140
145
.. _`Doctrine Cache` : https://github.com/doctrine/cache
Original file line number Diff line number Diff line change @@ -173,23 +173,17 @@ This requires you to implement several methods::
173
173
*/
174
174
public function supports(Request $request)
175
175
{
176
- return true;
176
+ return $request->headers->has('X-AUTH-TOKEN')
177
177
}
178
178
179
179
/**
180
180
* Called on every request. Return whatever credentials you want to
181
- * be passed to getUser().
181
+ * be passed to getUser() as $credentials .
182
182
*/
183
183
public function getCredentials(Request $request)
184
184
{
185
- if (!$token = $request->headers->get('X-AUTH-TOKEN')) {
186
- // No token?
187
- $token = null;
188
- }
189
-
190
- // What you return here will be passed to getUser() as $credentials
191
185
return array(
192
- 'token' => $token ,
186
+ 'token' => $request->headers->get('X-AUTH-TOKEN') ,
193
187
);
194
188
}
195
189
You can’t perform that action at this time.
0 commit comments