Project

General

Profile

Actions

Task #63112

closed

Use fully qualified name resolution in PHP 5.5

Added by Wouter Wolters about 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2014-11-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Since PHP 5.5 is a requirement, calls with the objectManager
should use the ::class construct instead of a string argument.

Actions #1

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/34414

Actions #2

Updated by Wouter Wolters about 10 years ago

for f in $(grep -sr "objectManager->get(" * | cut -d: -f1 | egrep ".php$" | grep -v "../rewrite.php" | sort -u); do php ../rewrite.php $f; done

<?php
$fileName = $argv[1];
$contents = file_get_contents($fileName);

$contents = preg_replace_callback(
    "/objectManager-\\>get\\('([^']+)'/",
    function ($matches) {
        return 'objectManager->get(\\' . str_replace('\\\\', '\\', $matches[1]) . '::class';
    },
    $contents
);

file_put_contents($fileName, $contents);
Actions #3

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/34414

Actions #4

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/34414

Actions #5

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/34414

Actions #6

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/34414

Actions #7

Updated by Gerrit Code Review about 10 years ago

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/34445

Actions #8

Updated by Wouter Wolters about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF