Skip to content

Commit

Permalink
Make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
HighLiuk committed Jun 18, 2024
1 parent bafa242 commit dac7e71
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Core/Cache/CacheStateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ protected function getHash(): string
{
$transformerHash = parent::getHash();

$advices = $this->aspectManager->getAdvices();
$aspectHash = md5(serialize($advices));
$aspectAdviceNames = $this->aspectManager->getAspectAdviceNames();
$aspectHash = md5(serialize($aspectAdviceNames));

return $transformerHash . $aspectHash;
}
Expand Down
12 changes: 9 additions & 3 deletions src/Core/Container/AspectManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,19 @@ public function getAspectAdviceContainers(): array
}

/**
* Get the advice names.
* Get the aspect advice names.
*
* @return string[]
*/
public function getAdvices(): array
public function getAspectAdviceNames(): array
{
return array_keys($this->adviceContainers);
$aspectAdviceNames = [];
foreach ($this->aspects as $aspect) {
foreach ($this->aspectAdviceContainers[$aspect] as $adviceContainer) {
$aspectAdviceNames[] = $adviceContainer->getName();
}
}
return $aspectAdviceNames;
}

/**
Expand Down

0 comments on commit dac7e71

Please sign in to comment.