Skip to content
Permalink
Browse files

Upgrade to Laravel 5.7

  • Loading branch information...
lovett committed Nov 24, 2018
1 parent 01fd289 commit 28ed2f5eab01bcba34322b7a924ee83da62c1c98
Showing with 5,716 additions and 8,877 deletions.
  1. +6 −2 .env.example
  2. +4 −4 .gitignore
  3. +0 −6 README.md
  4. +0 −2 app/Exceptions/Handler.php
  5. +5 −4 app/Http/Controllers/Auth/RegisterController.php
  6. +41 −0 app/Http/Controllers/Auth/VerificationController.php
  7. +21 −2 app/Http/Kernel.php
  8. +21 −0 app/Http/Middleware/Authenticate.php
  9. +17 −0 app/Http/Middleware/CheckForMaintenanceMode.php
  10. +3 −9 app/Http/Middleware/TrustProxies.php
  11. +7 −0 app/Http/Middleware/VerifyCsrfToken.php
  12. +5 −0 app/Providers/EventServiceProvider.php
  13. +1 −0 app/User.php
  14. +1 −1 bootstrap/app.php
  15. +20 −17 composer.json
  16. +839 −660 composer.lock
  17. +14 −21 config/app.php
  18. +4 −5 config/cache.php
  19. +13 −2 config/database.php
  20. +2 −1 config/filesystems.php
  21. +52 −0 config/hashing.php
  22. +92 −0 config/logging.php
  23. +7 −6 config/queue.php
  24. +6 −1 config/services.php
  25. +5 −3 config/session.php
  26. +1 −1 database/seeds/DatabaseSeeder.php
  27. +4,403 −8,039 package-lock.json
  28. +12 −12 package.json
  29. +3 −1 phpunit.xml
  30. +1 −0 public/svg/403.svg
  31. +1 −0 public/svg/404.svg
  32. +1 −0 public/svg/500.svg
  33. +1 −0 public/svg/503.svg
  34. 0 resources/{assets → }/js/app.js
  35. +7 −3 resources/{assets → }/js/bootstrap.js
  36. 0 resources/{assets → }/js/components/Autofill.vue
  37. 0 resources/{assets → }/js/components/AutofillHint.vue
  38. 0 resources/{assets → }/js/components/FacetSearch.vue
  39. 0 resources/{assets → }/js/components/Pickable.vue
  40. +94 −68 resources/lang/en/validation.php
  41. 0 resources/{assets → }/sass/_variables.scss
  42. 0 resources/{assets → }/sass/app.scss
  43. +1 −0 storage/framework/cache/.gitignore
  44. +2 −0 storage/framework/cache/data/.gitignore
  45. +0 −3 tests/CreatesApplication.php
  46. +3 −4 webpack.mix.js
@@ -2,9 +2,10 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
@@ -14,9 +15,9 @@ DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
@@ -33,3 +34,6 @@ PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
@@ -2,21 +2,21 @@
._*
.\#*
\#*
TAGS
/node_modules
/public/hot
/public/storage
/storage/*.key
/storage/debugbar
/vendor
/.idea
/.vscode
/nbproject
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
.phpunit.result.cache
*.sqlite
GPATH
GRTAGS
GTAGS
/.vagrant

This file was deleted.

@@ -29,8 +29,6 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
@@ -4,6 +4,7 @@
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
@@ -49,9 +50,9 @@ public function __construct()
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:6', 'confirmed'],
]);
}
@@ -66,7 +67,7 @@ protected function create(array $data)
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
'password' => Hash::make($data['password']),
]);
}
}
@@ -0,0 +1,41 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\VerifiesEmails;
class VerificationController extends Controller
{
/*
|--------------------------------------------------------------------------
| Email Verification Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling email verification for any
| user that recently registered with the application. Emails may also
| be re-sent if the user didn't receive the original email message.
|
*/
use VerifiesEmails;
/**
* Where to redirect users after verification.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:6,1')->only('verify', 'resend');
}
}
@@ -14,7 +14,7 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
@@ -51,11 +51,30 @@ class Kernel extends HttpKernel
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
/**
* The priority-sorted list of middleware.
*
* This forces the listed middleware to always be in the given order.
*
* @var array
*/
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
];
}
@@ -0,0 +1,21 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}
@@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
class CheckForMaintenanceMode extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
//
];
}
@@ -15,15 +15,9 @@ class TrustProxies extends Middleware
protected $proxies;
/**
* The current proxy header mappings.
* The headers that should be used to detect proxies.
*
* @var array
* @var int
*/
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
protected $headers = Request::HEADER_X_FORWARDED_ALL;
}
@@ -6,6 +6,13 @@
class VerifyCsrfToken extends Middleware
{
/**
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
*
* @var bool
*/
protected $addHttpCookie = true;
/**
* The URIs that should be excluded from CSRF verification.
*
@@ -3,6 +3,8 @@
namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
@@ -16,6 +18,9 @@ class EventServiceProvider extends ServiceProvider
'App\Events\Event' => [
'App\Listeners\EventListener',
],
Registered::class => [
SendEmailVerificationNotification::class,
],
];
/**
@@ -3,6 +3,7 @@
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Traits\AsMenu;
@@ -12,7 +12,7 @@
*/
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
dirname(__DIR__)
);
/*
@@ -14,22 +14,23 @@
}
],
"require": {
"php": ">=7.0.0",
"barryvdh/laravel-dompdf": "^0.8.1",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.5"
"php": ">=7.1.3",
"barryvdh/laravel-dompdf": "0.8.3",
"fideloper/proxy": "4.0.0",
"laravel/framework": "5.7.14",
"laravel/tinker": "1.0.8",
"laravelcollective/html": "5.7.1"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.1",
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpmd/phpmd": "^2.6",
"phpunit/phpunit": "~6.0",
"squizlabs/php_codesniffer": "^3.2",
"symfony/thanks": "^1.0"
"barryvdh/laravel-debugbar": "3.2.1",
"beyondcode/laravel-dump-server": "1.2.2",
"filp/whoops": "2.3.1",
"fzaninotto/faker": "1.8.0",
"mockery/mockery": "1.2.0",
"nunomaduro/collision": "2.1.1",
"phpmd/phpmd": "2.6.0",
"phpunit/phpunit": "7.4.4",
"squizlabs/php_codesniffer": "3.3.2"
},
"autoload": {
"classmap": [
@@ -56,16 +57,18 @@
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate"
"@php artisan key:generate --ansi"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
"@php artisan package:discover --ansi"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}

0 comments on commit 28ed2f5

Please sign in to comment.
You can’t perform that action at this time.