DowngradeHashAlgorithmXxHashRector
Downgrade hash algorithm xxh32, xxh64, xxh3 or xxh128 by default to md5. You can configure the algorithm to downgrade.
class SomeClass
{
public function run()
{
- return hash('xxh128', 'some-data-to-hash');
+ return hash('md5', 'some-data-to-hash');
}
}
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\DowngradePhp81\Rector\FuncCall\DowngradeHashAlgorithmXxHashRector;
return RectorConfig::configure()
->withRules([
DowngradeHashAlgorithmXxHashRector::class,
]);