From 215698b78c8dcab6af0f13e96e424c7ce3ae8077 Mon Sep 17 00:00:00 2001
From: Ankur Kaneria <akaneria@magento.com>
Date: Tue, 14 Jun 2016 11:32:39 -0500
Subject: [PATCH] MAGETWO-54205: After Disable/Enable Magento modules via CLI
 all cache types become disabled

- reverting changes to uninstall command files. The regenerate flag will be created as part of magento-composer-installer
---
 .../Magento/Setup/Console/Command/UninstallCommand.php | 10 +---------
 .../Test/Unit/Console/Command/UninstallCommandTest.php |  9 +--------
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/setup/src/Magento/Setup/Console/Command/UninstallCommand.php b/setup/src/Magento/Setup/Console/Command/UninstallCommand.php
index b4de82f66be..27d1181bdc7 100644
--- a/setup/src/Magento/Setup/Console/Command/UninstallCommand.php
+++ b/setup/src/Magento/Setup/Console/Command/UninstallCommand.php
@@ -11,7 +11,6 @@ use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Question\ConfirmationQuestion;
 use Magento\Setup\Model\InstallerFactory;
 use Magento\Framework\Setup\ConsoleLogger;
-use Magento\Framework\Code\GeneratedFiles;
 
 class UninstallCommand extends AbstractSetupCommand
 {
@@ -20,18 +19,12 @@ class UninstallCommand extends AbstractSetupCommand
      */
     private $installerFactory;
 
-    /**
-     * @var GeneratedFiles
-     */
-    private $generatedFiles;
-
     /**
      * @param InstallerFactory $installerFactory
      */
-    public function __construct(InstallerFactory $installerFactory, GeneratedFiles $generatedFiles)
+    public function __construct(InstallerFactory $installerFactory)
     {
         $this->installerFactory = $installerFactory;
-        $this->generatedFiles = $generatedFiles;
         parent::__construct();
     }
 
@@ -56,7 +49,6 @@ class UninstallCommand extends AbstractSetupCommand
         if ($helper->ask($input, $output, $question) || !$input->isInteractive()) {
             $installer = $this->installerFactory->create(new ConsoleLogger($output));
             $installer->uninstall();
-            $this->generatedFiles->requestRegeneration();
         }
     }
 }
diff --git a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php
index cbe2da59cb6..a3183950c8e 100644
--- a/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Console/Command/UninstallCommandTest.php
@@ -10,7 +10,6 @@ use Magento\Setup\Model\InstallerFactory;
 use Magento\Setup\Console\Command\UninstallCommand;
 use Symfony\Component\Console\Tester\CommandTester;
 use Magento\Setup\Model\Installer;
-use Magento\Framework\Code\GeneratedFiles;
 
 class UninstallCommandTest extends \PHPUnit_Framework_TestCase
 {
@@ -19,11 +18,6 @@ class UninstallCommandTest extends \PHPUnit_Framework_TestCase
      */
     private $installerFactory;
 
-    /**
-     * @var GeneratedFiles|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private $generatedFiles;
-
     /**
      * @var Installer|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -37,9 +31,8 @@ class UninstallCommandTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $this->installerFactory = $this->getMock('Magento\Setup\Model\InstallerFactory', [], [], '', false);
-        $this->generatedFiles = $this->getMock('Magento\Framework\Code\GeneratedFiles', [], [], '', false);
         $this->installer = $this->getMock('Magento\Setup\Model\Installer', [], [], '', false);
-        $this->command = new UninstallCommand($this->installerFactory, $this->generatedFiles);
+        $this->command = new UninstallCommand($this->installerFactory);
     }
 
     public function testExecuteInteractionYes()
-- 
GitLab