diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.diff index 873ee97..56def1d 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.diff +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.diff @@ -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'); diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.json index 273b495..58fa8c8 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.json @@ -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 } } diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/InputFileForIssues.php index 75d9d58..12a81fc 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/InputFileForIssues.php +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/InputFileForIssues.php @@ -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');