From 602c71877c75faf7efcb0090eb4039a2c3b72d3d Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 27 Nov 2020 12:31:08 +0100 Subject: [PATCH] Result cache - fix result cache save and restore with Neon with statements --- src/Analyser/ResultCache/ResultCacheManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Analyser/ResultCache/ResultCacheManager.php b/src/Analyser/ResultCache/ResultCacheManager.php index be987e29d9..74cad44239 100644 --- a/src/Analyser/ResultCache/ResultCacheManager.php +++ b/src/Analyser/ResultCache/ResultCacheManager.php @@ -2,6 +2,7 @@ namespace PHPStan\Analyser\ResultCache; +use Nette\Neon\Neon; use PHPStan\Analyser\AnalyserResult; use PHPStan\Analyser\Error; use PHPStan\Command\Output; @@ -541,7 +542,7 @@ private function getMeta(?array $projectConfigArray): array 'cacheVersion' => self::CACHE_VERSION, 'phpstanVersion' => $this->getPhpStanVersion(), 'phpVersion' => PHP_VERSION_ID, - 'projectConfig' => $projectConfigArray, + 'projectConfig' => Neon::encode($projectConfigArray), 'analysedPaths' => $this->analysedPaths, 'composerLocks' => $this->getComposerLocks(), 'cliAutoloadFile' => $this->cliAutoloadFile,