diff --git a/bootstrap/app.php b/bootstrap/app.php index f2801adf..037e17df 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -12,7 +12,7 @@ */ $app = new Illuminate\Foundation\Application( - realpath(__DIR__.'/../') + $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); /* diff --git a/config/app.php b/config/app.php index 7a0e17b4..9785ea14 100644 --- a/config/app.php +++ b/config/app.php @@ -40,7 +40,7 @@ return [ | */ - 'debug' => env('APP_DEBUG', false), + 'debug' => (bool) env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- @@ -54,6 +54,8 @@ return [ */ 'url' => env('APP_URL', 'http://localhost'), + + 'asset_url' => env('ASSET_URL', null), 'appsource' => env('APP_SOURCE', 'https://appslist.heimdall.site/'), /* @@ -95,6 +97,19 @@ return [ 'fallback_locale' => 'en', + /* + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | + */ + + 'faker_locale' => 'en_US', + /* |-------------------------------------------------------------------------- | Encryption Key @@ -110,23 +125,6 @@ return [ 'cipher' => 'AES-256-CBC', - /* - |-------------------------------------------------------------------------- - | Logging Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure the log settings for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Settings: "single", "daily", "syslog", "errorlog" - | - */ - - 'log' => env('APP_LOG', 'single'), - - 'log_level' => env('APP_LOG_LEVEL', 'debug'), - /* |-------------------------------------------------------------------------- | Autoloaded Service Providers @@ -195,6 +193,7 @@ return [ 'aliases' => [ 'App' => Illuminate\Support\Facades\App::class, + 'Arr' => Illuminate\Support\Arr::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, @@ -212,6 +211,7 @@ return [ 'Gate' => Illuminate\Support\Facades\Gate::class, 'Hash' => Illuminate\Support\Facades\Hash::class, 'Html' => Collective\Html\HtmlFacade::class, + 'Http' => Illuminate\Support\Facades\Http::class, 'Lang' => Illuminate\Support\Facades\Lang::class, 'Log' => Illuminate\Support\Facades\Log::class, 'Mail' => Illuminate\Support\Facades\Mail::class, @@ -226,6 +226,7 @@ return [ 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, + 'Str' => Illuminate\Support\Str::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, diff --git a/config/auth.php b/config/auth.php index 78175010..aaf982bc 100644 --- a/config/auth.php +++ b/config/auth.php @@ -44,6 +44,7 @@ return [ 'api' => [ 'driver' => 'token', 'provider' => 'users', + 'hash' => false, ], ], @@ -96,7 +97,21 @@ return [ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, + 'throttle' => 60, ], ], + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => 10800, + ]; diff --git a/config/broadcasting.php b/config/broadcasting.php index 3ca45eaa..3bba1103 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -37,7 +37,7 @@ return [ 'app_id' => env('PUSHER_APP_ID'), 'options' => [ 'cluster' => env('PUSHER_APP_CLUSTER'), - 'encrypted' => true, + 'useTLS' => true, ], ], diff --git a/config/cache.php b/config/cache.php index fa12e5e4..4da49e7e 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,5 +1,7 @@ [ 'driver' => 'array', + 'serialize' => false, ], 'database' => [ @@ -73,6 +76,15 @@ return [ 'connection' => 'default', ], + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + ], /* @@ -86,9 +98,6 @@ return [ | */ - 'prefix' => env( - 'CACHE_PREFIX', - str_slug(env('APP_NAME', 'laravel'), '_').'_cache' - ), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), ]; diff --git a/config/database.php b/config/database.php index d6be927a..de7e701f 100644 --- a/config/database.php +++ b/config/database.php @@ -44,6 +44,7 @@ return [ 'mysql' => [ 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), @@ -53,12 +54,17 @@ return [ 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', + 'prefix_indexes' => true, 'strict' => true, 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], ], 'pgsql' => [ 'driver' => 'pgsql', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), @@ -66,12 +72,14 @@ return [ 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', + 'prefix_indexes' => true, 'schema' => 'public', 'sslmode' => 'prefer', ], 'sqlsrv' => [ 'driver' => 'sqlsrv', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), 'database' => env('DB_DATABASE', 'forge'), @@ -79,8 +87,9 @@ return [ 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', + 'prefix_indexes' => true, ], - + ], /* diff --git a/config/filesystems.php b/config/filesystems.php index 40da9cee..ffae7cd6 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -61,8 +61,10 @@ return [ 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), ], - + ], ]; diff --git a/config/hashing.php b/config/hashing.php new file mode 100644 index 00000000..bc5da3a6 --- /dev/null +++ b/config/hashing.php @@ -0,0 +1,52 @@ + 'bcrypt', + + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 10), + ], + + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'argon' => [ + 'memory' => 1024, + 'threads' => 2, + 'time' => 2, + ], + +]; \ No newline at end of file diff --git a/config/queue.php b/config/queue.php index 8c06fcc5..00b76d65 100644 --- a/config/queue.php +++ b/config/queue.php @@ -4,18 +4,16 @@ return [ /* |-------------------------------------------------------------------------- - | Default Queue Driver + | Default Queue Connection Name |-------------------------------------------------------------------------- | | Laravel's queue API supports an assortment of back-ends via a single | API, giving you convenient access to each back-end using the same - | syntax for each one. Here you may set the default queue driver. - | - | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | syntax for every one. Here you may define a default connection. | */ - 'default' => env('QUEUE_DRIVER', 'sync'), + 'default' => env('QUEUE_CONNECTION', 'sync'), /* |-------------------------------------------------------------------------- @@ -26,6 +24,8 @@ return [ | is used by your application. A default configuration has been added | for each back-end shipped with Laravel. You are free to add more. | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | */ 'connections' => [ @@ -46,22 +46,25 @@ return [ 'host' => 'localhost', 'queue' => 'default', 'retry_after' => 90, + 'block_for' => 0, ], 'sqs' => [ 'driver' => 'sqs', - 'key' => env('SQS_KEY', 'your-public-key'), - 'secret' => env('SQS_SECRET', 'your-secret-key'), + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'queue' => env('SQS_QUEUE', 'your-queue-name'), - 'region' => env('SQS_REGION', 'us-east-1'), + 'suffix' => env('SQS_SUFFIX'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', - 'queue' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, + 'block_for' => null, ], ], @@ -78,6 +81,7 @@ return [ */ 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], diff --git a/config/services.php b/config/services.php index 4460f0ec..7dade332 100644 --- a/config/services.php +++ b/config/services.php @@ -8,31 +8,26 @@ return [ |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such - | as Stripe, Mailgun, SparkPost and others. This file provides a sane - | default location for this type of information, allowing packages - | to have a conventional place to find your various credentials. + | as Mailgun, Postmark, AWS and more. This file provides the de facto + | location for this type of information, allowing packages to have + | a conventional file to locate the various service credentials. | */ 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), + 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + ], + + 'postmark' => [ + 'token' => env('POSTMARK_TOKEN'), ], 'ses' => [ - 'key' => env('SES_KEY'), - 'secret' => env('SES_SECRET'), - 'region' => 'us-east-1', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], - - 'sparkpost' => [ - 'secret' => env('SPARKPOST_SECRET'), - ], - - 'stripe' => [ - 'model' => App\User::class, - 'key' => env('STRIPE_KEY'), - 'secret' => env('STRIPE_SECRET'), - ], - + ]; diff --git a/config/session.php b/config/session.php index e9324843..8dd53a10 100644 --- a/config/session.php +++ b/config/session.php @@ -1,5 +1,7 @@ null, + 'connection' => env('SESSION_CONNECTION', null), /* |-------------------------------------------------------------------------- @@ -96,7 +98,7 @@ return [ | */ - 'store' => null, + 'store' => env('SESSION_STORE', null), /* |-------------------------------------------------------------------------- @@ -124,7 +126,7 @@ return [ 'cookie' => env( 'SESSION_COOKIE', - str_slug(env('APP_NAME', 'laravel'), '_').'_session' + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' ), /* @@ -164,7 +166,7 @@ return [ | */ - 'secure' => env('SESSION_SECURE_COOKIE', null), + 'secure' => env('SESSION_SECURE_COOKIE'), /* |-------------------------------------------------------------------------- diff --git a/config/view.php b/config/view.php index 2acfd9cc..916e61b7 100644 --- a/config/view.php +++ b/config/view.php @@ -28,6 +28,9 @@ return [ | */ - 'compiled' => realpath(storage_path('framework/views')), + 'compiled' => env( + 'VIEW_COMPILED_PATH', + realpath(storage_path('framework/views')) + ), -]; +]; \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index bb9c4a7e..8e55d555 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,21 +1,16 @@ - +> - - ./tests/Feature - - ./tests/Unit + + ./tests/Feature + @@ -23,9 +18,14 @@ - - - - + + + + + + + + + - + \ No newline at end of file diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 4a7b288d..8d8a77e9 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -3,7 +3,6 @@ namespace Tests; use Illuminate\Contracts\Console\Kernel; -use Illuminate\Support\Facades\Hash; trait CreatesApplication { @@ -18,8 +17,6 @@ trait CreatesApplication $app->make(Kernel::class)->bootstrap(); - Hash::setRounds(4); - return $app; } -} +} \ No newline at end of file