diff --git a/core/default.services.yml b/core/default.services.yml index 280eb43d9b..e1bbbc7e21 100644 --- a/core/default.services.yml +++ b/core/default.services.yml @@ -1,4 +1,41 @@ parameters: + session.storage.options: + # Default ini options for sessions. + # + # Some distributions of Linux (most notably Debian) ship their PHP + # installations with garbage collection (gc) disabled. Since Drupal depends + # on PHP's garbage collection for clearing sessions, ensure that garbage + # collection occurs by using the most common settings. + # @default 1 + gc_probability: 1 + # @default 100 + gc_divisor: 100 + # + # Set session lifetime (in seconds), i.e. the time from the user's last + # visit to the active session may be deleted by the session garbage + # collector. When a session is deleted, authenticated users are logged out, + # and the contents of the user's $_SESSION variable is discarded. + # @default 200000 + gc_maxlifetime: 200000 + # + # Set session cookie lifetime (in seconds), i.e. the time from the session + # is created to the cookie expires, i.e. when the browser is expected to + # discard the cookie. The value 0 means "until the browser is closed". + # @default 2000000 + cookie_lifetime: 2000000 + # + # Drupal automatically generates a unique session cookie name based on the + # full domain name used to access the site. This mechanism is sufficient + # for most use-cases, including multi-site deployments. However, if it is + # desired that a session can be reused across different subdomains, the + # cookie domain needs to be set to the shared base domain. Doing so assures + # that users remain logged in as they cross between various subdomains. + # To maximize compatibility and normalize the behavior across user agents, + # the cookie domain should start with a dot. + # + # @default none + # cookie_domain: '.example.com' + # twig.config: # Twig debugging: # @@ -6,15 +43,15 @@ parameters: # - 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, 'twig_debug' + # 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 twig_auto_reload below). + # changes (see auto_reload below). # # For more information about debugging Twig templates, see - # http://drupal.org/node/1906392. + # https://www.drupal.org/node/1906392. # # Not recommended in production environments # @default false @@ -22,10 +59,10 @@ parameters: # Twig auto-reload: # # Automatically recompile Twig templates whenever the source code changes. - # If you don't provide a value for twig_auto_reload, it will be determined - # based on the value of twig_debug. + # If you don't provide a value for auto_reload, it will be determined + # based on the value of debug. # - # Not recommended in production environments + # Not recommended in production environments # @default null auto_reload: null # Twig cache: @@ -33,21 +70,105 @@ parameters: # 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 - # twig_auto_reload setting above should be enabled rather than disabling the + # auto_reload setting above should be enabled rather than disabling the # Twig cache. # # Not recommended in production environments # @default true cache: true + renderer.config: + # Renderer required cache contexts: + # + # The Renderer will automatically associate these cache contexts with every + # render array, hence varying every render array by these cache contexts. + # + # @default ['languages:language_interface', 'theme', 'user.permissions'] + required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions'] + # Renderer automatic placeholdering conditions: + # + # Drupal allows portions of the page to be automatically deferred when + # rendering to improve cache performance. That is especially helpful for + # cache contexts that vary widely, such as the active user. On some sites + # those may be different, however, such as sites with only a handful of + # users. If you know what the high-cardinality cache contexts are for your + # site, specify those here. If you're not sure, the defaults are fairly safe + # in general. + # + # For more information about rendering optimizations see + # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing + auto_placeholder_conditions: + # Max-age at or below which caching is not considered worthwhile. + # + # Disable by setting to -1. + # + # @default 0 + max-age: 0 + # Cache contexts with a high cardinality. + # + # Disable by setting to []. + # + # @default ['session', 'user'] + contexts: ['session', 'user'] + # Tags with a high invalidation frequency. + # + # Disable by setting to []. + # + # @default [] + tags: [] + # Cacheability debugging: + # + # Responses with cacheability metadata (CacheableResponseInterface instances) + # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers. + # + # For more information about debugging cacheable responses, see + # https://www.drupal.org/developing/api/8/response/cacheable-response-interface + # + # Not recommended in production environments + # @default false + http.response.debug_cacheability_headers: false factory.keyvalue: {} # Default key/value storage service to use. # @default keyvalue.database - #default: keyvalue.database + # default: keyvalue.database # Collection-specific overrides. - #state: keyvalue.database + # state: keyvalue.database factory.keyvalue.expirable: {} # Default key/value expirable storage service to use. # @default keyvalue.database.expirable - #default: keyvalue.database.expirable + # default: keyvalue.database.expirable + # Allowed protocols for URL generation. + filter_protocols: + - http + - https + - ftp + - news + - nntp + - tel + - telnet + - mailto + - irc + - ssh + - sftp + - webcal + - rtsp + + # Configure Cross-Site HTTP requests (CORS). + # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS + # for more information about the topic in general. + # Note: By default the configuration is disabled. + cors.config: + enabled: false + # Specify allowed headers, like 'x-allowed-header'. + allowedHeaders: [] + # Specify allowed request methods, specify ['*'] to allow all possible ones. + allowedMethods: [] + # Configure requests allowed from specific origins. + allowedOrigins: ['*'] + # Sets the Access-Control-Expose-Headers header. + exposedHeaders: false + # Sets the Access-Control-Max-Age header. + maxAge: false + # Sets the Access-Control-Allow-Credentials header. + supportsCredentials: false diff --git a/core/default.settings.php b/core/default.settings.php index 3936dcb463..ae64d2ffe8 100644 --- a/core/default.settings.php +++ b/core/default.settings.php @@ -1,5 +1,7 @@ 'mysql', + * $databases['default']['default'] = array ( * 'database' => 'databasename', - * 'username' => 'username', - * 'password' => 'password', + * 'username' => 'sqlusername', + * 'password' => 'sqlpassword', * 'host' => 'localhost', - * 'port' => 3306, - * 'prefix' => 'myprefix_', - * 'collation' => 'utf8_general_ci', + * 'port' => '3306', + * 'driver' => 'mysql', + * 'prefix' => '', + * 'collation' => 'utf8mb4_general_ci', * ); * @endcode + */ +$databases = []; + +/** + * Customizing database settings. + * + * Many of the values of the $databases array can be customized for your + * particular database system. Refer to the sample in the section above as a + * starting point. * * The "driver" property indicates what Drupal database driver the * connection should use. This is usually the same as the name of the @@ -118,19 +136,6 @@ * request as needed. The fourth line creates a new database with a name of * "extra". * - * For a single database configuration, the following is sufficient: - * @code - * $databases['default']['default'] = array( - * 'driver' => 'mysql', - * 'database' => 'databasename', - * 'username' => 'username', - * 'password' => 'password', - * 'host' => 'localhost', - * 'prefix' => 'main_', - * 'collation' => 'utf8_general_ci', - * ); - * @endcode - * * You can optionally set prefixes for some or all database table names * by using the 'prefix' setting. If a prefix is specified, the table * name will be prepended with its value. Be sure to use valid database @@ -141,6 +146,11 @@ * @code * 'prefix' => 'main_', * @endcode + * + * Per-table prefixes are deprecated as of Drupal 8.2, and will be removed in + * Drupal 9.0. After that, only a single prefix for all tables will be + * supported. + * * To provide prefixes for specific tables, set 'prefix' as an array. * The array's keys are the table names and the values are the prefixes. * The 'default' element is mandatory and holds the prefix for any tables @@ -174,7 +184,6 @@ * connecting to the database server, as well as PDO connection settings. For * example, to enable MySQL SELECT queries to exceed the max_join_size system * variable, and to reduce the database connection timeout to 5 seconds: - * * @code * $databases['default']['default'] = array( * 'init_commands' => array( @@ -186,71 +195,70 @@ * ); * @endcode * - * WARNING: These defaults are designed for database portability. Changing them - * may cause unexpected behavior, including potential data loss. + * WARNING: The above defaults are designed for database portability. Changing + * them may cause unexpected behavior, including potential data loss. See + * https://www.drupal.org/developing/api/database/configuration for more + * information on these defaults and the potential issues. * - * @see DatabaseConnection_mysql::__construct - * @see DatabaseConnection_pgsql::__construct - * @see DatabaseConnection_sqlite::__construct + * More details can be found in the constructor methods for each driver: + * - \Drupal\Core\Database\Driver\mysql\Connection::__construct() + * - \Drupal\Core\Database\Driver\pgsql\Connection::__construct() + * - \Drupal\Core\Database\Driver\sqlite\Connection::__construct() * - * Database configuration format: + * Sample Database configuration format for PostgreSQL (pgsql): * @code * $databases['default']['default'] = array( - * 'driver' => 'mysql', - * 'database' => 'databasename', - * 'username' => 'username', - * 'password' => 'password', - * 'host' => 'localhost', - * 'prefix' => '', - * ); - * $databases['default']['default'] = array( * 'driver' => 'pgsql', * 'database' => 'databasename', - * 'username' => 'username', - * 'password' => 'password', + * 'username' => 'sqlusername', + * 'password' => 'sqlpassword', * 'host' => 'localhost', * 'prefix' => '', * ); + * @endcode + * + * Sample Database configuration format for SQLite (sqlite): + * @code * $databases['default']['default'] = array( * 'driver' => 'sqlite', * 'database' => '/path/to/databasefilename', * ); * @endcode */ -$databases = array(); /** * Location of the site configuration files. * * The $config_directories array specifies the location of file system - * directories used for configuration data. On install, "active" and "staging" - * directories are created for configuration. The staging directory is used for - * configuration imports; the active directory is not used by default, since the - * default storage for active configuration is the database rather than the file - * system (this can be changed; see "Active configuration settings" below). - * - * The default location for the active and staging directories is inside a - * randomly-named directory in the public files path; this setting allows you to - * override these locations. If you use files for the active configuration, you - * can enhance security by putting the active configuration outside your - * document root. + * directories used for configuration data. On install, the "sync" directory is + * created. This is used for configuration imports. The "active" directory is + * not created by default since the default storage for active configuration is + * the database rather than the file system. (This can be changed. See "Active + * configuration settings" below). + * + * The default location for the "sync" directory is inside a randomly-named + * directory in the public files path. The setting below allows you to override + * the "sync" location. + * + * If you use files for the "active" configuration, you can tell the + * Configuration system where this directory is located by adding an entry with + * array key CONFIG_ACTIVE_DIRECTORY. * * Example: * @code * $config_directories = array( - * CONFIG_ACTIVE_DIRECTORY => '/some/directory/outside/webroot', - * CONFIG_STAGING_DIRECTORY => '/another/directory/outside/webroot', + * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot', * ); * @endcode */ -$config_directories = array(); +$config_directories = []; /** * Settings: * * $settings contains environment-specific configuration, such as the files * directory and reverse proxy address, and temporary configuration, such as - * turning on Twig debugging and security overrides. + * security overrides. * * @see \Drupal\Core\Site\Settings::get() */ @@ -274,6 +282,16 @@ */ $settings['hash_salt'] = ''; +/** + * Deployment identifier. + * + * Drupal's dependency injection container will be automatically invalidated and + * rebuilt when the Drupal core version changes. When updating contributed or + * custom code that changes the container, changing this identifier will also + * allow the container to be invalidated as soon as code is deployed. + */ +# $settings['deployment_identifier'] = \Drupal::VERSION; + /** * Access control for update.php script. * @@ -290,20 +308,22 @@ /** * External access proxy settings: * - * If your site must access the Internet via a web proxy then you can enter - * the proxy settings here. Currently only basic authentication is supported - * by using the username and password variables. The proxy_user_agent variable - * can be set to NULL for proxies that require no User-Agent header or to a - * non-empty string for proxies that limit requests to a specific agent. The - * proxy_exceptions variable is an array of host names to be accessed directly, - * not via proxy. + * If your site must access the Internet via a web proxy then you can enter the + * proxy settings here. Set the full URL of the proxy, including the port, in + * variables: + * - $settings['http_client_config']['proxy']['http']: The proxy URL for HTTP + * requests. + * - $settings['http_client_config']['proxy']['https']: The proxy URL for HTTPS + * requests. + * You can pass in the user name and password for basic authentication in the + * URLs in these settings. + * + * You can also define an array of host names that can be accessed directly, + * bypassing the proxy, in $settings['http_client_config']['proxy']['no']. */ -# $settings['proxy_server'] = ''; -# $settings['proxy_port'] = 8080; -# $settings['proxy_username'] = ''; -# $settings['proxy_password'] = ''; -# $settings['proxy_user_agent'] = ''; -# $settings['proxy_exceptions'] = array('127.0.0.1', 'localhost'); +# $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080'; +# $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080'; +# $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost']; /** * Reverse Proxy Configuration: @@ -322,11 +342,10 @@ * configuration requires the IP addresses of all remote proxies to be * specified in $settings['reverse_proxy_addresses'] to work correctly. * - * Enable this setting to get Drupal to determine the client IP from - * the X-Forwarded-For header (or $settings['reverse_proxy_header'] if set). - * If you are unsure about this setting, do not have a reverse proxy, - * or Drupal operates in a shared hosting environment, this setting - * should remain commented out. + * Enable this setting to get Drupal to determine the client IP from the + * X-Forwarded-For header. If you are unsure about this setting, do not have a + * reverse proxy, or Drupal operates in a shared hosting environment, this + * setting should remain commented out. * * In order for this setting to be used you must specify every possible * reverse proxy IP address in $settings['reverse_proxy_addresses']. @@ -342,13 +361,38 @@ * Specify every reverse proxy IP address in your environment. * This setting is required if $settings['reverse_proxy'] is TRUE. */ -# $settings['reverse_proxy_addresses'] = array('a.b.c.d', ...); +# $settings['reverse_proxy_addresses'] = ['a.b.c.d', ...]; /** - * Set this value if your proxy server sends the client IP in a header - * other than X-Forwarded-For. + * Reverse proxy trusted headers. + * + * Sets which headers to trust from your reverse proxy. + * + * Common values are: + * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * - \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * + * Note the default value of + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @endcode + * is not secure by default. The value should be set to only the specific + * headers the reverse proxy uses. For example: + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * @endcode + * This would trust the following headers: + * - X_FORWARDED_FOR + * - X_FORWARDED_HOST + * - X_FORWARDED_PROTO + * - X_FORWARDED_PORT + * + * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * @see \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @see \Symfony\Component\HttpFoundation\Request::setTrustedProxies */ -# $settings['reverse_proxy_header'] = 'HTTP_X_CLUSTER_CLIENT_IP'; +# $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED; + /** * Page caching: @@ -368,21 +412,55 @@ */ # $settings['omit_vary_cookie'] = TRUE; + /** - * Class Loader. + * Cache TTL for client error (4xx) responses. + * + * Items cached per-URL tend to result in a large number of cache items, and + * this can be problematic on 404 pages which by their nature are unbounded. A + * fixed TTL can be set for these items, defaulting to one hour, so that cache + * backends which do not support LRU can purge older entries. To disable caching + * of client error responses set the value to 0. Currently applies only to + * page_cache module. + */ +# $settings['cache_ttl_4xx'] = 3600; + +/** + * Expiration of cached forms. * - * By default, Composer's ClassLoader is used, which is best for development, as - * it does not break when code is moved in the file system. You can decorate the - * class loader with a cached solution for better performance, which is - * recommended for production sites. + * Drupal's Form API stores details of forms in a cache and these entries are + * kept for at least 6 hours by default. Expired entries are cleared by cron. * - * To do so, you may decorate and replace the local $class_loader variable. + * @see \Drupal\Core\Form\FormCache::setCache() + */ +# $settings['form_cache_expiration'] = 21600; + +/** + * Class Loader. * - * For example, to use Symfony's APC class loader, uncomment the code below. + * If the APC extension is detected, the Symfony APC class loader is used for + * performance reasons. Detection can be prevented by setting + * class_loader_auto_detect to false, as in the example below. + */ +# $settings['class_loader_auto_detect'] = FALSE; + +/* + * If the APC extension is not detected, either because APC is missing or + * because auto-detection has been disabled, auto-loading falls back to + * Composer's ClassLoader, which is good for development as it does not break + * when code is moved in the file system. You can also decorate the base class + * loader with another cached solution than the Symfony APC class loader, as + * all production sites should have a cached class loader of some sort enabled. + * + * To do so, you may decorate and replace the local $class_loader variable. For + * example, to use Symfony's APC class loader without automatic detection, + * uncomment the code below. */ /* if ($settings['hash_salt']) { - $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader('drupal.' . $settings['hash_salt'], $class_loader); + $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']); + $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader); + unset($prefix); $class_loader->unregister(); $apc_loader->register(); $class_loader = $apc_loader; @@ -407,27 +485,32 @@ * the code directly via SSH or FTP themselves. This setting completely * disables all functionality related to these authorized file operations. * - * @see http://drupal.org/node/244924 + * @see https://www.drupal.org/node/244924 * * Remove the leading hash signs to disable. */ # $settings['allow_authorize_operations'] = FALSE; /** - * Mixed-mode sessions: + * Default mode for directories and files written by Drupal. * - * Set to TRUE to create both secure and insecure sessions when using HTTPS. - * Defaults to FALSE. + * Value should be in PHP Octal Notation, with leading zero. */ -# $settings['mixed_mode_sessions'] = TRUE; +# $settings['file_chmod_directory'] = 0775; +# $settings['file_chmod_file'] = 0664; /** - * Default mode for for directories and files written by Drupal. + * Public file base URL: * - * Value should be in PHP Octal Notation, with leading zero. + * An alternative base URL to be used for serving public files. This must + * include any leading directory path. + * + * A different value from the domain used by Drupal to be used for accessing + * public files. This can be used for a simple CDN integration, or to improve + * security by serving user-uploaded files from a different domain or subdomain + * pointing to the same server. Do not include a trailing slash. */ -# $settings['file_chmod_directory'] = 0775; -# $settings['file_chmod_file'] = 0664; +# $settings['file_public_base_url'] = 'http://downloads.example.com/files'; /** * Public file path: @@ -438,6 +521,21 @@ */ # $settings['file_public_path'] = 'sites/default/files'; +/** + * Private file path: + * + * A local file system path where private files will be stored. This directory + * must be absolute, outside of the Drupal installation directory and not + * accessible over the web. + * + * Note: Caches need to be cleared when this value is changed to make the + * private:// stream wrapper available to the system. + * + * See https://www.drupal.org/documentation/modules/file for more information + * about securing private files. + */ +# $settings['file_private_path'] = ''; + /** * Session write interval: * @@ -458,10 +556,10 @@ * The "en" part of the variable name, is dynamic and can be any langcode of * any added language. (eg locale_custom_strings_de for german). */ -# $settings['locale_custom_strings_en'][''] = array( +# $settings['locale_custom_strings_en'][''] = [ # 'forum' => 'Discussion board', # '@count min' => '@count minutes', -# ); +# ]; /** * A custom theme for the offline page: @@ -475,28 +573,6 @@ */ # $settings['maintenance_theme'] = 'bartik'; -/** - * Base URL (optional). - * - * If Drupal is generating incorrect URLs on your site, which could - * be in HTML headers (links to CSS and JS files) or visible links on pages - * (such as in menus), uncomment the Base URL statement below (remove the - * leading hash sign) and fill in the absolute URL to your Drupal installation. - * - * You might also want to force users to use a given domain. - * See the .htaccess file for more information. - * - * Examples: - * $base_url = 'http://www.example.com'; - * $base_url = 'http://www.example.com:8888'; - * $base_url = 'http://www.example.com/drupal'; - * $base_url = 'https://www.example.com:8888/drupal'; - * - * It is not allowed to have a trailing slash; Drupal will add it - * for you. - */ -# $base_url = 'http://www.example.com'; // NO trailing slash! - /** * PHP settings: * @@ -509,30 +585,6 @@ * issues. */ -/** - * Some distributions of Linux (most notably Debian) ship their PHP - * installations with garbage collection (gc) disabled. Since Drupal depends on - * PHP's garbage collection for clearing sessions, ensure that garbage - * collection occurs by using the most common settings. - */ -ini_set('session.gc_probability', 1); -ini_set('session.gc_divisor', 100); - -/** - * Set session lifetime (in seconds), i.e. the time from the user's last visit - * to the active session may be deleted by the session garbage collector. When - * a session is deleted, authenticated users are logged out, and the contents - * of the user's $_SESSION variable is discarded. - */ -ini_set('session.gc_maxlifetime', 200000); - -/** - * Set session cookie lifetime (in seconds), i.e. the time from the session is - * created to the cookie expires, i.e. when the browser is expected to discard - * the cookie. The value 0 means "until the browser is closed". - */ -ini_set('session.cookie_lifetime', 2000000); - /** * If you encounter a situation where users post a large amount of text, and * the result is stripped out upon viewing but can still be edited, Drupal's @@ -544,23 +596,16 @@ # ini_set('pcre.backtrack_limit', 200000); # ini_set('pcre.recursion_limit', 200000); -/** - * Drupal automatically generates a unique session cookie name for each site - * based on its full domain name. If you have multiple domains pointing at the - * same Drupal site, you can either redirect them all to a single domain (see - * comment in .htaccess), or uncomment the line below and specify their shared - * base domain. Doing so assures that users remain logged in as they cross - * between your various domains. Make sure to always start the $cookie_domain - * with a leading dot, as per RFC 2109. - */ -# $cookie_domain = '.example.com'; - /** * Active configuration settings. * * By default, the active configuration is stored in the database in the * {config} table. To use a different storage mechanism for the active * configuration, do the following prior to installing: + * - Create an "active" directory and declare its path in $config_directories + * as explained under the 'Location of the site configuration files' section + * above in this file. To enhance security, you can declare a path that is + * outside your document root. * - Override the 'bootstrap_config_storage' setting here. It must be set to a * callable that returns an object that implements * \Drupal\Core\Config\StorageInterface. @@ -568,7 +613,7 @@ * override in a services.yml file in the same directory as settings.php * (definitions in this file will override service definition defaults). */ -# $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage'); +# $settings['bootstrap_config_storage'] = ['Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage']; /** * Configuration overrides. @@ -579,27 +624,24 @@ * the default settings.php. * * Note that any values you provide in these variable overrides will not be - * modifiable from the Drupal administration interface. + * viewable from the Drupal administration interface. The administration + * interface displays the values stored in configuration so that you can stage + * changes to other environments that don't have the overrides. + * + * There are particular configuration values that are risky to override. For + * example, overriding the list of installed modules in 'core.extension' is not + * supported as module install or uninstall has not occurred. Other examples + * include field storage configuration, because it has effects on database + * structure, and 'core.menu.static_menu_link_overrides' since this is cached in + * a way that is not config override aware. Also, note that changing + * configuration values in settings.php will not fire any of the configuration + * change events. */ +# $config['system.file']['path']['temporary'] = '/tmp'; # $config['system.site']['name'] = 'My Drupal site'; # $config['system.theme']['default'] = 'stark'; # $config['user.settings']['anonymous'] = 'Visitor'; -/** - * CSS/JS aggregated file gzip compression: - * - * By default, when CSS or JS aggregation and clean URLs are enabled Drupal will - * store a gzip compressed (.gz) copy of the aggregated files. If this file is - * available then rewrite rules in the default .htaccess file will serve these - * files to browsers that accept gzip encoded content. This allows pages to load - * faster for these users and has minimal impact on server load. If you are - * using a webserver other than Apache httpd, or a caching reverse proxy that is - * configured to cache and compress these files itself you may want to uncomment - * one or both of the below lines, which will prevent gzip files being stored. - */ -# $config['system.performance']['css']['gzip'] = FALSE; -# $config['system.performance']['js']['gzip'] = FALSE; - /** * Fast 404 pages: * @@ -609,23 +651,109 @@ * * The options below return a simple, fast 404 page for URLs matching a * specific pattern: - * - $conf['system.performance]['fast_404']['exclude_paths']: A regular + * - $config['system.performance']['fast_404']['exclude_paths']: A regular * expression to match paths to exclude, such as images generated by image - * styles, or dynamically-resized images. If you need to add more paths, you + * styles, or dynamically-resized images. The default pattern provided below + * also excludes the private file system. If you need to add more paths, you * can add '|path' to the expression. - * - $conf['system.performance]['fast_404']['paths']: A regular expression to + * - $config['system.performance']['fast_404']['paths']: A regular expression to * match paths that should return a simple 404 page, rather than the fully * themed 404 page. If you don't have any aliases ending in htm or html you * can add '|s?html?' to the expression. - * - $conf['system.performance]['fast_404']['html']: The html to return for + * - $config['system.performance']['fast_404']['html']: The html to return for * simple 404 pages. * * Remove the leading hash signs if you would like to alter this functionality. */ -# $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)\//'; +# $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//'; # $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; # $config['system.performance']['fast_404']['html'] = '404 Not Found

