Skip to content

Commit df0d28f

Browse files
committed
Merge branch '3.4'
* 3.4: Added a note about cache:clear and cache:pool:clear Improved the first example of the Guard authenticator Deprecated the web_profiler.position option
2 parents d53d72a + d282ee7 commit df0d28f

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

components/cache/cache_pools.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,16 @@ when all items are successfully deleted)::
130130
.. code-block:: terminal
131131
132132
$ php bin/console cache:pool:clear <cache-pool-name>
133-
133+
134134
# clears the "cache.app" pool
135135
$ php bin/console cache:pool:clear cache.app
136136
137137
# clears the "cache.validation" and "cache.app" pool
138138
$ php bin/console cache:pool:clear cache.validation cache.app
139139
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+
140145
.. _`Doctrine Cache`: https://github.com/doctrine/cache

security/guard_authentication.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,23 +173,17 @@ This requires you to implement several methods::
173173
*/
174174
public function supports(Request $request)
175175
{
176-
return true;
176+
return $request->headers->has('X-AUTH-TOKEN')
177177
}
178178

179179
/**
180180
* Called on every request. Return whatever credentials you want to
181-
* be passed to getUser().
181+
* be passed to getUser() as $credentials.
182182
*/
183183
public function getCredentials(Request $request)
184184
{
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
191185
return array(
192-
'token' => $token,
186+
'token' => $request->headers->get('X-AUTH-TOKEN'),
193187
);
194188
}
195189

0 commit comments

Comments
 (0)