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