diff --git a/compiler/src/Composer/ComposerJsonManipulator.php b/compiler/src/Composer/ComposerJsonManipulator.php
index <HASH>..<HASH> 100644
--- a/compiler/src/Composer/ComposerJsonManipulator.php
+++ b/compiler/src/Composer/ComposerJsonManipulator.php
@@ -103,6 +103,9 @@ final class ComposerJsonManipulator
         }
 
         $phpstanVersion = $json[self::REQUIRE][self::PHPSTAN_PHPSTAN];
+        // use exact version
+        $phpstanVersion = ltrim($phpstanVersion, '^');
+
         $json[self::REQUIRE]['phpstan/phpstan-src'] = $phpstanVersion;
         unset($json[self::REQUIRE][self::PHPSTAN_PHPSTAN]);
use extact version in phpstan compiler to rector.phar