[TASK] Deactivate install tool core updater in composer mode 43/42043/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Tue, 28 Jul 2015 14:50:27 +0000 (16:50 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 28 Jul 2015 16:03:34 +0000 (18:03 +0200)
Core updater must be disabled in composer mode,
to not interfere with composer commands.

Releases: master
Resolves: #68586
Change-Id: I0b406e6ac5cc2df10345a4c8c040c8ca2a10c947
Reviewed-on: http://review.typo3.org/42043
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/install/Classes/Controller/Action/Tool/ImportantActions.php
typo3/sysext/install/Classes/Service/CoreUpdateService.php
typo3/sysext/install/Resources/Private/Partials/Action/Tool/ImportantActions/CoreUpdateButton.html

index 20e8603..5f041a4 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\Controller\Action\Tool;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Install\Controller\Action;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Service\OpcodeCacheService;
@@ -73,6 +74,7 @@ class ImportantActions extends Action\AbstractAction {
                $coreUpdateService = $this->objectManager->get(\TYPO3\CMS\Install\Service\CoreUpdateService::class);
                $this->view
                        ->assign('enableCoreUpdate', $coreUpdateService->isCoreUpdateEnabled())
+                       ->assign('composerMode', Bootstrap::getInstance()->usesComposerClassLoading())
                        ->assign('operatingSystem', $operatingSystem)
                        ->assign('cgiDetected', GeneralUtility::isRunningOnCgiServerApi())
                        ->assign('databaseName', $GLOBALS['TYPO3_CONF_VARS']['DB']['database'])
index 63d107b..0369512 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\Service;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Service\OpcodeCacheService;
 use TYPO3\CMS\Core\Utility\PathUtility;
@@ -92,7 +93,7 @@ class CoreUpdateService {
         */
        public function isCoreUpdateEnabled() {
                $coreUpdateDisabled = getenv('TYPO3_DISABLE_CORE_UPDATER') ?: (getenv('REDIRECT_TYPO3_DISABLE_CORE_UPDATER') ?: FALSE);
-               return !$coreUpdateDisabled;
+               return !Bootstrap::getInstance()->usesComposerClassLoading() && !$coreUpdateDisabled;
        }
 
        /**
index 5894af8..b4ef19a 100644 (file)
                                        </div>
                                </div>
                                <div class="message-body">
-                                       This feature is disabled in this installation (through the environment variable <code>TYPO3_DISABLE_CORE_UPDATER=1</code>)
+                                       This feature is disabled in this installation.<br />
+                                       <f:if condition="{composerMode}">
+                                               <f:then>
+                                                       (Composer Mode is active. Please update using composer commands.)
+                                               </f:then>
+                                               <f:else>
+                                                       (The environment variable was set <code>TYPO3_DISABLE_CORE_UPDATER=1</code>.)
+                                               </f:else>
+                                       </f:if>
                                </div>
                        </div>
                </f:else>
        </f:if>
-</div>
\ No newline at end of file
+</div>