header($request->server->get('SERVER_PROTOCOL') . ' 403 Forbidden');
exit;
}
+ if ($install_state['interactive'] && drupal_valid_test_ua()) {
+ // Set the default timezone. While this doesn't cause any tests to fail, PHP
+ // complains if 'date.timezone' is not set in php.ini. The Australia/Sydney
+ // timezone is chosen so all tests are run using an edge case scenario
+ // (UTC+10 and DST). This choice is made to prevent timezone related
+ // regressions and reduce the fragility of the testing system in general.
+ date_default_timezone_set('Australia/Sydney');
+ }
$site_path = DrupalKernel::findSitePath($request, FALSE);
Settings::initialize(dirname(dirname(__DIR__)), $site_path, $class_loader);
else {
$environment = 'prod';
}
+ $GLOBALS['conf']['container_service_providers']['InstallerConfigOverride'] = 'Drupal\Core\Installer\ConfigOverride';
// Only allow dumping the container once the hash salt has been created.
$kernel = InstallerKernel::createFromRequest($request, $class_loader, $environment, (bool) Settings::get('hash_salt', FALSE));
'run' => $install_state['settings_verified'] ? INSTALL_TASK_SKIP : INSTALL_TASK_RUN_IF_NOT_COMPLETED,
'function' => 'Drupal\Core\Installer\Form\SiteSettingsForm',
],
- 'install_write_profile' => [
- ],
+ 'install_write_profile' => [],
'install_verify_database_ready' => [
'run' => $install_state['database_ready'] ? INSTALL_TASK_SKIP : INSTALL_TASK_RUN_IF_NOT_COMPLETED,
],
'display_name' => t('Install site'),
'type' => 'batch',
],
- 'install_profile_themes' => [
- ],
- 'install_install_profile' => [
- ],
+ 'install_profile_themes' => [],
+ 'install_install_profile' => [],
'install_import_translations' => [
'display_name' => t('Set up translations'),
'display' => $needs_translations,
'type' => 'batch',
'run' => $needs_translations ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,
],
- 'install_finished' => [
- ],
+ 'install_finished' => [],
];
// Allow the installation profile to modify the full list of tasks.
* @param string $server_pattern
* Server access pattern (to replace language code, version number, etc. in).
*
- * @return array
+ * @return array|null
* Requirements compliance array. If the translation was downloaded
* successfully then an empty array is returned. Otherwise the requirements
- * error with detailed information.
+ * error with detailed information. NULL if the file already exists for this
+ * language code.
*/
function install_check_translations($langcode, $server_pattern) {
$requirements = [];