[TASK] Namespace migration, code cleanup
authorMarkus Klein <markus.klein@typo3.org>
Thu, 14 May 2015 10:51:16 +0000 (12:51 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 14 May 2015 12:11:29 +0000 (14:11 +0200)
Change-Id: Ibf61f3f24b90f8f90486afc3596c29bba5c4bfe8

146 files changed:
Classes/Checks/AbstractCheckDefinition.php
Classes/Checks/AbstractCheckProcessor.php
Classes/Checks/AbstractCheckResultAnalyzer.php
Classes/Checks/Core/CallToDeprecatedMethods/Definition.php [new file with mode: 0644]
Classes/Checks/Core/CallToDeprecatedMethods/Processor.php [new file with mode: 0644]
Classes/Checks/Core/CallToDeprecatedMethods/ResultAnalyzer.php [new file with mode: 0644]
Classes/Checks/Core/CallToDeprecatedStaticMethods/Definition.php [deleted file]
Classes/Checks/Core/CallToDeprecatedStaticMethods/Processor.php [deleted file]
Classes/Checks/Core/CallToDeprecatedStaticMethods/ResultAnalyzer.php [deleted file]
Classes/Checks/Core/CallToDeprecatedViewHelpers/Definition.php
Classes/Checks/Core/CallToDeprecatedViewHelpers/Processor.php
Classes/Checks/Core/CallToDeprecatedViewHelpers/ResultAnalyzer.php
Classes/Checks/Core/MissingAddPluginParameter/Definition.php [deleted file]
Classes/Checks/Core/MissingAddPluginParameter/Processor.php [deleted file]
Classes/Checks/Core/MissingAddPluginParameter/ResultAnalyzer.php [deleted file]
Classes/Checks/Core/Mysql/Definition.php
Classes/Checks/Core/Mysql/Processor.php
Classes/Checks/Core/Mysql/ResultAnalyzer.php
Classes/Checks/Core/Namespace/Definition.php [deleted file]
Classes/Checks/Core/Namespace/Processor.php [deleted file]
Classes/Checks/Core/Namespace/ResultAnalyzer.php [deleted file]
Classes/Checks/Core/Namespaces/Definition.php [new file with mode: 0644]
Classes/Checks/Core/Namespaces/Processor.php [new file with mode: 0644]
Classes/Checks/Core/Namespaces/ResultAnalyzer.php [new file with mode: 0644]
Classes/Checks/Core/RemovedConstants/Definition.php
Classes/Checks/Core/RemovedConstants/Processor.php
Classes/Checks/Core/RemovedConstants/ResultAnalyzer.php
Classes/Checks/Core/RequireOnceInExtensions/Definition.php [deleted file]
Classes/Checks/Core/RequireOnceInExtensions/Processor.php [deleted file]
Classes/Checks/Core/RequireOnceInExtensions/ResultAnalyzer.php [deleted file]
Classes/Checks/Core/Xclasses/Definition.php [deleted file]
Classes/Checks/Core/Xclasses/Processor.php [deleted file]
Classes/Checks/Core/Xclasses/ResultAnalyzer.php [deleted file]
Classes/Checks/Dam/CallToDamClasses/Definition.php [deleted file]
Classes/Checks/Dam/CallToDamClasses/Processor.php [deleted file]
Classes/Checks/Dam/CallToDamClasses/ResultAnalyzer.php [deleted file]
Classes/Checks/Database/Utf8/Definition.php [deleted file]
Classes/Checks/Database/Utf8/Processor.php [deleted file]
Classes/Checks/Database/Utf8/ResultAnalyzer.php [deleted file]
Classes/Checks/Extension/IncompatibleWithLts/Definition.php
Classes/Checks/Extension/IncompatibleWithLts/Processor.php
Classes/Checks/Extension/IncompatibleWithLts/ResultAnalyzer.php
Classes/Checks/Extension/Obsolete/Definition.php
Classes/Checks/Extension/Obsolete/Processor.php
Classes/Checks/Extension/Obsolete/ResultAnalyzer.php
Classes/Cli/CommandManager.php
Classes/Cli/SmoothMigration.php [new file with mode: 0644]
Classes/Cli/class.smoothmigration_cli.php [deleted file]
Classes/Controller/AbstractCommandController.php
Classes/Controller/AbstractModuleController.php
Classes/Controller/AjaxController.php
Classes/Controller/ReportController.php
Classes/Controller/SmoothmigrationCommandController.php
Classes/Database/Labels.php [new file with mode: 0644]
Classes/Domain/Interface/Check.php [deleted file]
Classes/Domain/Interface/CheckDescription.php [deleted file]
Classes/Domain/Interface/CheckProcessor.php [deleted file]
Classes/Domain/Interface/CheckRequirements.php [deleted file]
Classes/Domain/Interface/CheckResultAnalyzer.php [deleted file]
Classes/Domain/Interface/Description.php [deleted file]
Classes/Domain/Interface/IssueLocation.php [deleted file]
Classes/Domain/Interface/Migration.php [deleted file]
Classes/Domain/Interface/MigrationDescription.php [deleted file]
Classes/Domain/Interface/MigrationProcessor.php [deleted file]
Classes/Domain/Interface/MigrationRequirements.php [deleted file]
Classes/Domain/Interface/MigrationResultAnalyzer.php [deleted file]
Classes/Domain/Interface/Processor.php [deleted file]
Classes/Domain/Interface/Requirements.php [deleted file]
Classes/Domain/Interface/ResultAnalyzer.php [deleted file]
Classes/Domain/Interfaces/Check.php [new file with mode: 0644]
Classes/Domain/Interfaces/CheckDescription.php [new file with mode: 0644]
Classes/Domain/Interfaces/CheckProcessor.php [new file with mode: 0644]
Classes/Domain/Interfaces/CheckRequirements.php [new file with mode: 0644]
Classes/Domain/Interfaces/CheckResultAnalyzer.php [new file with mode: 0644]
Classes/Domain/Interfaces/Description.php [new file with mode: 0644]
Classes/Domain/Interfaces/IssueLocation.php [new file with mode: 0644]
Classes/Domain/Interfaces/Migration.php [new file with mode: 0644]
Classes/Domain/Interfaces/MigrationDescription.php [new file with mode: 0644]
Classes/Domain/Interfaces/MigrationProcessor.php [new file with mode: 0644]
Classes/Domain/Interfaces/MigrationRequirements.php [new file with mode: 0644]
Classes/Domain/Interfaces/MigrationResultAnalyzer.php [new file with mode: 0644]
Classes/Domain/Interfaces/Processor.php [new file with mode: 0644]
Classes/Domain/Interfaces/Requirements.php [new file with mode: 0644]
Classes/Domain/Interfaces/ResultAnalyzer.php [new file with mode: 0644]
Classes/Domain/Model/Deprecation.php
Classes/Domain/Model/Issue.php
Classes/Domain/Model/IssueLocation/Configuration.php
Classes/Domain/Model/IssueLocation/Database.php
Classes/Domain/Model/IssueLocation/Extension.php
Classes/Domain/Model/IssueLocation/File.php
Classes/Domain/Model/IssueLocation/PhysicalLocation.php
Classes/Domain/Repository/DeprecationRepository.php
Classes/Domain/Repository/IssueRepository.php
Classes/Migrations/AbstractMigrationDefinition.php
Classes/Migrations/AbstractMigrationProcessor.php
Classes/Migrations/Core/CallToDeprecatedStaticMethods/Definition.php
Classes/Migrations/Core/CallToDeprecatedStaticMethods/Processor.php
Classes/Migrations/Core/MissingAddPluginParameter/Definition.php
Classes/Migrations/Core/MissingAddPluginParameter/Processor.php
Classes/Migrations/Core/Namespace/Definition.php [deleted file]
Classes/Migrations/Core/Namespace/Processor.php [deleted file]
Classes/Migrations/Core/Namespaces/Definition.php [new file with mode: 0644]
Classes/Migrations/Core/Namespaces/Processor.php [new file with mode: 0644]
Classes/Migrations/Core/RequireOnceInExtensions/Definition.php [deleted file]
Classes/Migrations/Core/RequireOnceInExtensions/Processor.php [deleted file]
Classes/Migrations/Core/Xclasses/Definition.php [deleted file]
Classes/Migrations/Core/Xclasses/Processor.php [deleted file]
Classes/Migrations/Database/CreateMissingTablesAndFields/Definition.php [deleted file]
Classes/Migrations/Database/CreateMissingTablesAndFields/Processor.php [deleted file]
Classes/Migrations/Database/Utf8/Definition.php [deleted file]
Classes/Migrations/Database/Utf8/Processor.php [deleted file]
Classes/Service/Check/Registry.php
Classes/Service/ClassAliasProvider.php
Classes/Service/MessageService.php
Classes/Service/Migration/Registry.php
Classes/Service/RequirementsAnalyzer.php
Classes/UserFunctions/Tca.php [deleted file]
Classes/Utility/DatabaseUtility.php
Classes/Utility/ExtensionUtility.php
Classes/Utility/FileLocatorUtility.php
Classes/ViewHelpers/IfMigrationAvailableViewHelper.php
Classes/ViewHelpers/InspectionViewHelper.php
Classes/ViewHelpers/ResultAnalyzerViewHelper.php
Configuration/TCA/tx_rxsmoothmigration7_deprecation.php [new file with mode: 0644]
Configuration/TCA/tx_rxsmoothmigration7_issue.php [new file with mode: 0644]
Configuration/TCA/tx_smoothmigration_domain_model_deprecation.php [deleted file]
Configuration/TCA/tx_smoothmigration_domain_model_issue.php [deleted file]
README.md
Resources/Private/.htaccess [new file with mode: 0644]
Resources/Private/Layouts/module.html
Resources/Private/Templates/Report/Checks.html
Resources/Private/Templates/Report/Extension.html
Resources/Private/Templates/Report/PageIdList.html
Resources/Private/Templates/Report/ReportOverview.html
Resources/Private/Templates/Report/Show.html
dynamicReturnTypeMeta.json [new file with mode: 0644]
ext_autoload.php [deleted file]
ext_conf_template.txt
ext_emconf.php
ext_icon.gif [deleted file]
ext_icon.png [new file with mode: 0644]
ext_localconf.php
ext_tables.php
ext_tables.sql
ext_tables_static+adt.sql
ext_typoscript_setup.txt

index a966fab..b927ee3 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+namespace Reelworx\RxSmoothmigration7\Checks;
+
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\Check;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckDescription;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Lang\LanguageService;
+
 /**
- * Class Tx_Smoothmigration_Checks_AbstractCheckDefinition
+ * Class Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition
  *
  * @author Steffen Ritter
  */
-abstract class Tx_Smoothmigration_Checks_AbstractCheckDefinition implements Tx_Smoothmigration_Domain_Interface_Check {
+abstract class AbstractCheckDefinition implements Check {
 
        /**
         *
-        * @var Tx_Extbase_Object_ObjectManager
+        * @var ObjectManager
         */
        protected $objectManager;
 
@@ -42,11 +50,7 @@ abstract class Tx_Smoothmigration_Checks_AbstractCheckDefinition implements Tx_S
         * Constructor
         */
        public function __construct() {
-               if (t3lib_div::int_from_ver(TYPO3_version) < 6001000) {
-                       $this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
-               } else {
-                       $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('\TYPO3\CMS\Extbase\Object\ObjectManager');
-               }
+               $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
        }
 
        /**
@@ -148,7 +152,7 @@ abstract class Tx_Smoothmigration_Checks_AbstractCheckDefinition implements Tx_S
         * @return int
         */
        public function getType() {
-               return Tx_Smoothmigration_Domain_Interface_CheckDescription::TYPE_PHP_CODE;
+               return CheckDescription::TYPE_PHP_CODE;
        }
 
        /**
@@ -180,7 +184,9 @@ abstract class Tx_Smoothmigration_Checks_AbstractCheckDefinition implements Tx_S
        protected function getLanguageLabelForCheck($field) {
                $classParts = explode('_', __CLASS__);
                $extensionName = strtolower($classParts[1]);
-               return $GLOBALS['LANG']->sL(
+               /** @var LanguageService $lang */
+               $lang = $GLOBALS['LANG'];
+               return $lang->sL(
                        'LLL:EXT:' . $extensionName . '/Resources/Private/Language/locallang.xml:check.' . $this->getIdentifier() . '.' . $field
                );
        }
@@ -188,7 +194,7 @@ abstract class Tx_Smoothmigration_Checks_AbstractCheckDefinition implements Tx_S
        /**
         * Get objectManager
         *
-        * @return Tx_Extbase_Object_ObjectManager
+        * @return ObjectManager
         */
        public function getObjectManager() {
                return $this->objectManager;
index a1e18d4..57042b8 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks;
+
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\Check;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
 
 /**
- * Class Tx_Smoothmigration_Checks_AbstractCheckProcessor
+ * Class Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor
  *
  * @author Michiel Roos
  */
-abstract class Tx_Smoothmigration_Checks_AbstractCheckProcessor implements Tx_Smoothmigration_Domain_Interface_CheckProcessor {
+abstract class AbstractCheckProcessor implements CheckProcessor {
 
        /**
         * @var string
@@ -35,24 +40,24 @@ abstract class Tx_Smoothmigration_Checks_AbstractCheckProcessor implements Tx_Sm
        private $extensionKey = NULL;
 
        /**
-        * @var Tx_Smoothmigration_Domain_Model_Issue[]
+        * @var Issue[]
         */
        protected $issues = array();
 
        /**
-        * @var Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_Definition
+        * @var \Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedMethods\Definition
         */
        protected $parentCheck;
 
        /**
-        * @param Tx_Smoothmigration_Domain_Interface_Check $check
+        * @param Check $check
         */
-       public function __construct(Tx_Smoothmigration_Domain_Interface_Check $check) {
+       public function __construct(Check $check) {
                $this->parentCheck = $check;
        }
 
        /**
-        * @return Tx_Smoothmigration_Domain_Model_Issue[]
+        * @return Issue[]
         */
        public function getIssues() {
                return $this->issues;
index 7900473..b28cc95 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks;
+
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\Check;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 
 /**
- * Class Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer
+ * Class Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer implements Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer {
+class AbstractCheckResultAnalyzer implements CheckResultAnalyzer {
 
        /**
         * @var object
@@ -35,28 +41,10 @@ class Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer implements Tx_Smooth
        protected $parentCheck;
 
        /**
-        * @var Tx_Extbase_Utility_Localization
+        * @param Check $check
         */
-       protected $translator;
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Interface_Check $check
-        */
-       public function __construct(Tx_Smoothmigration_Domain_Interface_Check $check) {
+       public function __construct(Check $check) {
                $this->parentCheck = $check;
-               $translator = t3lib_div::makeInstance('Tx_Extbase_Utility_Localization');
-               $this->injectTranslator($translator);
-       }
-
-       /**
-        * Injects the Localization Utility
-        *
-        * @param Tx_Extbase_Utility_Localization $translator
-        *        An instance of the Localization Utility
-        * @return void
-        */
-       public function injectTranslator(Tx_Extbase_Utility_Localization $translator) {
-               $this->translator = $translator;
        }
 
        /**
@@ -67,45 +55,43 @@ class Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer implements Tx_Smooth
         * @return string
         */
        public function ll($key, $arguments = NULL) {
-               return $this->translator->translate($key, 'smoothmigration', $arguments);
+               return LocalizationUtility::translate($key, 'rx_smoothmigration7', $arguments);
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getSeverity(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getSeverity(Issue $issue) {
                return 0;
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getExplanation(Issue $issue) {
                return '';
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getSolution(Issue $issue) {
                return '';
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getRawTextForCopyPaste(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getRawTextForCopyPaste(Issue $issue) {
                return '';
        }
 
 }
-
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Core/CallToDeprecatedMethods/Definition.php b/Classes/Checks/Core/CallToDeprecatedMethods/Definition.php
new file mode 100644 (file)
index 0000000..33f6a73
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedMethods;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
+
+/**
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedMethods\Definition
+ *
+ * @author Peter Beernink
+ */
+class Definition extends AbstractCheckDefinition {
+
+       /**
+        * @return CheckProcessor
+        */
+       public function getProcessor() {
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\CallToDeprecatedMethods\\Processor', $this);
+       }
+
+       /**
+        * @return CheckResultAnalyzer
+        */
+       public function getResultAnalyzer() {
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\CallToDeprecatedMethods\\ResultAnalyzer', $this);
+       }
+
+       /**
+        * Returns an CheckIdentifier
+        * Has to be unique
+        *
+        * @return string
+        */
+       public function getIdentifier() {
+               return 'typo3-core-code-callToDeprecatedStaticMethods';
+       }
+
+}
diff --git a/Classes/Checks/Core/CallToDeprecatedMethods/Processor.php b/Classes/Checks/Core/CallToDeprecatedMethods/Processor.php
new file mode 100644 (file)
index 0000000..7d258d9
--- /dev/null
@@ -0,0 +1,133 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the
+ * license from the author is found in LICENSE.txt distributed with these
+ * scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedMethods;
+
+use Reelworx\RxSmoothmigration7\Domain\Model\IssueLocation\File;
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Deprecation;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Domain\Repository\DeprecationRepository;
+use Reelworx\RxSmoothmigration7\Utility\FileLocatorUtility;
+
+/**
+ * Class
+ * Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedMethods\Definition
+ *
+ * @author Peter Beernink
+ */
+class Processor extends AbstractCheckProcessor {
+
+       /**
+        * @var DeprecationRepository
+        */
+       protected $deprecationRepository;
+
+       /**
+        * Inject the deprecation repository
+        *
+        * @param DeprecationRepository $deprecationRepository
+        *
+        * @return void
+        */
+       public function injectDeprecationRepository(DeprecationRepository $deprecationRepository) {
+               $this->deprecationRepository = $deprecationRepository;
+       }
+
+       /**
+        * Execute the check
+        *
+        * @return void
+        */
+       public function execute() {
+               $regularExpression = $this->generateRegularExpression();
+               if (trim($regularExpression)) {
+                       if ($this->getExtensionKey()) {
+                               $locations = FileLocatorUtility::searchInExtension(
+                                       $this->getExtensionKey(),
+                                       '.*\.(php|inc)$',
+                                       $regularExpression
+                               );
+                       } else {
+                               $locations = FileLocatorUtility::searchInExtensions(
+                                       '.*\.(php|inc)$',
+                                       $regularExpression
+                               );
+                       }
+                       foreach ($locations as $location) {
+                               $issue = new Issue($this->parentCheck->getIdentifier(), $location);
+                               $issue->setAdditionalInformation($this->getRepleacabilityReport($location));
+                               $this->issues[] = $issue;
+                       }
+               }
+       }
+
+       /**
+        * See if we can replace the found deprecation
+        *
+        * @param File $location
+        *
+        * @return array
+        */
+       protected function getRepleacabilityReport($location) {
+               $report = array();
+               $match = $location->getMatchedString();
+               $match = rtrim($match, '(');
+               list($class, $method) = explode('::', $match);
+               $deprecation = $this->deprecationRepository->findOneStaticByClassAndMethod($class, $method);
+               if ($deprecation instanceof Deprecation) {
+                       $report['isReplaceable'] = $deprecation->getNoBrainer();
+                       $report['replacementClass'] = $deprecation->getReplacementClass();
+                       $report['replacementMethod'] = $deprecation->getReplacementMethod();
+                       $report['replacementMessage'] = $deprecation->getReplacementMessage();
+                       $report['deprecationMessage'] = $deprecation->getMessage();
+                       $report['regexSearch'] = $deprecation->getRegexSearch();
+                       $report['regexReplace'] = $deprecation->getRegexReplace();
+               } else {
+                       $report['isReplaceable'] = FALSE;
+               }
+
+               return $report;
+       }
+
+       /**
+        * Generate a regular expression to search for all deprecated static calls
+        */
+       protected function generateRegularExpression() {
+               $regularExpression = array();
+
+               $deprecatedMethods = $this->deprecationRepository->findByIsStatic(TRUE);
+               /** @var Deprecation $deprecatedMethod */
+               foreach ($deprecatedMethods as $deprecatedMethod) {
+                       $regularExpression[] = $deprecatedMethod->getClass() . '::' . $deprecatedMethod->getMethod() . '\s?\(';
+               }
+
+               return '(' . implode('|', $regularExpression) . ')';
+       }
+
+}
diff --git a/Classes/Checks/Core/CallToDeprecatedMethods/ResultAnalyzer.php b/Classes/Checks/Core/CallToDeprecatedMethods/ResultAnalyzer.php
new file mode 100644 (file)
index 0000000..b857352
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedMethods;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+
+/**
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedMethods\ResultAnalyzer
+ *
+ * @author Peter Beernink
+ */
+class ResultAnalyzer extends AbstractCheckResultAnalyzer {
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getExplanation(Issue $issue) {
+               return $this->ll('result.typo3-core-code-callToDeprecatedStaticMethods.explanation');
+       }
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getSolution(Issue $issue) {
+               return $this->ll(
+                       'result.typo3-core-code-callToDeprecatedStaticMethods.solution',
+                       array(
+                               $issue->getLocation()->getMatchedString(),
+                               $issue->getLocation()->getFilePath(),
+                               $issue->getLocation()->getLineNumber()
+                       )
+               );
+       }
+}
+
diff --git a/Classes/Checks/Core/CallToDeprecatedStaticMethods/Definition.php b/Classes/Checks/Core/CallToDeprecatedStaticMethods/Definition.php
deleted file mode 100644 (file)
index 245068c..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_Definition
- *
- * @author Peter Beernink
- */
-class Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_Processor', $this);
-       }
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_ResultAnalyzer', $this);
-       }
-
-       /**
-        * Returns an CheckIdentifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier() {
-               return 'typo3-core-code-callToDeprecatedStaticMethods';
-       }
-
-}
diff --git a/Classes/Checks/Core/CallToDeprecatedStaticMethods/Processor.php b/Classes/Checks/Core/CallToDeprecatedStaticMethods/Processor.php
deleted file mode 100644 (file)
index fa38f71..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the
- * license from the author is found in LICENSE.txt distributed with these
- * scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class
- * Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_Definition
- *
- * @author Peter Beernink
- */
-class Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
-
-       /**
-        * @var Tx_Smoothmigration_Domain_Repository_DeprecationRepository
-        */
-       protected $deprecationRepository;
-
-       /**
-        * Inject the deprecation repository
-        *
-        * @param Tx_Smoothmigration_Domain_Repository_DeprecationRepository $deprecationRepository
-        *
-        * @return void
-        */
-       public function injectDeprecationRepository(Tx_Smoothmigration_Domain_Repository_DeprecationRepository $deprecationRepository) {
-               $this->deprecationRepository = $deprecationRepository;
-       }
-
-       /**
-        * Execute the check
-        *
-        * @return void
-        */
-       public function execute() {
-               $regularExpression = $this->generateRegularExpression();
-               if (trim($regularExpression)) {
-                       if ($this->getExtensionKey()) {
-                               $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
-                                       $this->getExtensionKey(),
-                                       '.*\.(php|inc)$',
-                                       $regularExpression
-                               );
-                       } else {
-                               $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions(
-                                       '.*\.(php|inc)$',
-                                       $regularExpression
-                               );
-                       }
-                       foreach ($locations as $location) {
-                               $issue = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
-                               $issue->setAdditionalInformation($this->getRepleacabilityReport($location));
-                               $this->issues[] = $issue;
-                       }
-               }
-       }
-
-       /**
-        * See if we can replace the found deprecation
-        *
-        * @param Tx_Smoothmigration_Domain_Model_IssueLocation_File $location
-        *
-        * @return array
-        */
-       protected function getRepleacabilityReport($location) {
-               $report = array();
-               $match = $location->getMatchedString();
-               $match = rtrim($match, '(');
-               list($class, $method) = explode('::', $match);
-               $deprecation = $this->deprecationRepository->findOneStaticByClassAndMethod($class, $method);
-               if ($deprecation instanceof Tx_Smoothmigration_Domain_Model_Deprecation) {
-                       $report['isReplaceable'] = $deprecation->getNoBrainer();
-                       $report['replacementClass'] = $deprecation->getReplacementClass();
-                       $report['replacementMethod'] = $deprecation->getReplacementMethod();
-                       $report['replacementMessage'] = $deprecation->getReplacementMessage();
-                       $report['deprecationMessage'] = $deprecation->getMessage();
-                       $report['regexSearch'] = $deprecation->getRegexSearch();
-                       $report['regexReplace'] = $deprecation->getRegexReplace();
-               } else {
-                       $report['isReplaceable'] = FALSE;
-               }
-
-               return $report;
-       }
-
-       /**
-        * Generate a regular expression to search for all deprecated static calls
-        */
-       protected function generateRegularExpression() {
-               $regularExpression = array();
-
-               $deprecatedMethods = $this->deprecationRepository->findByIsStatic(TRUE);
-               foreach ($deprecatedMethods as $deprecatedMethod) {
-                       $regularExpression[] = $deprecatedMethod->getClass() . '::' . $deprecatedMethod->getMethod() . '\s?\(';
-               }
-
-               return '(' . implode('|', $regularExpression) . ')';
-       }
-
-}
diff --git a/Classes/Checks/Core/CallToDeprecatedStaticMethods/ResultAnalyzer.php b/Classes/Checks/Core/CallToDeprecatedStaticMethods/ResultAnalyzer.php
deleted file mode 100644 (file)
index 7458b4a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_ResultAnalyzer
- *
- * @author Peter Beernink
- */
-class Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll('result.typo3-core-code-callToDeprecatedStaticMethods.explanation');
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll(
-                       'result.typo3-core-code-callToDeprecatedStaticMethods.solution',
-                       array(
-                               $issue->getLocation()->getMatchedString(),
-                               $issue->getLocation()->getFilePath(),
-                               $issue->getLocation()->getLineNumber()
-                       )
-               );
-       }
-}
-
-?>
\ No newline at end of file
index 4708ad5..d8ebe67 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedViewHelpers;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_Definition
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedViewHelpers\Definition
  *
  * @author Peter Beernink
  */
-class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
+class Definition extends AbstractCheckDefinition {
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
+        * @return CheckProcessor
         */
        public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_Processor', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\CallToDeprecatedViewHelpers\\Processor', $this);
        }
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
+        * @return CheckResultAnalyzer
         */
        public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_ResultAnalyzer', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\CallToDeprecatedViewHelpers\\ResultAnalyzer', $this);
        }
 
        /**
index e284ceb..ca1734f 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedViewHelpers;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Utility\FileLocatorUtility;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_Definition
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedViewHelpers\Definition
  *
  * @author Peter Beernink
  */
-class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
+class Processor extends AbstractCheckProcessor {
 
        /**
         * Array of all deprecated viewHelpers
@@ -51,19 +56,19 @@ class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_Processor exten
         */
        public function execute() {
                if ($this->getExtensionKey()) {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
+                       $locations = FileLocatorUtility::searchInExtension(
                                $this->getExtensionKey(),
                                '.*\.(html)$',
                                $this->generateRegularExpression()
                        );
                } else {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions(
+                       $locations = FileLocatorUtility::searchInExtensions(
                                '.*\.(html)$',
                                $this->generateRegularExpression()
                        );
                }
                foreach ($locations as $location) {
-                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
+                       $this->issues[] = new Issue($this->parentCheck->getIdentifier(), $location);
                }
        }
 
@@ -80,4 +85,3 @@ class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_Processor exten
 
 }
 
-?>
\ No newline at end of file
index 0720c5d..3e38005 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedViewHelpers;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_ResultAnalyzer
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\CallToDeprecatedViewHelpers\ResultAnalyzer
  *
  * @author Peter Beernink
  */
-class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
+class ResultAnalyzer extends AbstractCheckResultAnalyzer {
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getExplanation(Issue $issue) {
                return $this->ll('result.typo3-core-code-callToDeprecatedViewHelpers.explanation');
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getSolution(Issue $issue) {
                return $this->ll(
                        'result.typo3-core-code-callToDeprecatedViewHelpers.solution',
-                       array (
+                       array(
                                $issue->getLocation()->getMatchedString(),
                                $issue->getLocation()->getFilePath(),
                                $issue->getLocation()->getLineNumber()
@@ -59,4 +63,3 @@ class Tx_Smoothmigration_Checks_Core_CallToDeprecatedViewHelpers_ResultAnalyzer
 
 }
 
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Core/MissingAddPluginParameter/Definition.php b/Classes/Checks/Core/MissingAddPluginParameter/Definition.php
deleted file mode 100644 (file)
index 66cdb85..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/**
- *  Copyright notice
- *
- *  ⓒ 2014 Peter Kuehn <peter.kuehn@wmdb.de>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- */
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_Definition
- *
- * Checks for extensions that don't claim to be compatible with the current LTS
- * version in their ext_emconf.php files.
- *
- * @author Peter Kuehn
- */
-class Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_Definition
-       extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_Processor', $this);
-       }
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_ResultAnalyzer', $this);
-       }
-
-       /**
-        * Returns an CheckIdentifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier() {
-               return 'typo3-core-code-missingaddpluginparameter';
-       }
-
-}
diff --git a/Classes/Checks/Core/MissingAddPluginParameter/Processor.php b/Classes/Checks/Core/MissingAddPluginParameter/Processor.php
deleted file mode 100644 (file)
index 50b7e5f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- *  Copyright notice
- *
- *  ⓒ 2014 Peter Kuehn <peter.kuehn@wmdb.de>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- */
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_Processor
- *
- * @author Peter Kuehn
- */
-class Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_Processor
-       extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
-
-       /**
-        * Execute the check
-        *
-        * @return void
-        */
-       public function execute() {
-               $list = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered(TRUE, FALSE, TRUE);
-               foreach ($list as $extensionKey) {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
-                               $extensionKey,
-                               '.*[^ext_tables]\.(php|inc)$',
-                               '(addPlugin\s*\(\s*(array\s*\([^\)]*\)[^\,]*\,|\$[^\,]*\,)[^\)\,]*\))'
-                       );
-                       foreach ($locations as $location) {
-                               $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
-                       }
-               }
-       }
-}
diff --git a/Classes/Checks/Core/MissingAddPluginParameter/ResultAnalyzer.php b/Classes/Checks/Core/MissingAddPluginParameter/ResultAnalyzer.php
deleted file mode 100644 (file)
index 44337bf..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- *  Copyright notice
- *
- *  ⓒ 2014 Peter Kuehn <peter.kuehn@wmdb.de>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- */
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_ResultAnalyzer
- *
- * @author Peter Kuehn
- */
-class Tx_Smoothmigration_Checks_Core_MissingAddPluginParameter_ResultAnalyzer
-       extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll('result.typo3-core-code-missingaddpluginparameter.explanation');
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll(
-                       'result.typo3-core-code-missingaddpluginparameter.solution',
-                       array(
-                               $issue->getLocation()->getExtension(),
-                               $issue->getLocation()->getMinimumVersion(),
-                               $issue->getLocation()->getMaximumVersion(),
-                       )
-               );
-       }
-
-}
index 5c9affd..d19e21f 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\MySql;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_Mysql_Definition
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\MySql\Definition
  *
  * @author Peter Beernink
  */
-class Tx_Smoothmigration_Checks_Core_Mysql_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
+class Definition extends AbstractCheckDefinition {
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
+        * @return CheckProcessor
         */
        public function getProcessor() {
-               return $this->getObjectManager()->get('Tx_Smoothmigration_Checks_Core_Mysql_Processor', $this);
+               return $this->getObjectManager()->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\MySql\\Processor', $this);
        }
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
+        * @return CheckResultAnalyzer
         */
        public function getResultAnalyzer() {
-               return $this->getObjectManager()->get('Tx_Smoothmigration_Checks_Core_Mysql_ResultAnalyzer', $this);
+               return $this->getObjectManager()->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\MySql\\ResultAnalyzer', $this);
        }
 
        /**
index 1a4d692..9a37bb3 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\MySql;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Utility\FileLocatorUtility;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_Mysql_Definition
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\MySql\Definition
  *
  * @author Peter Beernink
  */
-class Tx_Smoothmigration_Checks_Core_Mysql_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
+class Processor extends AbstractCheckProcessor {
 
        /**
         * @return void
@@ -39,19 +44,19 @@ class Tx_Smoothmigration_Checks_Core_Mysql_Processor extends Tx_Smoothmigration_
                $regularExpression = '/[^>\*#]\s*(mysql_[a-z_]*)\s?\(/';
 
                if ($this->getExtensionKey()) {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
+                       $locations = FileLocatorUtility::searchInExtension(
                                $this->getExtensionKey(),
                                '.*\.(php|inc)$',
                                $regularExpression
                        );
                } else {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions(
+                       $locations = FileLocatorUtility::searchInExtensions(
                                '.*\.(php|inc)$',
                                $regularExpression
                        );
                }
                foreach ($locations as $location) {
-                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
+                       $this->issues[] = new Issue($this->parentCheck->getIdentifier(), $location);
                }
        }
 
index 023e3ce..8a06a65 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\MySql;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_Mysql_ResultAnalyzer
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\MySql\ResultAnalyzer
  *
  * @author Peter Beernink
  */
-class Tx_Smoothmigration_Checks_Core_Mysql_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
+class ResultAnalyzer extends AbstractCheckResultAnalyzer {
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getExplanation(Issue $issue) {
                return $this->ll('result.typo3-core-code-mysql.explanation');
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getSolution(Issue $issue) {
                return $this->ll(
                        'result.typo3-core-code-mysql.solution',
                        array(
@@ -59,4 +63,3 @@ class Tx_Smoothmigration_Checks_Core_Mysql_ResultAnalyzer extends Tx_Smoothmigra
 
 }
 
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Core/Namespace/Definition.php b/Classes/Checks/Core/Namespace/Definition.php
deleted file mode 100644 (file)
index 0447785..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
- *  Copyright notice
- *
- *  ⓒ 2014 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- */
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_Namespace_Definition
- *
- * @author Michiel Roos
- */
-class Tx_Smoothmigration_Checks_Core_Namespace_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_Namespace_Processor', $this);
-       }
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_Namespace_ResultAnalyzer', $this);
-       }
-
-       /**
-        * Returns an CheckIdentifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier() {
-               return 'typo3-core-code-namespace';
-       }
-}
diff --git a/Classes/Checks/Core/Namespace/Processor.php b/Classes/Checks/Core/Namespace/Processor.php
deleted file mode 100644 (file)
index 2a15b84..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-/**
- *  Copyright notice
- *
- *  ⓒ 2014 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- */
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_Namespace_Definition
- *
- * @author Michiel Roos
- */
-class Tx_Smoothmigration_Checks_Core_Namespace_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
-
-       /**
-        * Execute the check
-        *
-        * The regex can become quite large. We try to reduce the size by making the
-        * keys unique and splitting the array in several parts.
-        *
-        * @return void
-        */
-       public function execute() {
-               /** @var Tx_Smoothmigration_Service_ClassAliasProvider $classAliasProvider */
-               $classAliasProvider = t3lib_div::makeInstance('Tx_Smoothmigration_Service_ClassAliasProvider');
-
-               $legacyClasses = array_keys($classAliasProvider->getLegacyClasses());
-               $classAaliases = array_keys($classAliasProvider->getClassAliasMap());
-
-               $classes = array_unique(array_merge($legacyClasses, $classAaliases), SORT_REGULAR);
-
-               $count = count($classes);
-
-               $classChunks = array_chunk($classes, $count / 4);
-
-               if ($this->getExtensionKey()) {
-                       foreach ($classChunks as $chunk) {
-                               $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
-                                       $this->getExtensionKey(),
-                                       '.*\.(php|inc)$',
-                                       '(?:^|\s+|[^\/\.a-zA-Z0-9_]+)(' . implode('|', $chunk) . ')(?:[^\/\.a-zA-Z0-9_]+)'
-                               );
-                               foreach ($locations as $location) {
-                                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
-                               }
-                       }
-               } else {
-                       foreach ($classChunks as $chunk) {
-                               $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions(
-                                       '.*\.(php|inc)$',
-                                       '(?:^|\s+|[^\/\.a-zA-Z0-9_]+)(' . implode('|', $chunk) . ')(?:[^\/\.a-zA-Z0-9_]+)'
-                               );
-                               foreach ($locations as $location) {
-                                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
-                               }
-                       }
-               }
-       }
-}
diff --git a/Classes/Checks/Core/Namespace/ResultAnalyzer.php b/Classes/Checks/Core/Namespace/ResultAnalyzer.php
deleted file mode 100644 (file)
index 2ee2ba9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/**
- *  Copyright notice
- *
- *  ⓒ 2014 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- */
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_Namespace_ResultAnalyzer
- *
- * @author Michiel Roos
- */
-class Tx_Smoothmigration_Checks_Core_Namespace_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll('result.typo3-core-code-namespace.explanation');
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll(
-                       'result.typo3-core-code-namespace.solution',
-                       array(
-                               $issue->getLocation()->getMatchedString(),
-                               $issue->getLocation()->getFilePath(),
-                               $issue->getLocation()->getLineNumber()
-                       )
-               );
-       }
-
-}
diff --git a/Classes/Checks/Core/Namespaces/Definition.php b/Classes/Checks/Core/Namespaces/Definition.php
new file mode 100644 (file)
index 0000000..4473b3c
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/**
+ *  Copyright notice
+ *
+ *  ⓒ 2014 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ */
+namespace Reelworx\RxSmoothmigration7\Checks\Core\Namespaces;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
+
+/**
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\Namespaces\CallToDeprecatedMethods\Definition
+ *
+ * @author Michiel Roos
+ */
+class Definition extends AbstractCheckDefinition {
+
+       /**
+        * @return CheckProcessor
+        */
+       public function getProcessor() {
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\Namespaces\\Processor', $this);
+       }
+
+       /**
+        * @return CheckResultAnalyzer
+        */
+       public function getResultAnalyzer() {
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\Namespaces\\ResultAnalyzer', $this);
+       }
+
+       /**
+        * Returns an CheckIdentifier
+        * Has to be unique
+        *
+        * @return string
+        */
+       public function getIdentifier() {
+               return 'typo3-core-code-namespace';
+       }
+}
diff --git a/Classes/Checks/Core/Namespaces/Processor.php b/Classes/Checks/Core/Namespaces/Processor.php
new file mode 100644 (file)
index 0000000..8429580
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+/**
+ *  Copyright notice
+ *
+ *  ⓒ 2014 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ */
+namespace Reelworx\RxSmoothmigration7\Checks\Core\Namespaces;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Utility\FileLocatorUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\Namespaces\Definition
+ *
+ * @author Michiel Roos
+ */
+class Processor extends AbstractCheckProcessor {
+
+       /**
+        * Execute the check
+        *
+        * The regex can become quite large. We try to reduce the size by making the
+        * keys unique and splitting the array in several parts.
+        *
+        * @return void
+        */
+       public function execute() {
+               $classAliasProvider = GeneralUtility::makeInstance('Reelworx\\RxSmoothmigration7\\Service\\ClassAliasProvider');
+
+               $legacyClasses = array_keys($classAliasProvider->getLegacyClasses());
+               $classAaliases = array_keys($classAliasProvider->getClassAliasMap());
+
+               $classes = array_unique(array_merge($legacyClasses, $classAaliases), SORT_REGULAR);
+
+               $count = count($classes);
+
+               $classChunks = array_chunk($classes, $count / 4);
+
+               if ($this->getExtensionKey()) {
+                       foreach ($classChunks as $chunk) {
+                               $locations = FileLocatorUtility::searchInExtension(
+                                       $this->getExtensionKey(),
+                                       '.*\.(php|inc)$',
+                                       '(?:^|\s+|[^\/\.a-zA-Z0-9_]+)(' . implode('|', $chunk) . ')(?:[^\/\.a-zA-Z0-9_]+)'
+                               );
+                               foreach ($locations as $location) {
+                                       $this->issues[] = new Issue($this->parentCheck->getIdentifier(), $location);
+                               }
+                       }
+               } else {
+                       foreach ($classChunks as $chunk) {
+                               $locations = FileLocatorUtility::searchInExtensions(
+                                       '.*\.(php|inc)$',
+                                       '(?:^|\s+|[^\/\.a-zA-Z0-9_]+)(' . implode('|', $chunk) . ')(?:[^\/\.a-zA-Z0-9_]+)'
+                               );
+                               foreach ($locations as $location) {
+                                       $this->issues[] = new Issue($this->parentCheck->getIdentifier(), $location);
+                               }
+                       }
+               }
+       }
+}
diff --git a/Classes/Checks/Core/Namespaces/ResultAnalyzer.php b/Classes/Checks/Core/Namespaces/ResultAnalyzer.php
new file mode 100644 (file)
index 0000000..161e4f0
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/**
+ *  Copyright notice
+ *
+ *  ⓒ 2014 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ */
+namespace Reelworx\RxSmoothmigration7\Checks\Core\Namespaces;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+
+/**
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\Namespaces\ResultAnalyzer
+ *
+ * @author Michiel Roos
+ */
+class ResultAnalyzer extends AbstractCheckResultAnalyzer {
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getExplanation(Issue $issue) {
+               return $this->ll('result.typo3-core-code-namespace.explanation');
+       }
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getSolution(Issue $issue) {
+               return $this->ll(
+                       'result.typo3-core-code-namespace.solution',
+                       array(
+                               $issue->getLocation()->getMatchedString(),
+                               $issue->getLocation()->getFilePath(),
+                               $issue->getLocation()->getLineNumber()
+                       )
+               );
+       }
+
+}
index e8dc8e1..0040762 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\RemovedConstants;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_RemovedConstants_Definition
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\RemovedConstants\Definition
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Core_RemovedConstants_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
+class Definition extends AbstractCheckDefinition {
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
+        * @return CheckProcessor
         */
        public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_RemovedConstants_Processor', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\RemovedConstants\\Processor', $this);
        }
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
+        * @return CheckResultAnalyzer
         */
        public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_RemovedConstants_ResultAnalyzer', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Core\\RemovedConstants\\ResultAnalyzer', $this);
        }
 
        /**
index 57dd408..c809914 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\RemovedConstants;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Utility\FileLocatorUtility;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_RemovedConstants_Definition
+ * Class Processor
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Core_RemovedConstants_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
+class Processor extends AbstractCheckProcessor {
 
        /**
         * @var array
@@ -41,19 +46,19 @@ class Tx_Smoothmigration_Checks_Core_RemovedConstants_Processor extends Tx_Smoot
         */
        public function execute() {
                if ($this->getExtensionKey()) {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
+                       $locations = FileLocatorUtility::searchInExtension(
                                $this->getExtensionKey(),
                                '.*\.(php|inc)$',
                                $this->generateRegularExpression()
                        );
                } else {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions(
+                       $locations = FileLocatorUtility::searchInExtensions(
                                '.*\.(php|inc)$',
                                $this->generateRegularExpression()
                        );
                }
                foreach ($locations as $location) {
-                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
+                       $this->issues[] = new Issue($this->parentCheck->getIdentifier(), $location);
                }
        }
 
index 3f9cc38..a8a21ef 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Checks\Core\RemovedConstants;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
 
 /**
- * Class Tx_Smoothmigration_Checks_Core_RemovedConstants_ResultAnalyzer
+ * Class Reelworx\RxSmoothmigration7\Checks\Core\RemovedConstants\ResultAnalyzer
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Core_RemovedConstants_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
+class ResultAnalyzer extends AbstractCheckResultAnalyzer {
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getExplanation(Issue $issue) {
                return $this->ll('result.typo3-core-code-removedConstants.explanation');
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getSolution(Issue $issue) {
                return $this->ll(
                        'result.typo3-core-code-mysql.solution',
                        array(
@@ -56,4 +60,3 @@ class Tx_Smoothmigration_Checks_Core_RemovedConstants_ResultAnalyzer extends Tx_
 
 }
 
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Core/RequireOnceInExtensions/Definition.php b/Classes/Checks/Core/RequireOnceInExtensions/Definition.php
deleted file mode 100644 (file)
index dc22e3b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems (steffen.ritter@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_Definition
- *
- * @author Steffen Ritter
- */
-class Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_Processor', $this);
-       }
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_ResultAnalyzer', $this);
-       }
-
-       /**
-        * Returns an CheckIdentifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier() {
-               return 'typo3-core-code-requireOnceInExtensions';
-       }
-
-}
diff --git a/Classes/Checks/Core/RequireOnceInExtensions/Processor.php b/Classes/Checks/Core/RequireOnceInExtensions/Processor.php
deleted file mode 100644 (file)
index a4d7779..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems (steffen.ritter@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_Definition
- *
- * @author Steffen Ritter
- */
-class Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
-
-       /**
-        * @return void
-        */
-       public function execute() {
-               $regularExpression = '(?x)
-               ^\s*
-               (
-                       (?:require|require_once|include|include_once)
-                       (?:\s*\(?\s*|\s+)
-                       (?:
-                               (?:\$BACK_PATH|PATH_t3lib|PATH_tslib|PATH_typo3|PATH_txdam|PATH_site\s*\.\s*TYPO3_mainDir)
-                               \s?\.\s?
-                               (?![\'"]init\.php[\'"])
-                               |
-                               t3lib_extMgm::extPath[^\)]*\)
-                       )
-                       .*\)?\s*;?
-               )';
-
-               if ($this->getExtensionKey()) {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
-                               $this->getExtensionKey(),
-                               '.*\.(php|inc)$',
-                               $regularExpression
-                       );
-               } else {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions(
-                               '.*\.(php|inc)$',
-                               $regularExpression
-                       );
-               }
-               foreach ($locations as $location) {
-                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
-               }
-       }
-
-}
diff --git a/Classes/Checks/Core/RequireOnceInExtensions/ResultAnalyzer.php b/Classes/Checks/Core/RequireOnceInExtensions/ResultAnalyzer.php
deleted file mode 100644 (file)
index bd48328..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems (steffen.ritter@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_ResultAnalyzer
- *
- * @author Steffen Ritter
- */
-class Tx_Smoothmigration_Checks_Core_RequireOnceInExtensions_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll('result.typo3-core-code-requireOnceInExtensions.explanation');
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll(
-                       'result.typo3-core-code-requireOnceInExtensions.solution',
-                       array(
-                               $issue->getLocation()->getMatchedString(),
-                               $issue->getLocation()->getFilePath(),
-                               $issue->getLocation()->getLineNumber()
-                       )
-               );
-       }
-
-}
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Core/Xclasses/Definition.php b/Classes/Checks/Core/Xclasses/Definition.php
deleted file mode 100644 (file)
index 0deb6ab..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems (steffen.ritter@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_Xclasses_Definition
- *
- * @author Steffen Ritter
- */
-class Tx_Smoothmigration_Checks_Core_Xclasses_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_Xclasses_Processor', $this);
-       }
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Core_Xclasses_ResultAnalyzer', $this);
-       }
-
-       /**
-        * Returns an CheckIdentifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier() {
-               return 'typo3-core-code-xclasses';
-       }
-
-       /**
-        * Return the maximal TYPO3 Version the checks needs to be executed on.
-        *
-        * @return string
-        */
-       public function getMaximalTypo3Version() {
-               return '4.7.999';
-       }
-
-}
diff --git a/Classes/Checks/Core/Xclasses/Processor.php b/Classes/Checks/Core/Xclasses/Processor.php
deleted file mode 100644 (file)
index 62e75d7..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems (steffen.ritter@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_Xclasses_Definition
- *
- * @author Steffen Ritter
- */
-class Tx_Smoothmigration_Checks_Core_Xclasses_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
-
-       /**
-        * @return void
-        */
-       public function execute() {
-               $contexts = array('BE', 'FE');
-               if ($this->getExtensionKey()) {
-                       $extensionList = array($this->getExtensionKey());
-               } else {
-                       $extensionList = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered();
-               }
-
-               foreach ($contexts as $context) {
-                       if (is_array($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) && count($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) > 0) {
-                               foreach ($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS'] AS $targetClass => $implementationClass) {
-                                       if (is_file($implementationClass)) {
-                                               $path = str_replace(PATH_typo3conf . 'ext/', '', $implementationClass);
-                                               $extKey = current(explode('/', $path));
-                                       } else {
-                                               $extKey = t3lib_extMgm::getExtensionKeyByPrefix(strtolower($implementationClass));
-                                       }
-
-                                       if (!in_array($extKey, $extensionList)) {
-                                               continue;
-                                       }
-                                       $this->issues[] = $this->createIssue($context, $targetClass, $implementationClass, $extKey);
-                               }
-                       }
-               }
-
-       }
-
-       /**
-        * @param string $context
-        * @param string $targetClass
-        * @param string $implementationClass
-        * @param string $extKey
-        *
-        * @return Tx_Smoothmigration_Domain_Model_Issue
-        */
-       protected function createIssue($context, $targetClass, $implementationClass, $extKey) {
-               $physicalLocation = new Tx_Smoothmigration_Domain_Model_IssueLocation_File($extKey, 'EXT:' . $extKey . '/ext_localconf.php');
-               $details = new Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration(
-                       Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration::TYPE_PHP,
-                       '$GLOBALS[TYPO3_CONF_VARS][' . $context . '][XCLASS][' . $targetClass . ']',
-                       $implementationClass,
-                       $physicalLocation
-               );
-
-               // Cut off any possibly leading slash
-               $targetClass = ltrim($targetClass, '/');
-               if(file_exists(PATH_site . 'typo3conf/' . $targetClass)) {
-                       $originalFilePath = PATH_site . 'typo3conf/' . $targetClass;
-               } elseif(file_exists(PATH_site . 'typo3/sys/' . $targetClass)) {
-                       $originalFilePath = PATH_site . 'typo3/sys/' . $targetClass;
-               } elseif(file_exists(PATH_site . 'typo3/sysext/cms/' . $targetClass)) {
-                       $originalFilePath = PATH_site . 'typo3/sysext/cms/' . $targetClass;
-               } else {
-                       $originalFilePath = PATH_site . $targetClass;
-               }
-
-               $originalClass = $this->getFirstClassInFile($originalFilePath);
-
-               $xClass = $this->getFirstClassInFile($implementationClass);
-
-               $issue = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $details);
-               $issue->setAdditionalInformation(array(
-                       'ORIGINAL_CLASS_FILENAME' => $targetClass,
-                       'IMPLEMENTATION_CLASS_FILENAME' => $implementationClass,
-                       'ORIGINAL_CLASS' => $originalClass,
-                       'IMPLEMENTATION_CLASS' => $xClass
-               ));
-               return $issue;
-       }
-
-       /**
-        * @param string $physicalLocation
-        *
-        * @return string       the first class name in the given file
-        */
-       protected function getFirstClassInFile($physicalLocation) {
-               return $this->getClassInCode(file_get_contents($physicalLocation));
-       }
-
-       /**
-        * @param string $sourceCode
-        *
-        * @return string the first class name in the given source code
-        */
-       protected function getClassInCode($sourceCode) {
-
-               $tokens = token_get_all($sourceCode);
-               $count = count($tokens);
-               for ($i = 2; $i < $count; $i++) {
-                       if (   $tokens[$i - 2][0] == T_CLASS
-                               && $tokens[$i - 1][0] == T_WHITESPACE
-                               && $tokens[$i][0] == T_STRING) {
-
-                               return $tokens[$i][1];
-                       }
-               }
-       }
-}
diff --git a/Classes/Checks/Core/Xclasses/ResultAnalyzer.php b/Classes/Checks/Core/Xclasses/ResultAnalyzer.php
deleted file mode 100644 (file)
index 2d4d730..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems (steffen.ritter@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Core_Xclasses_ResultAnalyzer
- *
- * @author Steffen Ritter
- */
-class Tx_Smoothmigration_Checks_Core_Xclasses_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               $information = $issue->getAdditionalInformation();
-               return $this->ll(
-                       'result.typo3-core-code-xclasses.explanation',
-                       array(
-                               $information['IMPLEMENTATION_CLASS'],
-                               $information['ORIGINAL_CLASS']
-                       )
-               );
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               $information = $issue->getAdditionalInformation();
-
-               $originalClass = $information['ORIGINAL_CLASS'];
-               $newClass = $information['IMPLEMENTATION_CLASS'];
-
-               if (is_file($newClass)) {
-                       $pattern = '/^\s?class\s+([A-Za-z0-9_\\\\]+)\s+extends\s+([A-Za-z0-9_\\\\]+)/';
-                       foreach (new SplFileObject($newClass) as $lineContent) {
-                               $matches = array();
-                               if (preg_match($pattern, $lineContent, $matches)) {
-                                       $newClass = $matches[1];
-                                       $originalClass = $matches[2];
-                                       break;
-                               }
-                       }
-               }
-               return $this->ll(
-                       'result.typo3-core-code-xclasses.solution',
-                       array(
-                               $issue->getLocation()->getPhysicalLocation()->getFilePath() .
-                               ($issue->getLocation()->getPhysicalLocation()->getLineNumber() > -1 ?
-                                       ' line ' . $issue->getLocation()->getPhysicalLocation()->getLineNumber() :
-                                       ''),
-                               $originalClass,
-                               $newClass
-                       )
-               );
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getRawTextForCopyPaste(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               $information = $issue->getAdditionalInformation();
-
-               $originalClass = $information['ORIGINAL_CLASS'];
-               $newClass = $information['IMPLEMENTATION_CLASS'];
-               return $this->ll(
-                       'result.typo3-core-code-xclasses.raw',
-                       array(
-                               $originalClass,
-                               $newClass
-                       )
-               );
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Dam/CallToDamClasses/Definition.php b/Classes/Checks/Dam/CallToDamClasses/Definition.php
deleted file mode 100644 (file)
index c968601..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Dam_CallToDamClasses_Definition
- *
- * @author Peter Beernink
- */
-class Tx_Smoothmigration_Checks_Dam_CallToDamClasses_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Dam_CallToDamClasses_Processor', $this);
-       }
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Dam_CallToDamClasses_ResultAnalyzer', $this);
-       }
-
-       /**
-        * Returns an CheckIdentifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier() {
-               return 'typo3-dam-code-callToDamClasses';
-       }
-
-}
diff --git a/Classes/Checks/Dam/CallToDamClasses/Processor.php b/Classes/Checks/Dam/CallToDamClasses/Processor.php
deleted file mode 100644 (file)
index 8715991..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class
- * Tx_Smoothmigration_Checks_Core_CallToDeprecatedStaticMethods_Definition
- *
- * @author Peter Beernink
- */
-class Tx_Smoothmigration_Checks_Dam_CallToDamClasses_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
-
-       /**
-        * Array of all deprecated static methods
-        *
-        * @var array
-        */
-       protected $damClasses = array(
-               'tx_dam\w+',
-               'tx_damcatedit_positionMap',
-               'tx_damcatedit_db',
-               'tx_damcatedit_cm'
-       );
-
-       /**
-        * @return void
-        */
-       public function execute() {
-               if ($this->getExtensionKey()) {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtension(
-                               $this->getExtensionKey(),
-                               '.*\.(php|inc)$',
-                               $this->generateRegularExpression()
-                       );
-               } else {
-                       $locations = Tx_Smoothmigration_Utility_FileLocatorUtility::searchInExtensions(
-                               '.*\.(php|inc)$',
-                               $this->generateRegularExpression(),
-                               array(
-                                       'dam',
-                                       'dam_catedit',
-                                       'dam_cron',
-                                       'dam_filelinks',
-                                       'dam_index',
-                                       'dam_pages',
-                                       'dam_ttcontent',
-                                       'dam_ttnews',
-                                       'extbase_dam'
-                               )
-                       );
-               }
-               foreach ($locations as $location) {
-                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
-               }
-       }
-
-       /**
-        * Generate a regular expression to search for all deprecated static calls
-        *
-        * @return string
-        */
-       protected function generateRegularExpression() {
-               $regularExpression = array();
-               foreach ($this->damClasses as $damClass) {
-                       // static call
-                       $regularExpression[] = '(' . $damClass . '\:\:\w+)';
-                       // makeInstance call
-                       $regularExpression[] = '(makeInstance\((\"|\')' . $damClass . '(\"|\')\))';
-                       // new-call
-                       $regularExpression[] = '(new\s+' . $damClass . '\s*\;)';
-               }
-
-               return implode('|', $regularExpression);
-       }
-
-}
diff --git a/Classes/Checks/Dam/CallToDamClasses/ResultAnalyzer.php b/Classes/Checks/Dam/CallToDamClasses/ResultAnalyzer.php
deleted file mode 100644 (file)
index dba4633..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Peter Beernink, Drecomm (p.beernink@drecomm.nl)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Dam_CallToDamClasses_ResultAnalyzer
- *
- * @author Peter Beernink
- */
-class Tx_Smoothmigration_Checks_Dam_CallToDamClasses_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll('result.typo3-dam-code-callToDamClasses.explanation');
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll(
-                       'result.typo3-core-code-mysql.solution',
-                       array(
-                               $issue->getLocation()->getMatchedString(),
-                               $issue->getLocation()->getFilePath(),
-                               $issue->getLocation()->getLineNumber()
-                       )
-               );
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Database/Utf8/Definition.php b/Classes/Checks/Database/Utf8/Definition.php
deleted file mode 100644 (file)
index 2427f17..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Database_Utf8_Definition
- *
- * @author Michiel Roos
- */
-class Tx_Smoothmigration_Checks_Database_Utf8_Definition extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Database_Utf8_Processor', $this);
-       }
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Database_Utf8_ResultAnalyzer', $this);
-       }
-
-       /**
-        * Returns an CheckIdentifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier() {
-               return 'typo3-database-database-utf8';
-       }
-
-       /**
-        * Returns the Type of the Check
-        * One of the Constants Defined in that interface
-        *
-        * @return int
-        */
-       public function getType() {
-               return Tx_Smoothmigration_Domain_Interface_CheckDescription::TYPE_DATABASE;
-       }
-
-}
diff --git a/Classes/Checks/Database/Utf8/Processor.php b/Classes/Checks/Database/Utf8/Processor.php
deleted file mode 100644 (file)
index d62ab45..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Database_Utf8_Processor
- *
- * @author Michiel Roos
- */
-class Tx_Smoothmigration_Checks_Database_Utf8_Processor extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
-
-       /**
-        * Execute the check
-        * @return void
-        */
-       public function execute() {
-               $characterSets = $this->getMySqlCharacterSets();
-               $preferredCharacterSets = array(
-                       'character_set_connection' => 'utf8',
-                       'character_set_database' => 'utf8',
-                       'character_set_server' => 'utf8'
-               );
-
-               foreach ($characterSets as $key => $characterSet) {
-                       if (array_key_exists($key, $preferredCharacterSets)) {
-                               if ($characterSet !== $preferredCharacterSets[$key]) {
-                                       $physicalLocation = new Tx_Smoothmigration_Domain_Model_IssueLocation_Database(TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db);
-                                       $details = new Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration(
-                                               Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration::TYPE_DATABASESERVER,
-                                               TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db . ': ' . $key,
-                                               $characterSet,
-                                               $physicalLocation
-                                       );
-
-                                       $issue = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $details);
-                                       $issue->setAdditionalInformation(array(
-                                               'type' => 'configuration',
-                                               'setting' => $key,
-                                               'preferredValue' => $preferredCharacterSets[$key],
-                                               'actualValue' => $characterSet
-                                       ));
-                                       $this->issues[] = $issue;
-                               }
-                       }
-               }
-
-               $dbCharsetCollation = $this->getDatabaseCharsetAndCollation();
-               $allowedCollations = array(
-                       'utf8_general_ci',
-                       'utf8_unicode_ci',
-                       'utf8_general_cs',
-                       'utf8_unicode_cs',
-                       'utf8_bin'
-               );
-               $physicalLocation = new Tx_Smoothmigration_Domain_Model_IssueLocation_Database(TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db);
-               if ($dbCharsetCollation['characterSet'] !== 'utf8' OR
-                               !in_array($dbCharsetCollation['defaultCollation'], $allowedCollations)) {
-                       $key = 'databaseCharacterset';
-                       $details = new Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration(
-                               Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration::TYPE_DATABASE,
-                               TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db . ': ' . $key,
-                               $key,
-                               $physicalLocation
-                       );
-                       $issue = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $details);
-                       $issue->setAdditionalInformation(array(
-                               'type' => 'databaseCollation',
-                               'characterSet' => $dbCharsetCollation['characterSet'],
-                               'defaultCollation' => $dbCharsetCollation['defaultCollation']
-                       ));
-                       $this->issues[] = $issue;
-               }
-
-               $tableCollations = $this->getTableCollations();
-               foreach ($tableCollations as $collationInfo) {
-                       $key = $collationInfo['table_name'] . '#' . $collationInfo['collation_name'];
-                       $physicalLocation = new Tx_Smoothmigration_Domain_Model_IssueLocation_Database(TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db);
-                       $details = new Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration(
-                               Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration::TYPE_DATABASE,
-                               TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db . ': ' . $key,
-                               $key,
-                               $physicalLocation
-                       );
-
-                       $issue = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $details);
-                       $issue->setAdditionalInformation(array(
-                               'type' => 'tableCollation',
-                               'tableName' => $collationInfo['table_name'],
-                               'tableCollation' => $collationInfo['table_collation']
-                       ));
-                       $this->issues[] = $issue;
-               }
-
-               $columnCollations = $this->getColumnCollations();
-               foreach ($columnCollations as $collationInfo) {
-                       $key = $collationInfo['table_name'] . '#' . $collationInfo['column_name'] . '#' . $collationInfo['character_set_name'] . '#' . $collationInfo['collation_name'];
-                       $physicalLocation = new Tx_Smoothmigration_Domain_Model_IssueLocation_Database(TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db);
-                       $details = new Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration(
-                               Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration::TYPE_DATABASE,
-                               TYPO3_db_username . '@' . TYPO3_db_host . '/' . TYPO3_db . ': ' . $key,
-                               $key,
-                               $physicalLocation
-                       );
-
-                       $issue = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $details);
-                       $issue->setAdditionalInformation(array(
-                               'type' => 'columnCollation',
-                               'tableName' => $collationInfo['table_name'],
-                               'columnName' => $collationInfo['column_name'],
-                               'characterSetName' => $collationInfo['character_set_name'],
-                               'collationName' => $collationInfo['collation_name']
-                       ));
-                       $this->issues[] = $issue;
-               }
-       }
-
-       /**
-        * Get informations about the mysql server character_set
-        *
-        * @return array
-        */
-       protected function getMySqlCharacterSets() {
-               $characterSets = '';
-
-               $res = $GLOBALS['TYPO3_DB']->sql_query('SHOW VARIABLES LIKE "character_set_%";');
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $characterSets[$row['Variable_name']] = $row['Value'];
-               }
-               $GLOBALS['TYPO3_DB']->sql_free_result($res);
-
-               return $characterSets;
-       }
-
-       /**
-        * Get the database charset and collation
-        *
-        * The charset should be utf8
-        *
-        * For default collation:
-        * utf8_general_ci is reccomended
-        * utf8_unicode_ci is also ok
-        * utf8_bin is also ok
-        * The cs versions (Case sensitive compare) are also ok
-        *
-        * @return array $row
-        */
-       protected function getDatabaseCharsetAndCollation() {
-               $res = $GLOBALS['TYPO3_DB']->sql_query('
-                       SELECT
-                               DEFAULT_CHARACTER_SET_NAME as characterSet,
-                               DEFAULT_COLLATION_NAME as defaultCollation
-                       FROM
-                               information_schema.SCHEMATA
-                       WHERE
-                               SCHEMA_NAME = "' . TYPO3_db . '"');
-               $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
-               $GLOBALS['TYPO3_DB']->sql_free_result($res);
-               return $row;
-       }
-
-       /**
-        * Get the table collations for the current database
-        * utf8_general_ci is reccomended
-        * utf8_unicode_ci is also ok
-        * utf8_bin is also ok
-        * The cs versions (Case sensitive compare) are also ok
-        *
-        * @return array $mysqlTableCollations
-        */
-       protected function getTableCollations() {
-               $mysqlTableCollations = array();
-               $res = $GLOBALS['TYPO3_DB']->sql_query('
-                       SELECT table_name, table_collation
-                       FROM information_schema.TABLES
-                       WHERE table_schema = "' . TYPO3_db . '"
-                       AND NOT table_collation = "utf8_general_ci"
-                       AND NOT table_collation = "utf8_unicode_ci"
-                       AND NOT table_collation = "utf8_general_cs"
-                       AND NOT table_collation = "utf8_unicode_cs"
-                       AND NOT table_collation = "utf8_bin"
-                       ORDER BY table_name, table_collation');
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $mysqlTableCollations[] = $row;
-               }
-               $GLOBALS['TYPO3_DB']->sql_free_result($res);
-               return $mysqlTableCollations;
-       }
-
-
-       /**
-        * Get the column collations for the current database
-        * utf8_general_ci is reccomended
-        * utf8_unicode_ci is also ok
-        * utf8_bin is also ok
-        * The cs versions (Case sensitive compare) are also ok
-        *
-        * @return array $mysqlColumnCollations
-        */
-       protected function getColumnCollations() {
-               $mysqlColumnCollations = array();
-               $res = $GLOBALS['TYPO3_DB']->sql_query('
-                       SELECT table_name, column_name, character_set_name, collation_name
-                       FROM information_schema.COLUMNS
-                       WHERE table_schema = "' . TYPO3_db . '"
-                       AND (
-                               NOT character_set_name = "utf8"
-                               OR (
-                                       NOT collation_name = "utf8_general_ci"
-                                       AND NOT collation_name = "utf8_unicode_ci"
-                                       AND NOT collation_name = "utf8_general_cs"
-                                       AND NOT collation_name = "utf8_unicode_cs"
-                                       AND NOT collation_name = "utf8_bin"
-                               )
-                       )
-                       ORDER BY table_name, column_name');
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $mysqlColumnCollations[] = $row;
-               }
-               $GLOBALS['TYPO3_DB']->sql_free_result($res);
-               return $mysqlColumnCollations;
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Checks/Database/Utf8/ResultAnalyzer.php b/Classes/Checks/Database/Utf8/ResultAnalyzer.php
deleted file mode 100644 (file)
index a8f9480..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Class Tx_Smoothmigration_Checks_Database_Utf8_ResultAnalyzer
- *
- * @author Michiel Roos
- */
-class Tx_Smoothmigration_Checks_Database_Utf8_ResultAnalyzer extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               return $this->ll('result.typo3-database-database-utf8.explanation');
-       }
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
-               if (is_string($issue->getAdditionalInformation())) {
-                       $additionalInformation = unserialize($issue->getAdditionalInformation());
-               } else {
-                       $additionalInformation = $issue->getAdditionalInformation();
-               }
-               switch ($additionalInformation['type']) {
-                       case 'configuration':
-                               $result = $this->ll(
-                                       'result.typo3-database-database-utf8.databaseServerSetting',
-                                       array(
-                                               $additionalInformation['setting'],
-                                               $additionalInformation['actualValue'],
-                                               $additionalInformation['preferredValue']
-                                       )
-                               );
-                               break;
-                       case 'databaseCollation':
-                               $result = $this->ll(
-                                       'result.typo3-database-database-utf8.databaseCollation',
-                                       array(
-                                               $additionalInformation['characterSet'],
-                                               $additionalInformation['defaultCollation'],
-                                               'utf8',
-                                               'utf8_general_ci'
-                                       )
-                               );
-                               break;
-                       case 'tableCollation':
-                               $result = $this->ll(
-                                       'result.typo3-database-database-utf8.databaseTableCollation',
-                                       array(
-                                               $additionalInformation['tableName'],
-                                               $additionalInformation['tableCollation'],
-                                               'utf8_general_ci'
-                                       )
-                               );
-                               break;
-                       case 'columnCollation':
-                               $result = $this->ll(
-                                       'result.typo3-database-database-utf8.databaseColumnCollation',
-                                       array(
-                                               $additionalInformation['tableName'],
-                                               $additionalInformation['columnName'],
-                                               $additionalInformation['characterSetName'],
-                                               $additionalInformation['collationName']
-                                       )
-                               );
-                               break;
-                       default:
-                               $result = '';
-               }
-               return $result;
-       }
-}
-
-?>
\ No newline at end of file
index bd7adf0..d18f850 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
+namespace Reelworx\RxSmoothmigration7\Checks\Extension\IncompatibleWithLts;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
 
 /**
- * Class Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_Definition
+ * Class Definition
  *
  * Checks for extensions that don't claim to be compatible with the current LTS
  * version in their ext_emconf.php files.
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_Definition
-       extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
+class Definition extends AbstractCheckDefinition {
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
+        * @return CheckProcessor
         */
        public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_Processor', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Extension\\IncompatibleWithLts\\Processor', $this);
        }
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
+        * @return CheckResultAnalyzer
         */
        public function getResultAnalyzer() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_ResultAnalyzer', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Extension\\IncompatibleWithLts\\ResultAnalyzer', $this);
        }
 
        /**
index de9a9c6..a8f0bec 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
+namespace Reelworx\RxSmoothmigration7\Checks\Extension\IncompatibleWithLts;
+
+use Reelworx\RxSmoothmigration7\Domain\Model\IssueLocation\Extension;
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Utility\ExtensionUtility;
 
 /**
- * Class Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_Definition
+ * Class Definition
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_Processor
-       extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
+class Processor extends AbstractCheckProcessor {
 
        /**
         * Execute the check
@@ -35,10 +40,10 @@ class Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_Processor
         * @return void
         */
        public function execute() {
-               $extensions = Tx_Smoothmigration_Utility_ExtensionUtility::getIncompatibleExtensions();
+               $extensions = ExtensionUtility::getIncompatibleExtensions('7.2.0');
                foreach ($extensions as $extension => $versionRange) {
-                       $location = new Tx_Smoothmigration_Domain_Model_IssueLocation_Extension($extension, $versionRange[0], $versionRange[1]);
-                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
+                       $location = new Extension($extension, $versionRange[0], $versionRange[1]);
+                       $this->issues[] = new Issue($this->parentCheck->getIdentifier(), $location);
                }
        }
 }
