Loading core/lib/Drupal/Core/Command/DrupalApplication.php +2 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,8 @@ protected function bootstrap(): bool { // @todo Refactor `bootEnvironment()' so that we can use the parts we need // but leave the error handler alone. // @see https://www.drupal.org/node/2690035 // Define the DRUPAL_TEST_IN_CHILD_SITE based on if we're inside a test. DrupalKernel::setupDrupalTestInChildSite($kernel->getAppRoot()); $sitePath = DrupalKernel::findSitePath($request, TRUE); $kernel->setSitePath($sitePath); Settings::initialize($kernel->getAppRoot(), $kernel->getSitePath(), $this->classloader); Loading core/lib/Drupal/Core/DrupalKernel.php +23 −7 Original line number Diff line number Diff line Loading @@ -1168,7 +1168,29 @@ public static function bootEnvironment($app_root = NULL) { mb_internal_encoding('utf-8'); mb_language('uni'); // Indicate that code is operating in a test child site. // Set DRUPAL_TEST_IN_CHILD_SITE if we're inside a test. static::setupDrupalTestInChildSite($app_root); // Set the Drupal custom error handler. set_error_handler('_drupal_error_handler'); set_exception_handler('_drupal_exception_handler'); static::$isEnvironmentInitialized = TRUE; } /** * Define the DRUPAL_TEST_IN_CHILD_SITE constant as appropriate. * * @param string $app_root * The path to the application root. * * @internal This method is only intended to be called by this class and * \Drupal\Core\Command\DrupalApplication. We aim to remove the need for it * without a BC layer during Drupal 12. * @see https://www.drupal.org/node/2690035 */ public static function setupDrupalTestInChildSite(string $app_root): void { // Indicate if code is operating in a test child site or not. if (!defined('DRUPAL_TEST_IN_CHILD_SITE')) { if ($test_prefix = drupal_valid_test_ua()) { $test_db = new TestDatabase($test_prefix); Loading @@ -1191,12 +1213,6 @@ public static function bootEnvironment($app_root = NULL) { define('DRUPAL_TEST_IN_CHILD_SITE', FALSE); } } // Set the Drupal custom error handler. set_error_handler('_drupal_error_handler'); set_exception_handler('_drupal_exception_handler'); static::$isEnvironmentInitialized = TRUE; } /** Loading Loading
core/lib/Drupal/Core/Command/DrupalApplication.php +2 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,8 @@ protected function bootstrap(): bool { // @todo Refactor `bootEnvironment()' so that we can use the parts we need // but leave the error handler alone. // @see https://www.drupal.org/node/2690035 // Define the DRUPAL_TEST_IN_CHILD_SITE based on if we're inside a test. DrupalKernel::setupDrupalTestInChildSite($kernel->getAppRoot()); $sitePath = DrupalKernel::findSitePath($request, TRUE); $kernel->setSitePath($sitePath); Settings::initialize($kernel->getAppRoot(), $kernel->getSitePath(), $this->classloader); Loading
core/lib/Drupal/Core/DrupalKernel.php +23 −7 Original line number Diff line number Diff line Loading @@ -1168,7 +1168,29 @@ public static function bootEnvironment($app_root = NULL) { mb_internal_encoding('utf-8'); mb_language('uni'); // Indicate that code is operating in a test child site. // Set DRUPAL_TEST_IN_CHILD_SITE if we're inside a test. static::setupDrupalTestInChildSite($app_root); // Set the Drupal custom error handler. set_error_handler('_drupal_error_handler'); set_exception_handler('_drupal_exception_handler'); static::$isEnvironmentInitialized = TRUE; } /** * Define the DRUPAL_TEST_IN_CHILD_SITE constant as appropriate. * * @param string $app_root * The path to the application root. * * @internal This method is only intended to be called by this class and * \Drupal\Core\Command\DrupalApplication. We aim to remove the need for it * without a BC layer during Drupal 12. * @see https://www.drupal.org/node/2690035 */ public static function setupDrupalTestInChildSite(string $app_root): void { // Indicate if code is operating in a test child site or not. if (!defined('DRUPAL_TEST_IN_CHILD_SITE')) { if ($test_prefix = drupal_valid_test_ua()) { $test_db = new TestDatabase($test_prefix); Loading @@ -1191,12 +1213,6 @@ public static function bootEnvironment($app_root = NULL) { define('DRUPAL_TEST_IN_CHILD_SITE', FALSE); } } // Set the Drupal custom error handler. set_error_handler('_drupal_error_handler'); set_exception_handler('_drupal_exception_handler'); static::$isEnvironmentInitialized = TRUE; } /** Loading