Skip to content

Commit

Permalink
Removed getenv feature (unsafe in Laravel 8 / dotenv 5.x) (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrushton authored Oct 21, 2020
1 parent 66b00be commit 32cb8a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Envoy.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
exit;
}

$server = getenv('DEPLOY_SERVER');
$repo = getenv('DEPLOY_REPOSITORY');
$path = getenv('DEPLOY_PATH');
$slack = getenv('DEPLOY_SLACK_WEBHOOK');
$healthUrl = getenv('DEPLOY_HEALTH_CHECK');
$server = $_ENV['DEPLOY_SERVER'] ?? null;
$repo = $_ENV['DEPLOY_REPOSITORY'] ?? null;
$path = $_ENV['DEPLOY_PATH'] ?? null;
$slack = $_ENV['DEPLOY_SLACK_WEBHOOK'] ?? null;
$healthUrl = $_ENV['DEPLOY_HEALTH_CHECK'] ?? null;

if ( substr($path, 0, 1) !== '/' ) throw new Exception('Careful - your deployment path does not begin with /');

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"require": {
"php": "^7.0",
"vlucas/phpdotenv": "^4.0"
}
}

0 comments on commit 32cb8a9

Please sign in to comment.