diff --git a/src/Standards/Typo3Update/Configuration/Features/LegacyClassnames.yaml b/src/Standards/Typo3Update/Configuration/Features/LegacyClassnames.yaml new file mode 100644 index 0000000..c510db2 --- /dev/null +++ b/src/Standards/Typo3Update/Configuration/Features/LegacyClassnames.yaml @@ -0,0 +1,15 @@ +Typo3Update\Feature\LegacyClassnameFeature: + - Typo3Update_Sniffs_Classname_InheritanceSniff + - Typo3Update_Sniffs_Classname_InlineCommentSniff + - Typo3Update_Sniffs_Classname_InstanceofSniff + - Typo3Update_Sniffs_Classname_InstantiationWithMakeInstanceSniff + - Typo3Update_Sniffs_Classname_InstantiationWithNewSniff + - Typo3Update_Sniffs_Classname_InstantiationWithObjectManagerSniff + - Typo3Update_Sniffs_Classname_IsACallSniff + - Typo3Update_Sniffs_Classname_MissingNamespaceSniff + - Typo3Update_Sniffs_Classname_MissingVendorForPluginsAndModulesSniff + - Typo3Update_Sniffs_Classname_PhpDocCommentSniff + - Typo3Update_Sniffs_Classname_StaticCallSniff + - Typo3Update_Sniffs_Classname_TypeHintCatchExceptionSniff + - Typo3Update_Sniffs_Classname_TypeHintSniff + - Typo3Update_Sniffs_Classname_UseSniff diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/AbstractClassnameChecker.php b/src/Standards/Typo3Update/Feature/LegacyClassnameFeature.php similarity index 77% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/AbstractClassnameChecker.php rename to src/Standards/Typo3Update/Feature/LegacyClassnameFeature.php index 76c3cfe..70b5cf5 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/AbstractClassnameChecker.php +++ b/src/Standards/Typo3Update/Feature/LegacyClassnameFeature.php @@ -1,5 +1,5 @@ @@ -23,12 +23,13 @@ namespace Typo3Update\Sniffs\LegacyClassnames; use PHP_CodeSniffer as PhpCs; use PHP_CodeSniffer_File as PhpCsFile; use PHP_CodeSniffer_Sniff as PhpCsSniff; -use Typo3Update\Sniffs\LegacyClassnames\Mapping; +use Typo3Update\FeatureInterface; +use Typo3Update\Feature\LegacyClassnameMapping; /** - * Provide common uses for all sniffs, regarding class name checks. + * */ -abstract class AbstractClassnameChecker implements PhpCsSniff +class LegacyClassnameFeature implements FeatureInterface { /** * A list of extension names that might contain legacy class names. @@ -41,7 +42,7 @@ abstract class AbstractClassnameChecker implements PhpCsSniff public $legacyExtensions = ['Extbase', 'Fluid']; /** - * @var Mapping + * @var LegacyClassnameMapping */ protected $legacyMapping; @@ -56,51 +57,37 @@ abstract class AbstractClassnameChecker implements PhpCsSniff public function __construct() { - $this->legacyMapping = Mapping::getInstance(); + $this->legacyMapping = LegacyClassnameMapping::getInstance(); } /** - * Define whether the T_STRING default behaviour should be checked before - * or after the $stackPtr. + * Process like a PHPCS Sniff. * - * @return bool - */ - protected function shouldLookBefore() - { - return false; - } - - /** - * Processes the tokens that this sniff is interested in. - * - * This is the default implementation, as most of the time next T_STRING is - * the class name. This way only the register method has to be registered - * in default cases. - * - * @param PhpCsFile $phpcsFile The file where the token was found. - * @param int $stackPtr The position in the stack where - * the token was found. + * @param PhpCsFile $phpcsFile + * @param int $classnamePosition + * @param string $classname * * @return void - * - * @SuppressWarnings(PHPMD.ElseExpression) This is for performance reason. */ - public function process(PhpCsFile $phpcsFile, $stackPtr) + public function process(PhpCsFile $phpcsFile, $classnamePosition, $classname) { - $tokens = $phpcsFile->getTokens(); + $classname = trim($classname, '\\\'"'); // Remove trailing slash, and quotes. + $this->addMaybeWarning($phpcsFile, $classnamePosition, $classname); - if ($this->shouldLookBefore()) { - $classnamePosition = $phpcsFile->findPrevious(T_STRING, $stackPtr); - } else { - $classnamePosition = $phpcsFile->findNext(T_STRING, $stackPtr); - } - - if ($classnamePosition === false) { + if ($this->isLegacyClassname($classname) === false) { return; } - $classname = $tokens[$classnamePosition]['content']; - $this->addFixableError($phpcsFile, $classnamePosition, $classname); + $fix = $phpcsFile->addFixableError( + 'Legacy classes are not allowed; found "%s", use "%s" instead', + $classnamePosition, + 'legacyClassname', + [$classname, $this->getNewClassname($classname)] + ); + + if ($fix === true) { + $this->replaceLegacyClassname($phpcsFile, $classnamePosition, $classname); + } } /** @@ -122,7 +109,7 @@ abstract class AbstractClassnameChecker implements PhpCsSniff * @param string $classname * @return bool */ - private function isMaybeLegacyClassname($classname) + protected function isMaybeLegacyClassname($classname) { if (strpos($classname, 'Tx_') === false) { return false; @@ -163,34 +150,6 @@ abstract class AbstractClassnameChecker implements PhpCsSniff $this->legacyMapping->addLegacyClassname($legacyClassname, $newClassname); } - /** - * Add an fixable error if given $classname is legacy. - * - * @param PhpCsFile $phpcsFile - * @param int $classnamePosition - * @param string $classname - */ - public function addFixableError(PhpCsFile $phpcsFile, $classnamePosition, $classname) - { - $classname = trim($classname, '\\\'"'); // Remove trailing slash, and quotes. - $this->addMaybeWarning($phpcsFile, $classnamePosition, $classname); - - if ($this->isLegacyClassname($classname) === false) { - return; - } - - $fix = $phpcsFile->addFixableError( - 'Legacy classes are not allowed; found "%s", use "%s" instead', - $classnamePosition, - 'legacyClassname', - [$classname, $this->getNewClassname($classname)] - ); - - if ($fix === true) { - $this->replaceLegacyClassname($phpcsFile, $classnamePosition, $classname); - } - } - /** * Add an warning if given $classname is maybe legacy. * @@ -198,7 +157,7 @@ abstract class AbstractClassnameChecker implements PhpCsSniff * @param int $classnamePosition * @param string $classname */ - private function addMaybeWarning(PhpCsFile $phpcsFile, $classnamePosition, $classname) + protected function addMaybeWarning(PhpCsFile $phpcsFile, $classnamePosition, $classname) { if ($this->isLegacyClassname($classname) || $this->isMaybeLegacyClassname($classname) === false) { return; diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/Mapping.php b/src/Standards/Typo3Update/Feature/LegacyClassnameMapping.php similarity index 95% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/Mapping.php rename to src/Standards/Typo3Update/Feature/LegacyClassnameMapping.php index 685dec6..a2eacf6 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/Mapping.php +++ b/src/Standards/Typo3Update/Feature/LegacyClassnameMapping.php @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ namespace Typo3Update\Sniffs\LegacyClassnames; * 02110-1301, USA. */ -use Typo3Update\Sniffs\Options; +use Typo3Update\Options; /** * Singleton wrapper for mappings. @@ -28,7 +28,7 @@ use Typo3Update\Sniffs\Options; * Will check the configured file for whether a class is legacy and provides further methods. * Also can update to add new migrated class names. */ -final class Mapping +final class LegacyClassnameMapping { // Singleton implementation - Start static protected $instance = null; @@ -40,7 +40,7 @@ final class Mapping public static function getInstance() { if (static::$instance === null) { - static::$instance = new Mapping(); + static::$instance = new LegacyClassnameMapping(); } return static::$instance; diff --git a/src/Standards/Typo3Update/FeatureInterface.php b/src/Standards/Typo3Update/FeatureInterface.php new file mode 100644 index 0000000..ed73e55 --- /dev/null +++ b/src/Standards/Typo3Update/FeatureInterface.php @@ -0,0 +1,40 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +use PHP_CodeSniffer_File as PhpCsFile; + +/** + * + */ +interface FeatureInterface +{ + /** + * Process like a PHPCS Sniff. + * + * @param PhpCsFile $phpcsFile The current PhpCsFile working with. + * @param int $stackPtr The current stack pointer. + * @param string $content The content detected to work with. + * + * @return void + */ + public function process(PhpCsFile $phpcsFile, $stackPtr, $content); +} diff --git a/src/Standards/Typo3Update/Features.php b/src/Standards/Typo3Update/Features.php new file mode 100644 index 0000000..1927ffc --- /dev/null +++ b/src/Standards/Typo3Update/Features.php @@ -0,0 +1,69 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +use PHP_CodeSniffer_Sniff as PhpCsSniff; + +/** + * + */ +class Features implements \Iterator +{ + protected $index = 0; + protected $features = []; + + public function __construct(PhpCsSniff $sniff) + { + foreach (Options::getFeaturesConfiguration() as $featureName => $sniffs) { + if (in_array(get_class($sniff), $sniffs)) { + if (!class_implements($featureName, FeatureInterface::class)) { + throw new \Exception( + 'Configured Feature "' . $featureName . '" does not implement "' . FeatureInterface::class . '".', + 1493115488 + ); + } + $this->features[] = $featureName; + } + } + } + + // implement Iterator interface: + public function current() + { + return $this->features[$this->index]; + } + public function key() + { + return $this->index; + } + public function next() + { + ++$this->index; + } + public function rewind() + { + $this->index = 0; + } + public function valid() + { + return isset($this->features[$this->index]); + } +} diff --git a/src/Standards/Typo3Update/FeaturesSupport.php b/src/Standards/Typo3Update/FeaturesSupport.php new file mode 100644 index 0000000..183f017 --- /dev/null +++ b/src/Standards/Typo3Update/FeaturesSupport.php @@ -0,0 +1,53 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +use PHP_CodeSniffer_File as PhpCsFile; +use Typo3Update\Features; + +/** + * Provides "feature" support for sniff. + */ +trait FeaturesSupport +{ + /** + * @var Features + */ + protected $features; + + public function __construct() + { + $this->features = new Features($this); + } + + public function processFeatures(PhpCsFile $phpcsFile, $stackPtr, $content) + { + foreach ($this->features as $featureClassName) { + $feature = $this->createFeature($featureClassName); + $feature->process($phpcsFile, $stackPtr, $content); + } + } + + protected function createFeature($featureClassname) + { + return new $featureClassname($this); + } +} diff --git a/src/Standards/Typo3Update/Sniffs/Options.php b/src/Standards/Typo3Update/Options.php similarity index 82% rename from src/Standards/Typo3Update/Sniffs/Options.php rename to src/Standards/Typo3Update/Options.php index c6b5ba7..6aba777 100644 --- a/src/Standards/Typo3Update/Sniffs/Options.php +++ b/src/Standards/Typo3Update/Options.php @@ -1,5 +1,5 @@ @@ -21,6 +21,7 @@ namespace Typo3Update\Sniffs; */ use PHP_CodeSniffer as PhpCs; +use Symfony\Component\Yaml\Yaml; /** * Wrapper to retrieve options from PhpCs with defaults. @@ -51,7 +52,7 @@ class Options { return (string) static::getOptionWithDefault( 'mappingFile', - __DIR__ . '/../../../../LegacyClassnames.php' + __DIR__ . '/../../../LegacyClassnames.php' ); } @@ -64,7 +65,7 @@ class Options { return static::getOptionFileNames( 'removedFunctionConfigFiles', - __DIR__ . '/../Configuration/Removed/Functions/*.yaml' + __DIR__ . '/Configuration/Removed/Functions/*.yaml' ); } @@ -77,7 +78,7 @@ class Options { return static::getOptionFileNames( 'removedConstantConfigFiles', - __DIR__ . '/../Configuration/Removed/Constants/*.yaml' + __DIR__ . '/Configuration/Removed/Constants/*.yaml' ); } @@ -99,6 +100,24 @@ class Options return $option; } + public static function getFeaturesConfiguration() + { + $option = []; + $fileNames = static::getOptionFileNames( + 'features', + __DIR__ . '/Configuration/Features/*.yaml' + ); + + foreach ($fileNames as $file) { + $option = array_merge( + $option, + Yaml::parse(file_get_contents((string) $file)) + ); + } + + return $option; + } + /** * Get file names defined by option using optionName, if not defined, use default. * diff --git a/src/Standards/Typo3Update/Sniffs/Classname/AbstractClassnameChecker.php b/src/Standards/Typo3Update/Sniffs/Classname/AbstractClassnameChecker.php new file mode 100644 index 0000000..7bc96b2 --- /dev/null +++ b/src/Standards/Typo3Update/Sniffs/Classname/AbstractClassnameChecker.php @@ -0,0 +1,77 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +use PHP_CodeSniffer_File as PhpCsFile; +use PHP_CodeSniffer_Sniff as PhpCsSniff; +use Typo3Update\FeaturesSupport; + +/** + * Provide common uses for all sniffs, regarding class name checks. + */ +abstract class AbstractClassnameChecker implements PhpCsSniff +{ + use FeaturesSupport; + + /** + * Define whether the T_STRING default behaviour should be checked before + * or after the $stackPtr. + * + * @return bool + */ + protected function shouldLookBefore() + { + return false; + } + + /** + * Processes the tokens that this sniff is interested in. + * + * This is the default implementation, as most of the time next T_STRING is + * the class name. This way only the register method has to be registered + * in default cases. + * + * @param PhpCsFile $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + * + * @SuppressWarnings(PHPMD.ElseExpression) This is for performance reason. + */ + public function process(PhpCsFile $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($this->shouldLookBefore()) { + $classnamePosition = $phpcsFile->findPrevious(T_STRING, $stackPtr); + } else { + $classnamePosition = $phpcsFile->findNext(T_STRING, $stackPtr); + } + + if ($classnamePosition === false) { + return; + } + + $classname = $tokens[$classnamePosition]['content']; + $this->processFeatures($phpcsFile, $classnamePosition, $classname); + } +} diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff.php similarity index 92% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff.php index 59c9dd3..aa5f134 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff.php @@ -20,12 +20,12 @@ */ use PHP_CodeSniffer_File as PhpCsFile; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate extend and implement of old legacy classnames. */ -class Typo3Update_Sniffs_LegacyClassnames_InheritanceSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_InheritanceSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. @@ -79,6 +79,7 @@ class Typo3Update_Sniffs_LegacyClassnames_InheritanceSniff extends AbstractClass } foreach ($interfaces as $interface) { + // TODO: Migrate if (! $this->isLegacyClassname($interface)) { continue; } @@ -88,7 +89,7 @@ class Typo3Update_Sniffs_LegacyClassnames_InheritanceSniff extends AbstractClass continue; } - $this->addFixableError($phpcsFile, $position, $interface); + $this->processFeatures($phpcsFile, $position, $interface); } } } diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff.php similarity index 92% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff.php index 0877989..7f1b58c 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff.php @@ -20,12 +20,12 @@ */ use PHP_CodeSniffer_File as PhpCsFile; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Migrate PHP inline comments, e.g. for IDEs. */ -class Typo3Update_Sniffs_LegacyClassnames_InlineCommentSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_InlineCommentSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. @@ -59,7 +59,7 @@ class Typo3Update_Sniffs_LegacyClassnames_InlineCommentSniff extends AbstractCla return; } - $this->addFixableError($phpcsFile, $stackPtr, $commentParts[$this->getClassnamePosition($commentParts)]); + $this->processFeatures($phpcsFile, $stackPtr, $commentParts[$this->getClassnamePosition($commentParts)]); } /** diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff.php similarity index 87% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff.php index b261922..07fd90a 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff.php @@ -19,12 +19,12 @@ * 02110-1301, USA. */ -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate instanceof checks of old legacy classnames. */ -class Typo3Update_Sniffs_LegacyClassnames_InstanceofSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_InstanceofSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff.php similarity index 91% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff.php index bcb33d5..ee71469 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff.php @@ -21,12 +21,12 @@ use PHP_CodeSniffer_File as PhpCsFile; use PHP_CodeSniffer_Tokens as Tokens; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate instantiations of old legacy classnames using "makeInstance". */ -class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithMakeInstanceSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_InstantiationWithMakeInstanceSniff extends AbstractClassnameChecker { use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait; @@ -67,7 +67,7 @@ class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithMakeInstanceSniff ext $classname = $tokens[$classnamePosition]['content']; $this->originalTokenContent = $tokens[$classnamePosition]['content']; - $this->addFixableError($phpcsFile, $classnamePosition, $classname); + $this->processFeatures($phpcsFile, $classnamePosition, $classname); } /** diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff.php similarity index 86% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff.php index 9a1758e..be836f5 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff.php @@ -19,12 +19,12 @@ * 02110-1301, USA. */ -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate old legacy classnames instantiations using phps "new". */ -class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithNewSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_InstantiationWithNewSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff.php similarity index 77% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff.php index aa1d055..14afa1e 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff.php @@ -21,12 +21,12 @@ use PHP_CodeSniffer_File as PhpCsFile; use PHP_CodeSniffer_Tokens as Tokens; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate old legacy classname instantiations using objectmanager create and get. */ -class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithObjectManagerSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_InstantiationWithObjectManagerSniff extends AbstractClassnameChecker { use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait; @@ -80,20 +80,6 @@ class Typo3Update_Sniffs_LegacyClassnames_InstantiationWithObjectManagerSniff ex } $classname = $tokens[$classnamePosition]['content']; - $this->originalTokenContent = $tokens[$classnamePosition]['content']; - $this->addFixableError($phpcsFile, $classnamePosition, $classname); - } - - /** - * As token contains more then just class name, we have to build new content ourself. - * - * @param string $newClassname - * @param string $originalClassname - * @param PhpCsFile $phpcsFile - * @return string - */ - protected function getTokenForReplacement($newClassname, $originalClassname, PhpCsFile $phpcsFile) - { - return $this->getTokenReplacementForString($newClassname); + $this->processFeatures($phpcsFile, $classnamePosition, $classname); } } diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/IsACallSniff.php similarity index 75% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/IsACallSniff.php index 62e90a9..06ac05c 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/IsACallSniff.php @@ -20,12 +20,12 @@ */ use PHP_CodeSniffer_File as PhpcsFile; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate instantiations of old legacy classnames using "makeInstance". */ -class Typo3Update_Sniffs_LegacyClassnames_IsACallSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_IsACallSniff extends AbstractClassnameChecker { use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait; @@ -69,20 +69,6 @@ class Typo3Update_Sniffs_LegacyClassnames_IsACallSniff extends AbstractClassname } $classname = $tokens[$classnamePosition]['content']; - $this->originalTokenContent = $tokens[$classnamePosition]['content']; - $this->addFixableError($phpcsFile, $classnamePosition, $classname); - } - - /** - * As token contains more then just class name, we have to build new content ourself. - * - * @param string $newClassname - * @param string $originalClassname - * @param PhpCsFile $phpcsFile - * @return string - */ - protected function getTokenForReplacement($newClassname, $originalClassname, PhpCsFile $phpcsFile) - { - return $this->getTokenReplacementForString($newClassname); + $this->processFeatures($phpcsFile, $classnamePosition, $classname); } } diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff.php similarity index 93% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff.php index 8e97c45..1c18232 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff.php @@ -20,13 +20,13 @@ */ use PHP_CodeSniffer_File as PhpCsFile; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; -use Typo3Update\Sniffs\Options; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; +use Typo3Update\Options; /** * Detect missing namespaces for class definitions. */ -class Typo3Update_Sniffs_LegacyClassnames_MissingNamespaceSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_MissingNamespaceSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. @@ -66,7 +66,8 @@ class Typo3Update_Sniffs_LegacyClassnames_MissingNamespaceSniff extends Abstract } $classname = $tokens[$classnamePosition]['content']; - $this->addFixableError($phpcsFile, $classnamePosition, $classname); + // TODO: Migrate class, use custom feature as some parts are different! + // $this->addFixableError($phpcsFile, $classnamePosition, $classname); } /** diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff.php similarity index 64% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff.php index 14efb72..80a9818 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff.php @@ -20,15 +20,20 @@ */ use PHP_CodeSniffer_File as PhpCsFile; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use PHP_CodeSniffer_Sniff as PhpCsSniff; +use Typo3Update\FeaturesSupport; /** - * Migrate PHP Doc comments. + * Handle PHP Doc comments. * * E.g. annotations like @param or @return, see $allowedTags. + * + * Will do nothing itself, but call features. */ -class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_PhpDocCommentSniff implements PhpCsSniff { + use FeaturesSupport; + /** * The configured tags will be processed. * @var array @@ -42,9 +47,7 @@ class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff extends AbstractClassn */ public function register() { - return [ - T_DOC_COMMENT_TAG, - ]; + return [T_DOC_COMMENT_TAG]; } /** @@ -68,32 +71,8 @@ class Typo3Update_Sniffs_LegacyClassnames_DocCommentSniff extends AbstractClassn } $classnames = explode('|', explode(' ', $tokens[$classnamePosition]['content'])[0]); - $this->originalTokenContent = $tokens[$classnamePosition]['content']; foreach ($classnames as $classname) { - $this->addFixableError($phpcsFile, $classnamePosition, $classname); + $this->processFeatures($phpcsFile, $classnamePosition, $classname); } } - - /** - * As token contains more then just class name, we have to build new content ourself. - * - * @param string $newClassname - * @param string $originalClassname - * @param PhpCsFile $phpcsFile - * @return string - */ - protected function getTokenForReplacement($newClassname, $originalClassname, PhpCsFile $phpcsFile) - { - $token = explode(' ', $this->originalTokenContent); - - $classNames = explode('|', $token[0]); - foreach ($classNames as $position => $classname) { - if ($classname === $originalClassname) { - $classNames[$position] = $newClassname; - } - } - $token[0] = implode('|', $classNames); - - return implode(' ', $token); - } } diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff.php similarity index 89% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff.php index 1be8982..7e99447 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff.php @@ -19,12 +19,12 @@ * 02110-1301, USA. */ -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate static calls to old legacy classnames. */ -class Typo3Update_Sniffs_LegacyClassnames_StaticCallSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_StaticCallSniff extends AbstractClassnameChecker { /** * Define whether the T_STRING default behaviour should be checked before diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff.php similarity index 86% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff.php index 876aec8..1313616 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff.php @@ -19,12 +19,12 @@ * 02110-1301, USA. */ -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Migrate Typehints in catch statements. */ -class Typo3Update_Sniffs_LegacyClassnames_TypehintCatchExceptionSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_TypehintCatchExceptionSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff.php similarity index 89% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff.php index 3901309..224554c 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff.php @@ -20,12 +20,12 @@ */ use PHP_CodeSniffer_File as PhpCsFile; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Migrate Typehints in function / method definitions. */ -class Typo3Update_Sniffs_LegacyClassnames_TypehintSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_TypehintSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. @@ -58,7 +58,7 @@ class Typo3Update_Sniffs_LegacyClassnames_TypehintSniff extends AbstractClassnam if ($position === false) { continue; } - $this->addFixableError($phpcsFile, $position, $parameter['type_hint']); + $this->processFeatures($phpcsFile, $position, $parameter['type_hint']); } } } diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff.php b/src/Standards/Typo3Update/Sniffs/Classname/UseSniff.php similarity index 60% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff.php rename to src/Standards/Typo3Update/Sniffs/Classname/UseSniff.php index bed18bc..60e49ff 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Classname/UseSniff.php @@ -20,14 +20,14 @@ */ use PHP_CodeSniffer_File as PhpCsFile; -use Typo3Update\Sniffs\LegacyClassnames\AbstractClassnameChecker; +use Typo3Update\Sniffs\Classname\AbstractClassnameChecker; /** * Detect and migrate use statements with legacy classnames.. * * According to PSR-2, only one class per use statement is expected. */ -class Typo3Update_Sniffs_LegacyClassnames_UseSniff extends AbstractClassnameChecker +class Typo3Update_Sniffs_Classname_UseSniff extends AbstractClassnameChecker { /** * Returns the token types that this sniff is interested in. @@ -38,23 +38,4 @@ class Typo3Update_Sniffs_LegacyClassnames_UseSniff extends AbstractClassnameChec { return [T_USE]; } - - /** - * Overwrite to remove prefix. - * - * @param PhpCsFile $phpcsFile - * @param int $classnamePosition - * @param string $classname - * @param bool $forceEmptyPrefix Defines whether '\\' prefix should be checked or always be left out. - * - * @SuppressWarnings(PHPMD.BooleanArgumentFlag) - */ - protected function replaceLegacyClassname( - PhpCsFile $phpcsFile, - $classnamePosition, - $classname, - $forceEmptyPrefix = true - ) { - return parent::replaceLegacyClassname($phpcsFile, $classnamePosition, $classname, $forceEmptyPrefix); - } } diff --git a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff.php b/src/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff.php similarity index 96% rename from src/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff.php rename to src/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff.php index 7df07fc..057f197 100644 --- a/src/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff.php +++ b/src/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff.php @@ -22,12 +22,12 @@ use PHP_CodeSniffer_File as PhpCsFile; use PHP_CodeSniffer_Sniff as PhpCsSniff; use PHP_CodeSniffer_Tokens as Tokens; -use Typo3Update\Sniffs\Options; +use Typo3Update\Options; /** * Detect whether vendor is missing for plugins and modules registrations and configurations. */ -class Typo3Update_Sniffs_LegacyClassnames_MissingVendorForPluginsAndModulesSniff implements PhpCsSniff +class Typo3Update_Sniffs_LegacyClassname_MissingVendorForPluginsAndModulesSniff implements PhpCsSniff { use \Typo3Update\Sniffs\ExtendedPhpCsSupportTrait; diff --git a/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php b/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php index 13697f0..53f28a5 100644 --- a/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php +++ b/src/Standards/Typo3Update/Sniffs/Removed/AbstractGenericUsage.php @@ -24,7 +24,7 @@ use PHP_CodeSniffer_File as PhpCsFile; use PHP_CodeSniffer_Sniff as PhpCsSniff; use PHP_CodeSniffer_Tokens as Tokens; use Symfony\Component\Yaml\Yaml; -use Typo3Update\Sniffs\Options; +use Typo3Update\Options; /** * Contains common functionality for removed code like constants or functions. diff --git a/src/Standards/Typo3Update/Sniffs/Removed/GenericConstantUsageSniff.php b/src/Standards/Typo3Update/Sniffs/Removed/GenericConstantUsageSniff.php index e99a226..1ee46b1 100644 --- a/src/Standards/Typo3Update/Sniffs/Removed/GenericConstantUsageSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Removed/GenericConstantUsageSniff.php @@ -21,7 +21,7 @@ use PHP_CodeSniffer_File as PhpCsFile; use Typo3Update\Sniffs\Removed\AbstractGenericUsage; -use Typo3Update\Sniffs\Options; +use Typo3Update\Options; /** * Sniff that handles all calls to removed constants. diff --git a/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php b/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php index 7f8b730..4124eb2 100644 --- a/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php @@ -22,7 +22,7 @@ use PHP_CodeSniffer_File as PhpCsFile; use PHP_CodeSniffer_Tokens as Tokens; use Typo3Update\Sniffs\Removed\AbstractGenericUsage; -use Typo3Update\Sniffs\Options; +use Typo3Update\Options; /** * Sniff that handles all calls to removed functions. diff --git a/src/Standards/Typo3Update/ruleset.xml b/src/Standards/Typo3Update/ruleset.xml index 260cadb..2cc04d2 100644 --- a/src/Standards/Typo3Update/ruleset.xml +++ b/src/Standards/Typo3Update/ruleset.xml @@ -2,18 +2,18 @@ Provides sniffs and fixes for TYPO3 Updates. - + - + - + Legacy class definitions are not allowed; found "%s". Wrap your class inside a namespace. diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff/Expected.json similarity index 82% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff/Expected.json index 9b17ce4..e441162 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff/Expected.json @@ -9,7 +9,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Configuration_Configurationmanager\", use \"TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Inheritance.legacyClassname", + "source": "Typo3Update.Classname.Inheritance.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"t3lib_Singleton\", use \"TYPO3\\CMS\\Core\\SingletonInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Inheritance.legacyClassname", + "source": "Typo3Update.Classname.Inheritance.legacyClassname", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Core_BootstrapInterface\", use \"TYPO3\\CMS\\Extbase\\Core\\BootstrapInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Inheritance.legacyClassname", + "source": "Typo3Update.Classname.Inheritance.legacyClassname", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 27, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Configuration_Configurationmanager\", use \"TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Inheritance.legacyClassname", + "source": "Typo3Update.Classname.Inheritance.legacyClassname", "type": "ERROR" }, { @@ -45,7 +45,7 @@ "line": 28, "message": "Legacy classes are not allowed; found \"t3lib_Singleton\", use \"TYPO3\\CMS\\Core\\SingletonInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Inheritance.legacyClassname", + "source": "Typo3Update.Classname.Inheritance.legacyClassname", "type": "ERROR" }, { @@ -54,7 +54,7 @@ "line": 29, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Core_BootstrapInterface\", use \"TYPO3\\CMS\\Extbase\\Core\\BootstrapInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Inheritance.legacyClassname", + "source": "Typo3Update.Classname.Inheritance.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InheritanceSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InheritanceSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff/Expected.json similarity index 83% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff/Expected.json index b1c0d31..2a6f3ab 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff/Expected.json @@ -9,7 +9,7 @@ "line": 26, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InlineComment.legacyClassname", + "source": "Typo3Update.Classname.InlineComment.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 29, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InlineComment.legacyClassname", + "source": "Typo3Update.Classname.InlineComment.legacyClassname", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 32, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InlineComment.legacyClassname", + "source": "Typo3Update.Classname.InlineComment.legacyClassname", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 35, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InlineComment.legacyClassname", + "source": "Typo3Update.Classname.InlineComment.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InlineCommentSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InlineCommentSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/Expected.json similarity index 87% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/Expected.json index 33aca48..2cb2586 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/Expected.json @@ -9,7 +9,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"t3lib_Singleton\", use \"TYPO3\\CMS\\Core\\SingletonInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Instanceof.legacyClassname", + "source": "Typo3Update.Classname.Instanceof.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstanceofSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstanceofSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.json similarity index 85% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.json index d7f166c..b0f764e 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/Expected.json @@ -9,7 +9,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithMakeInstance.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithMakeInstance.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithMakeInstanceSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithMakeInstanceSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff/Expected.json similarity index 81% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff/Expected.json index 0183bc5..d06ec76 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff/Expected.json @@ -9,7 +9,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithNew.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithNew.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 23, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithNew.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithNew.legacyClassname", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 24, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithNew.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithNew.legacyClassname", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 27, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithNew.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithNew.legacyClassname", "type": "ERROR" }, { @@ -45,7 +45,7 @@ "line": 28, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithNew.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithNew.legacyClassname", "type": "ERROR" }, { @@ -54,7 +54,7 @@ "line": 29, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithNew.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithNew.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithNewSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithNewSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.json similarity index 80% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.json index 2ebb599..273b495 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/Expected.json @@ -9,7 +9,7 @@ "line": 24, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithObjectManager.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithObjectManager.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 25, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithObjectManager.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithObjectManager.legacyClassname", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 31, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithObjectManager.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithObjectManager.legacyClassname", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 33, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.InstantiationWithObjectManager.legacyClassname", + "source": "Typo3Update.Classname.InstantiationWithObjectManager.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/InstantiationWithObjectManagerSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/InstantiationWithObjectManagerSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json similarity index 84% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json index d754658..6ec4608 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/Expected.json @@ -9,7 +9,7 @@ "line": 26, "message": "Legacy classes are not allowed; found \"t3lib_Singleton\", use \"TYPO3\\CMS\\Core\\SingletonInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.IsACall.legacyClassname", + "source": "Typo3Update.Classname.IsACall.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 29, "message": "Legacy classes are not allowed; found \"t3lib_Singleton\", use \"TYPO3\\CMS\\Core\\SingletonInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.IsACall.legacyClassname", + "source": "Typo3Update.Classname.IsACall.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/IsACallSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/IsACallSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Arguments.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/Arguments.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/Arguments.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/Arguments.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/customVendor/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/customVendor/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/customVendor/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/customVendor/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/defaultVendor/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/customVendor/Expected.json similarity index 86% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/defaultVendor/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/customVendor/Expected.json index a720806..3126302 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/defaultVendor/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/customVendor/Expected.json @@ -9,7 +9,7 @@ "line": 24, "message": "Legacy class definitions are not allowed; found \"Tx_ExtName_Controller_Frontendcontroller\". Wrap your class inside a namespace.", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingNamespace.legacyClassname", + "source": "Typo3Update.Classname.MissingNamespace.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/customVendor/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/customVendor/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/customVendor/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/customVendor/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/defaultVendor/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/defaultVendor/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/defaultVendor/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/defaultVendor/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/customVendor/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/defaultVendor/Expected.json similarity index 86% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/customVendor/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/defaultVendor/Expected.json index a720806..3126302 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/customVendor/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/defaultVendor/Expected.json @@ -9,7 +9,7 @@ "line": 24, "message": "Legacy class definitions are not allowed; found \"Tx_ExtName_Controller_Frontendcontroller\". Wrap your class inside a namespace.", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingNamespace.legacyClassname", + "source": "Typo3Update.Classname.MissingNamespace.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/defaultVendor/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/defaultVendor/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingNamespaceSniff/defaultVendor/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/MissingNamespaceSniff/defaultVendor/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.diff similarity index 89% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.diff index f6d97a5..807e03e 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/Expected.diff +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.diff @@ -1,4 +1,4 @@ ---- tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/InputFileForIssues.php +--- tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php +++ PHP_CodeSniffer @@ -22,19 +22,19 @@ class InputFileForIssues diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json similarity index 83% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json index 6df46f0..dc72038 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/Expected.json @@ -9,7 +9,7 @@ "line": 25, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Repository_CategoryRepository\", use \"TYPO3\\CMS\\Extbase\\Domain\\Repository\\CategoryRepository\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.DocComment.legacyClassname", + "source": "Typo3Update.Classname.PhpDocComment.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 31, "message": "Legacy classes are not allowed; found \"t3lib_div\", use \"TYPO3\\CMS\\Core\\Utility\\GeneralUtility\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.DocComment.legacyClassname", + "source": "Typo3Update.Classname.PhpDocComment.legacyClassname", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 33, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Configuration_Configurationmanager\", use \"TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.DocComment.legacyClassname", + "source": "Typo3Update.Classname.PhpDocComment.legacyClassname", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 37, "message": "Legacy classes are not allowed; found \"t3lib_div\", use \"TYPO3\\CMS\\Core\\Utility\\GeneralUtility\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.DocComment.legacyClassname", + "source": "Typo3Update.Classname.PhpDocComment.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/DocCommentSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/PhpDocCommentSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.json similarity index 82% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.json index f2e2a54..124198b 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/Expected.json @@ -9,7 +9,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Utility_Extension\", use \"TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.StaticCall.legacyClassname", + "source": "Typo3Update.Classname.StaticCall.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 27, "message": "Legacy classes are not allowed; found \"t3lib_div\", use \"TYPO3\\CMS\\Core\\Utility\\GeneralUtility\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.StaticCall.legacyClassname", + "source": "Typo3Update.Classname.StaticCall.legacyClassname", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 27, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.StaticCall.legacyClassname", + "source": "Typo3Update.Classname.StaticCall.legacyClassname", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 28, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.StaticCall.legacyClassname", + "source": "Typo3Update.Classname.StaticCall.legacyClassname", "type": "ERROR" }, { @@ -45,7 +45,7 @@ "line": 30, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Command_HelpCommandController\", use \"TYPO3\\CMS\\Extbase\\Command\\HelpCommandController\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.StaticCall.legacyClassname", + "source": "Typo3Update.Classname.StaticCall.legacyClassname", "type": "ERROR" }, { @@ -54,7 +54,7 @@ "line": 31, "message": "Legacy classes are not allowed; found \"t3lib_Singleton\", use \"TYPO3\\CMS\\Core\\SingletonInterface\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.StaticCall.legacyClassname", + "source": "Typo3Update.Classname.StaticCall.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/StaticCallSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/StaticCallSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.json similarity index 82% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.json index ae6d240..59701dd 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/Expected.json @@ -9,7 +9,7 @@ "line": 24, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Exception\", use \"TYPO3\\CMS\\Extbase\\Exception\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHintCatchException.legacyClassname", + "source": "Typo3Update.Classname.TypeHintCatchException.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 30, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Exception\", use \"TYPO3\\CMS\\Extbase\\Exception\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHintCatchException.legacyClassname", + "source": "Typo3Update.Classname.TypeHintCatchException.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintCatchExceptionSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintCatchExceptionSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.json similarity index 83% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.json index 9b45649..9fde95c 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/Expected.json @@ -9,7 +9,7 @@ "line": 28, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHint.legacyClassname", + "source": "Typo3Update.Classname.TypeHint.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 31, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHint.legacyClassname", + "source": "Typo3Update.Classname.TypeHint.legacyClassname", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 43, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHint.legacyClassname", + "source": "Typo3Update.Classname.TypeHint.legacyClassname", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 46, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHint.legacyClassname", + "source": "Typo3Update.Classname.TypeHint.legacyClassname", "type": "ERROR" }, { @@ -45,7 +45,7 @@ "line": 56, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHint.legacyClassname", + "source": "Typo3Update.Classname.TypeHint.legacyClassname", "type": "ERROR" }, { @@ -54,7 +54,7 @@ "line": 59, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.TypeHint.legacyClassname", + "source": "Typo3Update.Classname.TypeHint.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/TypeHintSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/TypeHintSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.json similarity index 86% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.json index 6b30360..63816bd 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/Expected.json @@ -9,7 +9,7 @@ "line": 22, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Use.legacyClassname", + "source": "Typo3Update.Classname.Use.legacyClassname", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 23, "message": "Legacy classes are not allowed; found \"Tx_Extbase_Domain_Model_Backenduser\", use \"TYPO3\\CMS\\Extbase\\Domain\\Model\\BackendUser\" instead", "severity": 5, - "source": "Typo3Update.LegacyClassnames.Use.legacyClassname", + "source": "Typo3Update.Classname.Use.legacyClassname", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/UseSniff/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/Classname/UseSniff/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/Arguments.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/Arguments.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/Arguments.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/Arguments.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.json similarity index 79% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.json index c46162f..e2b6a38 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/customVendor/Expected.json @@ -9,7 +9,7 @@ "line": 23, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"MyCustomVendor.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 31, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"MyCustomVendor.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 39, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"MyCustomVendor.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 45, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"MyCustomVendor.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -45,7 +45,7 @@ "line": 51, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"MyCustomVendor.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -54,7 +54,7 @@ "line": 61, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"MyCustomVendor.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/customVendor/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/customVendor/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/customVendor/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/customVendor/InputFileForIssues.php diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.diff b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.diff similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.diff rename to tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.diff diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.json similarity index 79% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.json rename to tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.json index 8f4511c..c05e3c9 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/defaultVendor/Expected.json @@ -9,7 +9,7 @@ "line": 23, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"YourCompany.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -18,7 +18,7 @@ "line": 31, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"YourCompany.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -27,7 +27,7 @@ "line": 39, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"YourCompany.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -36,7 +36,7 @@ "line": 45, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"YourCompany.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -45,7 +45,7 @@ "line": 51, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"YourCompany.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" }, { @@ -54,7 +54,7 @@ "line": 61, "message": "No vendor is given, that will break TYPO3 handling for namespaced classes. Add vendor before Extensionkey like: \"YourCompany.\" . $_EXTKEY", "severity": 5, - "source": "Typo3Update.LegacyClassnames.MissingVendorForPluginsAndModules.missingVendor", + "source": "Typo3Update.LegacyClassname.MissingVendorForPluginsAndModules.missingVendor", "type": "ERROR" } ], diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/defaultVendor/InputFileForIssues.php b/tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/defaultVendor/InputFileForIssues.php similarity index 100% rename from tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassnames/MissingVendorForPluginsAndModulesSniff/defaultVendor/InputFileForIssues.php rename to tests/Fixtures/Standards/Typo3Update/Sniffs/LegacyClassname/MissingVendorForPluginsAndModulesSniff/defaultVendor/InputFileForIssues.php