From 057c67714fb2c713304ab5d4d15a8db4eab3db01 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 9 Dec 2016 10:19:18 +0100 Subject: [PATCH] WIP|FEATURE: Integrate scrutinizer * To allow auto checking of coding guideline --- .scrutinizer.yml | 32 +++++++++++++++++ Classes/Command/IndexCommandController.php | 40 ++++++++++++++++++++++ composer.json | 12 +++++++ ext_emconf.php | 4 +-- 4 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 .scrutinizer.yml create mode 100644 Classes/Command/IndexCommandController.php diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..31e46af --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,32 @@ +filter: + excluded_paths: + - 'Documentation/*' + - 'Resources/JavaScript/*' + paths: + - 'Classes/*' +tools: + + php_cpd: + enabled: true + + php_code_sniffer: + enabled: true + config: + standard: TYPO3CMS + + php_hhvm: + enabled: true + config: + use_undeclared_constant: false + + php_mess_detector: + enabled: true + config: + controversial_rules: + superglobals: false + + php_pdepend: + enabled: true + + php_analyzer: + enabled: true diff --git a/Classes/Command/IndexCommandController.php b/Classes/Command/IndexCommandController.php new file mode 100644 index 0000000..77cb651 --- /dev/null +++ b/Classes/Command/IndexCommandController.php @@ -0,0 +1,40 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +use TYPO3\CMS\Extbase\Mvc\Controller\CommandController; + +/** + * Command controller to provide indexing through CLI. + */ +class IndexCommandController extends CommandController +{ + /** + * Will index the given table or everything. + * + * @param string $table + */ + public function indexCommand($table) + { + // TODO: Allow to index multiple tables at once? + // TODO: Also allow to index everything? + } +} diff --git a/composer.json b/composer.json index de16915..f6c4410 100644 --- a/composer.json +++ b/composer.json @@ -9,11 +9,23 @@ "Leonmrni\\SearchCore\\": "Classes" } }, + "require" : { + "php": ">=5.6.0", + "typo3/cms": ">=6.2.0" + }, + "require-dev": { + "phpunit/phpunit": ">=4.8.0 <6.0.0" + }, "authors": [ { "name": "Justus Leon Moroni", "email": "developer@leonmrni.com", "role": "lead" + }, + { + "name": "Daniel Siepmann", + "email": "coding@daniel-siepmann.de", + "role": "developer" } ] } diff --git a/ext_emconf.php b/ext_emconf.php index 185982f..8614d21 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -6,8 +6,8 @@ $EM_CONF[$_EXTKEY] = [ 'category' => 'be', 'constraints' => [ 'depends' => [ - 'typo3' => '7.6.2-8.99.99', - 'php' => '7.0.0-7.99.99' + 'typo3' => '6.2.0-8.99.99', + 'php' => '5.6.0-7.99.99' ], 'conflicts' => [], ],