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 AsgardCms#432
  • Loading branch information
joshbrw committed Nov 11, 2017
1 parent 51c73b9 commit 973fd13
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 973fd13

Please sign in to comment.