|
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(
|
@@ -173,33 +171,6 @@ private function initObjectManager()
|
173 | 171 | $omProvider->setObjectManager($this->objectManager);
|
174 | 172 | }
|
175 | 173 |
|
176 |
| - /** |
177 |
| - * Checks whether generation directory is read-only. |
178 |
| - * Depends on the current mode: |
179 |
| - * production - application will proceed |
180 |
| - * default - application will be terminated |
181 |
| - * developer - application will be terminated |
182 |
| - * |
183 |
| - * @return void |
184 |
| - * @throws GenerationDirectoryAccessException If generation directory is read-only in developer mode |
185 |
| - */ |
186 |
| - private function assertGenerationPermissions() |
187 |
| - { |
188 |
| - /** @var GenerationDirectoryAccess $generationDirectoryAccess */ |
189 |
| - $generationDirectoryAccess = $this->objectManager->create( |
190 |
| - GenerationDirectoryAccess::class, |
191 |
| - ['serviceManager' => $this->serviceManager] |
192 |
| - ); |
193 |
| - /** @var State $state */ |
194 |
| - $state = $this->objectManager->get(State::class); |
195 |
| - |
196 |
| - if ($state->getMode() !== State::MODE_PRODUCTION |
197 |
| - && !$generationDirectoryAccess->check() |
198 |
| - ) { |
199 |
| - throw new GenerationDirectoryAccessException(); |
200 |
| - } |
201 |
| - } |
202 |
| - |
203 | 174 | /**
|
204 | 175 | * Checks whether compiler is being prepared.
|
205 | 176 | *
|
|
0 commit comments