|
9 | 9 | use Magento\Framework\App\DeploymentConfig;
|
10 | 10 | use Magento\Framework\App\Filesystem\DirectoryList;
|
11 | 11 | use Magento\Framework\App\ProductMetadata;
|
12 |
| -use Magento\Framework\App\State; |
13 | 12 | use Magento\Framework\Composer\ComposerJsonFinder;
|
14 | 13 | use Magento\Framework\Console\Exception\GenerationDirectoryAccessException;
|
15 | 14 | use Magento\Framework\Filesystem\Driver\File;
|
@@ -74,7 +73,6 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
|
74 | 73 |
|
75 | 74 | $this->assertCompilerPreparation();
|
76 | 75 | $this->initObjectManager();
|
77 |
| - $this->assertGenerationPermissions(); |
78 | 76 | } catch (\Exception $exception) {
|
79 | 77 | $output = new \Symfony\Component\Console\Output\ConsoleOutput();
|
80 | 78 | $output->writeln(
|
@@ -167,33 +165,6 @@ private function initObjectManager()
|
167 | 165 | $omProvider->setObjectManager($this->objectManager);
|
168 | 166 | }
|
169 | 167 |
|
170 |
| - /** |
171 |
| - * Checks whether generation directory is read-only. |
172 |
| - * Depends on the current mode: |
173 |
| - * production - application will proceed |
174 |
| - * default - application will be terminated |
175 |
| - * developer - application will be terminated |
176 |
| - * |
177 |
| - * @return void |
178 |
| - * @throws GenerationDirectoryAccessException If generation directory is read-only in developer mode |
179 |
| - */ |
180 |
| - private function assertGenerationPermissions() |
181 |
| - { |
182 |
| - /** @var GenerationDirectoryAccess $generationDirectoryAccess */ |
183 |
| - $generationDirectoryAccess = $this->objectManager->create( |
184 |
| - GenerationDirectoryAccess::class, |
185 |
| - ['serviceManager' => $this->serviceManager] |
186 |
| - ); |
187 |
| - /** @var State $state */ |
188 |
| - $state = $this->objectManager->get(State::class); |
189 |
| - |
190 |
| - if ($state->getMode() !== State::MODE_PRODUCTION |
191 |
| - && !$generationDirectoryAccess->check() |
192 |
| - ) { |
193 |
| - throw new GenerationDirectoryAccessException(); |
194 |
| - } |
195 |
| - } |
196 |
| - |
197 | 168 | /**
|
198 | 169 | * Checks whether compiler is being prepared.
|
199 | 170 | *
|
|
0 commit comments