Skip to content

Commit

Permalink
Merge branch 'feature/caching-invalidate-on-different-loaded-extensio…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Jun 22, 2020
2 parents c367695 + 3b7ec02 commit 4c7fdee
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/Util/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,18 @@ function ($file, $key, $iterator) {
// Along with the code hash, use various settings that can affect
// the results of a run to create a new hash. This hash will be used
// in the cache file name.
$rulesetHash = md5(var_export($ruleset->ignorePatterns, true).var_export($ruleset->includePatterns, true));
$configData = [
'phpVersion' => PHP_VERSION_ID,
'tabWidth' => $config->tabWidth,
'encoding' => $config->encoding,
'recordErrors' => $config->recordErrors,
'annotations' => $config->annotations,
'configData' => Config::getAllConfigData(),
'codeHash' => $codeHash,
'rulesetHash' => $rulesetHash,
$rulesetHash = md5(var_export($ruleset->ignorePatterns, true).var_export($ruleset->includePatterns, true));
$phpExtensionsHash = md5(var_export(get_loaded_extensions(), true));
$configData = [
'phpVersion' => PHP_VERSION_ID,
'phpExtensions' => $phpExtensionsHash,
'tabWidth' => $config->tabWidth,
'encoding' => $config->encoding,
'recordErrors' => $config->recordErrors,
'annotations' => $config->annotations,
'configData' => Config::getAllConfigData(),
'codeHash' => $codeHash,
'rulesetHash' => $rulesetHash,
];

$configString = var_export($configData, true);
Expand Down

0 comments on commit 4c7fdee

Please sign in to comment.