Skip to content

Commit

Permalink
⬆️ Upgrade Laravel to 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed Mar 21, 2017
1 parent 4199b0f commit 2e354cc
Show file tree
Hide file tree
Showing 34 changed files with 257 additions and 220 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
Expand All @@ -30,8 +30,8 @@ MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=

PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=

GITHUB_ID=
GITHUB_SECRET=
Expand Down
2 changes: 1 addition & 1 deletion app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ protected function unauthenticated($request, AuthenticationException $exception)
return response()->json(['error' => 'Unauthenticated.'], 401);
}

return redirect()->guest('login');
return redirect()->guest(route('login'));
}
}
4 changes: 4 additions & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class Kernel extends HttpKernel
protected $middleware = [
\M1guelpf\DeployingMode\CheckForDeployingMode::class,
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];

/**
Expand All @@ -28,6 +31,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
Expand Down
18 changes: 18 additions & 0 deletions app/Http/Middleware/TrimStrings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;

class TrimStrings extends BaseTrimmer
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}
4 changes: 1 addition & 3 deletions app/Providers/BroadcastServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public function boot()
/*
* Authenticate the user's personal channel...
*/
Broadcast::channel('App.User.*', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});
require base_path('routes/channels.php');
}
}
20 changes: 7 additions & 13 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,9 @@ public function map()
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
});
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}

/**
Expand All @@ -68,12 +65,9 @@ protected function mapWebRoutes()
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}
17 changes: 0 additions & 17 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,3 @@
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/

$compiledPath = __DIR__.'/cache/compiled.php';

if (file_exists($compiledPath)) {
require $compiledPath;
}
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"name": "orgmanager/orgmanager",
"description": "Supercharge you GitHub organizations!",
"keywords": ["orgmanager", "github", "organizations", "supercharge", "invite", "invites", "php", "laravel"],
"license": "MPL-2.0",
"type": "project",
"require": {
"php": ">=5.6.4",
"adamwathan/eloquent-oauth-l5": "^0.5.1",
"bugsnag/bugsnag-laravel": "^2.0",
"google/recaptcha": "~1.1",
"laravel/framework": "5.3.*",
"guzzlehttp/guzzle": "^6.2",
"laravel/framework": "5.4.*",
"laravel/tinker": "^1.0",
"m1guelpf/deploying-mode": "^1.0",
"m1guelpf/github": "dev-master",
"m1guelpf/github-api": "dev-packagist",
Expand All @@ -19,9 +21,7 @@
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
"phpunit/phpunit": "~5.7"
},
"autoload": {
"classmap": [
Expand All @@ -32,9 +32,9 @@
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
Expand Down
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Laravel\Tinker\TinkerServiceProvider::class,

/*
* Package Service Providers...
Expand Down Expand Up @@ -214,6 +215,7 @@
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
Expand Down
4 changes: 2 additions & 2 deletions config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'),
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
Expand Down
2 changes: 1 addition & 1 deletion config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache'),
'path' => storage_path('framework/cache/data'),
],

'memcached' => [
Expand Down
35 changes: 0 additions & 35 deletions config/compile.php

This file was deleted.

20 changes: 4 additions & 16 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

return [

/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/

'fetch' => PDO::FETCH_OBJ,

/*
|--------------------------------------------------------------------------
| Default Database Connection Name
Expand Down Expand Up @@ -59,8 +46,9 @@
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
Expand Down Expand Up @@ -107,7 +95,7 @@

'redis' => [

'cluster' => false,
'client' => 'predis',

'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
Expand Down
9 changes: 5 additions & 4 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],

's3' => [
'driver' => 's3',
'key' => 'your-key',
'secret' => 'your-secret',
'region' => 'your-region',
'bucket' => 'your-bucket',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],

],
Expand Down
32 changes: 20 additions & 12 deletions config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
| "ses", "sparkpost", "log"
| Supported: Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "log", "array"
|
*/

Expand Down Expand Up @@ -86,30 +86,38 @@

'username' => env('MAIL_USERNAME'),

'password' => env('MAIL_PASSWORD'),

/*
|--------------------------------------------------------------------------
| SMTP Server Password
| Sendmail System Path
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/

'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',

/*
|--------------------------------------------------------------------------
| Sendmail System Path
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/

'sendmail' => '/usr/sbin/sendmail -bs',
'markdown' => [
'theme' => 'default',

'paths' => [
resource_path('views/vendor/mail'),
],
],

];
2 changes: 1 addition & 1 deletion config/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

'paths' => [
realpath(base_path('resources/views')),
resource_path('views'),
],

/*
Expand Down
19 changes: 0 additions & 19 deletions gulpfile.js

This file was deleted.

Loading

0 comments on commit 2e354cc

Please sign in to comment.