index 03738ef..1dd8c5c 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
+namespace Reelworx\RxSmoothmigration7\Checks\Extension\IncompatibleWithLts;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
 
 /**
- * Class Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_ResultAnalyzer
+ * Class ResultAnalyzer
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Extension_IncompatibleWithLts_ResultAnalyzer
-       extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
+class ResultAnalyzer extends AbstractCheckResultAnalyzer {
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getExplanation(Issue $issue) {
                return $this->ll('result.typo3-extension-code-incompatiblewithlts.explanation');
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getSolution(Issue $issue) {
                return $this->ll(
                        'result.typo3-extension-code-incompatiblewithlts.solution',
                        array(
index 4476e57..f0d4fd9 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
+namespace Reelworx\RxSmoothmigration7\Checks\Extension\Obsolete;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer;
 
 /**
- * Class Tx_Smoothmigration_Checks_Extension_Obsolete_Definition
+ * Class Definition
  *
  * Checks for extensions that don't claim to be compatible with the current LTS
  * version in their ext_emconf.php files.
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Extension_Obsolete_Definition
-       extends Tx_Smoothmigration_Checks_AbstractCheckDefinition {
+class Definition extends AbstractCheckDefinition {
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
+        * @return CheckProcessor
         */
        public function getProcessor() {
-               return $this->objectManager->get('Tx_Smoothmigration_Checks_Extension_Obsolete_Processor', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Extension\\Obsolete\\Processor', $this);
        }
 
        /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
+        * @return CheckResultAnalyzer
         */
        public function getResultAnalyzer() {
-               return $this->objectManager->ge('Tx_Smoothmigration_Checks_Extension_Obsolete_ResultAnalyzer', $this);
+               return $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Checks\\Extension\\Obsolete\\ResultAnalyzer', $this);
        }
 
        /**
index 72e7413..ea1bf1f 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
+namespace Reelworx\RxSmoothmigration7\Checks\Extension\Obsolete;
+
+use Reelworx\RxSmoothmigration7\Domain\Model\IssueLocation\Extension;
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Utility\ExtensionUtility;
 
 /**
- * Class Tx_Smoothmigration_Checks_Extension_Obsolete_Definition
+ * Class Definition
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Extension_Obsolete_Processor
-       extends Tx_Smoothmigration_Checks_AbstractCheckProcessor {
+class Processor extends AbstractCheckProcessor {
 
        /**
         * Execute the check
@@ -35,10 +40,10 @@ class Tx_Smoothmigration_Checks_Extension_Obsolete_Processor
         * @return void
         */
        public function execute() {
-               $extensions = Tx_Smoothmigration_Utility_ExtensionUtility::getObsoleteExtensions();
+               $extensions = ExtensionUtility::getObsoleteExtensions();
                foreach ($extensions as $extension) {
-                       $location = new Tx_Smoothmigration_Domain_Model_IssueLocation_Extension($extension);
-                       $this->issues[] = new Tx_Smoothmigration_Domain_Model_Issue($this->parentCheck->getIdentifier(), $location);
+                       $location = new Extension($extension);
+                       $this->issues[] = new Issue($this->parentCheck->getIdentifier(), $location);
                }
        }
 }
