Mercurial > hg > isophonics-drupal-site
view core/scripts/dump-database-d8-mysql.php @ 11:bfffd8d7479a
Move drupal/core from "replace" to "require" section, to ensure Composer updates it
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:51:18 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
#!/usr/bin/env php <?php /** * @file * A command line application to dump a database to a generation script. */ use Drupal\Core\Command\DbDumpApplication; use Drupal\Core\DrupalKernel; use Drupal\Core\Site\Settings; use Symfony\Component\HttpFoundation\Request; if (PHP_SAPI !== 'cli') { return; } // Bootstrap. $autoloader = require __DIR__ . '/../../autoload.php'; require_once __DIR__ . '/../includes/bootstrap.inc'; $request = Request::createFromGlobals(); Settings::initialize(dirname(dirname(__DIR__)), DrupalKernel::findSitePath($request), $autoloader); $kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod')->boot(); // Run the database dump command. $application = new DbDumpApplication(); $application->run();