Skip to content

Commit

Permalink
[Cache] Replace Strings::webalize() with sha1_file() from resolved pa…
Browse files Browse the repository at this point in the history
…th on ChangedFilesDetector (#3356)

Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
samsonasik and actions-user committed Feb 7, 2023
1 parent 7f873f0 commit 51fcdc2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/Caching/Detector/ChangedFilesDetector.php
Expand Up @@ -4,7 +4,6 @@

namespace Rector\Caching\Detector;

use Nette\Utils\Strings;
use Rector\Caching\Cache;
use Rector\Caching\Config\FileHashComputer;
use Rector\Caching\Enum\CacheKey;
Expand Down Expand Up @@ -113,7 +112,7 @@ private function hashFile(string $filePath): string

private function storeConfigurationDataHash(string $filePath, string $configurationHash): void
{
$key = CacheKey::CONFIGURATION_HASH_KEY . '_' . Strings::webalize($filePath);
$key = CacheKey::CONFIGURATION_HASH_KEY . '_' . $this->hashFile($filePath);
$this->invalidateCacheIfConfigurationChanged($key, $configurationHash);

$this->cache->save($key, CacheKey::CONFIGURATION_HASH_KEY, $configurationHash);
Expand Down

0 comments on commit 51fcdc2

Please sign in to comment.