@@ -108,8 +108,9 @@ static function ($deferred) {
108
108
*/
109
109
public function prune ()
110
110
{
111
- $ this ->pool instanceof PruneableInterface && $ this ->pool ->prune ();
112
- $ this ->tagPool instanceof PruneableInterface && $ this ->tagPool ->prune ();
111
+ $ isPruned = $ this ->pool instanceof PruneableInterface && $ this ->pool ->prune ();
112
+
113
+ return $ this ->tagPool instanceof PruneableInterface && $ this ->tagPool ->prune () && $ isPruned ;
113
114
}
114
115
115
116
/**
@@ -422,7 +423,7 @@ protected function getTagVersions(array $tags): array
422
423
*
423
424
* @throws \Psr\Cache\InvalidArgumentException
424
425
*
425
- * @return string[]
426
+ * @return array
426
427
*/
427
428
protected function retrieveTagVersions (array $ tags ): array
428
429
{
@@ -433,8 +434,8 @@ protected function retrieveTagVersions(array $tags): array
433
434
$ newTagVersion = $ this ->generateTagVersion ();
434
435
$ tagVersions = $ generated = [];
435
436
foreach ($ this ->tagPool ->getItems (array_keys ($ tagIds )) as $ tagId => $ version ) {
436
- if ($ version ->isHit () && is_scalar ( $ tagVersion = $ version -> get ()) ) {
437
- $ tagVersions [$ tagIds [$ tagId ]] = $ tagVersion ;
437
+ if ($ version ->isHit ()) {
438
+ $ tagVersions [$ tagIds [$ tagId ]] = $ version -> get () ;
438
439
continue ;
439
440
}
440
441
$ version ->set ($ newTagVersion );
@@ -478,8 +479,10 @@ protected function getTagIdsMap(array $tags): array
478
479
479
480
/**
480
481
* Generates unique string for robust tag versioning.
482
+ *
483
+ * @return mixed
481
484
*/
482
- abstract protected function generateTagVersion (): string ;
485
+ abstract protected function generateTagVersion ();
483
486
484
487
/**
485
488
* Checks a set of tag versions against available current ones.
0 commit comments