Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Laravel 5.8 #80

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
"php": "^7.1.3",
"botman/botman": "~2.0",
"botman/driver-web": "~1.0",
"botman/studio-addons": "~1.3",
"botman/studio-addons": "~1.5",
"botman/tinker": "~1.0",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
"phpunit/phpunit": "^7.5"
},
"autoload": {
"classmap": [
Expand All @@ -43,8 +43,7 @@
},
"extra": {
"laravel": {
"dont-discover": [
]
"dont-discover": []
}
},
"scripts": {
Expand Down Expand Up @@ -74,4 +73,4 @@
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
17 changes: 17 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@

'url' => env('APP_URL', 'http://localhost'),

'asset_url' => env('ASSET_URL', null),

/*
|--------------------------------------------------------------------------
| Application Timezone
Expand Down Expand Up @@ -93,6 +95,19 @@

'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
Expand Down Expand Up @@ -176,6 +191,7 @@
'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,
Expand Down Expand Up @@ -205,6 +221,7 @@
'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,
Expand Down
20 changes: 14 additions & 6 deletions config/cache.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Str;

return [

/*
Expand All @@ -11,7 +13,8 @@
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
| Supported: "apc", "array", "database", "file", "memcached", "redis"
| Supported: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb"
|
*/

Expand Down Expand Up @@ -57,7 +60,7 @@
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
Expand All @@ -73,6 +76,14 @@
'connection' => 'cache',
],

'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
],

],

/*
Expand All @@ -86,9 +97,6 @@
|
*/

'prefix' => env(
'CACHE_PREFIX',
str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
),
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),

];
15 changes: 13 additions & 2 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],

'mysql' => [
Expand All @@ -50,8 +51,12 @@
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]),
],

'pgsql' => [
Expand All @@ -63,6 +68,7 @@
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
Expand All @@ -76,6 +82,7 @@
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],

],
Expand All @@ -99,14 +106,18 @@
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/

'redis' => [

'client' => 'predis',
'client' => env('REDIS_CLIENT', 'predis'),

'options' => [
'cluster' => env('REDIS_CLUSTER', 'predis'),
],

'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
Expand Down
17 changes: 15 additions & 2 deletions config/logging.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;

return [

Expand Down Expand Up @@ -35,7 +36,8 @@
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'channels' => ['daily'],
'ignore_exceptions' => false,
],

'single' => [
Expand All @@ -48,7 +50,7 @@
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
'days' => 14,
],

'slack' => [
Expand All @@ -59,9 +61,20 @@
'level' => 'critical',
],

'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],

'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
Expand Down
13 changes: 13 additions & 0 deletions config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,17 @@
],
],

/*
|--------------------------------------------------------------------------
| Log Channel
|--------------------------------------------------------------------------
|
| If you are using the "log" driver, you may specify the logging channel
| if you prefer to keep mail messages separate from other log entries
| for simpler reading. Otherwise, the default channel will be used.
|
*/

'log_channel' => env('MAIL_LOG_CHANNEL'),

];
9 changes: 5 additions & 4 deletions config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,22 @@
'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'),
'region' => env('AWS_REGION', 'us-east-1'),
],

'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
],
Expand Down
15 changes: 12 additions & 3 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@
'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' => env('SES_REGION', 'us-east-1'),
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_REGION', 'us-east-1'),
],

'sparkpost' => [
Expand All @@ -33,6 +38,10 @@
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
'webhook' => [
'secret' => env('STRIPE_WEBHOOK_SECRET'),
'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
],
],

];
12 changes: 7 additions & 5 deletions config/session.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Illuminate\Support\Str;

return [

/*
Expand All @@ -12,7 +14,7 @@
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
| "memcached", "redis", "dynamodb", "array"
|
*/

Expand Down Expand Up @@ -90,9 +92,9 @@
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using the "apc" or "memcached" session drivers, you may specify a
| cache store that should be used for these sessions. This value must
| correspond with one of the application's configured cache stores.
| When using the "apc", "memcached", or "dynamodb" session drivers you may
| list a cache store that should be used for these sessions. This value
| must match with one of the application's configured cache "stores".
|
*/

Expand Down Expand Up @@ -124,7 +126,7 @@

'cookie' => env(
'SESSION_COOKIE',
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),

/*
Expand Down
5 changes: 4 additions & 1 deletion config/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
|
*/

'compiled' => realpath(storage_path('framework/views')),
'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),

];
3 changes: 2 additions & 1 deletion database/factories/UserFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Illuminate\Support\Str;
use Faker\Generator as Faker;

/*
Expand All @@ -20,6 +21,6 @@
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
'remember_token' => Str::random(10),
];
});