Skip to content

Commit a6c68c2

Browse files
committed
fixing conflicts
2 parents 26eed64 + af2a4d4 commit a6c68c2

19 files changed

+122
-95
lines changed

app/Console/Kernel.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ protected function schedule(Schedule $schedule)
2929
}
3030

3131
/**
32-
* Register the Closure based commands for the application.
32+
* Register the commands for the application.
3333
*
3434
* @return void
3535
*/
3636
protected function commands()
3737
{
38+
$this->load(__DIR__.'/Commands');
39+
3840
require base_path('routes/console.php');
3941
}
4042
}

app/Exceptions/Handler.php

+12-24
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@
33
namespace App\Exceptions;
44

55
use Exception;
6-
use Illuminate\Auth\AuthenticationException;
76
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
87

98
class Handler extends ExceptionHandler
109
{
1110
/**
12-
* A list of the exception types that should not be reported.
11+
* A list of the exception types that are not reported.
1312
*
1413
* @var array
1514
*/
1615
protected $dontReport = [
17-
\Illuminate\Auth\AuthenticationException::class,
18-
\Illuminate\Auth\Access\AuthorizationException::class,
19-
\Symfony\Component\HttpKernel\Exception\HttpException::class,
20-
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
21-
\Illuminate\Session\TokenMismatchException::class,
22-
\Illuminate\Validation\ValidationException::class,
16+
//
17+
];
18+
19+
/**
20+
* A list of the inputs that are never flashed for validation exceptions.
21+
*
22+
* @var array
23+
*/
24+
protected $dontFlash = [
25+
'password',
26+
'password_confirmation',
2327
];
2428

2529
/**
@@ -46,20 +50,4 @@ public function render($request, Exception $exception)
4650
{
4751
return parent::render($request, $exception);
4852
}
49-
50-
/**
51-
* Convert an authentication exception into an unauthenticated response.
52-
*
53-
* @param \Illuminate\Http\Request $request
54-
* @param \Illuminate\Auth\AuthenticationException $exception
55-
* @return \Illuminate\Http\Response
56-
*/
57-
protected function unauthenticated($request, AuthenticationException $exception)
58-
{
59-
if ($request->expectsJson()) {
60-
return response()->json(['error' => 'Unauthenticated.'], 401);
61-
}
62-
63-
return redirect()->guest(route('login'));
64-
}
6553
}

app/Http/Kernel.php

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class Kernel extends HttpKernel
1818
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
1919
\App\Http\Middleware\TrimStrings::class,
2020
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
21+
\App\Http\Middleware\TrustProxies::class,
2122
];
2223

2324
/**

app/Http/Middleware/EncryptCookies.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace App\Http\Middleware;
44

5-
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
5+
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
66

7-
class EncryptCookies extends BaseEncrypter
7+
class EncryptCookies extends Middleware
88
{
99
/**
1010
* The names of the cookies that should not be encrypted.

app/Http/Middleware/TrimStrings.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace App\Http\Middleware;
44

5-
use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;
5+
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
66

7-
class TrimStrings extends BaseTrimmer
7+
class TrimStrings extends Middleware
88
{
99
/**
1010
* The names of the attributes that should not be trimmed.

app/Http/Middleware/TrustProxies.php

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
namespace App\Http\Middleware;
4+
5+
use Illuminate\Http\Request;
6+
use Fideloper\Proxy\TrustProxies as Middleware;
7+
8+
class TrustProxies extends Middleware
9+
{
10+
/**
11+
* The trusted proxies for this application.
12+
*
13+
* @var array
14+
*/
15+
protected $proxies;
16+
17+
/**
18+
* The current proxy header mappings.
19+
*
20+
* @var array
21+
*/
22+
protected $headers = [
23+
Request::HEADER_FORWARDED => 'FORWARDED',
24+
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
25+
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
26+
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
27+
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
28+
];
29+
}

app/Http/Middleware/VerifyCsrfToken.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace App\Http\Middleware;
44

5-
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
5+
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
66

