TASK: Update InstantiationWithObjectManagerSniff tests

Relates: #44
This commit is contained in:
Daniel Siepmann 2017-05-09 11:39:59 +02:00
parent d38ce3dc41
commit e2c972ed58
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 28 additions and 3 deletions

View file

@ -1,6 +1,6 @@
--- tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/InputFileForIssues.php
+++ PHP_CodeSniffer
@@ -21,13 +21,13 @@
@@ -21,16 +21,16 @@
// Not handled by this sniff, but StaticCallSniff, as this uses double colon.
$this->objectManager->get(\Tx_Extbase_Command_HelpCommandController::class);
@ -18,3 +18,6 @@
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager)
- ->get('Tx_Extbase_Command_HelpCommandController');
+ ->get('\TYPO3\CMS\Extbase\Command\HelpCommandController');
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager)
->get('\TYPO3\CMS\Perm\Controller\PermissionAjaxController');

View file

@ -38,14 +38,32 @@
"severity": 5,
"source": "Typo3Update.Classname.InstantiationWithObjectManager.legacyClassname",
"type": "ERROR"
},
{
"column": 11,
"fixable": false,
"line": 36,
"message": "Calls to removed code are not allowed; found perm. Removed in 7.0. The logic is moved into EXT:beuser. See: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62339-MoveExtPermIntoExtBeuser.html",
"severity": 5,
"source": "Typo3Update.Classname.InstantiationWithObjectManager.RemovedExtension.perm",
"type": "WARNING"
},
{
"column": 27,
"fixable": false,
"line": 37,
"message": "Calls to removed code are not allowed; found perm. Removed in 7.0. The logic is moved into EXT:beuser. See: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-62339-MoveExtPermIntoExtBeuser.html",
"severity": 5,
"source": "Typo3Update.Classname.InstantiationWithObjectManager.RemovedExtension.perm",
"type": "WARNING"
}
],
"warnings": 0
"warnings": 2
}
},
"totals": {
"errors": 4,
"fixable": 4,
"warnings": 0
"warnings": 2
}
}

View file

@ -31,3 +31,7 @@ $this->objectManager->get('Tx_Extbase_Command_HelpCommandController');
->get('\Tx_Extbase_Command_HelpCommandController');
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager)
->get('Tx_Extbase_Command_HelpCommandController');
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager)
->get('\TYPO3\CMS\Perm\Controller\PermissionAjaxController');
$this->objectManager->get('TYPO3\CMS\Perm\Controller\PermissionAjaxController');