#61788Use fully class name resolution in PHP 5.5
Description
Since PHP 5.5 is a requirement, calls to GeneralUtility::makeInstance should use the ::class construct instead of a string.
rewrite.php
<?php
$fileName = $argv[1];
$contents = file_get_contents($fileName);
$contents = preg_replace_callback(
"/::makeInstance\\('([^']+)'/",
function ($matches) {
return '::makeInstance(\\' . str_replace('\\\\', '\\', $matches[1]) . '::class';
},
$contents
);
file_put_contents($fileName, $contents);
Command
$ for f in $(grep -sr "::makeInstance(" * | cut -d: -f1 | egrep ".php$" | grep -v "rewrite.php" | sort -u); do php rewrite.php $f; done