7-
class VerifyCsrfToken extends BaseVerifier
7+
class VerifyCsrfToken extends Middleware
88
{
99
/**
1010
* The URIs that should be excluded from CSRF verification.

artisan

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env php
22
<?php
33

4+
define('LARAVEL_START', microtime(true));
5+
46
/*
57
|--------------------------------------------------------------------------
68
| Register The Auto Loader
@@ -13,7 +15,7 @@
1315
|
1416
*/
1517

16-
require __DIR__.'/bootstrap/autoload.php';
18+
require __DIR__.'/vendor/autoload.php';
1719

1820
$app = require_once __DIR__.'/bootstrap/app.php';
1921

bootstrap/autoload.php

-17
This file was deleted.

composer.json

+16-12
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
"license": "MIT",
66
"type": "project",
77
"require": {
8-
"php": ">=5.6.4",
9-
"laravel/framework": "5.4.*",
8+
"php": ">=7.0.0",
9+
"fideloper/proxy": "~3.3",
10+
"laravel/framework": "5.5.*",
1011
"laravel/tinker": "~1.0"
1112
},
1213
"require-dev": {
14+
"filp/whoops": "~2.0",
1315
"fzaninotto/faker": "~1.4",
1416
"mockery/mockery": "0.9.*",
15-
"phpunit/phpunit": "~5.7"
17+
"phpunit/phpunit": "~6.0"
1618
},
1719
"autoload": {
1820
"classmap": [
@@ -28,20 +30,22 @@
2830
"Tests\\": "tests/"
2931
}
3032
},
33+
"extra": {
34+
"laravel": {
35+
"dont-discover": [
36+
]
37+
}
38+
},
3139
"scripts": {
3240
"post-root-package-install": [
33-
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
41+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
3442
],
3543
"post-create-project-cmd": [
36-
"php artisan key:generate"
37-
],
38-
"post-install-cmd": [
39-
"Illuminate\\Foundation\\ComposerScripts::postInstall",
40-
"php artisan optimize"
44+
"@php artisan key:generate"
4145
],
42-
"post-update-cmd": [
43-
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
44-
"php artisan optimize"
46+
"post-autoload-dump": [
47+
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
48+
"@php artisan package:discover"
4549
]
4650
},
4751
"config": {

config/app.php

-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@
167167
/*
168168
* Package Service Providers...
169169
*/
170-
Laravel\Tinker\TinkerServiceProvider::class,
171170

172171
/*
173172
* Application Service Providers...

config/session.php

+19-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@
122122
|
123123
*/
124124

125-
'cookie' => 'laravel_session',
125+
'cookie' => env(
126+
'SESSION_COOKIE',
127+
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
128+
),
126129

127130
/*
128131
|--------------------------------------------------------------------------
@@ -176,4 +179,19 @@
176179

177180
'http_only' => true,
178181

182+
/*
183+
|--------------------------------------------------------------------------
184+
| Same-Site Cookies
185+
|--------------------------------------------------------------------------
186+
|
187+
| This option determines how your cookies behave when cross-site requests
188+
| take place, and can be used to mitigate CSRF attacks. By default, we
189+
| do not enable this as other CSRF protection services are in place.
190+
|
191+
| Supported: "lax", "strict"
192+
|
193+
*/
194+
195+
'same_site' => null,
196+
179197
];

database/factories/ModelFactory.php renamed to database/factories/UserFactory.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<?php
22

3+
use Faker\Generator as Faker;
4+
35
/*
46
|--------------------------------------------------------------------------
57
| Model Factories
68
|--------------------------------------------------------------------------
79
|
8-
| Here you may define all of your model factories. Model factories give
9-
| you a convenient way to create models for testing and seeding your
10-
| database. Just tell the factory how a default model should look.
10+
| This directory should contain each of the model factory definitions for
11+
| your application. Factories provide a convenient way to generate new
12+
| model instances for testing / seeding your application's database.
1113
|
1214
*/
1315

14-
/** @var \Illuminate\Database\Eloquent\Factory $factory */
15-
$factory->define(App\User::class, function (Faker\Generator $faker) {
16+
$factory->define(App\User::class, function (Faker $faker) {
1617
static $password;
1718

1819
return [

package.json

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"private": true,
3-
"scripts": {
4-
"dev": "npm run development",
5-
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6-
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7-
"watch-poll": "npm run watch -- --watch-poll",
8-
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9-
"prod": "npm run production",
10-
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11-
},
12-
"devDependencies": {
13-
"axios": "^0.16.2",
14-
"bootstrap-sass": "^3.3.7",
15-
"cross-env": "^5.0.1",
16-
"jquery": "^3.1.1",
17-
"laravel-mix": "^1.0",
18-
"lodash": "^4.17.4",
19-
"vue": "^2.1.10"
20-
}
2+
"private": true,
3+
"scripts": {
4+
"dev": "npm run development",
5+
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6+
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7+
"watch-poll": "npm run watch -- --watch-poll",
8+
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9+
"prod": "npm run production",
10+
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11+
},
12+
"devDependencies": {
13+
"axios": "^0.16.2",
14+
"bootstrap-sass": "^3.3.7",
15+
"cross-env": "^5.0.1",
16+
"jquery": "^3.1.1",
17+
"laravel-mix": "^1.0",
18+
"lodash": "^4.17.4",
19+
"vue": "^2.1.10"
20+
}
2121
}

phpunit.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
33
backupStaticAttributes="false"
4-
bootstrap="bootstrap/autoload.php"
4+
bootstrap="vendor/autoload.php"
55
colors="true"
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"

public/.htaccess

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
# Redirect Trailing Slashes If Not A Folder...
99
RewriteCond %{REQUEST_FILENAME} !-d
10-
RewriteRule ^(.*)/$ /$1 [L,R=301]
10+
RewriteCond %{REQUEST_URI} (.+)/$
11+
RewriteRule ^ %1 [L,R=301]
1112

1213
# Handle Front Controller...
1314
RewriteCond %{REQUEST_FILENAME} !-d

public/index.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* @author Taylor Otwell <taylor@laravel.com>
88
*/
99

10+
define('LARAVEL_START', microtime(true));
11+
1012
/*
1113
|--------------------------------------------------------------------------
1214
| Register The Auto Loader
@@ -19,7 +21,7 @@
1921
|
2022
*/
2123

22-
require __DIR__.'/../bootstrap/autoload.php';
24+
require __DIR__.'/../vendor/autoload.php';
2325

2426
/*
2527
|--------------------------------------------------------------------------

tests/Feature/ExampleTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
namespace Tests\Feature;
44

55
use Tests\TestCase;
6-
use Illuminate\Foundation\Testing\WithoutMiddleware;
7-
use Illuminate\Foundation\Testing\DatabaseMigrations;
8-
use Illuminate\Foundation\Testing\DatabaseTransactions;
6+
use Illuminate\Foundation\Testing\RefreshDatabase;
97

108
class ExampleTest extends TestCase
119
{

tests/Unit/ExampleTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
namespace Tests\Unit;
44

55
use Tests\TestCase;
6-
use Illuminate\Foundation\Testing\DatabaseMigrations;
7-
use Illuminate\Foundation\Testing\DatabaseTransactions;
6+
use Illuminate\Foundation\Testing\RefreshDatabase;
87

98
class ExampleTest extends TestCase
109
{

0 commit comments

Comments
 (0)