From d38ce3dc4148438494a2b59d8d567e26760d8aa1 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 9 May 2017 11:33:55 +0200 Subject: [PATCH] BUGFIX: Fix identifier for removed extension * Due to copy and paste the identifier was not indicating a removed extension. * Identifier and tests were adjusted accordingly. Relates: #44 --- .../Typo3Update/Feature/RemovedExtensionFeature.php | 2 +- .../Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json | 2 +- .../Sniffs/Classname/PhpDocCommentSniff/Expected.json | 2 +- .../Sniffs/Classname/StaticCallSniff/Expected.json | 4 ++-- .../Classname/TypeHintCatchExceptionSniff/Expected.json | 2 +- .../Sniffs/Classname/TypeHintSniff/Expected.json | 6 +++--- .../Typo3Update/Sniffs/Classname/UseSniff/Expected.json | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Standards/Typo3Update/Feature/RemovedExtensionFeature.php b/src/Standards/Typo3Update/Feature/RemovedExtensionFeature.php index aeab11f..dce19fc 100644 --- a/src/Standards/Typo3Update/Feature/RemovedExtensionFeature.php +++ b/src/Standards/Typo3Update/Feature/RemovedExtensionFeature.php @@ -55,7 +55,7 @@ class RemovedExtensionFeature extends AbstractYamlRemovedUsage foreach ($typo3Versions as $typo3Version => $removals) { foreach ($removals as $removed => $config) { $config['name'] = $removed; - $config['identifier'] = 'RemovedClass.' . str_replace('\\', '_', ltrim($removed, '\\')); + $config['identifier'] = 'RemovedExtension.' . str_replace('\\', '_', ltrim($removed, '\\')); $config['versionRemoved'] = $typo3Version; $config['oldUsage'] = $removed; diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json index ee399d9..4120a2d 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json @@ -45,7 +45,7 @@ "line": 38, "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.IsACall.RemovedClass.perm", + "source": "Typo3Update.Classname.IsACall.RemovedExtension.perm", "type": "WARNING" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json index 8d55953..1d56ad0 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json @@ -36,7 +36,7 @@ "line": 33, "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.PhpDocComment.RemovedClass.perm", + "source": "Typo3Update.Classname.PhpDocComment.RemovedExtension.perm", "type": "WARNING" }, { diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.json index 5c66396..e9ade00 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.json @@ -63,7 +63,7 @@ "line": 33, "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.StaticCall.RemovedClass.perm", + "source": "Typo3Update.Classname.StaticCall.RemovedExtension.perm", "type": "WARNING" }, { @@ -72,7 +72,7 @@ "line": 38, "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.StaticCall.RemovedClass.perm", + "source": "Typo3Update.Classname.StaticCall.RemovedExtension.perm", "type": "WARNING" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.json index 0094c2d..5748bcc 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.json @@ -27,7 +27,7 @@ "line": 48, "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.TypeHintCatchException.RemovedClass.perm", + "source": "Typo3Update.Classname.TypeHintCatchException.RemovedExtension.perm", "type": "WARNING" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.json index 2e56a13..f0d2559 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.json @@ -63,7 +63,7 @@ "line": 63, "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.TypeHint.RemovedClass.perm", + "source": "Typo3Update.Classname.TypeHint.RemovedExtension.perm", "type": "WARNING" }, { @@ -72,7 +72,7 @@ "line": 63, "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.TypeHint.RemovedClass.perm", + "source": "Typo3Update.Classname.TypeHint.RemovedExtension.perm", "type": "WARNING" }, { @@ -81,7 +81,7 @@ "line": 66, "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.TypeHint.RemovedClass.perm", + "source": "Typo3Update.Classname.TypeHint.RemovedExtension.perm", "type": "WARNING" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.json index dd191bf..7df8978 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.json @@ -27,7 +27,7 @@ "line": 26, "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.Use.RemovedClass.perm", + "source": "Typo3Update.Classname.Use.RemovedExtension.perm", "type": "WARNING" }, { @@ -36,7 +36,7 @@ "line": 27, "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.Use.RemovedClass.perm", + "source": "Typo3Update.Classname.Use.RemovedExtension.perm", "type": "WARNING" }, { @@ -45,7 +45,7 @@ "line": 28, "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.Use.RemovedClass.perm", + "source": "Typo3Update.Classname.Use.RemovedExtension.perm", "type": "WARNING" } ],