[FEATURE] Add command to dump class loading information 46/42046/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Tue, 28 Jul 2015 15:24:53 +0000 (17:24 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Wed, 29 Jul 2015 13:53:42 +0000 (15:53 +0200)
Releases: master
Resolves: #68589
Change-Id: I57debc378de1f831e2d06d16ac61b6ed6df45e2c
Reviewed-on: http://review.typo3.org/42046
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Feature-68589-AddCLICommandToDumpClassLoadingInformation.rst [new file with mode: 0644]
typo3/sysext/extensionmanager/Classes/Command/ExtensionCommandController.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-68589-AddCLICommandToDumpClassLoadingInformation.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-68589-AddCLICommandToDumpClassLoadingInformation.rst
new file mode 100644 (file)
index 0000000..6a1c3ea
--- /dev/null
@@ -0,0 +1,16 @@
+===================================================================
+Feature: #68589 - Add CLI command to dump class loading information
+===================================================================
+
+Description
+===========
+
+In rare cases it is useful to update the additional class loading information TYPO3 writes in non composer mode.
+We now provide a CLI command which does that.
+
+
+Impact
+======
+
+By executing ``typo3/cli_dispatch.phpsh extbase extension:updateclassloadinginformation`` on the command line,
+the class loading information of all active extensions is updated.
index d6ba24f..ce07ae2 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Extensionmanager\Command;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Core\Bootstrap;
+use TYPO3\CMS\Core\Core\ClassLoadingInformation;
 use TYPO3\CMS\Extbase\Mvc\Controller\CommandController;
 
 /**
@@ -65,6 +67,24 @@ class ExtensionCommandController extends CommandController {
        }
 
        /**
+        * Updates class loading information.
+        *
+        * This command is only needed during development. The extension manager takes care
+        * creating or updating this info properly during extension (de-)activation.
+        *
+        * @return void
+        */
+       public function updateClassLoadingInformationCommand() {
+               if (Bootstrap::usesComposerClassLoading()) {
+                       $this->output->outputLine('<error>Class loading information is managed by composer. Use "composer dump-autoload" command to update the information.</error>');
+                       $this->quit(1);
+               } else {
+                       ClassLoadingInformation::writeClassLoadingInformation();
+                       $this->output->outputLine('Class Loading information has been updated.');
+               }
+       }
+
+       /**
         * Emits packages may have changed signal
         */
        protected function emitPackagesMayHaveChangedSignal() {