/** * Execute the console command. * * @param ComposerFileWriter $writer * * @return bool|null * @throws \Exception */ public function fire(ComposerFileWriter $writer) { // php artisan plugin:sync-composer // sync $writer->resolvePlugins()->setFixMode()->write(); $this->output->success("The installation information of the plug-in was synchronized with the composer file(" . $writer->getPath() . ")."); }
/** * Execute the console command. * * @param ComposerFileWriter $writer * * @return bool|null */ public function fire(ComposerFileWriter $writer) { // php artisan xe:update [version] [--skip-download] // title $this->output->block('Update Xpressengine.'); // check option if (!$this->option('skip-download')) { $this->output->caution('Download the update file does not yet support. Update the core following the instructions below.'); $this->printGuide(); return; } // version 안내 $installedVersion = trim(file_get_contents(storage_path('app/installed'))); $this->warn(' Update version information:'); $this->output->text(" {$installedVersion} -> " . __XE_VERSION__); // confirm if ($this->confirm("Update the Xpressengine ver." . __XE_VERSION__ . ". There is a maximum moisture is applied. \r\nDo you want to update?") === false) { //return; } // 플러그인 업데이트 잠금 $writer->resolvePlugins()->setFixMode()->write(); // composer update실행(composer update --no-dev) if (!$this->option('skip-composer')) { $this->output->section('Run the composer update. There is a maximum moisture is applied.'); $this->line(" composer update"); try { $this->runComposer(base_path(), "update"); } catch (\Exception $e) { } } // migration $this->output->section('Run the migration of the Xpressengine.'); $this->migrateCore($installedVersion, __XE_VERSION__); // mark installed $this->markInstalled(); $this->output->success("Update the Xpressengine to ver." . __XE_VERSION__ . "."); }