index 445c464..116dd23 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
+namespace Reelworx\RxSmoothmigration7\Checks\Extension\Obsolete;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckResultAnalyzer;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
 
 /**
- * Class Tx_Smoothmigration_Checks_Extension_Obsolete_ResultAnalyzer
+ * Class ResultAnalyzer
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Checks_Extension_Obsolete_ResultAnalyzer
-       extends Tx_Smoothmigration_Checks_AbstractCheckResultAnalyzer {
+class ResultAnalyzer extends AbstractCheckResultAnalyzer {
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getExplanation(Issue $issue) {
                return $this->ll('result.typo3-extension-code-obsolete.explanation');
        }
 
        /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
+        * @param Issue $issue
         *
         * @return string
         */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue) {
+       public function getSolution(Issue $issue) {
                return $this->ll(
                        'result.typo3-extension-code-obsolete.solution',
                        array(
index 9aae18a..52512da 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
 
+namespace Reelworx\RxSmoothmigration7\Cli;
+
+use Reelworx\RxSmoothmigration7\Service;
+use TYPO3\CMS\Extbase\Mvc\Cli\Command;
+use TYPO3\CMS\Extbase\Mvc\Exception\AmbiguousCommandIdentifierException;
+use TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException;
+
 /**
  * A helper for CLI commands
  *
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public
  *    License, version 3 or later
  */
-class Tx_Smoothmigration_Cli_CommandManager extends Tx_Extbase_MVC_CLI_CommandManager {
+class CommandManager extends \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager {
 
        /**
         * Returns an array of all commands
         *
-        * @return array<Tx_Extbase_MVC_CLI_Command>
+        * @return Command[][]
         * @api
         */
        public function getAvailableCommands() {
                if ($this->availableCommands === NULL) {
                        $this->availableCommands = array();
 
-                       /** @var Tx_Smoothmigration_Service_Check_Registry $checkRegistry */
-                       $checkRegistry = $this->objectManager->get('Tx_Smoothmigration_Service_Check_Registry');
+                       $checkRegistry = $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Service\\Check\\Registry');
                        $checks = $checkRegistry->getActiveChecks();
                        foreach ($checks as $command) {
                                $commandIdentifier = $command->getIdentifier();
                                $this->availableCommands['check'][$commandIdentifier] = $command;
                        }
 
-                       /** @var Tx_Smoothmigration_Service_Migration_Registry $migrationRegistry */
-                       $migrationRegistry = $this->objectManager->get('Tx_Smoothmigration_Service_Migration_Registry');
+                       $migrationRegistry = $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Service\\Migration\\Registry');
                        $migrations = $migrationRegistry->getActiveMigrations();
                        foreach ($migrations as $command) {
                                $commandIdentifier = $command->getIdentifier();
@@ -67,10 +72,9 @@ class Tx_Smoothmigration_Cli_CommandManager extends Tx_Extbase_MVC_CLI_CommandMa
         * @param string $type The type of command
         * @param string $commandIdentifier command identifier in the format
         *    foo:bar:baz
-        *
-        * @throws Tx_Extbase_MVC_Exception_AmbiguousCommandIdentifier
-        * @throws Tx_Extbase_MVC_Exception_NoSuchCommand
-        * @return Tx_Extbase_MVC_CLI_Command
+        * @return Command
+        * @throws AmbiguousCommandIdentifierException
+        * @throws NoSuchCommandException
         * @api
         */
        public function getCommandByTypeAndIdentifier($type, $commandIdentifier) {
@@ -92,10 +96,10 @@ class Tx_Smoothmigration_Cli_CommandManager extends Tx_Extbase_MVC_CLI_CommandMa
                        }
                }
                if (count($matchedCommands) === 0) {
-                       throw new Tx_Extbase_MVC_Exception_NoSuchCommand('No command could be found that matches the command identifier "' . $commandIdentifier . '".', 1310556663);
+                       throw new NoSuchCommandException('No command could be found that matches the command identifier "' . $commandIdentifier . '".', 1310556663);
                }
                if (count($matchedCommands) > 1) {
-                       throw new Tx_Extbase_MVC_Exception_AmbiguousCommandIdentifier('More than one command matches the command identifier "' . $commandIdentifier . '"', 1310557169, NULL, $matchedCommands);
+                       throw new AmbiguousCommandIdentifierException('More than one command matches the command identifier "' . $commandIdentifier . '"', 1310557169, NULL, $matchedCommands);
                }
 
                return current($matchedCommands);
@@ -106,7 +110,7 @@ class Tx_Smoothmigration_Cli_CommandManager extends Tx_Extbase_MVC_CLI_CommandMa
         * of the specified command. This is the case, if the identifiers are the
         * same or if at least the last two command parts match (case sensitive).
         *
-        * @param Tx_Extbase_MVC_CLI_Command $command
+        * @param Command $command
         * @param string $commandIdentifier command identifier in the format
         *    foo:bar:baz (all lower case)
         *
@@ -114,7 +118,7 @@ class Tx_Smoothmigration_Cli_CommandManager extends Tx_Extbase_MVC_CLI_CommandMa
         *    commands identifier
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       protected function commandMatchesIdentifier(Tx_Extbase_MVC_CLI_Command $command, $commandIdentifier) {
+       protected function commandMatchesIdentifier(Command $command, $commandIdentifier) {
                $commandIdentifierParts = explode(':', $command->getCommandIdentifier());
                $searchedCommandIdentifierParts = explode(':', $commandIdentifier);
                $extensionKey = array_shift($commandIdentifierParts);
diff --git a/Classes/Cli/SmoothMigration.php b/Classes/Cli/SmoothMigration.php
new file mode 100644 (file)
index 0000000..60baf98
--- /dev/null
@@ -0,0 +1,290 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Ingo Schmitt <is@marketing-factory.de>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Cli;
+
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\Check;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository;
+use Reelworx\RxSmoothmigration7\Migrations\AbstractMigrationDefinition;
+use Reelworx\RxSmoothmigration7\Migrations\AbstractMigrationProcessor;
+use Reelworx\RxSmoothmigration7\Service;
+use TYPO3\CMS\Core\Controller\CommandLineController;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
+
+/**
+ * Class Reelworx\RxSmoothmigration7\Cli\SmoothMigration
+ */
+class SmoothMigration extends CommandLineController {
+
+       /**
+        * The issue repository
+        *
+        * @var \Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository
+        */
+       protected $issueRepository;
+
+       /**
+        * @var Service\MessageService
+        */
+       protected $messageBus;
+
+       /**
+        * @var ObjectManager
+        */
+       protected $objectManager;
+
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               // Loads the cli_args array with command line arguments
+               $this->cli_setArguments($_SERVER['argv']);
+
+               $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               $this->issueRepository = $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Domain\\Repository\\IssueRepository');
+               $this->messageBus = $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Service\\MessageService');
+
+               // Adding options to help archive:
+               $this->cli_options = array();
+               $this->cli_options[] = array('check', 'Check your code for needed migrations');
+               $this->cli_options[] = array('report', 'Detailed Report including extension, codeline and check');
+               $this->cli_options[] = array('executeAllChecks', 'Execute all checks and show a short summary');
+               $this->cli_options[] = array('migrate', 'Try to migrate your code');
+               $this->cli_options[] = array('help', 'Display this message');
+
+               // Setting help texts:
+               $this->cli_help['name'] = 'CLI Smoothmigration Agent';
+               $this->cli_help['synopsis'] = 'cli_dispatch.phpsh smoothmigration {task}';
+               $this->cli_help['description'] = 'Executes the report of the smoothmigration extension on CLI Basis';
+               $this->cli_help['examples'] = './typo3/cli_dispatch.phpsh smoothmigration report';
+               $this->cli_help['author'] = 'Ingo Schmitt <is@marketing-factory.de>';
+       }
+
+       /**
+        * CLI engine
+        *
+        * @param array $argv command line arguments
+        * @return string
+        */
+       public function cli_main($argv) {
+               $task = ((string)$this->cli_args['_DEFAULT'][1]) ?: '';
+
+               // Analysis type:
+               switch ($task) {
+                       case 'check':
+                               $checkKey = ((string)$this->cli_args['_DEFAULT'][2]) ?: '';
+                               $extension = trim((string)$this->cli_args['--extension'][0]);
+                               $this->check($checkKey, $extension);
+                               break;
+                       case 'executeAllChecks':
+                               $this->executeAllChecks();
+                               break;
+                       case 'report':
+                               $this->report();
+                               break;
+                       case 'migrate':
+                               $migrationTask = ((string)$this->cli_args['_DEFAULT'][2]) ?: '';
+                               $experimental = in_array((string)$this->cli_args['--experimental'][0], array('y', 'yes', 'true', '1'));
+                               $extension = trim((string)$this->cli_args['--extension'][0]);
+                               $this->migrate($migrationTask, $extension, $experimental);
+                               break;
+                       default:
+                               $this->cli_validateArgs();
+                               $this->cli_help();
+                               exit;
+               }
+       }
+
+       /**
+        * Check
+        *
+        * @param string $checkKey
+        * @param string $extensionKey
+        * @return void
+        */
+       private function check($checkKey, $extensionKey = '') {
+               $check = NULL;
+               $registry = Service\Check\Registry::getInstance();
+
+               if (!empty($checkKey)) {
+                       $check = $registry->getActiveCheckByIdentifier($checkKey);
+               }
+               if ($check === NULL) {
+                       $this->messageBus->message('Please choose a check to execute.' . LF . LF . 'Possible options are:' . LF);
+                       $this->messageBus->message($this->getChecks());
+                       return;
+               }
+
+               /** @var \Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor $processor */
+               $processor = $check->getProcessor();
+               $processor->setExtensionKey($extensionKey);
+               $processor->execute();
+               foreach ($processor->getIssues() as $issue) {
+                       $this->issueRepository->add($issue);
+               }
+               $persistenceManger = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
+               $persistenceManger->persistAll();
+               $this->messageBus->infoMessage('Check: ' . $check->getTitle() . ' has ' . count($processor->getIssues()) . ' issues ');
+       }
+
+       /**
+        * Renders a Report of Extensions as ASCII
+        *
+        * @return void
+        */
+       private function report() {
+               $registry = Service\Check\Registry::getInstance();
+               $issuesWithInspections = $this->issueRepository->findAllGroupedByExtensionAndInspection();
+               foreach ($issuesWithInspections as $extensionKey => $inspections) {
+                       $count = 0;
+                       foreach ($inspections as $issues) {
+                               /** @var Issue $singleIssue */
+                               foreach ($issues as $singleIssue) {
+                                       if ($count == 0) {
+                                               // Render Extension Key
+                                               $this->messageBus->headerMessage('Extension : ' . $singleIssue->getExtension(), 'info');
+                                       }
+                                       $check = $registry->getActiveCheckByIdentifier($singleIssue->getInspection());
+                                       if ($check) {
+                                               $this->messageBus->message($check->getResultAnalyzer()->getSolution($singleIssue));
+                                       }
+                                       $count++;
+                               }
+                       }
+                       $this->messageBus->successMessage('Total: ' . $count . ' issues in ' . $extensionKey . LF);
+               }
+       }
+
+       /**
+        * Execute all checks
+        *
+        * @return void
+        */
+       private function executeAllChecks() {
+               $issues = 0;
+               $registry = Service\Check\Registry::getInstance();
+               $checks = $registry->getActiveChecks();
+
+               /** @var Check $singleCheck */
+               foreach ($checks as $singleCheck) {
+                       $processor = $singleCheck->getProcessor();
+                       $this->messageBus->headerMessage('Check: ' . $singleCheck->getTitle(), 'info');
+                       $processor->execute();
+                       foreach ($processor->getIssues() as $issue) {
+                               $this->issueRepository->add($issue);
+                       }
+                       $issues = $issues + count($processor->getIssues());
+                       $this->messageBus->infoMessage(count($processor->getIssues()) . ' issues found');
+               }
+               $persistenceManger = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
+               $persistenceManger->persistAll();
+               $this->messageBus->infoMessage(LF . 'Total Issues : ' . $issues);
+       }
+
+       /**
+        * Migrate
+        *
+        * @param string $migrationTaskKey
+        * @param string $extensionKey
+        * @param boolean $experimental When TRUE, try to process experimental
+        *    migrations as well
+        * @return void
+        */
+       private function migrate($migrationTaskKey, $extensionKey = '', $experimental) {
+               $migrationTask = NULL;
+               $registry = Service\Migration\Registry::getInstance();
+
+               if (!empty($migrationTaskKey)) {
+                       $migrationTask = $registry->getActiveMigrationByCliKey($migrationTaskKey);
+               }
+               if ($migrationTask === NULL) {
+                       $this->messageBus->message('Please choose a migration to execute.' . LF . LF . 'Possible options are:' . LF);
+                       $this->messageBus->message($this->getMigrations());
+                       return;
+               }
+
+               /** @var \Reelworx\RxSmoothmigration7\Migrations\AbstractMigrationProcessor $processor */
+               $processor = $migrationTask->getProcessor();
+               $processor->setMessageService($this->messageBus);
+               $processor->setExperimental($experimental);
+               $processor->setExtensionKey($extensionKey);
+               $processor->execute();
+       }
+
+       /**
+        * Get available checks
+        *
+        * @return string
+        */
+       private function getChecks() {
+               $output = '';
+               $registry = Service\Check\Registry::getInstance();
+               $checks = $registry->getActiveChecks();
+               $maxLen = 0;
+               /** @var AbstractCheckDefinition $check */
+               foreach ($checks as $check) {
+                       if (strlen($check->getIdentifier()) > $maxLen) {
+                               $maxLen = strlen($check->getIdentifier());
+                       }
+               }
+               foreach ($checks as $check) {
+                       $output .= $check->getIdentifier() . substr($this->cli_indent(rtrim($check->getTitle()), $maxLen + 4), strlen($check->getIdentifier())) . LF;
+               }
+
+               return $output;
+       }
+
+       /**
+        * Get available migrations
+        *
+        * @return string
+        */
+       private function getMigrations() {
+               $output = '';
+               $registry = Service\Migration\Registry::getInstance();
+               $migrations = $registry->getActiveMigrations();
+               $maxLen = 0;
+               /** @var \Reelworx\RxSmoothmigration7\Migrations\AbstractMigrationDefinition $migration */
+               foreach ($migrations as $migration) {
+                       if (strlen($migration->getCliKey()) > $maxLen) {
+                               $maxLen = strlen($migration->getCliKey());
+                       }
+               }
+               foreach ($migrations as $migration) {
+                       $output .= $migration->getCliKey() . substr($this->cli_indent(rtrim($migration->getTitle()), $maxLen + 4), strlen($migration->getCliKey())) . LF;
+               }
+
+               return $output;
+       }
+}
+
+$cleanerObj = GeneralUtility::makeInstance('Reelworx\\RxSmoothmigration7\\Cli\\SmoothMigration');
+$cleanerObj->cli_main($_SERVER['argv']);
diff --git a/Classes/Cli/class.smoothmigration_cli.php b/Classes/Cli/class.smoothmigration_cli.php
deleted file mode 100644 (file)
index 8eee467..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Ingo Schmitt <is@marketing-factory.de>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-if (t3lib_div::int_from_ver(TYPO3_version) < 6002000) {
-       require_once(PATH_t3lib . 'class.t3lib_cli.php');
-}
-
-/**
- * Class tx_smoothmigration_cli
- */
-class tx_smoothmigration_cli extends t3lib_cli {
-
-       /**
-        * The issue repostitory
-        *
-        * @var Tx_Smoothmigration_Domain_Repository_IssueRepository
-        */
-       protected $issueRepository;
-
-       /**
-        * @var Tx_Smoothmigration_Service_MessageService
-        */
-       protected $messageBus;
-
-       /**
-        * @var Tx_Extbase_Object_ObjectManager
-        */
-       protected $objectManager;
-
-       /**
-        * Constructor
-        */
-       public function __construct() {
-               if (t3lib_div::int_from_ver(TYPO3_version) < 6002000) {
-                               // Loads the cli_args array with command line arguments
-                       $this->cli_args = $this->cli_getArgIndex();
-               } else {
-                               // Loads the cli_args array with command line arguments
-                       $this->cli_setArguments($_SERVER['argv']);
-               }
-
-               $this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
-               $this->issueRepository = $this->objectManager->get('Tx_Smoothmigration_Domain_Repository_IssueRepository');
-               $this->messageBus = $this->objectManager->get('Tx_Smoothmigration_Service_MessageService');
-
-                       // Adding options to help archive:
-               $this->cli_options = array();
-               $this->cli_options[] = array('check', 'Check your code for needed migrations');
-               $this->cli_options[] = array('report', 'Detailed Report including extension, codeline and check');
-               $this->cli_options[] = array('executeAllChecks', 'Execute all checks and show a short summary');
-               $this->cli_options[] = array('migrate', 'Try to migrate your code');
-               $this->cli_options[] = array('help', 'Display this message');
-
-                       // Setting help texts:
-               $this->cli_help['name'] = 'CLI Smoothmigration Agent';
-               $this->cli_help['synopsis'] = 'cli_dispatch.phpsh smoothmigration {task}';
-               $this->cli_help['description'] = 'Executes the report of the smoothmigration extension on CLI Basis';
-               $this->cli_help['examples'] = './typo3/cli_dispatch.phpsh smoothmigration report';
-               $this->cli_help['author'] = 'Ingo Schmitt <is@marketing-factory.de>';
-       }
-
-       /**
-        * CLI engine
-        *
-        * @param array $argv command line arguments
-        * @return string
-        */
-       public function cli_main($argv) {
-               $task = ((string)$this->cli_args['_DEFAULT'][1]) ?: '';
-
-                       // Analysis type:
-               switch ($task) {
-                       case 'check':
-                               $checkKey = ((string)$this->cli_args['_DEFAULT'][2]) ?: '';
-                               $extension = trim((string)$this->cli_args['--extension'][0]);
-                               $this->check($checkKey, $extension);
-                               break;
-                       case 'executeAllChecks':
-                               $this->executeAllChecks();
-                               break;
-                       case 'report':
-                               $this->report();
-                               break;
-                       case 'migrate':
-                               $migrationTask = ((string)$this->cli_args['_DEFAULT'][2]) ?: '';
-                               $experimental = in_array((string)$this->cli_args['--experimental'][0],  array('y', 'yes', 'true', '1'));
-                               $extension = trim((string)$this->cli_args['--extension'][0]);
-                               $this->migrate($migrationTask, $extension, $experimental);
-                               break;
-                       default:
-                               $this->cli_validateArgs();
-                               $this->cli_help();
-                               exit;
-               }
-       }
-
-       /**
-        * Check
-        *
-        * @param string $checkKey
-        * @param string $extensionKey
-        * @return void
-        */
-       private function check($checkKey, $extensionKey = '') {
-               $check = NULL;
-               /** @var Tx_Smoothmigration_Service_Check_Registry $registry */
-               $registry = Tx_Smoothmigration_Service_Check_Registry::getInstance();
-
-               if (!empty($checkKey)) {
-                       $check = $registry->getActiveCheckByIdentifier($checkKey);
-               }
-               if ($check === NULL) {
-                       $this->messageBus->message('Please choose a check to execute.' . LF . LF . 'Possible options are:' .  LF);
-                       $this->messageBus->message($this->getChecks());
-                       return;
-               }
-
-               /** @var Tx_Smoothmigration_Checks_AbstractCheckProcessor $processor */
-               $processor = $check->getProcessor();
-               $processor->setExtensionKey($extensionKey);
-               $processor->execute();
-               foreach ($processor->getIssues() as $issue) {
-                       $this->issueRepository->add($issue);
-               }
-               /** @var Tx_Extbase_Persistence_Manager $persistenceManger */
-               $persistenceManger = $this->objectManager->get('Tx_Extbase_Persistence_Manager');
-               $persistenceManger->persistAll();
-               $this->messageBus->infoMessage('Check: ' . $check->getTitle() . ' has ' . count($processor->getIssues()) . ' issues ');
-       }
-
-       /**
-        * Renders a Report of Extensions as ASCII
-        *
-        * @return void
-        */
-       private function report() {
-               $registry = Tx_Smoothmigration_Service_Check_Registry::getInstance();
-               $issuesWithInspections = $this->issueRepository->findAllGroupedByExtensionAndInspection();
-               foreach ($issuesWithInspections as $extensionKey => $inspections) {
-                       $count = 0;
-                       foreach ($inspections as $issues) {
-                               /** @var Tx_Smoothmigration_Domain_Model_Issue $singleIssue */
-                               foreach ($issues as $singleIssue) {
-                                       if ($count == 0) {
-                                                       // Render Extension Key
-                                               $this->messageBus->headerMessage('Extension : ' . $singleIssue->getExtension(), 'info');
-                                       }
-                                       $check = $registry->getActiveCheckByIdentifier($singleIssue->getInspection());
-                                       if ($check) {
-                                               $this->messageBus->message($check->getResultAnalyzer()->getSolution($singleIssue));
-                                       }
-                                       $count ++;
-                               }
-                       }
-                       $this->messageBus->successMessage('Total: ' . $count . ' issues in ' . $extensionKey . LF);
-               }
-       }
-
-       /**
-        * Execute all checks
-        *
-        * @return void
-        */
-       private function executeAllChecks() {
-               $issues = 0;
-               $registry = Tx_Smoothmigration_Service_Check_Registry::getInstance();
-               $checks = $registry->getActiveChecks();
-
-               /** @var Tx_Smoothmigration_Domain_Interface_Check $singleCheck */
-               foreach ($checks as $singleCheck) {
-                       $processor = $singleCheck->getProcessor();
-                       $this->messageBus->headerMessage('Check: ' . $singleCheck->getTitle(), 'info');
-                       $processor->execute();
-                       foreach ($processor->getIssues() as $issue) {
-                               $this->issueRepository->add($issue);
-                       }
-                       $issues = $issues + count($processor->getIssues());
-                       $this->messageBus->infoMessage(count($processor->getIssues()) . ' issues found');
-               }
-               $persistenceManger = $this->objectManager->get('Tx_Extbase_Persistence_Manager');
-               $persistenceManger->persistAll();
-               $this->messageBus->infoMessage(LF . 'Total Issues : ' . $issues);
-       }
-
-       /**
-        * Migrate
-        *
-        * @param string $migrationTaskKey
-        * @param string $extensionKey
-        * @param boolean $experimental When TRUE, try to process experimental
-        *    migrations as well
-        * @return void
-        */
-       private function migrate($migrationTaskKey, $extensionKey = '', $experimental) {
-               $migrationTask = NULL;
-               /** @var Tx_Smoothmigration_Service_Migration_Registry $registry */
-               $registry = Tx_Smoothmigration_Service_Migration_Registry::getInstance();
-
-               if (!empty($migrationTaskKey)) {
-                       $migrationTask = $registry->getActiveMigrationByCliKey($migrationTaskKey);
-               }
-               if ($migrationTask === NULL) {
-                       $this->messageBus->message('Please choose a migration to execute.' . LF . LF . 'Possible options are:' .  LF);
-                       $this->messageBus->message($this->getMigrations());
-                       return;
-               }
-
-               /** @var Tx_Smoothmigration_Migrations_AbstractMigrationProcessor $processor */
-               $processor = $migrationTask->getProcessor();
-               $processor->setMessageService($this->messageBus);
-               $processor->setExperimental($experimental);
-               $processor->setExtensionKey($extensionKey);
-               $processor->execute();
-       }
-
-       /**
-        * Get available checks
-        *
-        * @return string
-        */
-       private function getChecks() {
-               $output = '';
-               $registry = Tx_Smoothmigration_Service_Check_Registry::getInstance();
-               $checks = $registry->getActiveChecks();
-               $maxLen = 0;
-               /** @var Tx_Smoothmigration_Checks_AbstractCheckDefinition $check */
-               foreach ($checks as $check) {
-                       if (strlen($check->getIdentifier()) > $maxLen) {
-                               $maxLen = strlen($check->getIdentifier());
-                       }
-               }
-               foreach ($checks as $check) {
-                       $output .= $check->getIdentifier() . substr($this->cli_indent(rtrim($check->getTitle()), $maxLen + 4), strlen($check->getIdentifier())) . LF;
-               }
-
-               return $output;
-       }
-
-       /**
-        * Get available migrations
-        *
-        * @return string
-        */
-       private function getMigrations() {
-               $output = '';
-               /** @var Tx_Smoothmigration_Service_Migration_Registry $registry */
-               $registry = Tx_Smoothmigration_Service_Migration_Registry::getInstance();
-               $migrations = $registry->getActiveMigrations();
-               $maxLen = 0;
-               /** @var Tx_Smoothmigration_Migrations_AbstractMigrationDefinition $migration */
-               foreach ($migrations as $migration) {
-                       if (strlen($migration->getCliKey()) > $maxLen) {
-                               $maxLen = strlen($migration->getCliKey());
-                       }
-               }
-               foreach ($migrations as $migration) {
-                       $output .= $migration->getCliKey() . substr($this->cli_indent(rtrim($migration->getTitle()), $maxLen + 4), strlen($migration->getCliKey())) . LF;
-               }
-
-               return $output;
-       }
-}
-
-$cleanerObj = t3lib_div::makeInstance('tx_smoothmigration_cli');
-$cleanerObj->cli_main($_SERVER['argv']);
index 577f87c..1142184 100644 (file)
  */
 
 // I can haz color / use unicode?
+namespace Reelworx\RxSmoothmigration7\Controller;
+
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Extbase\Mvc\Controller\CommandController;
+
 if (DIRECTORY_SEPARATOR !== '\\') {
-       define('USE_COLOR', function_exists('posix_isatty') && posix_isatty(STDOUT));
+       define('USE_COLOR', function_exists('posix_isatty') && posix_isatty((int)STDOUT));
        define('UNICODE', TRUE);
 } else {
        define('USE_COLOR', getenv('ANSICON') !== FALSE);
@@ -43,12 +48,12 @@ if (@exec('tput cols')) {
  * @package smoothmigration
  * @subpackage Controller
  */
-class Tx_Smoothmigration_Controller_AbstractCommandController extends Tx_Extbase_MVC_Controller_CommandController {
+class AbstractCommandController extends CommandController {
 
        /**
-        * Output t3lib_FlashMessage
+        * Output FlashMessage
         *
-        * @param t3lib_FlashMessage $message
+        * @param FlashMessage $message
         *
         * @return void
         */
@@ -59,7 +64,7 @@ class Tx_Smoothmigration_Controller_AbstractCommandController extends Tx_Extbase
                if ($message->getMessage()) {
                        $this->outputLine($message->getMessage());
                }
-               if ($message->getSeverity() !== t3lib_FlashMessage::OK) {
+               if ($message->getSeverity() !== FlashMessage::OK) {
                        $this->sendAndExit(1);
                }
        }
@@ -240,7 +245,7 @@ class Tx_Smoothmigration_Controller_AbstractCommandController extends Tx_Extbase
        /**
         * Show a header message
         *
-        * @param $message
+        * @param string $message
         * @param string $style
         * @param boolean $flushOutput
         *
@@ -248,7 +253,7 @@ class Tx_Smoothmigration_Controller_AbstractCommandController extends Tx_Extbase
         */
        public function headerMessage($message, $style = 'info', $flushOutput = TRUE) {
                // Crop the message
-               $message = substr($message, 0, TERMINAL_WIDTH );
+               $message = substr($message, 0, TERMINAL_WIDTH);
                if (UNICODE) {
                        $linePaddingLength = mb_strlen('─') * (TERMINAL_WIDTH);
                        $message =
index 8463437..1ad07df 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-if (t3lib_div::int_from_ver(TYPO3_version) < 6002000) {
-       require_once(PATH_site . TYPO3_mainDir . 'template.php');
-}
+namespace Reelworx\RxSmoothmigration7\Controller;
+
+use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Mvc\RequestInterface;
+use TYPO3\CMS\Extbase\Mvc\ResponseInterface;
+use TYPO3\CMS\Extensionmanager\Controller\ActionController;
+use TYPO3\CMS\Lang\LanguageService;
 
 /**
  * Abstract action controller.
  *
  * @author Steffen Ritter
-
  */
-class Tx_Smoothmigration_Controller_AbstractModuleController extends Tx_Extbase_MVC_Controller_ActionController {
+class AbstractModuleController extends ActionController {
+
        /**
         * @var string Key of the extension this controller belongs to
         */
-       protected $extensionName = 'Smoothmigration';
+       protected $extensionName = 'RxSmoothmigration7';
 
        /**
         * @var string The module security token
@@ -47,45 +53,50 @@ class Tx_Smoothmigration_Controller_AbstractModuleController extends Tx_Extbase_
        protected $moduleToken = '';
 
        /**
-        * @var t3lib_PageRenderer
+        * @var \TYPO3\CMS\Core\Page\PageRenderer
         */
        protected $pageRenderer;
+
+       /**
+        * @var \TYPO3\CMS\Backend\Template\DocumentTemplate
+        */
+       protected $template;
+
        /**
         * Initializes the controller before invoking an action method.
         *
         * @return void
         */
        protected function initializeAction() {
-               $this->pageRenderer->addCssFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/StyleSheet/module.css');
-               $this->pageRenderer->addInlineLanguageLabelFile('EXT:smoothmigration/Resources/Private/Language/locallang.xml');
-               $this->pageRenderer->addJsLibrary('jquery', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/jquery-1.10.1.min.js');
-               $this->pageRenderer->addJsLibrary('sprintf', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/sprintf.min.js');
-               $this->pageRenderer->addJsFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/General.js');
-
-               if (t3lib_div::int_from_ver(TYPO3_version) > 6001000) {
-                       $this->moduleToken = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get()->generateToken('moduleCall', 'tools_SmoothmigrationSmoothmigration');
-               }
+               $extRelPath = ExtensionManagementUtility::extRelPath('rx_smoothmigration7');
+               $this->pageRenderer->addCssFile($extRelPath . 'Resources/Public/StyleSheet/module.css');
+               $this->pageRenderer->addInlineLanguageLabelFile('EXT:rx_smoothmigration7/Resources/Private/Language/locallang.xml');
+               $this->pageRenderer->addJsLibrary('jquery', $extRelPath . 'Resources/Public/JavaScript/jquery-1.10.1.min.js');
+               $this->pageRenderer->addJsLibrary('sprintf', $extRelPath . 'Resources/Public/JavaScript/sprintf.min.js');
+               $this->pageRenderer->addJsFile($extRelPath . 'Resources/Public/JavaScript/General.js');
+               $this->moduleToken = FormProtectionFactory::get()->generateToken('moduleCall', 'tools_RxSmoothmigration7Smoothmigration');
        }
 
        /**
         * Processes a general request. The result can be returned by altering the given response.
         *
-        * @param Tx_Extbase_MVC_RequestInterface $request The request object
-        * @param Tx_Extbase_MVC_ResponseInterface $response The response, modified by this handler
-        * @throws Tx_Extbase_MVC_Exception_UnsupportedRequestType if the controller doesn't support the current request type
+        * @param RequestInterface $request The request object
+        * @param ResponseInterface $response The response, modified by this handler
         * @return void
         */
-       public function processRequest(Tx_Extbase_MVC_RequestInterface $request, Tx_Extbase_MVC_ResponseInterface $response) {
-               $this->template = t3lib_div::makeInstance('template');
+       public function processRequest(RequestInterface $request, ResponseInterface $response) {
+               $this->template = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->pageRenderer = $this->template->getPageRenderer();
 
-               $GLOBALS['SOBE'] = new stdClass();
+               $GLOBALS['SOBE'] = new \stdClass();
                $GLOBALS['SOBE']->doc = $this->template;
 
                parent::processRequest($request, $response);
 
+               /** @var LanguageService $lang */
+               $lang = $GLOBALS['LANG'];
                $pageHeader = $this->template->startpage(
-                       $GLOBALS['LANG']->sL('LLL:EXT:smoothmigration/Resources/Private/Language/locallang.xml:module.title')
+                       $lang->sL('LLL:EXT:rx_smoothmigration7/Resources/Private/Language/locallang.xml:module.title')
                );
                $pageEnd = $this->template->endPage();
 
@@ -93,7 +104,3 @@ class Tx_Smoothmigration_Controller_AbstractModuleController extends Tx_Extbase_
        }
 }
 
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/smoothmigration/Classes/Controller/AbstractModuleController.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/smoothmigration/Classes/Controller/AbstractModuleController.php']);
-}
-?>
\ No newline at end of file
index c8e9630..bf1eac5 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+namespace Reelworx\RxSmoothmigration7\Controller;
+
+use Reelworx\RxSmoothmigration7\Service\Check\Registry;
+use Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository;
+use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
+use TYPO3\CMS\Extbase\Mvc\Web\Response;
+
 /**
- * Class Tx_Smoothmigration_Controller_ReportController
+ * Class AjaxController
  */
-class Tx_Smoothmigration_Controller_AjaxController extends Tx_Extbase_MVC_Controller_ActionController {
+class AjaxController extends ActionController {
 
        /**
-        * @var Tx_Smoothmigration_Domain_Repository_IssueRepository {
+        * @var \Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository
         */
        protected $issueRepository;
 
-       public function injectIssueRepository(Tx_Smoothmigration_Domain_Repository_IssueRepository $issueRepository) {
+       /**
+        * @param \Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository $issueRepository
+        */
+       public function injectIssueRepository(IssueRepository $issueRepository) {
                $this->issueRepository = $issueRepository;
        }
 
@@ -46,7 +56,9 @@ class Tx_Smoothmigration_Controller_AjaxController extends Tx_Extbase_MVC_Contro
         */
        protected function initializeAction() {
                parent::initializeAction();
-               $this->response->setHeader('Content-type', 'application/json; charset=utf-8');
+               if ($this->response instanceof Response) {
+                       $this->response->setHeader('Content-type', 'application/json; charset=utf-8');
+               }
        }
 
        /**
@@ -55,7 +67,7 @@ class Tx_Smoothmigration_Controller_AjaxController extends Tx_Extbase_MVC_Contro
         * @return string
         */
        public function runTestAction($checkIdentifier) {
-               $registry = Tx_Smoothmigration_Service_Check_Registry::getInstance();
+               $registry = Registry::getInstance();
                $check = $registry->getActiveCheckByIdentifier($checkIdentifier);
 
                if ($check !== NULL) {
@@ -70,7 +82,9 @@ class Tx_Smoothmigration_Controller_AjaxController extends Tx_Extbase_MVC_Contro
                                'issueCount' => count($processor->getIssues()),
                        ));
                } else {
-                       $this->response->setStatus(404, 'Check not found');
+                       if ($this->response instanceof Response) {
+                               $this->response->setStatus(404, 'Check not found');
+                       }
                        return json_encode(array('result' => 'ERROR'));
                }
        }
@@ -90,15 +104,10 @@ class Tx_Smoothmigration_Controller_AjaxController extends Tx_Extbase_MVC_Contro
                                'issueCount' => $deletedIssueCount,
                        ));
                } else {
-                       $this->response->setStatus(404, 'Check not found');
+                       if ($this->response instanceof Response) {
+                               $this->response->setStatus(404, 'Check not found');
+                       }
                        return json_encode(array('result' => 'ERROR'));
                }
        }
 }
-
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/smoothmigration/Classes/Controller/AjaxController.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/smoothmigration/Classes/Controller/AjaxController.php']);
-}
-
-?>
\ No newline at end of file
index 358de21..8883213 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+namespace Reelworx\RxSmoothmigration7\Controller;
+
+use Reelworx\RxSmoothmigration7\Utility\DatabaseUtility;
+use Reelworx\RxSmoothmigration7\Utility\ExtensionUtility;
+use Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\MathUtility;
+
 /**
- * Class Tx_Smoothmigration_Controller_ReportController
+ * Class ReportController
  */
-class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_Controller_AbstractModuleController {
+class ReportController extends AbstractModuleController {
 
        /**
-        * @var Tx_Smoothmigration_Domain_Repository_IssueRepository {
+        * @var \Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository
         */
        protected $issueRepository;
 
        /**
-        * @param Tx_Smoothmigration_Domain_Repository_IssueRepository $issueRepository
+        * @param IssueRepository $issueRepository
         *
         * @return void
         */
-       public function injectIssueRepository(Tx_Smoothmigration_Domain_Repository_IssueRepository $issueRepository) {
+       public function injectIssueRepository(IssueRepository $issueRepository) {
                $this->issueRepository = $issueRepository;
        }
 
@@ -50,8 +61,7 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
         * @return void
         */
        public function checksAction() {
-               /** @var Tx_Smoothmigration_Service_Check_Registry $checkRegistry */
-               $checkRegistry = $this->objectManager->get('Tx_Smoothmigration_Service_Check_Registry');
+               $checkRegistry = $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Service\\Registry');
                $activeChecks = $checkRegistry->getActiveChecks();
                $this->view->assign('checks', $activeChecks);
                $this->view->assign('issuesByCheck', $this->issueRepository->findAllGroupedByInspection($activeChecks));
@@ -72,7 +82,7 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                $values['argumentPrefix'] = 'tx_smoothmigration_tools_smoothmigrationsmoothmigration';
 
                // List of sites
-               $sites = Tx_Smoothmigration_Utility_DatabaseUtility::getSiteRoots();
+               $sites = DatabaseUtility::getSiteRoots();
                $selectSites = array();
                foreach ($sites as $siteUid => $siteData) {
                        $selectSites[$siteUid] = $siteUid . ': ' . $siteData['title'];
@@ -92,9 +102,9 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                }
 
                if ($selectedSite) {
-                       $values['pageCount'] = count(Tx_Smoothmigration_Utility_DatabaseUtility::getChildPagesArray($selectedSite, $limit));
-                       $values['pageIds'] = implode(', ', Tx_Smoothmigration_Utility_DatabaseUtility::getChildPagesArray($selectedSite, $limit));
-                       $values['domainRecords'] = Tx_Smoothmigration_Utility_DatabaseUtility::getDomainRecords($selectedSite);
+                       $values['pageCount'] = count(DatabaseUtility::getChildPagesArray($selectedSite, $limit));
+                       $values['pageIds'] = implode(', ', DatabaseUtility::getChildPagesArray($selectedSite, $limit));
+                       $values['domainRecords'] = DatabaseUtility::getDomainRecords($selectedSite);
                }
 
                $this->view->assignMultiple($values);
@@ -114,7 +124,7 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                $values['argumentPrefix'] = 'tx_smoothmigration_tools_smoothmigrationsmoothmigration';
 
                // List of frontend extensions
-               $loadedExtensions = Tx_Smoothmigration_Utility_ExtensionUtility::getFrontendExtensions(FALSE);
+               $loadedExtensions = ExtensionUtility::getFrontendExtensions(FALSE);
                $this->view->assign('loadedExtensions', $loadedExtensions);
 
                $selectedExtension = '';
@@ -123,7 +133,7 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                }
 
                // List of sites
-               $sites = Tx_Smoothmigration_Utility_DatabaseUtility::getSiteRoots();
+               $sites = DatabaseUtility::getSiteRoots();
                $selectSites = array();
                foreach ($sites as $siteUid => $siteData) {
                        $selectSites[$siteUid] = $siteUid . ': ' . $siteData['title'];
@@ -138,22 +148,24 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
 
                if ($selectedSite && $selectedExtension != 1) {
                        // Get TypoScript configuration for selected site
-                       if (count($sites) && $selectedSite) {
-                               $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext');
-                               $tmpl->tt_track = 0;
+                       if (count($sites)) {
+                               $tmpl = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
+                               $tmpl->tt_track = FALSE;
                                $tmpl->init();
-                               $tmpl->runThroughTemplates(t3lib_BEfunc::BEgetRootLine((int)$selectedSite, 'AND 1=1'), 0);
+                               $tmpl->runThroughTemplates(BackendUtility::BEgetRootLine((int)$selectedSite, 'AND 1=1'), 0);
                                $tmpl->generateConfig();
                        }
 
                        // Fetch correct class names
                        $correctClassNames = array();
                        if ($selectedExtension) {
-                               $correctClassNames[$selectedExtension] = t3lib_extMgm::getCN($selectedExtension);
+                               $correctClassNames[$selectedExtension] = ExtensionManagementUtility::getCN($selectedExtension);
                        } else {
-                               $extensionKeys = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensions();
+                               //@todo examine if getLoadedExtensionsFiltered is actually correct - not sure
+//                             $extensionKeys = Reelworx\RxSmoothmigration7\Utility\ExtensionUtility::getLoadedExtensions();
+                               $extensionKeys = ExtensionUtility::getLoadedExtensionsFiltered();
                                foreach ($extensionKeys as $key) {
-                                       $correctClassNames[$key] = t3lib_extMgm::getCN($key);
+                                       $correctClassNames[$key] = ExtensionManagementUtility::getCN($key);
                                }
                        }
 
@@ -189,7 +201,7 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                        foreach ($tmpl->setup['tt_content.']['list.']['20.'] as $listType => $_) {
                                if (preg_match('/^[^.]+$/', $listType)) {
                                        foreach ($values['plugins'] as $correctedClassName) {
-                                               if (preg_match('/^' . $correctedClassName .'/', $listType)) {
+                                               if (preg_match('/^' . $correctedClassName . '/', $listType)) {
                                                        $values['listTypes'][] = $listType;
                                                }
                                        }
@@ -200,22 +212,24 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                        $values['pages'] = array();
                        if (count($values['listTypes']) || count($values['cTypes'])) {
                                $values['pages'] =
-                                       Tx_Smoothmigration_Utility_DatabaseUtility::getPagesWithContentElements($values['cTypes'], $values['listTypes']);
+                                       DatabaseUtility::getPagesWithContentElements($values['cTypes'], $values['listTypes']);
                        }
 
                        $pages = array();
                        foreach ($values['pages'] as $page) {
                                $this->setInPageArray(
                                        $pages,
-                                       t3lib_BEfunc::BEgetRootLine($page['pageUid'], 'AND 1=1'),
+                                       BackendUtility::BEgetRootLine($page['pageUid'], 'AND 1=1'),
                                        $page
                                );
                        }
 
+                       /** @var \TYPO3\CMS\Lang\LanguageService $lang */
+                       $lang = $GLOBALS['LANG'];
                        $lines = array();
                        $lines[] = '<tr class="t3-row-header">
                                <td nowrap>Page title</td>
-                               <td nowrap>' . $GLOBALS['LANG']->getLL('isExt') . '</td>
+                               <td nowrap>' . $lang->getLL('isExt') . '</td>
                                </tr>';
                        $lines = array_merge($lines, $this->renderList($pages));
 
@@ -244,7 +258,7 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
         */
        public function showAction() {
                // Set a default site root so we can link to the extension usage report
-               $sites = Tx_Smoothmigration_Utility_DatabaseUtility::getSiteRoots();
+               $sites = DatabaseUtility::getSiteRoots();
                $defaultSite = array_shift($sites);
                $this->view->assign('site', $defaultSite['uid']);
                $this->view->assign('issueCount', $this->issueRepository->findAll()->count());
@@ -262,7 +276,7 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
 
                $this->pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/ux/flashmessages.js');
 
-               $resourcePath = t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/';
+               $resourcePath = ExtensionManagementUtility::extRelPath('rx_smoothmigration7') . 'Resources/Public/JavaScript/';
 
                //$this->pageRenderer->addCssFile($resourcePath . 'gridfilters/css/GridFilters.css');
 
@@ -317,28 +331,24 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                if (is_array($pages)) {
                        reset($pages);
                        static $i;
-                       $isV4 = t3lib_div::int_from_ver(TYPO3_version) < 6002000;
                        foreach ($pages as $k => $v) {
-                               if ($isV4) {
-                                       $valueIsInt = t3lib_div::testInt($k);
-                               } else {
-                                       $valueIsInt = \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($k);
-                               }
-                               if ($valueIsInt) {
+                               if (MathUtility::canBeInterpretedAsInteger($k)) {
                                        if (isset($pages[$k . "_"])) {
                                                $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
                                                        <td nowrap><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align="top">' .
-                                                       '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('id' => $k))) . '">' .
-                                                       t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k), array("title" => 'ID: ' . $k)) .
-                                                       t3lib_div::fixed_lgd_cs($pages[$k], 30) . '</a></td>
-                                                       <td align="center">' . ($pages[$k . '_']['root_min_val'] == 0 ? t3lib_iconWorks::getSpriteIcon('status-status-checked') : "&nbsp;") .
+                                                       '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('id' => $k))) . '">' .
+                                                       IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k), array("title" => 'ID: ' . $k)) .
+                                                       GeneralUtility::fixed_lgd_cs($pages[$k], 30) . '</a></td>
+                                                       <td align="center">' . ($pages[$k . '_']['root_min_val'] == 0
+                                                               ? IconUtility::getSpriteIcon('status-status-checked')
+                                                               : "&nbsp;") .
                                                        '</td>
                                                        </tr>';
                                        } else {
                                                $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
                                                        <td nowrap ><img src="clear.gif" width="1" height="1" hspace=' . ($c * 10) . ' align=top>' .
-                                                       t3lib_iconWorks::getSpriteIconForRecord('pages', t3lib_BEfunc::getRecordWSOL('pages', $k)) .
-                                                       t3lib_div::fixed_lgd_cs($pages[$k], 30) . '</td>
+                                                       IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k)) .
+                                                       GeneralUtility::fixed_lgd_cs($pages[$k], 30) . '</td>
                                                        <td align="center"></td>
                                                        </tr>';
                                        }
@@ -349,8 +359,3 @@ class Tx_Smoothmigration_Controller_ReportController extends Tx_Smoothmigration_
                return $lines;
        }
 }
-
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/smoothmigration/Classes/Controller/ReviewController.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/smoothmigration/Classes/Controller/ReviewController.php']);
-}
index b0aa6f0..8c42479 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
 
+namespace Reelworx\RxSmoothmigration7\Controller;
+
+use Reelworx\RxSmoothmigration7\Cli\CommandManager;
+use Reelworx\RxSmoothmigration7\Service\Check\Registry;
+use Reelworx\RxSmoothmigration7\Service\MessageService;
+use Reelworx\RxSmoothmigration7\Utility\ExtensionUtility;
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition;
+use Reelworx\RxSmoothmigration7\Checks\AbstractCheckProcessor;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\Check;
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\Migration;
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+use Reelworx\RxSmoothmigration7\Domain\Repository\IssueRepository;
+use Reelworx\RxSmoothmigration7\Migrations\AbstractMigrationProcessor;
+use TYPO3\CMS\Extbase\Mvc\Cli\Command;
+use TYPO3\CMS\Extbase\Mvc\Controller\CommandController;
+use TYPO3\CMS\Extbase\Mvc\Exception\CommandException;
 
 /**
  * Command Controller to execute smoothmigration checks
@@ -28,7 +44,7 @@
  * @package smoothmigration
  * @subpackage Controller
  */
-class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_Extbase_MVC_Controller_CommandController {
+class SmoothmigrationCommandController extends CommandController {
 
        /**
         * @var array
@@ -36,12 +52,12 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
        protected $autoCompleteValues = array();
 
        /**
-        * @var array
+        * @var \Reelworx\RxSmoothmigration7\Domain\Interfaces\Description[][]
         */
        protected $availableActions = array();
 
        /**
-        * @var array<\TYPO3\CMS\Extbase\Mvc\Cli\Command>
+        * @var Command[][]
         */
        protected $availableCommands = NULL;
 
@@ -53,38 +69,38 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
        protected $isInInteractiveMode = FALSE;
 
        /**
-        * True if we are running the checkAll comman
+        * True if we are running the checkAll command
         *
         * @var bool
         */
        protected $isCheckingAll = FALSE;
 
        /**
-        * @var Tx_Smoothmigration_Cli_CommandManager
+        * @var CommandManager
         */
        protected $commandManager;
 
        /**
-        * @param Tx_Smoothmigration_Cli_CommandManager $commandManager
+        * @param CommandManager $commandManager
         *
         * @return void
         */
-       public function injectCommandManager(Tx_Smoothmigration_Cli_CommandManager $commandManager) {
+       public function injectCommandManager(CommandManager $commandManager) {
                $this->commandManager = $commandManager;
        }
 
        /**
-        * @var Tx_Smoothmigration_Service_MessageService
+        * @var MessageService
         */
        protected $messageBus;
 
        /**
         * inject the messageBus
         *
-        * @param Tx_Smoothmigration_Service_MessageService $messageBus
+        * @param MessageService $messageBus
         * @return void
         */
-       public function injectMessageBus(Tx_Smoothmigration_Service_MessageService $messageBus) {
+       public function injectMessageBus(MessageService $messageBus) {
                $this->messageBus = $messageBus;
        }
 
@@ -103,35 +119,32 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                        $this->displayActionIndex();
                } else {
                        try {
-                               /** @var Tx_Smoothmigration_Domain_Interface_Check $check */
-                               $check = $this->commandManager->getCommandByTypeAndIdentifier('Check', $commandIdentifier);
+                               /** @var Check $check */
+                               $check = $this->commandManager->getCommandByTypeAndIdentifier('Reelworx\\RxSmoothmigration7\\Domain\\Interfaces\\Check', $commandIdentifier);
                                if ($check) {
                                        $forExtension = (trim($extensionKey)) ? ' in extension: ' . $extensionKey : '';
                                        $this->messageBus->headerMessage('Check: \'' . $check->getTitle() . '\'' . $forExtension);
-                                       /** @var Tx_Smoothmigration_Checks_AbstractCheckProcessor $processor */
+                                       /** @var AbstractCheckProcessor $processor */
                                        $processor = $check->getProcessor();
                                        if (trim($extensionKey)) {
                                                $processor->setExtensionKey($extensionKey);
                                        }
                                        $processor->execute();
-                                       $issueRepository = $this->objectManager->get('Tx_Smoothmigration_Domain_Repository_IssueRepository');
+                                       $issueRepository = $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Domain\\Repository\\IssueRepository');
                                        foreach ($processor->getIssues() as $issue) {
                                                $issueRepository->add($issue);
                                        }
 
-                                       /** @var Tx_Extbase_Persistence_Manager $persistenceManger */
-                                       $persistenceManger = $this->objectManager->get('Tx_Extbase_Persistence_Manager');
-                                       $persistenceManger->registerRepositoryClassName('Tx_Smoothmigration_Domain_Repository_IssueRepository');
+                                       $persistenceManger = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
+                                       $persistenceManger->registerRepositoryClassName('Reelworx\\RxSmoothmigration7\\Domain\\Repository\\IssueRepository');
                                        $persistenceManger->persistAll();
                                        $this->issueReport(count($processor->getIssues()), $extensionKey);
                                        if ($this->isInInteractiveMode && !$this->isCheckingAll) {
                                                $this->checkCommand();
                                        }
                                }
-                       } catch (Tx_Extbase_MVC_Exception_Command $exception) {
+                       } catch (CommandException $exception) {
                                $this->messageBus->message($exception->getMessage());
-
-                               return;
                        }
                }
        }
@@ -146,7 +159,7 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
        public function checkAllCommand($extensionKey = '') {
                $this->isCheckingAll = TRUE;
                $availableCommands = $this->commandManager->getAvailableCommands();
-               /** @var Tx_Smoothmigration_Checks_AbstractCheckDefinition $command */
+               /** @var AbstractCheckDefinition $command */
                foreach ($availableCommands['check'] as $command) {
                        $commandIdentifier = $command->getIdentifier();
                        $this->checkCommand($commandIdentifier, $extensionKey);
@@ -203,7 +216,7 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                $this->messageBus->setCompletions(array(
                        'actions' => $this->autoCompleteValues['actions'],
                        'commands' => $this->autoCompleteValues['commands'],
-                       'extensions' => Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered()
+                       'extensions' => ExtensionUtility::getLoadedExtensionsFiltered()
                ));
                $this->messageBus->usage();
                $response = $this->messageBus->prompt();
@@ -256,12 +269,12 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                        $this->displayActionIndex('Migration');
                } else {
                        try {
-                               /** @var Tx_Smoothmigration_Domain_Interface_Migration $migration */
-                               $migration = $this->commandManager->getCommandByTypeAndIdentifier('Migration', $commandIdentifier);
+                               /** @var Migration $migration */
+                               $migration = $this->commandManager->getCommandByTypeAndIdentifier('Reelworx\\RxSmoothmigration7\\Domain\\Interfaces\\Migration', $commandIdentifier);
                                if ($migration) {
                                        $forExtension = (trim($extensionKey)) ? ' for extension: ' . $extensionKey : '';
                                        $this->messageBus->headerMessage('Migration: \'' . $migration->getTitle() . '\'' . $forExtension);
-                                       /** @var Tx_Smoothmigration_Migrations_AbstractMigrationProcessor $processor */
+                                       /** @var \Reelworx\RxSmoothmigration7\Migrations\AbstractMigrationProcessor $processor */
                                        $processor = $migration->getProcessor();
                                        if (trim($extensionKey)) {
                                                $processor->setExtensionKey($extensionKey);
@@ -272,14 +285,11 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                                        $processor->setMessageService($this->messageBus);
                                        $processor->execute();
 
-                                       /** @var Tx_Extbase_Persistence_Manager $persistenceManger */
-                                       $persistenceManger = $this->objectManager->get('Tx_Extbase_Persistence_Manager');
+                                       $persistenceManger = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
                                        $persistenceManger->persistAll();
                                }
-                       } catch (Tx_Extbase_MVC_Exception_Command $exception) {
+                       } catch (CommandException $exception) {
                                $this->messageBus->message($exception->getMessage());
-
-                               return;
                        }
                }
        }
@@ -294,9 +304,8 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
         * @return void
         */
        public function reportCommand($extensionKey = '') {
-               $registry = Tx_Smoothmigration_Service_Check_Registry::getInstance();
-               /** @var Tx_Smoothmigration_Domain_Repository_IssueRepository $issueRepository */
-               $issueRepository = $this->objectManager->get('Tx_Smoothmigration_Domain_Repository_IssueRepository');
+               $registry = Registry::getInstance();
+               $issueRepository = $this->objectManager->get('Reelworx\\RxSmoothmigration7\\Domain\\Repository\\IssueRepository');
                if ($extensionKey) {
                        $issuesWithInspections = $issueRepository->findByExtensionGroupedByInspection($extensionKey);
                } else {
@@ -307,18 +316,18 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                                $count = 0;
                                $notMigratedCount = 0;
                                foreach ($inspections as $issues) {
-                                       /** @var Tx_Smoothmigration_Domain_Model_Issue $singleIssue */
+                                       /** @var Issue $singleIssue */
                                        foreach ($issues as $singleIssue) {
                                                if ($count == 0) {
-                                                       // Render Extension Key
+                                                       // Render extension Key
                                                        $this->messageBus->headerMessage('Extension : ' . $singleIssue->getExtension(), 'info');
                                                }
                                                $check = $registry->getActiveCheckByIdentifier($singleIssue->getInspection());
                                                $migrationStatus = $singleIssue->getMigrationStatus();
-                                               Tx_Smoothmigration_Domain_Interface_Migration::SUCCESS;
+                                               Migration::SUCCESS;
                                                if ($check) {
                                                        switch ($migrationStatus) {
-                                                               case Tx_Smoothmigration_Domain_Interface_Migration::SUCCESS:
+                                                               case Migration::SUCCESS:
                                                                        $this->messageBus->successMessage($check->getResultAnalyzer()->getSolution($singleIssue));
                                                                        break;
                                                                default:
@@ -382,7 +391,7 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                )));
                $this->messageBus->horizontalLine();
 
-               /** @var Tx_Smoothmigration_Checks_AbstractCheckDefinition $command */
+               /** @var \Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition $command */
                $counter = 1;
                foreach ($this->availableActions[$type] as $command) {
                        $this->autoCompleteValues['actions'][] = $command->getIdentifier();
@@ -399,7 +408,7 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                if ($this->isInInteractiveMode) {
                        $this->messageBus->setCompletions(array(
                                'actions' => $this->autoCompleteValues['actions'],
-                               'extensions' => Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered()
+                               'extensions' => ExtensionUtility::getLoadedExtensionsFiltered()
                        ));
                        $actions = $this->autoCompleteValues['actions'][$type];
                        $this->messageBus->usage();
@@ -467,14 +476,14 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
                $length = 0;
 
                if ($colorizedLength) {
-                       /** @var Tx_Smoothmigration_Checks_AbstractCheckDefinition $command */
+                       /** @var \Reelworx\RxSmoothmigration7\Checks\AbstractCheckDefinition $command */
                        foreach ($commands as $command) {
                                if ($length < strlen($this->messageBus->successString($command->getIdentifier()))) {
                                        $length = strlen($this->messageBus->successString($command->getIdentifier()));
                                }
                        }
                } else {
-                       /** @var Tx_Smoothmigration_Checks_AbstractCheckDefinition $command */
+                       /** @var AbstractCheckDefinition $command */
                        foreach ($commands as $command) {
                                if ($length < strlen($command->getIdentifier())) {
                                        $length = strlen($command->getIdentifier());
@@ -507,7 +516,7 @@ class Tx_Smoothmigration_Controller_SmoothmigrationCommandController extends Tx_
        }
 
        /**
-        * @return Tx_Smoothmigration_Service_MessageService
+        * @return MessageService
         */
        public function getMessageBus() {
                return $this->messageBus;
diff --git a/Classes/Database/Labels.php b/Classes/Database/Labels.php
new file mode 100644 (file)
index 0000000..f9584fc
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+namespace Reelworx\RxSmoothmigration7\Database;
+
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Labels for database tables
+ */
+class DatabaseLabels {
+
+       /**
+        * Title for deprecation table
+        *
+        * @param array $parameters
+        * @return void
+        */
+       public function deprecationTitle(&$parameters) {
+               $record = BackendUtility::getRecord($parameters['table'], $parameters['row']['uid']);
+               $parameters['title'] = $this->renderTitle($record['interface'] ?: $record['class'] . ': ' . $record['method']);
+       }
+
+       /**
+        * Title for issue table
+        *
+        * @param array $parameters
+        * @return void
+        */
+       public function issueTitle(&$parameters) {
+               $record = BackendUtility::getRecord($parameters['table'], $parameters['row']['uid']);
+               $parameters['title'] = $this->renderTitle($record['extension'] . ': ' . $record['inspection']);
+       }
+
+       /**
+        * @param string $title
+        * @return string
+        */
+       protected function renderTitle($title) {
+               /** @var BackendUserAuthentication $beUser */
+               $beUser = $GLOBALS['BE_USER'];
+               $titleLength = $beUser->uc['titleLen'] ?: 30;
+               return htmlspecialchars(GeneralUtility::fixed_lgd_cs($title, $titleLength));
+       }
+
+}
diff --git a/Classes/Domain/Interface/Check.php b/Classes/Domain/Interface/Check.php
deleted file mode 100644 (file)
index bffd0f2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_CheckProcessor
- *
- * @author Steffen Ritter
- */
-interface Tx_Smoothmigration_Domain_Interface_Check extends Tx_Smoothmigration_Domain_Interface_CheckDescription, Tx_Smoothmigration_Domain_Interface_CheckRequirements, t3lib_Singleton {
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckProcessor
-        */
-       public function getProcessor();
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer
-        */
-       public function getResultAnalyzer();
-}
diff --git a/Classes/Domain/Interface/CheckDescription.php b/Classes/Domain/Interface/CheckDescription.php
deleted file mode 100644 (file)
index 5a41a80..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_CheckDescription
- *
- * @author Steffen Ritter
- */
-interface Tx_Smoothmigration_Domain_Interface_CheckDescription extends Tx_Smoothmigration_Domain_Interface_Description {
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/CheckProcessor.php b/Classes/Domain/Interface/CheckProcessor.php
deleted file mode 100644 (file)
index e1ca72a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_CheckProcessor
- *
- * @author Steffen Ritter
- */
-interface Tx_Smoothmigration_Domain_Interface_CheckProcessor extends Tx_Smoothmigration_Domain_Interface_Processor {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Interface_Check $check
-        */
-       public function __construct(Tx_Smoothmigration_Domain_Interface_Check $check);
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/CheckRequirements.php b/Classes/Domain/Interface/CheckRequirements.php
deleted file mode 100644 (file)
index af25b22..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_CheckRequirements
- *
- * @author Steffen Ritter
- */
-interface Tx_Smoothmigration_Domain_Interface_CheckRequirements extends Tx_Smoothmigration_Domain_Interface_Requirements {
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/CheckResultAnalyzer.php b/Classes/Domain/Interface/CheckResultAnalyzer.php
deleted file mode 100644 (file)
index 64694bf..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_CheckProcessor
- *
- * @author Steffen Ritter
- */
-interface Tx_Smoothmigration_Domain_Interface_CheckResultAnalyzer extends Tx_Smoothmigration_Domain_Interface_ResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Interface_Check $check
-        */
-       public function __construct(Tx_Smoothmigration_Domain_Interface_Check $check);
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/Description.php b/Classes/Domain/Interface/Description.php
deleted file mode 100644 (file)
index 70e0cf8..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_Description
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_Description {
-
-       const TYPE_SETTINGS = 0;
-       const TYPE_PHP_CODE = 1;
-       const TYPE_EXTENSION = 2;
-       const TYPE_DATABASE = 4;
-       const TYPE_ENVIRONMENT = 8;
-
-       /**
-        * Returns an Identifier
-        * Has to be unique
-        *
-        * @return string
-        */
-       public function getIdentifier();
-
-       /**
-        * Returns the Type of the Object
-        * One of the Constants Defined in that interface
-        *
-        * @return int
-        */
-       public function getType();
-
-       /**
-        * Returns the name of the check
-        *
-        * @return string
-        */
-       public function getTitle();
-
-       /**
-        * Returns a string which describes the check in one sentence.
-        *
-        * @return string
-        */
-       public function getShortDescription();
-
-       /**
-        * Returns a string which contains an elaborate description
-        * of what the check does.
-        *
-        * @return string
-        */
-       public function getDescription();
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/IssueLocation.php b/Classes/Domain/Interface/IssueLocation.php
deleted file mode 100644 (file)
index 76019a7..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_IssueDetails
- *
- * @author Steffen Ritter
- */
-interface Tx_Smoothmigration_Domain_Interface_IssueLocation {
-
-       /**
-        * Creates ID which identifies the occurence of that issue
-        *
-        * @return string
-        */
-       public function createIssueIdentifier();
-
-       /**
-        * Developers want to group by Extension/not by test,
-        * implement that later
-        *
-        * @return string|NULL
-        */
-       public function getExtension();
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/Migration.php b/Classes/Domain/Interface/Migration.php
deleted file mode 100644 (file)
index 340ed49..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_MigrationProcessor
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_Migration extends Tx_Smoothmigration_Domain_Interface_MigrationDescription, Tx_Smoothmigration_Domain_Interface_MigrationRequirements, t3lib_Singleton {
-
-       const SUCCESS = 1;
-       const ERROR_FILE_NOT_FOUND = 2;
-       const ERROR_FILE_NOT_WRITABLE = 3;
-       const ERROR_FILE_NOT_CHANGED = 4;
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_MigrationProcessor
-        */
-       public function getProcessor();
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Interface_MigrationResultAnalyzer
-        */
-       public function getResultAnalyzer();
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/MigrationDescription.php b/Classes/Domain/Interface/MigrationDescription.php
deleted file mode 100644 (file)
index 5f7a8a6..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_MigrationDescription
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_MigrationDescription extends
-       Tx_Smoothmigration_Domain_Interface_Description {
-
-       /**
-        * Get a key to identify the migration for CLI usage
-        *
-        * @return string
-        */
-       public function getCliKey();
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/MigrationProcessor.php b/Classes/Domain/Interface/MigrationProcessor.php
deleted file mode 100644 (file)
index f09974a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_MigrationProcessor
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_MigrationProcessor extends Tx_Smoothmigration_Domain_Interface_Processor {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Interface_Migration $migration
-        */
-       public function __construct(Tx_Smoothmigration_Domain_Interface_Migration $migration);
-
-}
diff --git a/Classes/Domain/Interface/MigrationRequirements.php b/Classes/Domain/Interface/MigrationRequirements.php
deleted file mode 100644 (file)
index 3943e25..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_CheckRequirements
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_MigrationRequirements extends Tx_Smoothmigration_Domain_Interface_Requirements {
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/MigrationResultAnalyzer.php b/Classes/Domain/Interface/MigrationResultAnalyzer.php
deleted file mode 100644 (file)
index 13a2701..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_MigrationProcessor
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_MigrationResultAnalyzer extends Tx_Smoothmigration_Domain_Interface_ResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Interface_Migration $migration
-        */
-       public function __construct(Tx_Smoothmigration_Domain_Interface_Migration $migration);}
-
-?>
diff --git a/Classes/Domain/Interface/Processor.php b/Classes/Domain/Interface/Processor.php
deleted file mode 100644 (file)
index 04ce2ba..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_Processor
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_Processor {
-
-       /**
-        * @return mixed
-        */
-       public function execute();
-
-       /**
-        * @return boolean
-        */
-       public function hasIssues();
-
-       /**
-        * @return Tx_Smoothmigration_Domain_Model_Issue[]
-        */
-       public function getIssues();
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/Requirements.php b/Classes/Domain/Interface/Requirements.php
deleted file mode 100644 (file)
index f25d053..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_Requirements
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_Requirements {
-
-       /**
-        * Return the minimum TYPO3 Version the checks needs to be executed on.
-        *
-        * @return string
-        */
-       public function getMinimalTypo3Version();
-
-       /**
-        * Return the maximal TYPO3 Version the checks needs to be executed on.
-        *
-        * @return string
-        */
-       public function getMaximalTypo3Version();
-
-       /**
-        * Return the minimum PHP Version the checks needs to be executed on.
-        *
-        * @return string
-        */
-       public function getMinimalPhpVersion();
-
-       /**
-        * Return the maximal PHP Version the checks needs to be executed on.
-        *
-        * @return string
-        */
-       public function getMaximalPhpVersion();
-
-       /**
-        * Returns an array of php-modules, which need to be available
-        * to activate this check;
-        *
-        * Empty array is returned if no special modules are needed
-        *
-        * @return string[]
-        */
-       public function getRequiredAvailablePhpModules();
-
-       /**
-        * Returns an array of php-modules, which need to be absent
-        * to activate this check
-        *
-        * Empty array is returned if there are no missing php-modules
-        *
-        * @return string[]
-        */
-       public function getRequiredAbsentPhpModules();
-
-       /**
-        * Returns an array of Extensions which are required by this check.
-        *
-        * The array may either contain the extension-key as array key while a
-        * a version-range (x.x.x-y.y.y)is provided as value or only the extension-key
-        * as value which then will just check for presence of the given extension.
-        *
-        * @return array
-        */
-       public function getRequiredExtensions();
-
-       /**
-        * Returns an array of Extensions which make this check either obsolete,
-        * or this check is incompatible to.
-        *
-        * @return array
-        */
-       public function getConflictingExtensions();
-
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interface/ResultAnalyzer.php b/Classes/Domain/Interface/ResultAnalyzer.php
deleted file mode 100644 (file)
index a1474c4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project 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.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script 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.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface Tx_Smoothmigration_Domain_Interface_ResultAnalyzer
- *
- * @author Michiel Roos
- */
-interface Tx_Smoothmigration_Domain_Interface_ResultAnalyzer {
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSeverity(Tx_Smoothmigration_Domain_Model_Issue $issue);
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getExplanation(Tx_Smoothmigration_Domain_Model_Issue $issue);
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getSolution(Tx_Smoothmigration_Domain_Model_Issue $issue);
-
-       /**
-        * @param Tx_Smoothmigration_Domain_Model_Issue $issue
-        *
-        * @return string
-        */
-       public function getRawTextForCopyPaste(Tx_Smoothmigration_Domain_Model_Issue $issue);
-
-}
-
-?>
\ No newline at end of file
diff --git a/Classes/Domain/Interfaces/Check.php b/Classes/Domain/Interfaces/Check.php
new file mode 100644 (file)
index 0000000..de40518
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+use TYPO3\CMS\Core\SingletonInterface;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor
+ *
+ * @author Steffen Ritter
+ */
+interface Check extends CheckDescription, CheckRequirements, SingletonInterface {
+
+       /**
+        * @return \Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor
+        */
+       public function getProcessor();
+
+       /**
+        * @return \Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckResultAnalyzer
+        */
+       public function getResultAnalyzer();
+}
diff --git a/Classes/Domain/Interfaces/CheckDescription.php b/Classes/Domain/Interfaces/CheckDescription.php
new file mode 100644 (file)
index 0000000..7331457
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckDescription
+ *
+ * @author Steffen Ritter
+ */
+interface CheckDescription extends Description {
+}
diff --git a/Classes/Domain/Interfaces/CheckProcessor.php b/Classes/Domain/Interfaces/CheckProcessor.php
new file mode 100644 (file)
index 0000000..5195ce0
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor
+ *
+ * @author Steffen Ritter
+ */
+interface CheckProcessor extends Processor {
+
+       /**
+        * @param Check $check
+        */
+       public function __construct(Check $check);
+}
diff --git a/Classes/Domain/Interfaces/CheckRequirements.php b/Classes/Domain/Interfaces/CheckRequirements.php
new file mode 100644 (file)
index 0000000..5672521
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckRequirements
+ *
+ * @author Steffen Ritter
+ */
+interface CheckRequirements extends Requirements {
+}
diff --git a/Classes/Domain/Interfaces/CheckResultAnalyzer.php b/Classes/Domain/Interfaces/CheckResultAnalyzer.php
new file mode 100644 (file)
index 0000000..bfb2343
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor
+ *
+ * @author Steffen Ritter
+ */
+interface CheckResultAnalyzer extends ResultAnalyzer {
+
+       /**
+        * @param Check $check
+        */
+       public function __construct(Check $check);
+}
diff --git a/Classes/Domain/Interfaces/Description.php b/Classes/Domain/Interfaces/Description.php
new file mode 100644 (file)
index 0000000..210d5e7
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\Description
+ *
+ * @author Michiel Roos
+ */
+interface Description {
+
+       const TYPE_SETTINGS = 0;
+       const TYPE_PHP_CODE = 1;
+       const TYPE_EXTENSION = 2;
+       const TYPE_DATABASE = 4;
+       const TYPE_ENVIRONMENT = 8;
+
+       /**
+        * Returns an Identifier
+        * Has to be unique
+        *
+        * @return string
+        */
+       public function getIdentifier();
+
+       /**
+        * Returns the Type of the Object
+        * One of the Constants Defined in that interface
+        *
+        * @return int
+        */
+       public function getType();
+
+       /**
+        * Returns the name of the check
+        *
+        * @return string
+        */
+       public function getTitle();
+
+       /**
+        * Returns a string which describes the check in one sentence.
+        *
+        * @return string
+        */
+       public function getShortDescription();
+
+       /**
+        * Returns a string which contains an elaborate description
+        * of what the check does.
+        *
+        * @return string
+        */
+       public function getDescription();
+}
+
diff --git a/Classes/Domain/Interfaces/IssueLocation.php b/Classes/Domain/Interfaces/IssueLocation.php
new file mode 100644 (file)
index 0000000..4c904e9
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Steffen Ritter, rs websystems <steffen.ritter@typo3.org>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface IssueLocation
+ *
+ * @author Steffen Ritter
+ */
+interface IssueLocation {
+
+       /**
+        * Creates ID which identifies the occurrence of that issue
+        *
+        * @return string
+        */
+       public function createIssueIdentifier();
+
+       /**
+        * Developers want to group by Extension/not by test,
+        * implement that later
+        *
+        * @return string|NULL
+        */
+       public function getExtension();
+}
+
diff --git a/Classes/Domain/Interfaces/Migration.php b/Classes/Domain/Interfaces/Migration.php
new file mode 100644 (file)
index 0000000..0243019
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+use TYPO3\CMS\Core\SingletonInterface;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\MigrationProcessor
+ *
+ * @author Michiel Roos
+ */
+interface Migration extends MigrationDescription, MigrationRequirements, SingletonInterface {
+
+       const SUCCESS = 1;
+       const ERROR_FILE_NOT_FOUND = 2;
+       const ERROR_FILE_NOT_WRITABLE = 3;
+       const ERROR_FILE_NOT_CHANGED = 4;
+
+       /**
+        * @return MigrationProcessor
+        */
+       public function getProcessor();
+
+       /**
+        * @return MigrationResultAnalyzer
+        */
+       public function getResultAnalyzer();
+}
diff --git a/Classes/Domain/Interfaces/MigrationDescription.php b/Classes/Domain/Interfaces/MigrationDescription.php
new file mode 100644 (file)
index 0000000..67d922c
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\MigrationDescription
+ *
+ * @author Michiel Roos
+ */
+interface MigrationDescription extends Description {
+
+       /**
+        * Get a key to identify the migration for CLI usage
+        *
+        * @return string
+        */
+       public function getCliKey();
+}
+
diff --git a/Classes/Domain/Interfaces/MigrationProcessor.php b/Classes/Domain/Interfaces/MigrationProcessor.php
new file mode 100644 (file)
index 0000000..3f5aeac
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\MigrationProcessor
+ *
+ * @author Michiel Roos
+ */
+interface MigrationProcessor extends Processor {
+
+       /**
+        * @param Migration $migration
+        */
+       public function __construct(Migration $migration);
+
+}
diff --git a/Classes/Domain/Interfaces/MigrationRequirements.php b/Classes/Domain/Interfaces/MigrationRequirements.php
new file mode 100644 (file)
index 0000000..09bac25
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckRequirements
+ *
+ * @author Michiel Roos
+ */
+interface MigrationRequirements extends Requirements {
+}
+
diff --git a/Classes/Domain/Interfaces/MigrationResultAnalyzer.php b/Classes/Domain/Interfaces/MigrationResultAnalyzer.php
new file mode 100644 (file)
index 0000000..d848ca0
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\MigrationProcessor
+ *
+ * @author Michiel Roos
+ */
+interface MigrationResultAnalyzer extends ResultAnalyzer {
+
+       /**
+        * @param Migration $migration
+        */
+       public function __construct(Migration $migration);
+}
+
diff --git a/Classes/Domain/Interfaces/Processor.php b/Classes/Domain/Interfaces/Processor.php
new file mode 100644 (file)
index 0000000..51b9a9c
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+*  All rights reserved
+*
+*  This script is part of the TYPO3 project. The TYPO3 project 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.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script 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.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+
+ /**
+  * Interface Processor
+  * @author Michiel Roos
+ */
+interface Processor {
+
+       /**
+        * @return mixed
+        */
+       public function execute();
+
+       /**
+        * @return boolean
+        */
+       public function hasIssues();
+
+       /**
+        * @return Issue[]
+        */
+       public function getIssues();
+}
+
diff --git a/Classes/Domain/Interfaces/Requirements.php b/Classes/Domain/Interfaces/Requirements.php
new file mode 100644 (file)
index 0000000..c98012e
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+/**
+ * Interface Reelworx\RxSmoothmigration7\Domain\Interfaces\Requirements
+ *
+ * @author Michiel Roos
+ */
+interface Requirements {
+
+       /**
+        * Return the minimum TYPO3 Version the checks needs to be executed on.
+        *
+        * @return string
+        */
+       public function getMinimalTypo3Version();
+
+       /**
+        * Return the maximal TYPO3 Version the checks needs to be executed on.
+        *
+        * @return string
+        */
+       public function getMaximalTypo3Version();
+
+       /**
+        * Return the minimum PHP Version the checks needs to be executed on.
+        *
+        * @return string
+        */
+       public function getMinimalPhpVersion();
+
+       /**
+        * Return the maximal PHP Version the checks needs to be executed on.
+        *
+        * @return string
+        */
+       public function getMaximalPhpVersion();
+
+       /**
+        * Returns an array of php-modules, which need to be available
+        * to activate this check;
+        *
+        * Empty array is returned if no special modules are needed
+        *
+        * @return string[]
+        */
+       public function getRequiredAvailablePhpModules();
+
+       /**
+        * Returns an array of php-modules, which need to be absent
+        * to activate this check
+        *
+        * Empty array is returned if there are no missing php-modules
+        *
+        * @return string[]
+        */
+       public function getRequiredAbsentPhpModules();
+
+       /**
+        * Returns an array of Extensions which are required by this check.
+        *
+        * The array may either contain the extension-key as array key while a
+        * a version-range (x.x.x-y.y.y)is provided as value or only the extension-key
+        * as value which then will just check for presence of the given extension.
+        *
+        * @return array
+        */
+       public function getRequiredExtensions();
+
+       /**
+        * Returns an array of Extensions which make this check either obsolete,
+        * or this check is incompatible to.
+        *
+        * @return array
+        */
+       public function getConflictingExtensions();
+
+}
+
diff --git a/Classes/Domain/Interfaces/ResultAnalyzer.php b/Classes/Domain/Interfaces/ResultAnalyzer.php
new file mode 100644 (file)
index 0000000..ad047df
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2013 Michiel Roos <michiel@maxserv.nl>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+namespace Reelworx\RxSmoothmigration7\Domain\Interfaces;
+
+use Reelworx\RxSmoothmigration7\Domain\Model\Issue;
+
+/**
+ * Interface ResultAnalyzer
+ *
+ * @author Michiel Roos
+ */
+interface ResultAnalyzer {
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getSeverity(Issue $issue);
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getExplanation(Issue $issue);
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getSolution(Issue $issue);
+
+       /**
+        * @param Issue $issue
+        *
+        * @return string
+        */
+       public function getRawTextForCopyPaste(Issue $issue);
+
+}
index 5c9bc00..68dee0f 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+namespace Reelworx\RxSmoothmigration7\Domain\Model;
+
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
+
 /**
- * Class Tx_Smoothmigration_Domain_Model_Deprecation
+ * Class Reelworx\RxSmoothmigration7\Domain\Model\Deprecation
  *
  * @author Michiel Roos
  */
-class Tx_Smoothmigration_Domain_Model_Deprecation extends Tx_Extbase_DomainObject_AbstractEntity {
+class Deprecation extends AbstractEntity {
 
        /**
         * @var string
@@ -223,4 +227,3 @@ class Tx_Smoothmigration_Domain_Model_Deprecation extends Tx_Extbase_DomainObjec
 
 }
 
-?>
\ No newline at end of file
index 1900157..6772fc4 100644 (file)
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+namespace Reelworx\RxSmoothmigration7\Domain\Model;
+
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\IssueLocation;
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
+
 /**
- * Class Tx_Smoothmigration_Domain_Model_Issue
+ * Class Reelworx\RxSmoothmigration7\Domain\Model\Issue
  *
  * @author Steffen Ritter
  */
-class Tx_Smoothmigration_Domain_Model_Issue extends Tx_Extbase_DomainObject_AbstractEntity {
+class Issue extends AbstractEntity {
 
        /**
         * @var string
@@ -49,7 +54,7 @@ class Tx_Smoothmigration_Domain_Model_Issue extends Tx_Extbase_DomainObject_Abst
        protected $extension;
 
        /**
-        * @var Tx_Smoothmigration_Domain_Interface_IssueLocation
+        * @var IssueLocation
         */
        protected $location;
 
@@ -75,9 +80,9 @@ class Tx_Smoothmigration_Domain_Model_Issue extends Tx_Extbase_DomainObject_Abst
 
        /**
         * @param string $checkIdentifier
-        * @param Tx_Smoothmigration_Domain_Interface_IssueLocation $issueDetails
+        * @param \Reelworx\RxSmoothmigration7\Domain\Interfaces\IssueLocation $issueDetails
         */
-       public function __construct($checkIdentifier, Tx_Smoothmigration_Domain_Interface_IssueLocation $issueDetails) {
+       public function __construct($checkIdentifier, IssueLocation $issueDetails) {
                $this->setLocation($issueDetails);
                $this->inspection = $checkIdentifier;
        }
@@ -102,7 +107,7 @@ class Tx_Smoothmigration_Domain_Model_Issue extends Tx_Extbase_DomainObject_Abst
        }
 
        /**
-        * @param \Tx_Smoothmigration_Domain_Interface_IssueLocation $details
+        * @param \Reelworx\RxSmoothmigration7\Domain\Interfaces\IssueLocation $details
         *
         * @return void
         */
@@ -114,7 +119,7 @@ class Tx_Smoothmigration_Domain_Model_Issue extends Tx_Extbase_DomainObject_Abst
        }
 
        /**
-        * @return \Tx_Smoothmigration_Domain_Interface_IssueLocation
+        * @return \Reelworx\RxSmoothmigration7\Domain\Interfaces\IssueLocation
         */
        public function getLocation() {
                if ($this->location == NULL && $this->locationInfo !== NULL) {
index 9057a02..88bf658 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Domain\Model\IssueLocation;
+
+use Reelworx\RxSmoothmigration7\Domain\Interfaces\IssueLocation;
 
 /**
- * Class Tx_Smoothmigration_Domain_Interface_CheckProcessor
+ * Class Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor
  *
  * @author Steffen Ritter
  */
-class Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration implements Tx_Smoothmigration_Domain_Interface_IssueLocation {
+class Configuration implements IssueLocation {
 
 
        const TYPE_TCA = 1;
@@ -57,7 +60,7 @@ class Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration implements Tx_
        protected $currentValue;
 
        /**
-        * @var Tx_Smoothmigration_Domain_Model_IssueLocation_PhysicalLocation
+        * @var PhysicalLocation
         */
        protected $physicalLocation;
 
@@ -68,16 +71,16 @@ class Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration implements Tx_
         */
        public function createIssueIdentifier() {
                return md5($this->type . '-' . $this->path) .
-                       ($this->physicalLocation !== NULL ? $this->physicalLocation->createIssueIdentifier() : '');
+               ($this->physicalLocation !== NULL ? $this->physicalLocation->createIssueIdentifier() : '');
        }
 
        /**
         * @param integer $type
         * @param string $path
         * @param string $currentValue
-        * @param Tx_Smoothmigration_Domain_Model_IssueLocation_PhysicalLocation $location
+        * @param PhysicalLocation $location
         */
-       public function __construct($type, $path, $currentValue = '', Tx_Smoothmigration_Domain_Model_IssueLocation_PhysicalLocation $location = NULL) {
+       public function __construct($type, $path, $currentValue = '', PhysicalLocation $location = NULL) {
                $this->type = $type;
                $this->path = $path;
                $this->currentValue = $currentValue;
@@ -117,16 +120,16 @@ class Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration implements Tx_
        }
 
        /**
-        * @param \Tx_Smoothmigration_Domain_Model_IssueLocation_PhysicalLocation $physicalLocation
+        * @param PhysicalLocation $physicalLocation
         *
         * @return void
         */
-       public function setPhysicalLocation(Tx_Smoothmigration_Domain_Model_IssueLocation_PhysicalLocation $physicalLocation) {
+       public function setPhysicalLocation(PhysicalLocation $physicalLocation) {
                $this->physicalLocation = $physicalLocation;
        }
 
        /**
-        * @return \Tx_Smoothmigration_Domain_Model_IssueLocation_PhysicalLocation
+        * @return PhysicalLocation
         */
        public function getPhysicalLocation() {
                return $this->physicalLocation;
@@ -165,4 +168,3 @@ class Tx_Smoothmigration_Domain_Model_IssueLocation_Configuration implements Tx_
 
 }
 
-?>
\ No newline at end of file
index edad0ef..194d1e0 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+namespace Reelworx\RxSmoothmigration7\Domain\Model\IssueLocation;
 
 /**
- * Class Tx_Smoothmigration_Domain_Interface_CheckProcessor
+ * Class Reelworx\RxSmoothmigration7\Domain\Interfaces\CheckProcessor
  *
  * @author Steffen Ritter
  */
-class Tx_Smoothmigration_Domain_Model_IssueLocation_Database extends Tx_Smoothmigration_Domain_Model_IssueLocation_PhysicalLocation {
+class Database extends PhysicalLocation {
 
        /**
         * @var string
@@ -148,4 +149,3 @@ class Tx_Smoothmigration_Domain_Model_IssueLocation_Database extends Tx_Smoothmi
 
 }
 
-?>
\ No newline at end of file