Skip to content

Commit de1c7ec

Browse files
committed
Fixed missing visibility and comments of on internal methods
I'm aware that this is technically a BC break but those methods were never supposed to be called as there's absolutely no reason to do so. Calling those should be considered a bug. I've also double checked in all Composer dependents (dependent packages) and couldn't find anyone using those.
1 parent 5ecf8f1 commit de1c7ec

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/Psr6Store.php

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ public function clear()
399399

400400
/**
401401
* @return string
402+
*
403+
* @internal Do not use in public code, this is for unit testing purposes only
402404
*/
403405
public function getCacheKey(Request $request)
404406
{
@@ -409,10 +411,24 @@ public function getCacheKey(Request $request)
409411
return 'md'.hash('sha256', $uri);
410412
}
411413

414+
/**
415+
* @return string
416+
*
417+
* @internal Do not use in public code, this is for unit testing purposes only
418+
*/
419+
public function generateContentDigest(Response $response)
420+
{
421+
if ($response instanceof BinaryFileResponse) {
422+
return 'bf'.hash_file('sha256', $response->getFile()->getPathname());
423+
}
424+
425+
return 'en'.hash('sha256', $response->getContent());
426+
}
427+
412428
/**
413429
* @return string
414430
*/
415-
public function getVaryKey(array $vary, Request $request)
431+
private function getVaryKey(array $vary, Request $request)
416432
{
417433
if (0 === \count($vary)) {
418434
return self::NON_VARYING_KEY;
@@ -442,18 +458,6 @@ public function getVaryKey(array $vary, Request $request)
442458
return hash('sha256', $hashData);
443459
}
444460

445-
/**
446-
* @return string
447-
*/
448-
public function generateContentDigest(Response $response)
449-
{
450-
if ($response instanceof BinaryFileResponse) {
451-
return 'bf'.hash_file('sha256', $response->getFile()->getPathname());
452-
}
453-
454-
return 'en'.hash('sha256', $response->getContent());
455-
}
456-
457461
private function saveContentDigest(Response $response)
458462
{
459463
if ($response->headers->has('X-Content-Digest')) {

0 commit comments

Comments
 (0)