From 70cfd902bd2d23bb5321ae57556a94cb93102e42 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Tue, 15 Mar 2022 21:05:08 -0600 Subject: [PATCH] Revert "Run the default config through ArrayFile parser" This reverts commit c3bdfae664c1cdde2ea1403027fc38b0822a0cf5. --- config/app.php | 74 ++++++++++--------- config/auth.php | 56 +++++++-------- config/broadcasting.php | 37 ++++++---- config/cache.php | 64 ++++++++++------- config/cms.php | 152 ++++++++++++++++++++-------------------- config/cookie.php | 9 ++- config/database.php | 119 +++++++++++++++++-------------- config/develop.php | 9 +-- config/environment.php | 11 +-- config/filesystems.php | 30 ++++---- config/hashing.php | 17 ++--- config/logging.php | 72 ++++++++++--------- config/mail.php | 40 ++++++----- config/queue.php | 65 +++++++++-------- config/services.php | 13 ++-- config/session.php | 68 +++++++++--------- config/view.php | 20 ++++-- 17 files changed, 470 insertions(+), 386 deletions(-) diff --git a/config/app.php b/config/app.php index 813e09110..4ba2ad7f9 100644 --- a/config/app.php +++ b/config/app.php @@ -1,7 +1,7 @@ env('APP_DEBUG', true), - + /* |-------------------------------------------------------------------------- | Application Name @@ -28,9 +28,9 @@ return [ | any other location as required by the application or its packages. | */ - + 'name' => env('APP_NAME', 'Winter CMS'), - + /* |-------------------------------------------------------------------------- | Application URL @@ -41,9 +41,9 @@ return [ | your application so that it is used when running Artisan tasks. | */ - + 'url' => env('APP_URL', 'http://localhost'), - + /* |-------------------------------------------------------------------------- | Asset URL @@ -57,9 +57,9 @@ return [ | 'asset_url' => 'https://cdn.example.com/', | */ - + 'asset_url' => env('ASSET_URL', null), - + /* |-------------------------------------------------------------------------- | Trusted hosts @@ -87,9 +87,9 @@ return [ | NOTE: Even when set to `false`, this functionality is explicitly enabled | on the Backend password reset flow for security reasons. */ - + 'trustedHosts' => false, - + /* |-------------------------------------------------------------------------- | Trusted proxies @@ -115,9 +115,9 @@ return [ | 'trustedProxies' => '192.168.1.1, 192.168.1.2' | 'trustedProxies' => ['192.168.1.1', '192.168.1.2'] */ - + 'trustedProxies' => null, - + /* |-------------------------------------------------------------------------- | Trusted proxy headers @@ -150,9 +150,9 @@ return [ | | - Amazon ELB users should always use the "HEADER_X_FORWARDED_AWS_ELB" option. */ - + 'trustedProxyHeaders' => 'HEADER_X_FORWARDED_ALL', - + /* |-------------------------------------------------------------------------- | Application Timezone @@ -171,9 +171,9 @@ return [ | to display dates & times. | */ - + 'timezone' => 'UTC', - + /* |-------------------------------------------------------------------------- | Application Locale Configuration @@ -190,9 +190,9 @@ return [ | Backend\Models\Preference->getLocaleOptions() | */ - + 'locale' => 'en', - + /* |-------------------------------------------------------------------------- | Application Fallback Locale @@ -203,9 +203,9 @@ return [ | the language folders that are provided through your application. | */ - + 'fallback_locale' => 'en', - + /* |-------------------------------------------------------------------------- | Faker Locale @@ -216,9 +216,9 @@ return [ | localized telephone numbers, street address information and more. | */ - + 'faker_locale' => 'en_US', - + /* |-------------------------------------------------------------------------- | Encryption Key @@ -229,10 +229,11 @@ return [ | will not be safe. Please do this before deploying an application! | */ - + 'key' => env('APP_KEY'), + 'cipher' => 'AES-256-CBC', - + /* |-------------------------------------------------------------------------- | Autoloaded Service Providers @@ -243,12 +244,14 @@ return [ | this array to grant expanded functionality to your applications. | */ - - 'providers' => array_merge(include base_path('modules/system/providers.php'), [ + + 'providers' => array_merge(include(base_path('modules/system/providers.php')), [ + // 'Illuminate\Html\HtmlServiceProvider', // Example - 'System\\ServiceProvider', + + 'System\ServiceProvider', ]), - + /* |-------------------------------------------------------------------------- | Load automatically discovered packages @@ -266,9 +269,9 @@ return [ | even if discovery is disabled. | */ - + 'loadDiscoveredPackages' => false, - + /* |-------------------------------------------------------------------------- | Class Aliases @@ -279,6 +282,11 @@ return [ | the aliases are "lazy" loaded so they don't hinder performance. | */ - - 'aliases' => array_merge(include base_path('modules/system/aliases.php'), []), + + 'aliases' => array_merge(include(base_path('modules/system/aliases.php')), [ + + // 'Str' => 'Illuminate\Support\Str', // Example + + ]), + ]; diff --git a/config/auth.php b/config/auth.php index 2acc88e6b..8dc13b61c 100644 --- a/config/auth.php +++ b/config/auth.php @@ -1,41 +1,39 @@ [ - /* - |-------------------------------------------------------------------------- - | Enable throttling of Backend authentication attempts - |-------------------------------------------------------------------------- - | - | If set to true, users will be given a limited number of attempts to sign - | in to the Backend before being blocked for a specified number of minutes. - | - */ - + |-------------------------------------------------------------------------- + | Enable throttling of Backend authentication attempts + |-------------------------------------------------------------------------- + | + | If set to true, users will be given a limited number of attempts to sign + | in to the Backend before being blocked for a specified number of minutes. + | + */ 'enabled' => true, - + /* - |-------------------------------------------------------------------------- - | Failed Authentication Attempt Limit - |-------------------------------------------------------------------------- - | - | Number of failed attempts allowed while trying to authenticate a user. - | - */ - + |-------------------------------------------------------------------------- + | Failed Authentication Attempt Limit + |-------------------------------------------------------------------------- + | + | Number of failed attempts allowed while trying to authenticate a user. + | + */ 'attemptLimit' => 5, - + /* - |-------------------------------------------------------------------------- - | Suspension Time - |-------------------------------------------------------------------------- - | - | The number of minutes to suspend further attempts on authentication once - | the attempt limit is reached. - | - */ - + |-------------------------------------------------------------------------- + | Suspension Time + |-------------------------------------------------------------------------- + | + | The number of minutes to suspend further attempts on authentication once + | the attempt limit is reached. + | + */ 'suspensionTime' => 15, ], + ]; diff --git a/config/broadcasting.php b/config/broadcasting.php index 4210685ba..542f5f1de 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -1,7 +1,7 @@ env('BROADCAST_DRIVER', 'null'), - + /* |-------------------------------------------------------------------------- | Broadcast Connections @@ -27,32 +27,41 @@ return [ | each available type of connection are provided inside this array. | */ - + 'connections' => [ + 'pusher' => [ - 'app_id' => env('PUSHER_APP_ID'), - 'client_options' => [], - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'useTLS' => true, + 'app_id' => env('PUSHER_APP_ID'), + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html ], - 'secret' => env('PUSHER_APP_SECRET'), + 'driver' => 'pusher', + 'key' => env('PUSHER_APP_KEY'), + 'options' => [ + 'cluster' => env('PUSHER_APP_CLUSTER'), + 'useTLS' => true, + ], + 'secret' => env('PUSHER_APP_SECRET'), ], + 'ably' => [ 'driver' => 'ably', - 'key' => env('ABLY_KEY'), + 'key' => env('ABLY_KEY'), ], + 'redis' => [ 'connection' => 'default', - 'driver' => 'redis', + 'driver' => 'redis', ], + 'log' => [ 'driver' => 'log', ], + 'null' => [ 'driver' => 'null', ], + ], + ]; diff --git a/config/cache.php b/config/cache.php index 22597b4cd..e2bba3160 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,7 +1,7 @@ env('CACHE_DRIVER', 'file'), - + /* |-------------------------------------------------------------------------- | Cache Stores @@ -33,34 +33,41 @@ return [ | "memcached", "redis", "dynamodb", "octane", "null" | */ - + 'stores' => [ + 'apc' => [ 'driver' => 'apc', ], + 'array' => [ - 'driver' => 'array', + 'driver' => 'array', 'serialize' => false, ], + 'database' => [ - 'connection' => null, - 'driver' => 'database', + 'connection' => null, + 'driver' => 'database', 'lock_connection' => null, - 'table' => 'cache', + 'table' => 'cache', ], + 'file' => [ 'driver' => 'file', - 'path' => storage_path('framework/cache'), + 'path' => storage_path('framework/cache'), ], + 'memcached' => [ - 'driver' => 'memcached', - 'options' => [], + 'driver' => 'memcached', + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 'sasl' => [ env('MEMCACHED_USERNAME'), env('MEMCACHED_PASSWORD'), ], - 'servers' => [ + 'servers' => [ [ 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 'port' => env('MEMCACHED_PORT', 11211), @@ -68,24 +75,28 @@ return [ ], ], ], + 'redis' => [ - 'connection' => 'cache', - 'driver' => 'redis', + 'connection' => 'cache', + 'driver' => 'redis', 'lock_connection' => 'default', ], + 'dynamodb' => [ - 'driver' => 'dynamodb', + 'driver' => 'dynamodb', 'endpoint' => env('DYNAMODB_ENDPOINT'), - 'key' => env('AWS_ACCESS_KEY_ID'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'key' => env('AWS_ACCESS_KEY_ID'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), ], + 'octane' => [ 'driver' => 'octane', ], + ], - + /* |-------------------------------------------------------------------------- | Cache Key Prefix @@ -96,9 +107,9 @@ return [ | value to get prefixed to all our keys so we can avoid collisions. | */ - - 'prefix' => env('CACHE_PREFIX', str_slug(env('APP_NAME', 'winter'), '_') . '_cache'), - + + 'prefix' => env('CACHE_PREFIX', str_slug(env('APP_NAME', 'winter'), '_').'_cache'), + /* |-------------------------------------------------------------------------- | Cache Key for the CMS' PHP code parser cache @@ -110,9 +121,9 @@ return [ | prevent conflicts. | */ - + 'codeParserDataCacheKey' => 'cms-php-file-data', - + /* |-------------------------------------------------------------------------- | Disable Request Cache @@ -132,6 +143,7 @@ return [ | null - enable for HTTP requests, disable when running in CLI | */ - + 'disableRequestCache' => null, + ]; diff --git a/config/cms.php b/config/cms.php index 483d13fdf..4da7fd4a7 100644 --- a/config/cms.php +++ b/config/cms.php @@ -1,7 +1,7 @@ 'demo', - + /* |-------------------------------------------------------------------------- | Bleeding edge updates @@ -23,9 +23,9 @@ return [ | and use the development copies of core files and plugins. | */ - + 'edgeUpdates' => false, - + /* |-------------------------------------------------------------------------- | Back-end URI prefix @@ -35,9 +35,9 @@ return [ | For example: backend -> http://localhost/backend | */ - + 'backendUri' => 'backend', - + /* |-------------------------------------------------------------------------- | Back-end force HTTPS security @@ -48,9 +48,9 @@ return [ | web server config, but can be handled by the app for added security. | */ - + 'backendForceSecure' => false, - + /* |-------------------------------------------------------------------------- | Back-end login remember @@ -66,9 +66,9 @@ return [ | wanted behavior | */ - + 'backendForceRemember' => true, - + /* |-------------------------------------------------------------------------- | Back-end timezone @@ -79,9 +79,9 @@ return [ | dates displayed in the back-end will be converted to this timezone. | */ - + 'backendTimezone' => 'UTC', - + /* |-------------------------------------------------------------------------- | Back-end Skin @@ -90,9 +90,9 @@ return [ | Specifies the back-end skin to use. | */ - - 'backendSkin' => 'Backend\\Skins\\Standard', - + + 'backendSkin' => 'Backend\Skins\Standard', + /* |-------------------------------------------------------------------------- | Automatically run migrations on login @@ -105,9 +105,9 @@ return [ | and disabled when debug mode is disabled. | */ - + 'runMigrationsOnLogin' => null, - + /* |-------------------------------------------------------------------------- | Determines which modules to load @@ -116,13 +116,9 @@ return [ | Specify which modules should be registered when using the application. | */ - - 'loadModules' => [ - 'System', - 'Backend', - 'Cms', - ], - + + 'loadModules' => ['System', 'Backend', 'Cms'], + /* |-------------------------------------------------------------------------- | Prevents application updates @@ -134,9 +130,9 @@ return [ | and themes will still be downloaded. | */ - + 'disableCoreUpdates' => false, - + /* |-------------------------------------------------------------------------- | Specific plugins to disable @@ -145,9 +141,9 @@ return [ | Specify plugin codes which will always be disabled in the application. | */ - + 'disablePlugins' => [], - + /* |-------------------------------------------------------------------------- | Determines if the routing caching is enabled. @@ -159,9 +155,9 @@ return [ | to disable the caching during the development, and enable it in the production mode. | */ - + 'enableRoutesCache' => false, - + /* |-------------------------------------------------------------------------- | Time to live for the URL map. @@ -172,9 +168,9 @@ return [ | interval, in minutes, specified with the urlMapCacheTTL parameter expires. | */ - + 'urlCacheTtl' => 10, - + /* |-------------------------------------------------------------------------- | Time to live for parsed CMS objects. @@ -185,9 +181,9 @@ return [ | the corresponding template file is modified. | */ - + 'parsedPageCacheTTL' => 10, - + /* |-------------------------------------------------------------------------- | Determines if the asset caching is enabled. @@ -199,9 +195,9 @@ return [ | to disable the caching during the development, and enable it in the production mode. | */ - + 'enableAssetCache' => false, - + /* |-------------------------------------------------------------------------- | Determines if the asset minification is enabled. @@ -213,9 +209,9 @@ return [ | when debug mode (app.debug) is disabled. | */ - + 'enableAssetMinify' => null, - + /* |-------------------------------------------------------------------------- | Check import timestamps when combining assets @@ -227,9 +223,9 @@ return [ | is used when debug mode (app.debug) is enabled. | */ - + 'enableAssetDeepHashing' => null, - + /* |-------------------------------------------------------------------------- | Database-driven Themes @@ -253,9 +249,9 @@ return [ | from the database. | */ - + 'databaseTemplates' => false, - + /* |-------------------------------------------------------------------------- | Public plugins path @@ -265,9 +261,9 @@ return [ | or you can specify a full URL path. | */ - + 'pluginsPath' => '/plugins', - + /* |-------------------------------------------------------------------------- | Public themes path @@ -277,9 +273,9 @@ return [ | or you can specify a full URL path. | */ - + 'themesPath' => '/themes', - + /* |-------------------------------------------------------------------------- | Resource storage @@ -314,26 +310,30 @@ return [ | path for the uploads disk and `/projects/winter/storage/app/media` as | the path for the media disk. */ - + 'storage' => [ + 'uploads' => [ - 'disk' => 'local', - 'folder' => 'uploads', - 'path' => '/storage/app/uploads', + 'disk' => 'local', + 'folder' => 'uploads', + 'path' => '/storage/app/uploads', 'temporaryUrlTTL' => 3600, ], + 'media' => [ - 'disk' => 'local', + 'disk' => 'local', 'folder' => 'media', - 'path' => '/storage/app/media', + 'path' => '/storage/app/media', ], + 'resized' => [ - 'disk' => 'local', + 'disk' => 'local', 'folder' => 'resized', - 'path' => '/storage/app/resized', + 'path' => '/storage/app/resized', ], + ], - + /* |-------------------------------------------------------------------------- | Convert Line Endings @@ -343,9 +343,9 @@ return [ | \r\n to the unix style \n. | */ - + 'convertLineEndings' => false, - + /* |-------------------------------------------------------------------------- | Linking policy @@ -359,9 +359,9 @@ return [ | force - force hostname and schema using app.url config value | */ - + 'linkPolicy' => 'detect', - + /* |-------------------------------------------------------------------------- | Default permission mask @@ -370,12 +370,9 @@ return [ | Specifies a default file and folder permission for newly created objects. | */ - - 'defaultMask' => [ - 'file' => null, - 'folder' => null, - ], - + + 'defaultMask' => ['file' => null, 'folder' => null], + /* |-------------------------------------------------------------------------- | Safe mode @@ -386,9 +383,9 @@ return [ | debug mode (app.debug) is disabled. | */ - + 'enableSafeMode' => null, - + /* |-------------------------------------------------------------------------- | Cross Site Request Forgery (CSRF) Protection @@ -398,9 +395,9 @@ return [ | checked for a valid security token. | */ - + 'enableCsrfProtection' => true, - + /* |-------------------------------------------------------------------------- | Force bytecode invalidation @@ -411,9 +408,9 @@ return [ | cache won't update the cache, set to true to get around this. | */ - + 'forceBytecodeInvalidation' => true, - + /* |-------------------------------------------------------------------------- | Twig Strict Variables @@ -426,9 +423,9 @@ return [ | enabled. | */ - + 'enableTwigStrictVariables' => false, - + /* |-------------------------------------------------------------------------- | Base Directory Restriction @@ -445,9 +442,9 @@ return [ | NEVER have this disabled in production. | */ - + 'restrictBaseDir' => true, - + /* |-------------------------------------------------------------------------- | Backend Service Worker @@ -467,6 +464,7 @@ return [ | false - disallow service workers to run in the backend | */ - + 'enableBackendServiceWorkers' => false, + ]; diff --git a/config/cookie.php b/config/cookie.php index a6c8528d7..f286fe5a6 100644 --- a/config/cookie.php +++ b/config/cookie.php @@ -1,7 +1,7 @@ [], + + 'unencryptedCookies' => [ + // 'my_cookie', + ], + ]; diff --git a/config/database.php b/config/database.php index 5d4bd6c39..2d612ab1c 100644 --- a/config/database.php +++ b/config/database.php @@ -1,7 +1,7 @@ env('DB_CONNECTION', 'mysql'), - + /* |-------------------------------------------------------------------------- | Database Connections @@ -29,63 +29,68 @@ return [ | choice installed on your machine before you begin development. | */ - + 'connections' => [ + 'sqlite' => [ - 'database' => env('DB_DATABASE', storage_path('database.sqlite')), - 'driver' => 'sqlite', + 'database' => env('DB_DATABASE', storage_path('database.sqlite')), + 'driver' => 'sqlite', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), - 'prefix' => '', - 'url' => env('DATABASE_URL'), + 'prefix' => '', + 'url' => env('DATABASE_URL'), ], + 'mysql' => [ - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'database' => env('DB_DATABASE', 'winter'), - 'driver' => 'mysql', - 'engine' => 'InnoDB', - 'host' => env('DB_HOST', '127.0.0.1'), - 'options' => extension_loaded('pdo_mysql') ? array_filter([ + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'database' => env('DB_DATABASE', 'winter'), + 'driver' => 'mysql', + 'engine' => 'InnoDB', + 'host' => env('DB_HOST', '127.0.0.1'), + 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], - 'password' => env('DB_PASSWORD', ''), - 'port' => env('DB_PORT', '3306'), - 'prefix' => '', + 'password' => env('DB_PASSWORD', ''), + 'port' => env('DB_PORT', '3306'), + 'prefix' => '', 'prefix_indexes' => true, - 'strict' => true, - 'unix_socket' => env('DB_SOCKET', ''), - 'url' => env('DATABASE_URL'), - 'username' => env('DB_USERNAME', 'winter'), - 'varcharmax' => 191, + 'strict' => true, + 'unix_socket' => env('DB_SOCKET', ''), + 'url' => env('DATABASE_URL'), + 'username' => env('DB_USERNAME', 'winter'), + 'varcharmax' => 191, ], + 'pgsql' => [ - 'charset' => 'utf8', - 'database' => env('DB_DATABASE', 'winter'), - 'driver' => 'pgsql', - 'host' => env('DB_HOST', '127.0.0.1'), - 'password' => env('DB_PASSWORD', ''), - 'port' => env('DB_PORT', '5432'), - 'prefix' => '', + 'charset' => 'utf8', + 'database' => env('DB_DATABASE', 'winter'), + 'driver' => 'pgsql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'password' => env('DB_PASSWORD', ''), + 'port' => env('DB_PORT', '5432'), + 'prefix' => '', 'prefix_indexes' => true, - 'search_path' => 'public', - 'sslmode' => 'prefer', - 'url' => env('DATABASE_URL'), - 'username' => env('DB_USERNAME', 'winter'), + 'search_path' => 'public', + 'sslmode' => 'prefer', + 'url' => env('DATABASE_URL'), + 'username' => env('DB_USERNAME', 'winter'), ], + 'sqlsrv' => [ - 'charset' => 'utf8', - 'database' => env('DB_DATABASE', 'winter'), - 'driver' => 'sqlsrv', - 'host' => env('DB_HOST', '127.0.0.1'), - 'password' => env('DB_PASSWORD', ''), - 'port' => env('DB_PORT', '1433'), - 'prefix' => '', + 'charset' => 'utf8', + 'database' => env('DB_DATABASE', 'winter'), + 'driver' => 'sqlsrv', + 'host' => env('DB_HOST', '127.0.0.1'), + 'password' => env('DB_PASSWORD', ''), + 'port' => env('DB_PORT', '1433'), + 'prefix' => '', 'prefix_indexes' => true, - 'url' => env('DATABASE_URL'), - 'username' => env('DB_USERNAME', 'winter'), + 'url' => env('DATABASE_URL'), + 'username' => env('DB_USERNAME', 'winter'), ], + ], - + /* |-------------------------------------------------------------------------- | Migration Repository Table @@ -96,9 +101,9 @@ return [ | the migrations on disk haven't actually been run in the database. | */ - + 'migrations' => 'migrations', - + /* |-------------------------------------------------------------------------- | Redis Databases @@ -109,26 +114,32 @@ return [ | such as APC or Memcached. Winter makes it easy to dig right in. | */ - + 'redis' => [ + 'client' => env('REDIS_CLIENT', 'phpredis'), + 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', str_slug(env('APP_NAME', 'winter'), '_') . '_database_'), + 'prefix' => env('REDIS_PREFIX', str_slug(env('APP_NAME', 'winter'), '_').'_database_'), ], + 'default' => [ 'database' => env('REDIS_DB', '0'), - 'host' => env('REDIS_HOST', '127.0.0.1'), + 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'url' => env('REDIS_URL'), + 'port' => env('REDIS_PORT', '6379'), + 'url' => env('REDIS_URL'), ], + 'cache' => [ 'database' => env('REDIS_CACHE_DB', '1'), - 'host' => env('REDIS_HOST', '127.0.0.1'), + 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'url' => env('REDIS_URL'), + 'port' => env('REDIS_PORT', '6379'), + 'url' => env('REDIS_URL'), ], + ], + ]; diff --git a/config/develop.php b/config/develop.php index 47c89175c..381b56409 100644 --- a/config/develop.php +++ b/config/develop.php @@ -1,7 +1,7 @@ false, - + /* |-------------------------------------------------------------------------- | Allow deep-level symlinks @@ -40,6 +40,7 @@ return [ | false - only allow symlinks at the first level of subdirectories (default) | */ - + 'allowDeepSymlinks' => false, + ]; diff --git a/config/environment.php b/config/environment.php index fb17f634d..5249b15ba 100644 --- a/config/environment.php +++ b/config/environment.php @@ -1,7 +1,7 @@ 'development', - + /* |-------------------------------------------------------------------------- | Environment Multitenancy @@ -25,8 +25,11 @@ return [ | different configuration, such as database and theme, per hostname. | */ - + 'hosts' => [ + 'localhost' => 'dev', + ], + ]; diff --git a/config/filesystems.php b/config/filesystems.php index 0fc110370..a85fcc8a9 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -1,7 +1,7 @@ env('FILESYSTEM_DISK', 'local'), - + /* |-------------------------------------------------------------------------- | Filesystem Disks @@ -27,22 +27,26 @@ return [ | Supported Drivers: "local", "ftp", "sftp", "s3" | */ - + 'disks' => [ + 'local' => [ 'driver' => 'local', - 'root' => storage_path('app'), - 'url' => '/storage/app', + 'root' => storage_path('app'), + 'url' => '/storage/app', ], + 's3' => [ - 'bucket' => env('AWS_BUCKET'), - 'driver' => 's3', - 'endpoint' => env('AWS_ENDPOINT'), - 'key' => env('AWS_ACCESS_KEY_ID'), - 'region' => env('AWS_DEFAULT_REGION'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'url' => env('AWS_URL'), + 'bucket' => env('AWS_BUCKET'), + 'driver' => 's3', + 'endpoint' => env('AWS_ENDPOINT'), + 'key' => env('AWS_ACCESS_KEY_ID'), + 'region' => env('AWS_DEFAULT_REGION'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'url' => env('AWS_URL'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), ], + ], + ]; diff --git a/config/hashing.php b/config/hashing.php index f8c867896..616059443 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -1,7 +1,7 @@ 'bcrypt', - + /* |-------------------------------------------------------------------------- | Bcrypt Options @@ -27,11 +27,11 @@ return [ | to control the amount of time it takes to hash the given password. | */ - + 'bcrypt' => [ 'rounds' => env('BCRYPT_ROUNDS', 10), ], - + /* |-------------------------------------------------------------------------- | Argon Options @@ -42,10 +42,11 @@ return [ | to control the amount of time it takes to hash the given password. | */ - + 'argon' => [ - 'memory' => 65536, + 'memory' => 65536, 'threads' => 1, - 'time' => 4, + 'time' => 4, ], + ]; diff --git a/config/logging.php b/config/logging.php index e60a3fa51..e7ea8f3bb 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,7 +1,7 @@ env('LOG_CHANNEL', 'stack'), - + /* |-------------------------------------------------------------------------- | Deprecations Log Channel @@ -25,9 +25,9 @@ return [ | your application ready for upcoming major versions of dependencies. | */ - + 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), - + /* |-------------------------------------------------------------------------- | Log Channels @@ -42,66 +42,74 @@ return [ | "custom", "stack" | */ - + 'channels' => [ 'stack' => [ - 'channels' => [ - 'single', - ], - 'driver' => 'stack', + 'channels' => ['single'], + 'driver' => 'stack', 'ignore_exceptions' => false, ], + 'single' => [ 'driver' => 'single', - 'level' => env('LOG_LEVEL', 'debug'), - 'path' => storage_path('logs/system.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'path' => storage_path('logs/system.log'), ], + 'daily' => [ - 'days' => 14, + 'days' => 14, 'driver' => 'daily', - 'level' => env('LOG_LEVEL', 'debug'), - 'path' => storage_path('logs/system.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'path' => storage_path('logs/system.log'), ], + 'slack' => [ - 'driver' => 'slack', - 'emoji' => ':boom:', - 'level' => env('LOG_LEVEL', 'critical'), - 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'driver' => 'slack', + 'emoji' => ':boom:', + 'level' => env('LOG_LEVEL', 'critical'), + 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Winter Log', ], + 'papertrail' => [ - 'driver' => 'monolog', - 'handler' => env('LOG_PAPERTRAIL_HANDLER', \Monolog\Handler\SyslogUdpHandler::class), + 'driver' => 'monolog', + 'handler' => env('LOG_PAPERTRAIL_HANDLER', \Monolog\Handler\SyslogUdpHandler::class), 'handler_with' => [ - 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), ], - 'level' => env('LOG_LEVEL', 'debug'), + 'level' => env('LOG_LEVEL', 'debug'), ], + 'stderr' => [ - 'driver' => 'monolog', + 'driver' => 'monolog', 'formatter' => env('LOG_STDERR_FORMATTER'), - 'handler' => \Monolog\Handler\StreamHandler::class, - 'level' => env('LOG_LEVEL', 'debug'), - 'with' => [ + 'handler' => \Monolog\Handler\StreamHandler::class, + 'level' => env('LOG_LEVEL', 'debug'), + 'with' => [ 'stream' => 'php://stderr', ], ], + 'syslog' => [ 'driver' => 'syslog', - 'level' => env('LOG_LEVEL', 'debug'), + 'level' => env('LOG_LEVEL', 'debug'), ], + 'errorlog' => [ 'driver' => 'errorlog', - 'level' => env('LOG_LEVEL', 'debug'), + 'level' => env('LOG_LEVEL', 'debug'), ], + 'null' => [ - 'driver' => 'monolog', + 'driver' => 'monolog', 'handler' => \Monolog\Handler\NullHandler::class, ], + 'emergency' => [ 'path' => storage_path('logs/system.log'), ], ], + ]; diff --git a/config/mail.php b/config/mail.php index d1c10db33..25a896d14 100644 --- a/config/mail.php +++ b/config/mail.php @@ -1,7 +1,7 @@ env('MAIL_MAILER', 'smtp'), - + /* |-------------------------------------------------------------------------- | Mailer Configurations @@ -32,46 +32,53 @@ return [ | "postmark", "log", "array", "failover" | */ - + 'mailers' => [ 'smtp' => [ 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - 'password' => env('MAIL_PASSWORD'), - 'port' => env('MAIL_PORT', 587), - 'timeout' => null, - 'transport' => 'smtp', - 'username' => env('MAIL_USERNAME'), + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'password' => env('MAIL_PASSWORD'), + 'port' => env('MAIL_PORT', 587), + 'timeout' => null, + 'transport' => 'smtp', + 'username' => env('MAIL_USERNAME'), ], + 'ses' => [ 'transport' => 'ses', ], + 'mailgun' => [ 'transport' => 'mailgun', ], + 'postmark' => [ 'transport' => 'postmark', ], + 'sendmail' => [ - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'), + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'), 'transport' => 'sendmail', ], + 'log' => [ - 'channel' => env('MAIL_LOG_CHANNEL'), + 'channel' => env('MAIL_LOG_CHANNEL'), 'transport' => 'log', ], + 'array' => [ 'transport' => 'array', ], + 'failover' => [ - 'mailers' => [ + 'mailers' => [ 'smtp', 'log', ], 'transport' => 'failover', ], ], - + /* |-------------------------------------------------------------------------- | Global "From" Address @@ -82,9 +89,10 @@ return [ | used globally for all e-mails that are sent by your application. | */ - + 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', 'noreply@example.com'), - 'name' => env('MAIL_FROM_NAME', env('APP_NAME', 'Winter CMS')), + 'name' => env('MAIL_FROM_NAME', env('APP_NAME', 'Winter CMS')), ], + ]; diff --git a/config/queue.php b/config/queue.php index 569d9ee42..ba40614d7 100644 --- a/config/queue.php +++ b/config/queue.php @@ -1,7 +1,7 @@ env('QUEUE_CONNECTION', 'sync'), - + /* |-------------------------------------------------------------------------- | Queue Connections @@ -27,46 +27,52 @@ return [ | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" | */ - + 'connections' => [ + 'sync' => [ 'driver' => 'sync', ], + 'database' => [ 'after_commit' => false, - 'driver' => 'database', - 'queue' => 'default', - 'retry_after' => 90, - 'table' => 'jobs', + 'driver' => 'database', + 'queue' => 'default', + 'retry_after' => 90, + 'table' => 'jobs', ], + 'beanstalkd' => [ 'after_commit' => false, - 'block_for' => 0, - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 90, + 'block_for' => 0, + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 90, ], + 'sqs' => [ 'after_commit' => false, - 'driver' => 'sqs', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'default'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'suffix' => env('SQS_SUFFIX'), + 'driver' => 'sqs', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'default'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'suffix' => env('SQS_SUFFIX'), ], + 'redis' => [ 'after_commit' => false, - 'block_for' => null, - 'connection' => 'default', - 'driver' => 'redis', - 'queue' => env('REDIS_QUEUE', 'default'), - 'retry_after' => 90, + 'block_for' => null, + 'connection' => 'default', + 'driver' => 'redis', + 'queue' => env('REDIS_QUEUE', 'default'), + 'retry_after' => 90, ], + ], - + /* |-------------------------------------------------------------------------- | Failed Queue Jobs @@ -77,10 +83,11 @@ return [ | have failed. You may change them to any database / table you wish. | */ - + 'failed' => [ 'database' => env('DB_CONNECTION', 'mysql'), - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), - 'table' => 'failed_jobs', + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'table' => 'failed_jobs', ], + ]; diff --git a/config/services.php b/config/services.php index d2cf8694b..32760c1d4 100644 --- a/config/services.php +++ b/config/services.php @@ -1,7 +1,7 @@ [ - 'domain' => env('MAILGUN_DOMAIN'), + 'domain' => env('MAILGUN_DOMAIN'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), - 'secret' => env('MAILGUN_SECRET'), + 'secret' => env('MAILGUN_SECRET'), ], + 'postmark' => [ 'token' => env('POSTMARK_TOKEN'), ], + 'ses' => [ - 'key' => env('AWS_ACCESS_KEY_ID'), + 'key' => env('AWS_ACCESS_KEY_ID'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), ], + ]; diff --git a/config/session.php b/config/session.php index 73b725aaf..78aac1472 100644 --- a/config/session.php +++ b/config/session.php @@ -1,7 +1,7 @@ env('SESSION_DRIVER', 'file'), - + /* |-------------------------------------------------------------------------- | Session Lifetime @@ -28,10 +28,11 @@ return [ | to immediately expire on the browser closing, set that option. | */ - + 'lifetime' => env('SESSION_LIFETIME', 120), + 'expire_on_close' => false, - + /* |-------------------------------------------------------------------------- | Session Encryption @@ -42,9 +43,9 @@ return [ | automatically by Laravel and you can use the Session like normal. | */ - + 'encrypt' => false, - + /* |-------------------------------------------------------------------------- | Session File Location @@ -55,9 +56,9 @@ return [ | location may be specified. This is only needed for file sessions. | */ - + 'files' => storage_path('framework/sessions'), - + /* |-------------------------------------------------------------------------- | Session Database Connection @@ -68,9 +69,9 @@ return [ | correspond to a connection in your database configuration options. | */ - + 'connection' => env('SESSION_CONNECTION'), - + /* |-------------------------------------------------------------------------- | Session Database Table @@ -81,9 +82,9 @@ return [ | provided for you; however, you are free to change this as needed. | */ - + 'table' => 'sessions', - + /* |-------------------------------------------------------------------------- | Session Cache Store @@ -96,9 +97,9 @@ return [ | Affects: "apc", "dynamodb", "memcached", "redis" | */ - + 'store' => env('SESSION_STORE'), - + /* |-------------------------------------------------------------------------- | Session Sweeping Lottery @@ -109,12 +110,9 @@ return [ | happen on a given request. By default, the odds are 2 out of 100. | */ - - 'lottery' => [ - 2, - 100, - ], - + + 'lottery' => [2, 100], + /* |-------------------------------------------------------------------------- | Session Cookie Name @@ -125,9 +123,12 @@ return [ | new session cookie is created by the framework for every driver. | */ - - 'cookie' => env('SESSION_COOKIE', str_slug(env('APP_NAME', 'winter'), '_') . '_session'), - + + 'cookie' => env( + 'SESSION_COOKIE', + str_slug(env('APP_NAME', 'winter'), '_').'_session' + ), + /* |-------------------------------------------------------------------------- | Session Cookie Path @@ -138,9 +139,9 @@ return [ | your application but you are free to change this when necessary. | */ - + 'path' => '/', - + /* |-------------------------------------------------------------------------- | Session Cookie Domain @@ -151,9 +152,9 @@ return [ | available to in your application. A sensible default has been set. | */ - + 'domain' => env('SESSION_DOMAIN'), - + /* |-------------------------------------------------------------------------- | HTTP Access Only @@ -164,9 +165,9 @@ return [ | the HTTP protocol. You are free to modify this option if needed. | */ - + 'http_only' => true, - + /* |-------------------------------------------------------------------------- | HTTPS Only Cookies @@ -177,9 +178,9 @@ return [ | the cookie from being sent to you when it can't be done securely. | */ - + 'secure' => env('SESSION_SECURE_COOKIE', false), - + /* |-------------------------------------------------------------------------- | Same-Site Cookies @@ -211,6 +212,7 @@ return [ | Supported: "lax", "strict", "none", null | */ - + 'same_site' => 'lax', + ]; diff --git a/config/view.php b/config/view.php index e38f47fd3..bbbb7327e 100644 --- a/config/view.php +++ b/config/view.php @@ -1,7 +1,7 @@ [], - + + 'paths' => [ + // Default Laravel Blade template location + // @see https://github.com/octobercms/october/issues/3473 & https://github.com/octobercms/october/issues/3459 + // realpath(base_path('resources/views')) + ], + /* |-------------------------------------------------------------------------- | Compiled View Path @@ -25,6 +29,10 @@ return [ | directory. However, as usual, you are free to change this value. | */ - - 'compiled' => env('VIEW_COMPILED_PATH', realpath(storage_path('framework/views'))), + + 'compiled' => env( + 'VIEW_COMPILED_PATH', + realpath(storage_path('framework/views')) + ), + ];