Not Found

The requested URL "@path" was not found on this server.

'; +/** + * Load services definition file. + */ +$settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml'; + +/** + * Override the default service container class. + * + * This is useful for example to trace the service container for performance + * tracking purposes, for testing a service container with an error condition or + * to test a service container that throws an exception. + */ +# $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container'; + +/** + * Override the default yaml parser class. + * + * Provide a fully qualified class name here if you would like to provide an + * alternate implementation YAML parser. The class must implement the + * \Drupal\Component\Serialization\SerializationInterface interface. + */ +# $settings['yaml_parser_class'] = NULL; + +/** + * Trusted host configuration. + * + * Drupal core can use the Symfony trusted host mechanism to prevent HTTP Host + * header spoofing. + * + * To enable the trusted host mechanism, you enable your allowable hosts + * in $settings['trusted_host_patterns']. This should be an array of regular + * expression patterns, without delimiters, representing the hosts you would + * like to allow. + * + * For example: + * @code + * $settings['trusted_host_patterns'] = array( + * '^www\.example\.com$', + * ); + * @endcode + * will allow the site to only run from www.example.com. + * + * If you are running multisite, or if you are running your site from + * different domain names (eg, you don't redirect http://www.example.com to + * http://example.com), you should specify all of the host patterns that are + * allowed by your site. + * + * For example: + * @code + * $settings['trusted_host_patterns'] = array( + * '^example\.com$', + * '^.+\.example\.com$', + * '^example\.org$', + * '^.+\.example\.org$', + * ); + * @endcode + * will allow the site to run off of all variants of example.com and + * example.org, with all subdomains included. + */ + +/** + * The default list of directories that will be ignored by Drupal's file API. + * + * By default ignore node_modules and bower_components folders to avoid issues + * with common frontend tools and recursive scanning of directories looking for + * extensions. + * + * @see file_scan_directory() + * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory() + */ +$settings['file_scan_ignore_directories'] = [ + 'node_modules', + 'bower_components', +]; + +/** + * The default number of entities to update in a batch process. + * + * This is used by update and post-update functions that need to go through and + * change all the entities on a site, so it is useful to increase this number + * if your hosting configuration (i.e. RAM allocation, CPU speed) allows for a + * larger number of entities to be processed in a single batch run. + */ +$settings['entity_update_batch_size'] = 50; + /** * Load local development override configuration, if available. * @@ -636,6 +764,7 @@ * * Keep this code block at the end of this file to take full effect. */ -# if (file_exists(__DIR__ . '/settings.local.php')) { -# include __DIR__ . '/settings.local.php'; +# +# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { +# include $app_root . '/' . $site_path . '/settings.local.php'; # } diff --git a/core/includes/update.inc b/core/includes/update.inc index 6629ed9b98..bb3498833a 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -10,7 +10,6 @@ use Drupal\Component\Graph\Graph; use Drupal\Core\Update\UpdateKernel; -use Drupal\Component\Utility\String; use Drupal\Core\Config\FileStorage; use Drupal\Core\Config\ConfigException; use Drupal\Core\Page\DefaultHtmlPageRenderer; diff --git a/sites/default/default.services.yml b/sites/default/default.services.yml deleted file mode 100644 index 792d600548..0000000000 --- a/sites/default/default.services.yml +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php deleted file mode 100644 index b3d9bbc7f3..0000000000 --- a/sites/default/default.settings.php +++ /dev/null @@ -1 +0,0 @@ -