Task #61788
closedUse fully class name resolution in PHP 5.5
100%
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
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32913
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32913
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32913
Updated by Gerrit Code Review about 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32913
Updated by Gerrit Code Review about 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32913
Updated by Gerrit Code Review about 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32913
Updated by Xavier Perseguers about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cb7f35fce04e5dc4b07af416c400932bc542a55d.
Updated by Gerrit Code Review about 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34089
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34089
Updated by Xavier Perseguers about 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 3bdff73675cbe50e250f53f167579d167cc14e45.