mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
Type doesn't have to be serialized in order to be hashed
This commit is contained in:
parent
bfd86240fd
commit
03d4f0d5b1
@ -16,6 +16,7 @@ use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\StringType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\UnionType;
|
||||
use PHPStan\Type\VerbosityLevel;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\PHPStan\TypeFactoryStaticHelper;
|
||||
|
||||
@ -73,7 +74,7 @@ final class TypeFactory
|
||||
$type = $this->removeValueFromConstantType($type);
|
||||
}
|
||||
|
||||
$typeHash = md5(serialize($type));
|
||||
$typeHash = md5($type->describe(VerbosityLevel::cache()));
|
||||
|
||||
$uniqueTypes[$typeHash] = $type;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user