|
| 1 | +diff -Naur a/vendor/magento/framework/Console/Cli.php b/vendor/magento/framework/Console/Cli.php |
| 2 | +--- a/vendor/magento/framework/Console/Cli.php |
| 3 | ++++ b/vendor/magento/framework/Console/Cli.php |
| 4 | +@@ -9,7 +9,6 @@ use Magento\Framework\App\Bootstrap; |
| 5 | + use Magento\Framework\App\DeploymentConfig; |
| 6 | + use Magento\Framework\App\Filesystem\DirectoryList; |
| 7 | + use Magento\Framework\App\ProductMetadata; |
| 8 | +-use Magento\Framework\App\State; |
| 9 | + use Magento\Framework\Composer\ComposerJsonFinder; |
| 10 | + use Magento\Framework\Console\Exception\GenerationDirectoryAccessException; |
| 11 | + use Magento\Framework\Filesystem\Driver\File; |
| 12 | +@@ -19,7 +18,6 @@ use Magento\Setup\Application; |
| 13 | + use Magento\Setup\Console\CompilerPreparation; |
| 14 | + use Magento\Setup\Model\ObjectManagerProvider; |
| 15 | + use Symfony\Component\Console; |
| 16 | +-use Zend\ServiceManager\ServiceManager; |
| 17 | + |
| 18 | + /** |
| 19 | + * Magento 2 CLI Application. |
| 20 | +@@ -74,7 +72,6 @@ class Cli extends Console\Application |
| 21 | + |
| 22 | + $this->assertCompilerPreparation(); |
| 23 | + $this->initObjectManager(); |
| 24 | +- $this->assertGenerationPermissions(); |
| 25 | + } catch (\Exception $exception) { |
| 26 | + $output = new \Symfony\Component\Console\Output\ConsoleOutput(); |
| 27 | + $output->writeln( |
| 28 | +@@ -166,33 +163,6 @@ class Cli extends Console\Application |
| 29 | + $omProvider->setObjectManager($this->objectManager); |
| 30 | + } |
| 31 | + |
| 32 | +- /** |
| 33 | +- * Checks whether generation directory is read-only. |
| 34 | +- * Depends on the current mode: |
| 35 | +- * production - application will proceed |
| 36 | +- * default - application will be terminated |
| 37 | +- * developer - application will be terminated |
| 38 | +- * |
| 39 | +- * @return void |
| 40 | +- * @throws GenerationDirectoryAccessException If generation directory is read-only in developer mode |
| 41 | +- */ |
| 42 | +- private function assertGenerationPermissions() |
| 43 | +- { |
| 44 | +- /** @var GenerationDirectoryAccess $generationDirectoryAccess */ |
| 45 | +- $generationDirectoryAccess = $this->objectManager->create( |
| 46 | +- GenerationDirectoryAccess::class, |
| 47 | +- ['serviceManager' => $this->serviceManager] |
| 48 | +- ); |
| 49 | +- /** @var State $state */ |
| 50 | +- $state = $this->objectManager->get(State::class); |
| 51 | +- |
| 52 | +- if ($state->getMode() !== State::MODE_PRODUCTION |
| 53 | +- && !$generationDirectoryAccess->check() |
| 54 | +- ) { |
| 55 | +- throw new GenerationDirectoryAccessException(); |
| 56 | +- } |
| 57 | +- } |
| 58 | +- |
| 59 | + /** |
| 60 | + * Checks whether compiler is being prepared. |
| 61 | + * |
0 commit comments