/** * */ public function save() { $fs = new Filesystem(); $fs->dumpFile(Platform::sharedDir() . '/settings.local.php', $this->string); // Relink if missing. if (!$fs->exists(Platform::webDir() . '/sites/default/settings.local.php')) { $fs->symlink('../../../shared/settings.local.php', Platform::webDir() . '/sites/default/settings.local.php'); } }
/** * {@inheritdoc} * * @see PlatformCommand::getCurrentEnvironment() */ protected function execute(InputInterface $input, OutputInterface $output) { /** @var ShellHelper $shell */ $shell = $this->getHelper('shell'); $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); $shell->setOutput($output); if (!is_dir(LocalProject::getProjectRoot() . '/docker/fg')) { $shell->execute(['git', 'clone', 'https://github.com/brendangregg/FlameGraph.git', LocalProject::getProjectRoot() . '/docker/fg']); } if (!is_dir(LocalProject::getProjectRoot() . '/docker/xhpfg')) { $shell->execute(['git', 'clone', 'https://github.com/msonnabaum/xhprof-flamegraphs.git', LocalProject::getProjectRoot() . '/docker/xhpfg']); } $this->stdOut->writeln("<comment>Patching Drupal for xhprof</comment>"); $process = new Process('patch -p1 < ' . CLI_ROOT . '/resources/drupal-enable-profiling.patch', Platform::webDir()); $process->mustRun(null); }
/** * {@inheritdoc} * * @see PlatformCommand::getCurrentEnvironment() */ protected function execute(InputInterface $input, OutputInterface $output) { $this->stdOut->writeln("<comment>Removing patch on Drupal for xhprof</comment>"); $process = new Process('patch -p1 -R < ' . CLI_ROOT . '/resources/drupal-enable-profiling.patch', Platform::webDir()); $process->mustRun(null); }