Mise à jour Laravel de 5.5 à 5.6

Upgrade effectué dans une installation quasi standard avec les extensions : jenssegers, laravelcollective et voyager

Mise à jour Laravel

De la version 5.5 à 5.6

Upgrade effectué avec les extensions :

  • jenssegers/date
  • laravelcollective/html
  • tcg/voyager

Editer le fichier composer.json comme suit

DANS "require"

 "php": ">=7.1.3",

"fideloper/proxy": "~4.0",

"laravel/framework": "5.6.*",

DANS "require-dev"

 "phpunit/phpunit": "~7.0",

 

Dans le terminal

cd /path/to/laravel/app

composer update

 

Dans config/ créer les fichiers

hashing.php

logging.php
 

EDITER config/hashing.php comme suit

<?php

return [

/*

|--------------------------------------------------------------------------

| Default Hash Driver

|--------------------------------------------------------------------------

|

| This option controls the default hash driver that will be used to hash

| passwords for your application. By default, the bcrypt algorithm is

| used; however, you remain free to modify this option if you wish.

|

| Supported: "bcrypt", "argon"

|

*/

'driver' => 'argon',

];

 

EDITER config/logging.php comme suit

<?php

return [


/*

|--------------------------------------------------------------------------

| Default Log Channel

|--------------------------------------------------------------------------

|

| This option defines the default log channel that gets used when writing

| messages to the logs. The name specified in this option should match

| one of the channels defined in the "channels" configuration array.

|

*/


'default' => env('LOG_CHANNEL', 'stack'),


/*

|--------------------------------------------------------------------------

| Log Channels

|--------------------------------------------------------------------------

|

| Here you may configure the log channels 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 Drivers: "single", "daily", "slack", "syslog",

|                    "errorlog", "custom", "stack"

|

*/
 

'channels' => [

'stack' => [

'driver' => 'stack',

'channels' => ['single'],

],

 
'single' => [

'driver' => 'single',

'path' => storage_path('logs/laravel.log'),

'level' => 'debug',

],

 
'daily' => [

'driver' => 'daily',

'path' => storage_path('logs/laravel.log'),

'level' => 'debug',

'days' => 7,

],
 

'slack' => [

'driver' => 'slack',

'url' => env('LOG_SLACK_WEBHOOK_URL'),

'username' => 'Laravel Log',

'emoji' => ':boom:',

'level' => 'critical',

],
 

'syslog' => [

'driver' => 'syslog',

'level' => 'debug',

],
 

'errorlog' => [

'driver' => 'errorlog',

'level' => 'debug',

],

],
 

];

  

Editer le fichier app/Http/Middleware/TrustProxies.php comme suit

<?php
namespace App\Http\Middleware;
 

use Illuminate\Http\Request;

use Fideloper\Proxy\TrustProxies as Middleware;
 

class TrustProxies extends Middleware

{

/**

* The trusted proxies for this application.

*

* @var array

*/

protected $proxies;
 

/**

* The headers that should be used to detect proxies.

*

* @var string

*/

protected $headers = Request::HEADER_X_FORWARDED_ALL;

}

 

C'est tout, moins de 10 minutes et tout fonctionne.

 

Publication : vendredi 1 juin 2018 à 08:34
Mis à jour : mardi 11 décembre 2018 à 07:49
Article vue 498 fois

Mise à jour Laravel de 5.5 à 5.6