DowngradeStrEndsWithRector
Downgrade str_ends_with() to strncmp() version
-str_ends_with($haystack, $needle);
+"" === $needle || ("" !== $haystack && 0 === substr_compare($haystack, $needle, -\strlen($needle)));
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\DowngradePhp80\Rector\FuncCall\DowngradeStrEndsWithRector;
return RectorConfig::configure()
->withRules([
DowngradeStrEndsWithRector::class,
]);