Issue #3048885 by RenatoG: Examples using new array in settings.php

(cherry picked from commit 94b4bcf786)
8.7.x
Alex Pott 2019-05-06 12:26:30 +01:00
parent 7460ad9745
commit c4d04b2690
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 22 additions and 22 deletions

View File

@ -76,7 +76,7 @@
* specific needs. * specific needs.
* *
* @code * @code
* $databases['default']['default'] = array ( * $databases['default']['default'] = [
* 'database' => 'databasename', * 'database' => 'databasename',
* 'username' => 'sqlusername', * 'username' => 'sqlusername',
* 'password' => 'sqlpassword', * 'password' => 'sqlpassword',
@ -85,7 +85,7 @@
* 'driver' => 'mysql', * 'driver' => 'mysql',
* 'prefix' => '', * 'prefix' => '',
* 'collation' => 'utf8mb4_general_ci', * 'collation' => 'utf8mb4_general_ci',
* ); * ];
* @endcode * @endcode
*/ */
$databases = []; $databases = [];
@ -156,13 +156,13 @@ $databases = [];
* The 'default' element is mandatory and holds the prefix for any tables * The 'default' element is mandatory and holds the prefix for any tables
* not specified elsewhere in the array. Example: * not specified elsewhere in the array. Example:
* @code * @code
* 'prefix' => array( * 'prefix' => [
* 'default' => 'main_', * 'default' => 'main_',
* 'users' => 'shared_', * 'users' => 'shared_',
* 'sessions' => 'shared_', * 'sessions' => 'shared_',
* 'role' => 'shared_', * 'role' => 'shared_',
* 'authmap' => 'shared_', * 'authmap' => 'shared_',
* ), * ],
* @endcode * @endcode
* You can also use a reference to a schema/database as a prefix. This may be * You can also use a reference to a schema/database as a prefix. This may be
* useful if your Drupal installation exists in a schema that is not the default * useful if your Drupal installation exists in a schema that is not the default
@ -170,13 +170,13 @@ $databases = [];
* time. * time.
* Example: * Example:
* @code * @code
* 'prefix' => array( * 'prefix' => [
* 'default' => 'main.', * 'default' => 'main.',
* 'users' => 'shared.', * 'users' => 'shared.',
* 'sessions' => 'shared.', * 'sessions' => 'shared.',
* 'role' => 'shared.', * 'role' => 'shared.',
* 'authmap' => 'shared.', * 'authmap' => 'shared.',
* ); * ];
* @endcode * @endcode
* NOTE: MySQL and SQLite's definition of a schema is a database. * NOTE: MySQL and SQLite's definition of a schema is a database.
* *
@ -185,14 +185,14 @@ $databases = [];
* example, to enable MySQL SELECT queries to exceed the max_join_size system * example, to enable MySQL SELECT queries to exceed the max_join_size system
* variable, and to reduce the database connection timeout to 5 seconds: * variable, and to reduce the database connection timeout to 5 seconds:
* @code * @code
* $databases['default']['default'] = array( * $databases['default']['default'] = [
* 'init_commands' => array( * 'init_commands' => [
* 'big_selects' => 'SET SQL_BIG_SELECTS=1', * 'big_selects' => 'SET SQL_BIG_SELECTS=1',
* ), * ],
* 'pdo' => array( * 'pdo' => [
* PDO::ATTR_TIMEOUT => 5, * PDO::ATTR_TIMEOUT => 5,
* ), * ],
* ); * ];
* @endcode * @endcode
* *
* WARNING: The above defaults are designed for database portability. Changing * WARNING: The above defaults are designed for database portability. Changing
@ -207,22 +207,22 @@ $databases = [];
* *
* Sample Database configuration format for PostgreSQL (pgsql): * Sample Database configuration format for PostgreSQL (pgsql):
* @code * @code
* $databases['default']['default'] = array( * $databases['default']['default'] = [
* 'driver' => 'pgsql', * 'driver' => 'pgsql',
* 'database' => 'databasename', * 'database' => 'databasename',
* 'username' => 'sqlusername', * 'username' => 'sqlusername',
* 'password' => 'sqlpassword', * 'password' => 'sqlpassword',
* 'host' => 'localhost', * 'host' => 'localhost',
* 'prefix' => '', * 'prefix' => '',
* ); * ];
* @endcode * @endcode
* *
* Sample Database configuration format for SQLite (sqlite): * Sample Database configuration format for SQLite (sqlite):
* @code * @code
* $databases['default']['default'] = array( * $databases['default']['default'] = [
* 'driver' => 'sqlite', * 'driver' => 'sqlite',
* 'database' => '/path/to/databasefilename', * 'database' => '/path/to/databasefilename',
* ); * ];
* @endcode * @endcode
*/ */
@ -246,9 +246,9 @@ $databases = [];
* *
* Example: * Example:
* @code * @code
* $config_directories = array( * $config_directories = [
* CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot', * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
* ); * ];
* @endcode * @endcode
*/ */
$config_directories = []; $config_directories = [];
@ -705,9 +705,9 @@ $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
* *
* For example: * For example:
* @code * @code
* $settings['trusted_host_patterns'] = array( * $settings['trusted_host_patterns'] = [
* '^www\.example\.com$', * '^www\.example\.com$',
* ); * ];
* @endcode * @endcode
* will allow the site to only run from www.example.com. * will allow the site to only run from www.example.com.
* *
@ -718,12 +718,12 @@ $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
* *
* For example: * For example:
* @code * @code
* $settings['trusted_host_patterns'] = array( * $settings['trusted_host_patterns'] = [
* '^example\.com$', * '^example\.com$',
* '^.+\.example\.com$', * '^.+\.example\.com$',
* '^example\.org$', * '^example\.org$',
* '^.+\.example\.org$', * '^.+\.example\.org$',
* ); * ];
* @endcode * @endcode
* will allow the site to run off of all variants of example.com and * will allow the site to run off of all variants of example.com and
* example.org, with all subdomains included. * example.org, with all subdomains included.