Skip to content

Instantly share code, notes, and snippets.

@robballou
Last active May 30, 2017 18:42
Show Gist options
  • Save robballou/ed309e16cc991dc3d447 to your computer and use it in GitHub Desktop.
Save robballou/ed309e16cc991dc3d447 to your computer and use it in GitHub Desktop.
Drupal 8 basic settings file (for development)
<?php
assert_options(ASSERT_ACTIVE, TRUE);
\Drupal\Component\Assertion\Handle::register();
$databases = [
'default' => [
'default' => [
'driver' => 'mysql',
'database' => '',
'username' => '',
'password' => '',
'host' => 'localhost',
'prefix' => '',
],
],
];
// $config_directories = [];
$settings['hash_salt'] = '';
$settings['update_free_access'] = FALSE;
// services
$settings['container_yamls'][] = __DIR__ . '/services.yml';
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
$settings['trusted_host_patterns'] = [
'^localhost$',
'^dev$',
];
// $settings['install_profile'] = '';
// $config_directories['sync'] = '';
$config['system.file']['path.temporary'] = '/tmp';
$settings['file_private_path'] = 'private';
/**
* Disable CSS and JS aggregation.
*/
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
// disable caching
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
$settings['cache']['bins']['render'] = 'cache.backend.null';
// enable verbose errors
$config['system.logging']['error_level'] = 'verbose';
$config['devel.settings']['devel_dumper'] = 'kint';
$settings['devel.settings']['devel_dumper'] = 'kint';
if (file_exists(DRUPAL_ROOT . '/modules/contrib/devel/kint/kint/Kint.class.php')) {
$settings['devel.devel_dumper'] = 'kint';
$config['devel.devel_dumper'] = 'kint';
require_once DRUPAL_ROOT . '/modules/contrib/devel/kint/kint/Kint.class.php';
Kint::$maxLevels = 6;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment