Skip to content

Commit 164251b

Browse files
authored
Fixes #81
2 parents 8fb5fcb + dac7e71 commit 164251b

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/Core/Cache/CacheStateManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ protected function getHash(): string
2727
{
2828
$transformerHash = parent::getHash();
2929

30-
$aspects = $this->aspectManager->getAspects();
31-
$aspectHash = md5(serialize($aspects));
30+
$aspectAdviceNames = $this->aspectManager->getAspectAdviceNames();
31+
$aspectHash = md5(serialize($aspectAdviceNames));
3232

3333
return $transformerHash . $aspectHash;
3434
}

src/Core/Container/AspectManager.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,22 @@ public function getAspectAdviceContainers(): array
212212
return $this->aspectAdviceContainers;
213213
}
214214

215+
/**
216+
* Get the aspect advice names.
217+
*
218+
* @return string[]
219+
*/
220+
public function getAspectAdviceNames(): array
221+
{
222+
$aspectAdviceNames = [];
223+
foreach ($this->aspects as $aspect) {
224+
foreach ($this->aspectAdviceContainers[$aspect] as $adviceContainer) {
225+
$aspectAdviceNames[] = $adviceContainer->getName();
226+
}
227+
}
228+
return $aspectAdviceNames;
229+
}
230+
215231
/**
216232
* Get the advice containers by advice names.
217233
*

0 commit comments

Comments
 (0)