Skip to content

Commit

Permalink
Define the warning callback on the SetAppKey method as getLaravel() d…
Browse files Browse the repository at this point in the history
…oesn't exist - Fixes issue #432
  • Loading branch information
joshbrw authored and nWidart committed Jun 29, 2018
1 parent d6b4c27 commit da5ea23
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Modules/Core/Console/Installers/Scripts/SetAppKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@

use Illuminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Encryption\Encrypter;
use Modules\Core\Console\Installers\SetupScript;

class SetAppKey implements SetupScript
{
use ConfirmableTrait;

/**
* @var Application
*/
private $application;

public function __construct(Application $application)
{
$this->application = $application;
}

/**
* Fire the install script
* @param Command $command
Expand Down Expand Up @@ -90,4 +102,16 @@ protected function keyReplacementPattern()

return "/^APP_KEY{$escaped}/m";
}

/**
* Get the default confirmation callback.
*
* @return \Closure
*/
protected function getDefaultConfirmCallback(): callable
{
return function () {
return $this->application->environment() === 'production';
};
}
}

0 comments on commit da5ea23

Please sign in to comment.