diff --git a/composer.json b/composer.json index 3fa2cbf32..0f630b0e0 100644 --- a/composer.json +++ b/composer.json @@ -64,6 +64,15 @@ "post-update-cmd": [ "php artisan october:util set build", "php artisan package:discover" + ], + "test": [ + "phpunit --stop-on-failure --prepend ./vendor/october/rain/src/Support/helpers.php" + ], + "lint": [ + "parallel-lint --exclude vendor --exclude storage --exclude tests/fixtures/plugins/testvendor/goto/Plugin.php ." + ], + "sniff": [ + "phpcs --colors -nq --report=\"full\" --extensions=\"php\"" ] }, "config": { diff --git a/config/app.php b/config/app.php index e0c727196..838123183 100644 --- a/config/app.php +++ b/config/app.php @@ -16,7 +16,7 @@ return [ | */ - 'debug' => true, + 'debug' => env('APP_DEBUG', true), /* |-------------------------------------------------------------------------- @@ -41,7 +41,7 @@ return [ | */ - 'url' => 'http://localhost', + 'url' => env('APP_URL', 'http://localhost'), /* |-------------------------------------------------------------------------- @@ -101,7 +101,7 @@ return [ | */ - 'key' => 'CHANGE_ME!!!!!!!!!!!!!!!!!!!!!!!', + 'key' => env('APP_KEY', ''), 'cipher' => 'AES-256-CBC', diff --git a/config/cache.php b/config/cache.php index 251771724..ba95b1801 100644 --- a/config/cache.php +++ b/config/cache.php @@ -13,7 +13,7 @@ return [ | */ - 'default' => 'file', + 'default' => env('CACHE_DRIVER', 'file'), /* |-------------------------------------------------------------------------- diff --git a/config/cms.php b/config/cms.php index 4c838a026..b5b5eb135 100644 --- a/config/cms.php +++ b/config/cms.php @@ -156,7 +156,7 @@ return [ | */ - 'enableRoutesCache' => false, + 'enableRoutesCache' => env('ROUTES_CACHE', false), /* |-------------------------------------------------------------------------- @@ -196,7 +196,7 @@ return [ | */ - 'enableAssetCache' => false, + 'enableAssetCache' => env('ASSET_CACHE', false), /* |-------------------------------------------------------------------------- @@ -250,7 +250,7 @@ return [ | */ - 'databaseTemplates' => false, + 'databaseTemplates' => env('DATABASE_TEMPLATES', false), /* |-------------------------------------------------------------------------- @@ -343,7 +343,7 @@ return [ | */ - 'linkPolicy' => 'detect', + 'linkPolicy' => env('LINK_POLICY', 'detect'), /* |-------------------------------------------------------------------------- @@ -379,7 +379,7 @@ return [ | */ - 'enableCsrfProtection' => true, + 'enableCsrfProtection' => env('ENABLE_CSRF', true), /* |-------------------------------------------------------------------------- diff --git a/config/database.php b/config/database.php index 70f1420c6..8087772e9 100644 --- a/config/database.php +++ b/config/database.php @@ -26,7 +26,7 @@ return [ | */ - 'default' => 'mysql', + 'default' => env('DB_CONNECTION', 'mysql'), /* |-------------------------------------------------------------------------- @@ -48,18 +48,18 @@ return [ 'sqlite' => [ 'driver' => 'sqlite', - 'database' => 'storage/database.sqlite', + 'database' => env('DB_DATABASE', 'storage/database.sqlite'), 'prefix' => '', ], 'mysql' => [ 'driver' => 'mysql', 'engine' => 'InnoDB', - 'host' => 'localhost', - 'port' => 3306, - 'database' => 'database', - 'username' => 'root', - 'password' => '', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', 3306), + 'database' => env('DB_DATABASE', 'database'), + 'username' => env('DB_USERNAME', ''), + 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', @@ -68,11 +68,11 @@ return [ 'pgsql' => [ 'driver' => 'pgsql', - 'host' => 'localhost', - 'port' => 5432, - 'database' => 'database', - 'username' => 'root', - 'password' => '', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', 5432), + 'database' => env('DB_DATABASE', 'database'), + 'username' => env('DB_USERNAME', ''), + 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', @@ -80,11 +80,11 @@ return [ 'sqlsrv' => [ 'driver' => 'sqlsrv', - 'host' => 'localhost', - 'port' => 1433, - 'database' => 'database', - 'username' => 'root', - 'password' => '', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', 5432), + 'database' => env('DB_DATABASE', 'database'), + 'username' => env('DB_USERNAME', ''), + 'password' => env('DB_PASSWORD', ''), 'prefix' => '', ], @@ -119,9 +119,9 @@ return [ 'cluster' => false, 'default' => [ - 'host' => '127.0.0.1', - 'password' => null, - 'port' => 6379, + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', ''), + 'port' => env('REDIS_PORT', 6379), 'database' => 0, ], @@ -142,5 +142,5 @@ return [ | */ - 'useConfigForTesting' => false, + 'useConfigForTesting' => env('DB_USE_CONFIG_FOR_TESTING', false), ]; diff --git a/config/mail.php b/config/mail.php index 7c2332d2f..2823eac3a 100644 --- a/config/mail.php +++ b/config/mail.php @@ -16,7 +16,7 @@ return [ | */ - 'driver' => 'smtp', + 'driver' => env('MAIL_DRIVER', 'smtp'), /* |-------------------------------------------------------------------------- @@ -29,7 +29,7 @@ return [ | */ - 'host' => 'smtp.mailgun.org', + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), /* |-------------------------------------------------------------------------- @@ -42,7 +42,7 @@ return [ | */ - 'port' => 587, + 'port' => env('MAIL_PORT', 587), /* |-------------------------------------------------------------------------- @@ -68,7 +68,7 @@ return [ | */ - 'encryption' => 'tls', + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), /* |-------------------------------------------------------------------------- @@ -81,7 +81,7 @@ return [ | */ - 'username' => null, + 'username' => env('MAIL_USERNAME', ''), /* |-------------------------------------------------------------------------- @@ -94,7 +94,7 @@ return [ | */ - 'password' => null, + 'password' => env('MAIL_PASSWORD', ''), /* |-------------------------------------------------------------------------- diff --git a/config/queue.php b/config/queue.php index de27ab7f1..e14dfac78 100644 --- a/config/queue.php +++ b/config/queue.php @@ -16,7 +16,7 @@ return [ | */ - 'default' => 'sync', + 'default' => env('QUEUE_CONNECTION', 'sync'), /* |-------------------------------------------------------------------------- diff --git a/config/session.php b/config/session.php index ab762f221..194747a76 100644 --- a/config/session.php +++ b/config/session.php @@ -16,7 +16,7 @@ return [ | */ - 'driver' => 'file', + 'driver' => env('SESSION_DRIVER', 'file'), /* |-------------------------------------------------------------------------- diff --git a/storage/framework/cache/data/.gitignore b/storage/framework/cache/data/.gitignore deleted file mode 100644 index c96a04f00..000000000 --- a/storage/framework/cache/data/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/themes/demo/pages/404.htm b/themes/demo/pages/404.htm index 984fb0e77..56246825d 100644 --- a/themes/demo/pages/404.htm +++ b/themes/demo/pages/404.htm @@ -1,10 +1,11 @@ title = "Page not found (404)" -url = "/404" +url = "/404/:slug" layout = "default" +is_hidden = 0 == -
We're sorry, but the page you requested cannot be found.
-