|
@@ -1,6 +1,13 @@
|
|
|
<?php
|
|
|
+
|
|
|
+use Cake\Cache\Engine\FileEngine;
|
|
|
+use Cake\Database\Connection;
|
|
|
+use Cake\Database\Driver\Mysql;
|
|
|
+use Cake\Log\Engine\FileLog;
|
|
|
+use Cake\Mailer\Transport\MailTransport;
|
|
|
+
|
|
|
return [
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Debug Level:
|
|
|
*
|
|
|
* Production Mode:
|
|
@@ -9,9 +16,9 @@ return [
|
|
|
* Development Mode:
|
|
|
* true: Errors and warnings shown.
|
|
|
*/
|
|
|
- 'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN),
|
|
|
+ 'debug' => false, //filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN),
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Configure basic information about the application.
|
|
|
*
|
|
|
* - namespace - The namespace to find app classes under.
|
|
@@ -44,7 +51,7 @@ return [
|
|
|
'encoding' => env('APP_ENCODING', 'UTF-8'),
|
|
|
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
|
|
|
'defaultTimezone' => env('APP_DEFAULT_TIMEZONE', 'UTC'),
|
|
|
- 'base' => dirname(__DIR__),
|
|
|
+ 'base' => false,
|
|
|
'dir' => 'src',
|
|
|
'webroot' => 'webroot',
|
|
|
'wwwRoot' => WWW_ROOT,
|
|
@@ -60,7 +67,7 @@ return [
|
|
|
],
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Security and encryption configuration
|
|
|
*
|
|
|
* - salt - A random string used in security hashing methods.
|
|
@@ -68,10 +75,10 @@ return [
|
|
|
* You should treat it as extremely sensitive data.
|
|
|
*/
|
|
|
'Security' => [
|
|
|
- 'salt' => env('SECURITY_SALT', '__SALT__'),
|
|
|
+ 'salt' => env('SECURITY_SALT', '3ff7e038084e5f048329ff059595581b5dbcfef5c9d7b0ede105382539a41f84'),
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Apply timestamps with the last modified time to static assets (js, css, images).
|
|
|
* Will append a querystring parameter containing the time the file was modified.
|
|
|
* This is useful for busting browser caches.
|
|
@@ -84,62 +91,48 @@ return [
|
|
|
// 'cacheTime' => '+1 year'
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Configure the cache adapters.
|
|
|
*/
|
|
|
'Cache' => [
|
|
|
'default' => [
|
|
|
- 'className' => 'Cake\Cache\Engine\FileEngine',
|
|
|
+ 'className' => FileEngine::class,
|
|
|
'path' => CACHE,
|
|
|
'url' => env('CACHE_DEFAULT_URL', null),
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Configure the cache used for general framework caching.
|
|
|
* Translation cache files are stored with this configuration.
|
|
|
* Duration will be set to '+2 minutes' in bootstrap.php when debug = true
|
|
|
* If you set 'className' => 'Null' core cache will be disabled.
|
|
|
*/
|
|
|
'_cake_core_' => [
|
|
|
- 'className' => 'Cake\Cache\Engine\FileEngine',
|
|
|
+ 'className' => FileEngine::class,
|
|
|
'prefix' => 'myapp_cake_core_',
|
|
|
- 'path' => CACHE . 'persistent/',
|
|
|
+ 'path' => CACHE . 'persistent' . DS,
|
|
|
'serialize' => true,
|
|
|
'duration' => '+1 years',
|
|
|
'url' => env('CACHE_CAKECORE_URL', null),
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Configure the cache for model and datasource caches. This cache
|
|
|
* configuration is used to store schema descriptions, and table listings
|
|
|
* in connections.
|
|
|
* Duration will be set to '+2 minutes' in bootstrap.php when debug = true
|
|
|
*/
|
|
|
'_cake_model_' => [
|
|
|
- 'className' => 'Cake\Cache\Engine\FileEngine',
|
|
|
+ 'className' => FileEngine::class,
|
|
|
'prefix' => 'myapp_cake_model_',
|
|
|
- 'path' => CACHE . 'models/',
|
|
|
+ 'path' => CACHE . 'models' . DS,
|
|
|
'serialize' => true,
|
|
|
'duration' => '+1 years',
|
|
|
'url' => env('CACHE_CAKEMODEL_URL', null),
|
|
|
],
|
|
|
-
|
|
|
- /**
|
|
|
- * Configure the cache for routes. The cached routes collection is built the
|
|
|
- * first time the routes are processed via `config/routes.php`.
|
|
|
- * Duration will be set to '+2 seconds' in bootstrap.php when debug = true
|
|
|
- */
|
|
|
- '_cake_routes_' => [
|
|
|
- 'className' => 'Cake\Cache\Engine\FileEngine',
|
|
|
- 'prefix' => 'myapp_cake_routes_',
|
|
|
- 'path' => CACHE,
|
|
|
- 'serialize' => true,
|
|
|
- 'duration' => '+1 years',
|
|
|
- 'url' => env('CACHE_CAKEROUTES_URL', null),
|
|
|
- ],
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Configure the Error and Exception handlers used by your application.
|
|
|
*
|
|
|
* By default errors are displayed using Debugger, when debug is true and logged
|
|
@@ -153,29 +146,54 @@ return [
|
|
|
* Options:
|
|
|
*
|
|
|
* - `errorLevel` - int - The level of errors you are interested in capturing.
|
|
|
- * - `trace` - boolean - Whether or not backtraces should be included in
|
|
|
+ * - `trace` - boolean - Whether backtraces should be included in
|
|
|
* logged errors/exceptions.
|
|
|
- * - `log` - boolean - Whether or not you want exceptions logged.
|
|
|
- * - `exceptionRenderer` - string - The class responsible for rendering
|
|
|
- * uncaught exceptions. If you choose a custom class you should place
|
|
|
- * the file for that class in src/Error. This class needs to implement a
|
|
|
- * render method.
|
|
|
+ * - `log` - boolean - Whether you want exceptions logged.
|
|
|
+ * - `exceptionRenderer` - string - The class responsible for rendering uncaught exceptions.
|
|
|
+ * The chosen class will be used for both CLI and web environments. If you want different
|
|
|
+ * classes used in CLI and web environments you'll need to write that conditional logic as well.
|
|
|
+ * The conventional location for custom renderers is in `src/Error`. Your exception renderer needs to
|
|
|
+ * implement the `render()` method and return either a string or Http\Response.
|
|
|
+ * `errorRenderer` - string - The class responsible for rendering PHP errors. The selected
|
|
|
+ * class will be used for both web and CLI contexts. If you want different classes for each environment
|
|
|
+ * you'll need to write that conditional logic as well. Error renderers need to
|
|
|
+ * to implement the `Cake\Error\ErrorRendererInterface`.
|
|
|
* - `skipLog` - array - List of exceptions to skip for logging. Exceptions that
|
|
|
* extend one of the listed exceptions will also be skipped for logging.
|
|
|
* E.g.:
|
|
|
* `'skipLog' => ['Cake\Http\Exception\NotFoundException', 'Cake\Http\Exception\UnauthorizedException']`
|
|
|
- * - `extraFatalErrorMemory` - int - The number of megabytes to increase
|
|
|
- * the memory limit by when a fatal error is encountered. This allows
|
|
|
+ * - `extraFatalErrorMemory` - int - The number of megabytes to increase the memory limit by
|
|
|
+ * when a fatal error is encountered. This allows
|
|
|
* breathing room to complete logging or error handling.
|
|
|
+ * - `ignoredDeprecationPaths` - array - A list of glob compatible file paths that deprecations
|
|
|
+ * should be ignored in. Use this to ignore deprecations for plugins or parts of
|
|
|
+ * your application that still emit deprecations.
|
|
|
*/
|
|
|
'Error' => [
|
|
|
'errorLevel' => E_ALL,
|
|
|
'skipLog' => [],
|
|
|
- 'log' => true,
|
|
|
+ 'log' => false,
|
|
|
'trace' => true,
|
|
|
+ 'ignoredDeprecationPaths' => [],
|
|
|
+ ],
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Debugger configuration
|
|
|
+ *
|
|
|
+ * Define development error values for Cake\Error\Debugger
|
|
|
+ *
|
|
|
+ * - `editor` Set the editor URL format you want to use.
|
|
|
+ * By default atom, emacs, macvim, phpstorm, sublime, textmate, and vscode are
|
|
|
+ * available. You can add additional editor link formats using
|
|
|
+ * `Debugger::addEditor()` during your application bootstrap.
|
|
|
+ * - `outputMask` A mapping of `key` to `replacement` values that
|
|
|
+ * `Debugger` should replace in dumped data and logs generated by `Debugger`.
|
|
|
+ */
|
|
|
+ 'Debugger' => [
|
|
|
+ 'editor' => 'phpstorm',
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Email configuration.
|
|
|
*
|
|
|
* By defining transports separately from delivery profiles you can easily
|
|
@@ -196,22 +214,26 @@ return [
|
|
|
*/
|
|
|
'EmailTransport' => [
|
|
|
'default' => [
|
|
|
- 'className' => 'Cake\Mailer\Transport\MailTransport',
|
|
|
+ 'className' => MailTransport::class,
|
|
|
/*
|
|
|
- * The following keys are used in SMTP transports:
|
|
|
+ * The keys host, port, timeout, username, password, client and tls
|
|
|
+ * are used in SMTP transports
|
|
|
*/
|
|
|
'host' => 'localhost',
|
|
|
'port' => 25,
|
|
|
'timeout' => 30,
|
|
|
- 'username' => null,
|
|
|
- 'password' => null,
|
|
|
+ /*
|
|
|
+ * It is recommended to set these options through your environment or app_local.php
|
|
|
+ */
|
|
|
+ //'username' => null,
|
|
|
+ //'password' => null,
|
|
|
'client' => null,
|
|
|
- 'tls' => null,
|
|
|
+ 'tls' => false,
|
|
|
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
|
|
|
],
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Email delivery profiles
|
|
|
*
|
|
|
* Delivery profiles allow you to predefine various properties about email
|
|
@@ -224,12 +246,15 @@ return [
|
|
|
'default' => [
|
|
|
'transport' => 'default',
|
|
|
'from' => 'you@localhost',
|
|
|
+ /*
|
|
|
+ * Will by default be set to config value of App.encoding, if that exists otherwise to UTF-8.
|
|
|
+ */
|
|
|
//'charset' => 'utf-8',
|
|
|
//'headerCharset' => 'utf-8',
|
|
|
],
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Connection information used by the ORM to connect
|
|
|
* to your application's datastores.
|
|
|
*
|
|
@@ -243,58 +268,22 @@ return [
|
|
|
* other RDBMS.
|
|
|
*/
|
|
|
'Datasources' => [
|
|
|
+ /*
|
|
|
+ * These configurations should contain permanent settings used
|
|
|
+ * by all environments.
|
|
|
+ *
|
|
|
+ * The values in app_local.php will override any values set here
|
|
|
+ * and should be used for local and per-environment configurations.
|
|
|
+ *
|
|
|
+ * Environment variable based configurations can be loaded here or
|
|
|
+ * in app_local.php depending on the applications needs.
|
|
|
+ */
|
|
|
'default' => [
|
|
|
- 'className' => 'Cake\Database\Connection',
|
|
|
- 'driver' => 'Cake\Database\Driver\Mysql',
|
|
|
+ 'className' => Connection::class,
|
|
|
+ 'driver' => Mysql::class,
|
|
|
'persistent' => true,
|
|
|
- 'host' => 'tfb-database',
|
|
|
- /*
|
|
|
- * CakePHP will use the default DB port based on the driver selected
|
|
|
- * MySQL on MAMP uses port 8889, MAMP users will want to uncomment
|
|
|
- * the following line and set the port accordingly
|
|
|
- */
|
|
|
- //'port' => '3306',
|
|
|
- 'username' => 'benchmarkdbuser',
|
|
|
- 'password' => 'benchmarkdbpass',
|
|
|
- 'database' => 'hello_world',
|
|
|
- /*
|
|
|
- * You do not need to set this flag to use full utf-8 encoding (internal default since CakePHP 3.6).
|
|
|
- */
|
|
|
- //'encoding' => 'utf8mb4',
|
|
|
'timezone' => 'UTC',
|
|
|
- 'flags' => [],
|
|
|
- 'cacheMetadata' => true,
|
|
|
- 'log' => false,
|
|
|
|
|
|
- /**
|
|
|
- * Set identifier quoting to true if you are using reserved words or
|
|
|
- * special characters in your table or column names. Enabling this
|
|
|
- * setting will result in queries built using the Query Builder having
|
|
|
- * identifiers quoted when creating SQL. It should be noted that this
|
|
|
- * decreases performance because each query needs to be traversed and
|
|
|
- * manipulated before being executed.
|
|
|
- */
|
|
|
- 'quoteIdentifiers' => false,
|
|
|
-
|
|
|
- /**
|
|
|
- * During development, if using MySQL < 5.6, uncommenting the
|
|
|
- * following line could boost the speed at which schema metadata is
|
|
|
- * fetched from the database. It can also be set directly with the
|
|
|
- * mysql configuration directive 'innodb_stats_on_metadata = 0'
|
|
|
- * which is the recommended value in production environments
|
|
|
- */
|
|
|
- //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
|
|
|
-
|
|
|
- 'url' => env('DATABASE_URL', null),
|
|
|
- ],
|
|
|
-
|
|
|
- /**
|
|
|
- * The test connection is used during the test suite.
|
|
|
- */
|
|
|
- 'test' => [
|
|
|
- 'className' => 'Cake\Database\Connection',
|
|
|
- 'driver' => 'Cake\Database\Driver\Mysql',
|
|
|
- 'persistent' => true,
|
|
|
'host' => 'tfb-database',
|
|
|
/*
|
|
|
* CakePHP will use the default DB port based on the driver selected
|
|
@@ -313,61 +302,65 @@ return [
|
|
|
'flags' => [],
|
|
|
'cacheMetadata' => true,
|
|
|
'log' => false,
|
|
|
-
|
|
|
- /**
|
|
|
- * Set identifier quoting to true if you are using reserved words or
|
|
|
- * special characters in your table or column names. Enabling this
|
|
|
- * setting will result in queries built using the Query Builder having
|
|
|
- * identifiers quoted when creating SQL. It should be noted that this
|
|
|
- * decreases performance because each query needs to be traversed and
|
|
|
- * manipulated before being executed.
|
|
|
+ /*
|
|
|
+ * If not using the default 'public' schema with the PostgreSQL driver
|
|
|
+ * set it here.
|
|
|
*/
|
|
|
- 'quoteIdentifiers' => false,
|
|
|
+ //'schema' => 'myapp',
|
|
|
|
|
|
- /**
|
|
|
- * During development, if using MySQL < 5.6, uncommenting the
|
|
|
- * following line could boost the speed at which schema metadata is
|
|
|
- * fetched from the database. It can also be set directly with the
|
|
|
- * mysql configuration directive 'innodb_stats_on_metadata = 0'
|
|
|
- * which is the recommended value in production environments
|
|
|
+ /*
|
|
|
+ * You can use a DSN string to set the entire configuration
|
|
|
*/
|
|
|
- //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
|
|
|
-
|
|
|
- 'url' => env('DATABASE_URL', null),
|
|
|
+ //'url' => env('DATABASE_URL', null),
|
|
|
],
|
|
|
+ /*
|
|
|
+ * The test connection is used during the test suite.
|
|
|
+ */
|
|
|
+ // 'test' => [
|
|
|
+ // 'className' => Connection::class,
|
|
|
+ // 'driver' => Mysql::class,
|
|
|
+ // 'persistent' => false,
|
|
|
+ // 'timezone' => 'UTC',
|
|
|
+ // //'encoding' => 'utf8mb4',
|
|
|
+ // 'flags' => [],
|
|
|
+ // 'cacheMetadata' => true,
|
|
|
+ // 'quoteIdentifiers' => false,
|
|
|
+ // 'log' => false,
|
|
|
+ // //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
|
|
|
+ // ],
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Configures logging options
|
|
|
*/
|
|
|
'Log' => [
|
|
|
'debug' => [
|
|
|
- 'className' => 'Cake\Log\Engine\NullEngine',
|
|
|
+ 'className' => FileLog::class,
|
|
|
'path' => LOGS,
|
|
|
'file' => 'debug',
|
|
|
'url' => env('LOG_DEBUG_URL', null),
|
|
|
- 'scopes' => false,
|
|
|
- 'levels' => ['emergency'],
|
|
|
+ 'scopes' => null,
|
|
|
+ 'levels' => ['notice', 'info', 'debug'],
|
|
|
],
|
|
|
'error' => [
|
|
|
- 'className' => 'Cake\Log\Engine\NullEngine',
|
|
|
+ 'className' => FileLog::class,
|
|
|
'path' => LOGS,
|
|
|
'file' => 'error',
|
|
|
'url' => env('LOG_ERROR_URL', null),
|
|
|
- 'scopes' => false,
|
|
|
- 'levels' => ['emergency'],
|
|
|
+ 'scopes' => null,
|
|
|
+ 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
|
|
|
],
|
|
|
// To enable this dedicated query log, you need set your datasource's log flag to true
|
|
|
'queries' => [
|
|
|
- 'className' => 'Cake\Log\Engine\NullEngine',
|
|
|
+ 'className' => FileLog::class,
|
|
|
'path' => LOGS,
|
|
|
'file' => 'queries',
|
|
|
'url' => env('LOG_QUERIES_URL', null),
|
|
|
- 'scopes' => ['queriesLog'],
|
|
|
+ 'scopes' => ['cake.database.queries'],
|
|
|
],
|
|
|
],
|
|
|
|
|
|
- /**
|
|
|
+ /*
|
|
|
* Session configuration.
|
|
|
*
|
|
|
* Contains an array of settings to use for session configuration. The
|
|
@@ -376,8 +369,8 @@ return [
|
|
|
*
|
|
|
* ## Options
|
|
|
*
|
|
|
- * - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'. Avoid using `.` in cookie names,
|
|
|
- * as PHP will drop sessions from cookies with `.` in the name.
|
|
|
+ * - `cookie` - The name of the cookie to use. Defaults to value set for `session.name` php.ini config.
|
|
|
+ * Avoid using `.` in cookie names, as PHP will drop sessions from cookies with `.` in the name.
|
|
|
* - `cookiePath` - The url path for which session cookie is set. Maps to the
|
|
|
* `session.cookie_path` php.ini config. Defaults to base path of app.
|
|
|
* - `timeout` - The time in minutes the session should be valid for.
|
|
@@ -391,7 +384,7 @@ return [
|
|
|
* array with at least the `engine` key, being the name of the Session engine
|
|
|
* class to use for managing the session. CakePHP bundles the `CacheSession`
|
|
|
* and `DatabaseSession` engines.
|
|
|
- * - `ini` - An associative array of additional ini values to set.
|
|
|
+ * - `ini` - An associative array of additional 'session.*` ini values to set.
|
|
|
*
|
|
|
* The built-in `defaults` options are:
|
|
|
*
|
|
@@ -400,7 +393,7 @@ return [
|
|
|
* - 'database' - Uses CakePHP's database sessions.
|
|
|
* - 'cache' - Use the Cache class to save sessions.
|
|
|
*
|
|
|
- * To define a custom session handler, save it at src/Network/Session/<name>.php.
|
|
|
+ * To define a custom session handler, save it at src/Http/Session/<name>.php.
|
|
|
* Make sure the class implements PHP's `SessionHandlerInterface` and set
|
|
|
* Session.handler to <name>
|
|
|
*
|