public function configure() { $fs = new Filesystem(); $fs->copy(CLI_ROOT . '/resources/stacks/wordpress/wp-config.php', Platform::webDir() . '/wp-config.php', true); $fs->remove(Platform::webDir() . '/wp-confg-sample.php'); $fs->dumpFile(Platform::sharedDir() . '/wp-config.local.php', $this->string); // Relink if missing. if (!$fs->exists(Platform::webDir() . '/wp-config.local.php')) { $fs->symlink('../shared/wp-config.local.php', Platform::webDir() . '/wp-config .local.php'); } }
/** * */ public function configure() { $fs = new Filesystem(); if (!file_exists(Platform::webDir() . '/sites/default/settings.php')) { $fs->copy(CLI_ROOT . '/resources/stacks/drupal/drupal7.settings.php', Platform::webDir() . '/sites/default/settings.php', true); } $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'); } }
/** * */ public function configure() { $fs = new Filesystem(); if ($this->version == DrupalStackHelper::DRUPAL7) { $fs->copy(CLI_ROOT . '/resources/stacks/drupal/drupal7.settings.php', Platform::webDir() . '/sites/default/settings.php', true); } elseif ($this->version == DrupalStackHelper::DRUPAL8) { $fs->copy(CLI_ROOT . '/resources/stacks/drupal/drupal8.settings.php', Platform::webDir() . '/sites/default/settings.php', true); } if ($this->version == DrupalStackHelper::DRUPAL8) { $fs->mkdir([Platform::sharedDir() . '/config', Platform::sharedDir() . '/config/active', Platform::sharedDir() . '/config/staging']); } $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'); } }
public function testSharedDir() { mkdir(Platform::sharedDir()); $this->assertTrue(is_dir(self::$tmpName . '/shared')); }
protected function discoverBehatYml() { $scanDirs = [Platform::sharedDir(), Platform::webDir(), Platform::rootDir() . '/tests']; if (is_dir(Platform::repoDir())) { $scanDirs[] = Platform::repoDir(); } $finder = new Finder(); $finder->files()->in($scanDirs)->name('behat.yml'); return $finder; }
/** * Write a drushrc */ public function drushrc() { $drushrc = <<<EOT <?php \$options['uri'] = "http://{$this->projectName}.{$this->projectTld}"; EOT; $fs = new Filesystem(); $fs->dumpFile(Platform::sharedDir() . '/drushrc.php', $drushrc); $fs->symlink('../../../shared/drushrc.php', Platform::webDir() . '/sites/default/drushrc.php'); }
protected function discoverBehatYml() { $depth = $this->stdIn->getOption('depth'); $scanDirs = [Platform::sharedDir(), Platform::webDir()]; if (is_dir(Platform::repoDir())) { $scanDirs[] = Platform::repoDir(); } if (is_dir(Platform::testsDir())) { $scanDirs[] = Platform::testsDir(); } $extraDir = $this->stdIn->getOption('folder'); if ($extraDir && is_dir($extraDir)) { $scanDirs[] = $extraDir; } $finder = new Finder(); $finder->files()->in($scanDirs)->depth("< {$depth}")->name('behat.yml'); return $finder; }