/** * Launch application * * @return \Magento\Framework\App\ResponseInterface */ public function launch() { $this->objectManager->configure(['preferences' => ['Magento\\Tools\\Di\\Compiler\\Config\\WriterInterface' => 'Magento\\Tools\\Di\\Compiler\\Config\\Writer\\Filesystem', 'Magento\\Tools\\Di\\Compiler\\Log\\Writer\\WriterInterface' => 'Magento\\Tools\\Di\\Compiler\\Log\\Writer\\Console'], 'Magento\\Tools\\Di\\Compiler\\Config\\ModificationChain' => ['arguments' => ['modificationsList' => ['BackslashTrim' => ['instance' => 'Magento\\Tools\\Di\\Compiler\\Config\\Chain\\BackslashTrim'], 'PreferencesResolving' => ['instance' => 'Magento\\Tools\\Di\\Compiler\\Config\\Chain\\PreferencesResolving'], 'InterceptorSubstitution' => ['instance' => 'Magento\\Tools\\Di\\Compiler\\Config\\Chain\\InterceptorSubstitution'], 'InterceptionPreferencesResolving' => ['instance' => 'Magento\\Tools\\Di\\Compiler\\Config\\Chain\\PreferencesResolving'], 'ArgumentsSerialization' => ['instance' => 'Magento\\Tools\\Di\\Compiler\\Config\\Chain\\ArgumentsSerialization']]]], 'Magento\\Tools\\Di\\Code\\Generator\\PluginList' => ['arguments' => ['cache' => ['instance' => 'Magento\\Framework\\App\\Interception\\Cache\\CompiledConfig']]], 'Magento\\Tools\\Di\\Code\\Reader\\ClassesScanner' => ['arguments' => ['excludePatterns' => $this->excludedPathsList]]]); $operations = [Task\OperationFactory::REPOSITORY_GENERATOR => ['path' => $this->compiledPathsList['application'], 'filePatterns' => ['di' => '/\\/etc\\/([a-zA-Z_]*\\/di|di)\\.xml$/']], Task\OperationFactory::APPLICATION_CODE_GENERATOR => [$this->compiledPathsList['application'], $this->compiledPathsList['library'], $this->compiledPathsList['generated_helpers']], Task\OperationFactory::INTERCEPTION => ['intercepted_paths' => [$this->compiledPathsList['application'], $this->compiledPathsList['library'], $this->compiledPathsList['generated_helpers']], 'path_to_store' => $this->compiledPathsList['generated_helpers']], Task\OperationFactory::AREA_CONFIG_GENERATOR => [$this->compiledPathsList['application'], $this->compiledPathsList['library'], $this->compiledPathsList['generated_helpers']], Task\OperationFactory::INTERCEPTION_CACHE => [$this->compiledPathsList['application'], $this->compiledPathsList['library'], $this->compiledPathsList['generated_helpers']]]; $responseCode = Response::SUCCESS; try { foreach ($operations as $operationCode => $arguments) { $this->taskManager->addOperation($operationCode, $arguments); } $this->taskManager->process(); } catch (Task\OperationException $e) { $responseCode = Response::ERROR; $this->response->setBody($e->getMessage()); } $this->response->setCode($responseCode); return $this->response; }
/** * Launch application * * @return \Magento\Framework\App\ResponseInterface */ public function launch() { $this->objectManager->configure(['preferences' => ['Magento\\Tools\\Di\\Compiler\\Config\\WriterInterface' => 'Magento\\Tools\\Di\\Compiler\\Config\\Writer\\Filesystem']]); $operations = [Task\OperationFactory::AREA => [BP . '/' . 'app/code', BP . '/' . 'lib/internal/Magento/Framework', BP . '/' . 'var/generation'], Task\OperationFactory::INTERCEPTION => BP . '/var/generation', Task\OperationFactory::INTERCEPTION_CACHE => [BP . '/' . 'app/code', BP . '/' . 'lib/internal/Magento/Framework', BP . '/' . 'var/generation']]; $responseCode = Response::SUCCESS; try { foreach ($operations as $operationCode => $arguments) { $this->taskManager->addOperation($operationCode, $arguments); } $this->taskManager->process(); } catch (Task\OperationException $e) { $responseCode = Response::ERROR; $this->response->setBody($e->getMessage()); } $this->response->setCode($responseCode); return $this->response; }