Created
February 7, 2023 21:43
-
-
Save jcicero518/41b0adbdb0205d262b0e84f97a763593 to your computer and use it in GitHub Desktop.
settings.local.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local development services. | |
# | |
# To activate this feature, follow the instructions at the top of the | |
# 'example.settings.local.php' file, which sits next to this file. | |
parameters: | |
http.response.debug_cacheability_headers: true | |
twig.config: | |
# Twig debugging: | |
# | |
# When debugging is enabled: | |
# - The markup of each Twig template is surrounded by HTML comments that | |
# contain theming information, such as template file name suggestions. | |
# - Note that this debugging markup will cause automated tests that directly | |
# check rendered HTML to fail. When running automated tests, 'debug' | |
# should be set to FALSE. | |
# - The dump() function can be used in Twig templates to output information | |
# about template variables. | |
# - Twig templates are automatically recompiled whenever the source code | |
# changes (see auto_reload below). | |
# | |
# For more information about debugging Twig templates, see | |
# https://www.drupal.org/node/1906392. | |
# | |
# Enabling Twig debugging is not recommended in production environments. | |
# @default false | |
debug: true | |
# Twig auto-reload: | |
# | |
# Automatically recompile Twig templates whenever the source code changes. | |
# If you don't provide a value for auto_reload, it will be determined | |
# based on the value of debug. | |
# | |
# Enabling auto-reload is not recommended in production environments. | |
# @default null | |
auto_reload: null | |
# Twig cache: | |
# | |
# By default, Twig templates will be compiled and stored in the filesystem | |
# to increase performance. Disabling the Twig cache will recompile the | |
# templates from source each time they are used. In most cases the | |
# auto_reload setting above should be enabled rather than disabling the | |
# Twig cache. | |
# | |
# Disabling the Twig cache is not recommended in production environments. | |
# @default true | |
cache: false | |
# File extensions: | |
# | |
# List of file extensions the Twig system is allowed to load via the | |
# twig.loader.filesystem service. Files with other extensions will not be | |
# loaded unless they are added here. For example, to allow a file named | |
# 'example.partial' to be loaded, add 'partial' to this list. To load files | |
# with no extension, add an empty string '' to the list. | |
# | |
# @default ['css', 'html', 'js', 'svg', 'twig'] | |
allowed_file_extensions: | |
- css | |
- html | |
- js | |
- svg | |
- twig | |
services: | |
cache.backend.null: | |
class: Drupal\Core\Cache\NullBackendFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// web/sites/default/settings.local.php | |
// phpcs:ignoreFile | |
/** | |
* @file | |
* Local development override configuration feature. | |
* | |
* To activate this feature, copy and rename it such that its path plus | |
* filename is 'sites/default/settings.local.php'. Then, go to the bottom of | |
* 'sites/default/settings.php' and uncomment the commented lines that mention | |
* 'settings.local.php'. | |
* | |
* If you are using a site name in the path, such as 'sites/example.com', copy | |
* this file to 'sites/example.com/settings.local.php', and uncomment the lines | |
* at the bottom of 'sites/example.com/settings.php'. | |
*/ | |
/** | |
* Assertions. | |
* | |
* The Drupal project primarily uses runtime assertions to enforce the | |
* expectations of the API by failing when incorrect calls are made by code | |
* under development. | |
* | |
* @see http://php.net/assert | |
* @see https://www.drupal.org/node/2492225 | |
* | |
* If you are using PHP 7.0 it is strongly recommended that you set | |
* zend.assertions=1 in the PHP.ini file (It cannot be changed from .htaccess | |
* or runtime) on development machines and to 0 in production. | |
* | |
* @see https://wiki.php.net/rfc/expectations | |
*/ | |
assert_options(ASSERT_ACTIVE, TRUE); | |
assert_options(ASSERT_EXCEPTION, TRUE); | |
/** | |
* Enable local development services. | |
*/ | |
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml'; | |
$databases['default']['default'] = array ( | |
'database' => 'bethel9', | |
'username' => 'homestead', /** Vagrant defaults to this username **/ | |
'password' => 'secret', /** Vagrant defaults to this password **/ | |
'prefix' => '', | |
'host' => '127.0.0.1', | |
'port' => '3306', | |
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', | |
'driver' => 'mysql', | |
); | |
$settings['config_sync_directory'] = '../config'; | |
$settings['hash_salt'] = 'YOUR_SALT_HERE'; | |
/** | |
* Show all error messages, with backtrace information. | |
* | |
* In case the error level could not be fetched from the database, as for | |
* example the database connection failed, we rely only on this value. | |
*/ | |
$config['system.logging']['error_level'] = 'verbose'; | |
/** | |
* Disable CSS and JS aggregation. | |
*/ | |
$config['system.performance']['css']['preprocess'] = FALSE; | |
$config['system.performance']['js']['preprocess'] = FALSE; | |
/** | |
* Disable the render cache. | |
* | |
* Note: you should test with the render cache enabled, to ensure the correct | |
* cacheability metadata is present. However, in the early stages of | |
* development, you may want to disable it. | |
* | |
* This setting disables the render cache by using the Null cache back-end | |
* defined by the development.services.yml file above. | |
* | |
* Only use this setting once the site has been installed. | |
*/ | |
$settings['cache']['bins']['render'] = 'cache.backend.null'; | |
/** | |
* Disable caching for migrations. | |
* | |
* Uncomment the code below to only store migrations in memory and not in the | |
* database. This makes it easier to develop custom migrations. | |
*/ | |
# $settings['cache']['bins']['discovery_migration'] = 'cache.backend.memory'; | |
/** | |
* Disable Internal Page Cache. | |
* | |
* Note: you should test with Internal Page Cache enabled, to ensure the correct | |
* cacheability metadata is present. However, in the early stages of | |
* development, you may want to disable it. | |
* | |
* This setting disables the page cache by using the Null cache back-end | |
* defined by the development.services.yml file above. | |
* | |
* Only use this setting once the site has been installed. | |
*/ | |
$settings['cache']['bins']['page'] = 'cache.backend.null'; | |
/** | |
* Disable Dynamic Page Cache. | |
* | |
* Note: you should test with Dynamic Page Cache enabled, to ensure the correct | |
* cacheability metadata is present (and hence the expected behavior). However, | |
* in the early stages of development, you may want to disable it. | |
*/ | |
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; | |
/** | |
* Allow test modules and themes to be installed. | |
* | |
* Drupal ignores test modules and themes by default for performance reasons. | |
* During development it can be useful to install test extensions for debugging | |
* purposes. | |
*/ | |
$settings['extension_discovery_scan_tests'] = TRUE; | |
/** | |
* Enable access to rebuild.php. | |
* | |
* This setting can be enabled to allow Drupal's php and database cached | |
* storage to be cleared via the rebuild.php page. Access to this page can also | |
* be gained by generating a query string from rebuild_token_calculator.sh and | |
* using these parameters in a request to rebuild.php. | |
*/ | |
$settings['rebuild_access'] = TRUE; | |
/** | |
* Skip file system permissions hardening. | |
* | |
* The system module will periodically check the permissions of your site's | |
* site directory to ensure that it is not writable by the website user. For | |
* sites that are managed with a version control system, this can cause problems | |
* when files in that directory such as settings.php are updated, because the | |
* user pulling in the changes won't have permissions to modify files in the | |
* directory. | |
*/ | |
$settings['skip_permissions_hardening'] = TRUE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment