From b11581cbd89630712d792e982c8f91ca51ea475f Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sat, 13 Dec 2014 15:28:07 +0100 Subject: [PATCH 01/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd675a7..bf56b33 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Checkout the project website at forge.typo3.org: * fetch an extension from TER * import an extension * install / uninstall extension - * create upload folders + * ~~create upload folders~~ * configure extension * SiteApi * info From 99a183927a43c2de5259541206a8a87f7f6cd916 Mon Sep 17 00:00:00 2001 From: David Greiner Date: Fri, 10 Apr 2015 16:30:43 +0200 Subject: [PATCH 02/20] [TASK] using sprintf for logger message too --- Classes/Command/CacheApiCommandController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Command/CacheApiCommandController.php b/Classes/Command/CacheApiCommandController.php index 167858f..747b5fa 100644 --- a/Classes/Command/CacheApiCommandController.php +++ b/Classes/Command/CacheApiCommandController.php @@ -84,7 +84,7 @@ public function injectCacheApiService(\Etobi\CoreAPI\Service\CacheApiService $ca public function clearAllCachesCommand($hard = false) { $this->cacheApiService->clearAllCaches($hard); $message = 'All caches have been cleared%s.'; - $this->logger->info($message); + $this->logger->info(sprintf($message, $hard ? ' hard' : '')); $this->outputLine($message, $hard ? array(' hard') : array('')); } @@ -158,4 +158,4 @@ public function clearAllExceptPageCacheCommand() { $this->logger->info($message); $this->outputLine($message); } -} \ No newline at end of file +} From e2140b205f5fd60423a0482573e1b7beac18e065 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Tue, 26 Aug 2014 19:14:11 +0200 Subject: [PATCH 03/20] [FEATURE] ConfigurationApi --- .../ConfigurationApiCommandController.php | 58 +++++++++++++++++++ ext_autoload.php | 1 + ext_localconf.php | 3 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 Classes/Command/ConfigurationApiCommandController.php diff --git a/Classes/Command/ConfigurationApiCommandController.php b/Classes/Command/ConfigurationApiCommandController.php new file mode 100644 index 0000000..450bf42 --- /dev/null +++ b/Classes/Command/ConfigurationApiCommandController.php @@ -0,0 +1,58 @@ + + * 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! + ***************************************************************/ + +use TYPO3\CMS\Extbase\Mvc\Controller\CommandController; +use TYPO3\CMS\Extbase\Reflection\ObjectAccess; + +/** + * Configuration API Command Controller + * + * @package TYPO3 + * @subpackage coreapi + */ +class ConfigurationApiCommandController extends CommandController { + + /** + * listCommand + * + * @return string + */ + public function listCommand() { + $typo3ConfVars = $GLOBALS['TYPO3_CONF_VARS']; + $this->outputLine(json_encode($typo3ConfVars)); + } + + /** + * showCommand + * + * @param string $param + * @return string + */ + public function showCommand($key) { + $typo3ConfVars = ObjectAccess::getPropertyPath($GLOBALS['TYPO3_CONF_VARS'], $key); + $this->outputLine(json_encode($typo3ConfVars)); + } +} diff --git a/ext_autoload.php b/ext_autoload.php index 7fc7218..6e9ad09 100644 --- a/ext_autoload.php +++ b/ext_autoload.php @@ -9,6 +9,7 @@ 'Etobi\CoreAPI\Command\SiteApiCommandController' => $extensionClassesPath . 'Command/SiteApiCommandController.php', 'Etobi\CoreAPI\Command\CacheApiCommandController' => $extensionClassesPath . 'Command/CacheApiCommandController.php', 'Etobi\CoreAPI\Command\ExtensionApiCommandController' => $extensionClassesPath . 'Command/ExtensionApiCommandController.php', + 'Etobi\CoreAPI\Command\ConfigurationApiCommandController' => $extensionClassesPath . 'Command/ConfigurationApiCommandController.php', 'Etobi\CoreAPI\Service\CacheApiService' => $extensionClassesPath . 'Service/CacheApiService.php', 'Etobi\CoreAPI\Service\SiteApiService' => $extensionClassesPath . 'Service/SiteApiService.php', 'Etobi\CoreAPI\Service\DatabaseApiService' => $extensionClassesPath . 'Service/DatabaseApiService.php', diff --git a/ext_localconf.php b/ext_localconf.php index 6f9dbe2..eda6690 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -8,4 +8,5 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\CacheApiCommandController'; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\SiteApiCommandController'; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\ExtensionApiCommandController'; -} \ No newline at end of file + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\ConfigurationApiCommandController'; +} From 07a81e07a79483a2462d1c0842ff27ff152261a0 Mon Sep 17 00:00:00 2001 From: Tobias Liebig Date: Sat, 18 Apr 2015 14:26:23 +0200 Subject: [PATCH 04/20] [FEATURE] implement ConfigurationApiService --- .../ConfigurationApiCommandController.php | 19 ++++---- Classes/Service/ConfigurationApiService.php | 43 +++++++++++++++++++ 2 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 Classes/Service/ConfigurationApiService.php diff --git a/Classes/Command/ConfigurationApiCommandController.php b/Classes/Command/ConfigurationApiCommandController.php index 450bf42..641d4e4 100644 --- a/Classes/Command/ConfigurationApiCommandController.php +++ b/Classes/Command/ConfigurationApiCommandController.php @@ -25,7 +25,6 @@ ***************************************************************/ use TYPO3\CMS\Extbase\Mvc\Controller\CommandController; -use TYPO3\CMS\Extbase\Reflection\ObjectAccess; /** * Configuration API Command Controller @@ -36,23 +35,27 @@ class ConfigurationApiCommandController extends CommandController { /** - * listCommand + * @var \Etobi\CoreAPI\Service\ConfigurationApiService + * @inject + */ + protected $configurationApiService; + + /** + * List all configurations * * @return string */ public function listCommand() { - $typo3ConfVars = $GLOBALS['TYPO3_CONF_VARS']; - $this->outputLine(json_encode($typo3ConfVars)); + $this->outputLine(json_encode($this->configurationApiService->getConfigurationArray())); } /** - * showCommand + * Get configuration value for given key * - * @param string $param + * @param string $key * @return string */ public function showCommand($key) { - $typo3ConfVars = ObjectAccess::getPropertyPath($GLOBALS['TYPO3_CONF_VARS'], $key); - $this->outputLine(json_encode($typo3ConfVars)); + $this->outputLine(json_encode($this->configurationApiService->getValue($key))); } } diff --git a/Classes/Service/ConfigurationApiService.php b/Classes/Service/ConfigurationApiService.php new file mode 100644 index 0000000..d6543ca --- /dev/null +++ b/Classes/Service/ConfigurationApiService.php @@ -0,0 +1,43 @@ + + * @package Etobi\CoreAPI\Service\ConfigurationApiService + */ +class ConfigurationApiService { + + /** + * @param string $key + * @return mixed + */ + public function getValue($key) { + return ObjectAccess::getPropertyPath($this->getConfigurationArray(), $key); + } + + /** + * Returns the configuration array + * + * @return array + */ + public function getConfigurationArray() { + return $GLOBALS['TYPO3_CONF_VARS']; + } +} From 0c69515f270006f1cb2025ed36ef272ded98f548 Mon Sep 17 00:00:00 2001 From: Tobias Liebig Date: Sat, 18 Apr 2015 15:07:37 +0200 Subject: [PATCH 05/20] Revert "[TASK] using sprintf for logger message too" This reverts commit 99a183927a43c2de5259541206a8a87f7f6cd916. --- Classes/Command/CacheApiCommandController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Command/CacheApiCommandController.php b/Classes/Command/CacheApiCommandController.php index 747b5fa..167858f 100644 --- a/Classes/Command/CacheApiCommandController.php +++ b/Classes/Command/CacheApiCommandController.php @@ -84,7 +84,7 @@ public function injectCacheApiService(\Etobi\CoreAPI\Service\CacheApiService $ca public function clearAllCachesCommand($hard = false) { $this->cacheApiService->clearAllCaches($hard); $message = 'All caches have been cleared%s.'; - $this->logger->info(sprintf($message, $hard ? ' hard' : '')); + $this->logger->info($message); $this->outputLine($message, $hard ? array(' hard') : array('')); } @@ -158,4 +158,4 @@ public function clearAllExceptPageCacheCommand() { $this->logger->info($message); $this->outputLine($message); } -} +} \ No newline at end of file From 047ded6ce50876f858c2f8723f003718f6216d0b Mon Sep 17 00:00:00 2001 From: Tobias Liebig Date: Sat, 18 Apr 2015 15:08:05 +0200 Subject: [PATCH 06/20] Revert "[FEATURE] implement ConfigurationApiService" This reverts commit 07a81e07a79483a2462d1c0842ff27ff152261a0. --- .../ConfigurationApiCommandController.php | 19 ++++---- Classes/Service/ConfigurationApiService.php | 43 ------------------- 2 files changed, 8 insertions(+), 54 deletions(-) delete mode 100644 Classes/Service/ConfigurationApiService.php diff --git a/Classes/Command/ConfigurationApiCommandController.php b/Classes/Command/ConfigurationApiCommandController.php index 641d4e4..450bf42 100644 --- a/Classes/Command/ConfigurationApiCommandController.php +++ b/Classes/Command/ConfigurationApiCommandController.php @@ -25,6 +25,7 @@ ***************************************************************/ use TYPO3\CMS\Extbase\Mvc\Controller\CommandController; +use TYPO3\CMS\Extbase\Reflection\ObjectAccess; /** * Configuration API Command Controller @@ -35,27 +36,23 @@ class ConfigurationApiCommandController extends CommandController { /** - * @var \Etobi\CoreAPI\Service\ConfigurationApiService - * @inject - */ - protected $configurationApiService; - - /** - * List all configurations + * listCommand * * @return string */ public function listCommand() { - $this->outputLine(json_encode($this->configurationApiService->getConfigurationArray())); + $typo3ConfVars = $GLOBALS['TYPO3_CONF_VARS']; + $this->outputLine(json_encode($typo3ConfVars)); } /** - * Get configuration value for given key + * showCommand * - * @param string $key + * @param string $param * @return string */ public function showCommand($key) { - $this->outputLine(json_encode($this->configurationApiService->getValue($key))); + $typo3ConfVars = ObjectAccess::getPropertyPath($GLOBALS['TYPO3_CONF_VARS'], $key); + $this->outputLine(json_encode($typo3ConfVars)); } } diff --git a/Classes/Service/ConfigurationApiService.php b/Classes/Service/ConfigurationApiService.php deleted file mode 100644 index d6543ca..0000000 --- a/Classes/Service/ConfigurationApiService.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @package Etobi\CoreAPI\Service\ConfigurationApiService - */ -class ConfigurationApiService { - - /** - * @param string $key - * @return mixed - */ - public function getValue($key) { - return ObjectAccess::getPropertyPath($this->getConfigurationArray(), $key); - } - - /** - * Returns the configuration array - * - * @return array - */ - public function getConfigurationArray() { - return $GLOBALS['TYPO3_CONF_VARS']; - } -} From 413e560c63937675533576c9b69bf8a59505320e Mon Sep 17 00:00:00 2001 From: Tobias Liebig Date: Sat, 18 Apr 2015 15:08:16 +0200 Subject: [PATCH 07/20] Revert "[FEATURE] ConfigurationApi" This reverts commit e2140b205f5fd60423a0482573e1b7beac18e065. --- .../ConfigurationApiCommandController.php | 58 ------------------- ext_autoload.php | 1 - ext_localconf.php | 3 +- 3 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 Classes/Command/ConfigurationApiCommandController.php diff --git a/Classes/Command/ConfigurationApiCommandController.php b/Classes/Command/ConfigurationApiCommandController.php deleted file mode 100644 index 450bf42..0000000 --- a/Classes/Command/ConfigurationApiCommandController.php +++ /dev/null @@ -1,58 +0,0 @@ - - * 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! - ***************************************************************/ - -use TYPO3\CMS\Extbase\Mvc\Controller\CommandController; -use TYPO3\CMS\Extbase\Reflection\ObjectAccess; - -/** - * Configuration API Command Controller - * - * @package TYPO3 - * @subpackage coreapi - */ -class ConfigurationApiCommandController extends CommandController { - - /** - * listCommand - * - * @return string - */ - public function listCommand() { - $typo3ConfVars = $GLOBALS['TYPO3_CONF_VARS']; - $this->outputLine(json_encode($typo3ConfVars)); - } - - /** - * showCommand - * - * @param string $param - * @return string - */ - public function showCommand($key) { - $typo3ConfVars = ObjectAccess::getPropertyPath($GLOBALS['TYPO3_CONF_VARS'], $key); - $this->outputLine(json_encode($typo3ConfVars)); - } -} diff --git a/ext_autoload.php b/ext_autoload.php index 6e9ad09..7fc7218 100644 --- a/ext_autoload.php +++ b/ext_autoload.php @@ -9,7 +9,6 @@ 'Etobi\CoreAPI\Command\SiteApiCommandController' => $extensionClassesPath . 'Command/SiteApiCommandController.php', 'Etobi\CoreAPI\Command\CacheApiCommandController' => $extensionClassesPath . 'Command/CacheApiCommandController.php', 'Etobi\CoreAPI\Command\ExtensionApiCommandController' => $extensionClassesPath . 'Command/ExtensionApiCommandController.php', - 'Etobi\CoreAPI\Command\ConfigurationApiCommandController' => $extensionClassesPath . 'Command/ConfigurationApiCommandController.php', 'Etobi\CoreAPI\Service\CacheApiService' => $extensionClassesPath . 'Service/CacheApiService.php', 'Etobi\CoreAPI\Service\SiteApiService' => $extensionClassesPath . 'Service/SiteApiService.php', 'Etobi\CoreAPI\Service\DatabaseApiService' => $extensionClassesPath . 'Service/DatabaseApiService.php', diff --git a/ext_localconf.php b/ext_localconf.php index eda6690..6f9dbe2 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -8,5 +8,4 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\CacheApiCommandController'; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\SiteApiCommandController'; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\ExtensionApiCommandController'; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Etobi\CoreAPI\Command\ConfigurationApiCommandController'; -} +} \ No newline at end of file From c5d809023091e991efefc54d673d2812ea3d332e Mon Sep 17 00:00:00 2001 From: Sebastian Michaelsen Date: Wed, 29 Apr 2015 22:36:09 +0200 Subject: [PATCH 08/20] [BUGFIX] class name in ObjectManager->get() mustn't start with backslash --- Classes/Command/BackendApiCommandController.php | 2 +- Classes/Command/CacheApiCommandController.php | 2 +- Classes/Command/DatabaseApiCommandController.php | 2 +- Classes/Command/ExtensionApiCommandController.php | 2 +- Classes/Command/SiteApiCommandController.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Classes/Command/BackendApiCommandController.php b/Classes/Command/BackendApiCommandController.php index c250c18..318c094 100644 --- a/Classes/Command/BackendApiCommandController.php +++ b/Classes/Command/BackendApiCommandController.php @@ -56,7 +56,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/CacheApiCommandController.php b/Classes/Command/CacheApiCommandController.php index 747b5fa..89c18d1 100644 --- a/Classes/Command/CacheApiCommandController.php +++ b/Classes/Command/CacheApiCommandController.php @@ -57,7 +57,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/DatabaseApiCommandController.php b/Classes/Command/DatabaseApiCommandController.php index b60444e..1b7420c 100644 --- a/Classes/Command/DatabaseApiCommandController.php +++ b/Classes/Command/DatabaseApiCommandController.php @@ -58,7 +58,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/ExtensionApiCommandController.php b/Classes/Command/ExtensionApiCommandController.php index 91e998e..ff5d871 100644 --- a/Classes/Command/ExtensionApiCommandController.php +++ b/Classes/Command/ExtensionApiCommandController.php @@ -61,7 +61,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/SiteApiCommandController.php b/Classes/Command/SiteApiCommandController.php index 715841e..ff9f8da 100644 --- a/Classes/Command/SiteApiCommandController.php +++ b/Classes/Command/SiteApiCommandController.php @@ -59,7 +59,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** From 07b77ed2359250a0a8411dfbcc4a89a8d313b842 Mon Sep 17 00:00:00 2001 From: Felix Kopp Date: Mon, 4 May 2015 11:30:11 +0200 Subject: [PATCH 09/20] [TASK] Remove leading Slash on class names --- Classes/Command/BackendApiCommandController.php | 2 +- Classes/Command/CacheApiCommandController.php | 2 +- Classes/Command/DatabaseApiCommandController.php | 2 +- Classes/Command/ExtensionApiCommandController.php | 2 +- Classes/Command/SiteApiCommandController.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Classes/Command/BackendApiCommandController.php b/Classes/Command/BackendApiCommandController.php index c250c18..318c094 100644 --- a/Classes/Command/BackendApiCommandController.php +++ b/Classes/Command/BackendApiCommandController.php @@ -56,7 +56,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/CacheApiCommandController.php b/Classes/Command/CacheApiCommandController.php index 167858f..781ff31 100644 --- a/Classes/Command/CacheApiCommandController.php +++ b/Classes/Command/CacheApiCommandController.php @@ -57,7 +57,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/DatabaseApiCommandController.php b/Classes/Command/DatabaseApiCommandController.php index b60444e..1b7420c 100644 --- a/Classes/Command/DatabaseApiCommandController.php +++ b/Classes/Command/DatabaseApiCommandController.php @@ -58,7 +58,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/ExtensionApiCommandController.php b/Classes/Command/ExtensionApiCommandController.php index 91e998e..ff5d871 100644 --- a/Classes/Command/ExtensionApiCommandController.php +++ b/Classes/Command/ExtensionApiCommandController.php @@ -61,7 +61,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** diff --git a/Classes/Command/SiteApiCommandController.php b/Classes/Command/SiteApiCommandController.php index 715841e..ff9f8da 100644 --- a/Classes/Command/SiteApiCommandController.php +++ b/Classes/Command/SiteApiCommandController.php @@ -59,7 +59,7 @@ public function injectLogManager(\TYPO3\CMS\Core\Log\LogManager $logManager) { * Initialize the object */ public function initializeObject() { - $this->logger = $this->objectManager->get('\TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); + $this->logger = $this->objectManager->get('TYPO3\CMS\Core\Log\LogManager')->getLogger(__CLASS__); } /** From 9246a5ee49db947e309b7e3796f77bbcc586f256 Mon Sep 17 00:00:00 2001 From: Tobias Liebig Date: Tue, 5 May 2015 12:26:02 +0200 Subject: [PATCH 10/20] [TASK] raise version number --- ext_emconf.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext_emconf.php b/ext_emconf.php index e15eec6..fbc26d3 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -17,12 +17,12 @@ 'modify_tables' => '', 'clearCacheOnLoad' => 0, 'lockType' => '', - 'version' => '1.1.1', + 'version' => '1.2.0', 'constraints' => array( 'depends' => array( - 'typo3' => '6.2.0-6.2.99', - 'extbase' => '6.2.0-6.2.99', - 'fluid' => '6.2.0-6.2.99', + 'typo3' => '6.2.0-7.99.99', + 'extbase' => '6.2.0-7.99.99', + 'fluid' => '6.2.0-7.99.99', ), 'conflicts' => array( ), From 87710ab09e9b4b170be809ac127c9979bef4cb21 Mon Sep 17 00:00:00 2001 From: dirk diebel Date: Thu, 18 Jun 2015 07:38:44 +0200 Subject: [PATCH 11/20] [BUGFIX] missing constants MAXIMUM_LINE_LENGTH added, because since 7.3.0 it's no longer part of extbase's CommandController class --- Classes/Command/ExtensionApiCommandController.php | 2 ++ Classes/Command/SiteApiCommandController.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Classes/Command/ExtensionApiCommandController.php b/Classes/Command/ExtensionApiCommandController.php index ff5d871..c48f030 100644 --- a/Classes/Command/ExtensionApiCommandController.php +++ b/Classes/Command/ExtensionApiCommandController.php @@ -38,6 +38,8 @@ */ class ExtensionApiCommandController extends CommandController { + const MAXIMUM_LINE_LENGTH = 79; + /** * @var \TYPO3\CMS\Core\Log\LogManager $logManager */ diff --git a/Classes/Command/SiteApiCommandController.php b/Classes/Command/SiteApiCommandController.php index ff9f8da..b3e13ae 100644 --- a/Classes/Command/SiteApiCommandController.php +++ b/Classes/Command/SiteApiCommandController.php @@ -36,6 +36,8 @@ */ class SiteApiCommandController extends CommandController { + const MAXIMUM_LINE_LENGTH = 79; + /** * @var \TYPO3\CMS\Core\Log\LogManager $logManager */ From 1a45eaa8c633867084ffe5524bc2dcae827e0d9f Mon Sep 17 00:00:00 2001 From: Sebastian Michaelsen Date: Tue, 30 Jun 2015 09:12:38 +0200 Subject: [PATCH 12/20] [TASK] Add autoload information to composer.json --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3569eaf..38e9267 100644 --- a/composer.json +++ b/composer.json @@ -13,5 +13,10 @@ "name": "Stefano Kowalke" } ], + "autoload": { + "psr-4": { + "Etobi\\CoreAPI\\": "Classes" + } + }, "minimum-stability": "dev" -} \ No newline at end of file +} From 5e13143361a96f02e97d7b6f16c28e1ad04f6827 Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 8 Nov 2015 12:37:04 +0100 Subject: [PATCH 13/20] [TASK] Migrate to container-based infrastructure on Travis-CI Closes #112 --- .travis.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 656f1bb..815817e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +sudo: false language: php php: - 5.3 @@ -12,6 +13,14 @@ services: - memcached - redis-server +addons: + apt: + packages: + # Get latest git version cause of travis issues (https://github.com/travis-ci/travis-ci/issues/1710) + - git + - parallel + - tree + notifications: email: - blueduck@gmx.net @@ -20,8 +29,6 @@ notifications: - typo3:DHkQdCNWc6x2znPAYA5T2LXO#gsoc-coreapi before_script: - # Get latest git version cause of travis issues (https://github.com/travis-ci/travis-ci/issues/1710) - - sudo apt-get update && sudo apt-get install git parallel tree - > if [[ "$TRAVIS_PHP_VERSION" = "5.3" || "$TRAVIS_PHP_VERSION" = "5.4" ]]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; From 7577396878819fbe63f678929840fc60a46a7312 Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 8 Nov 2015 12:47:32 +0100 Subject: [PATCH 14/20] [TASK] Add HHVM as build environment on Travis-CI and allow it to fail Closes: #113 --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 815817e..46dae83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,15 @@ php: - 5.4 - 5.5 - 5.6 + - hhvm env: - DB=mysql TYPO3=coreapi/develop INTEGRATION=master COVERAGE=0 +matrix: + allow_failures: + - php: hhvm + services: - memcached - redis-server From 0bd573c3ba54528afc1e416cab56fbef6ea4513c Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 8 Nov 2015 15:15:05 +0100 Subject: [PATCH 15/20] [TASK] Add config for HHVM Closes: #114 --- .travis.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46dae83..600a30d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,14 +35,22 @@ notifications: before_script: - > - if [[ "$TRAVIS_PHP_VERSION" = "5.3" || "$TRAVIS_PHP_VERSION" = "5.4" ]]; then + if [[ "$TRAVIS_PHP_VERSION" == "5.3" || "$TRAVIS_PHP_VERSION" == "5.4" ]]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; echo "apc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; echo "apc.slam_defense=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; pecl install igbinary > /dev/null; fi - - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - > + if [[ "$TRAVIS_PHP_VERSION" == "5.5" || "$TRAVIS_PHP_VERSION" == "5.5"]]; then + echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; + echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; + fi + - > + if [[ "$TRAVIS_PHP_VERSION" == "hhv*" ]]; then + echo "extension = memcache.so" >> /etc/hhvm/php.ini; + echo "extension = redis.so" >> /etc/hhvm/php.ini; + fi - cd .. - git clone --single-branch --branch $INTEGRATION --depth 1 git://github.com/TYPO3-coreapi/TYPO3-Travis-Integration.git build-environment - source build-environment/install-helper.sh From ecb8a6faf59f087e2b66676945d1c84d6d65abbd Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 8 Nov 2015 15:18:56 +0100 Subject: [PATCH 16/20] [BUGFIX] Adjust version number in condition Follow-up to #114 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 600a30d..a3391db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ before_script: pecl install igbinary > /dev/null; fi - > - if [[ "$TRAVIS_PHP_VERSION" == "5.5" || "$TRAVIS_PHP_VERSION" == "5.5"]]; then + if [[ "$TRAVIS_PHP_VERSION" == "5.5" || "$TRAVIS_PHP_VERSION" == "5.6"]]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi From 0c8192ea276b9c8e513cb93339ca0284ce72572a Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 8 Nov 2015 15:21:52 +0100 Subject: [PATCH 17/20] [BUGFIX] Fix the compare operator Follow-up to #114 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a3391db..482f79d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,19 +35,19 @@ notifications: before_script: - > - if [[ "$TRAVIS_PHP_VERSION" == "5.3" || "$TRAVIS_PHP_VERSION" == "5.4" ]]; then + if [[ "$TRAVIS_PHP_VERSION" = "5.3" || "$TRAVIS_PHP_VERSION" = "5.4" ]]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; echo "apc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; echo "apc.slam_defense=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; pecl install igbinary > /dev/null; fi - > - if [[ "$TRAVIS_PHP_VERSION" == "5.5" || "$TRAVIS_PHP_VERSION" == "5.6"]]; then + if [[ "$TRAVIS_PHP_VERSION" = "5.5" || "$TRAVIS_PHP_VERSION" = "5.6"]]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi - > - if [[ "$TRAVIS_PHP_VERSION" == "hhv*" ]]; then + if [[ "$TRAVIS_PHP_VERSION" = "hhv*" ]]; then echo "extension = memcache.so" >> /etc/hhvm/php.ini; echo "extension = redis.so" >> /etc/hhvm/php.ini; fi From c79ac82ef23bf746ee6e54d9e3816635dc130622 Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 8 Nov 2015 15:24:13 +0100 Subject: [PATCH 18/20] [BUGFIX] Add space before bracket Follow-up to #114 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 482f79d..08edc4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ before_script: pecl install igbinary > /dev/null; fi - > - if [[ "$TRAVIS_PHP_VERSION" = "5.5" || "$TRAVIS_PHP_VERSION" = "5.6"]]; then + if [[ "$TRAVIS_PHP_VERSION" = "5.5" || "$TRAVIS_PHP_VERSION" = "5.6" ]]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi From 4b195a400fc7914916a75bb10eb82b5a79995b65 Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Wed, 11 Nov 2015 12:12:34 +0100 Subject: [PATCH 19/20] [TASK] Remove the version from composer.json Packgist.org will detect the version from git tags. --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 38e9267..fef4f58 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,6 @@ "name": "etobi/coreapi", "description": "Provides a simple to use API for common core features. Goal is to be able to do the most common tasks by CLI instead of doing it in the backend/browser.", "type": "typo3-cms-extension", - "version": "1.1.1", "keywords": ["typo3", "extension", "deployment", "commandline", "cli"], "authors": [ { From 0188291473d5ba79fcbde606a55d0f16cd1a7d4e Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 15 Nov 2015 20:00:25 +0100 Subject: [PATCH 20/20] Raise version number --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index fbc26d3..e4ad62e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -17,7 +17,7 @@ 'modify_tables' => '', 'clearCacheOnLoad' => 0, 'lockType' => '', - 'version' => '1.2.0', + 'version' => '1.2.1', 'constraints' => array( 'depends' => array( 'typo3' => '6.2.0-7.99.99',