Skip to content

Commit fb4e411

Browse files
fix: rename environment directory variable from environmentDirectory to envDirectory
Co-authored-by: Michal Sniatala <[email protected]>
1 parent 23c6881 commit fb4e411

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/Config/Paths.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ class Paths
8484
* This variable must contain the name of the directory for
8585
* environment files.
8686
*/
87-
public string $environmentDirectory = __DIR__ . '/../../';
87+
public string $envDirectory = __DIR__ . '/../../';
8888
}

system/Boot.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public static function preload(Paths $paths): void
170170
protected static function loadDotEnv(Paths $paths): void
171171
{
172172
require_once $paths->systemDirectory . '/Config/DotEnv.php';
173-
(new DotEnv($paths->environmentDirectory))->load();
173+
(new DotEnv($paths->envDirectory))->load();
174174
}
175175

176176
protected static function defineEnvironment(): void

system/Commands/Encryption/GenerateKey.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function run(array $params)
102102
// force DotEnv to reload the new env vars
103103
putenv('encryption.key');
104104
unset($_ENV['encryption.key'], $_SERVER['encryption.key']);
105-
$dotenv = new DotEnv((new Paths())->environmentDirectory);
105+
$dotenv = new DotEnv((new Paths())->envDirectory);
106106
$dotenv->load();
107107

108108
CLI::write('Application\'s new encryption key was successfully set.', 'green');
@@ -156,7 +156,7 @@ protected function confirmOverwrite(array $params): bool
156156
protected function writeNewEncryptionKeyToFile(string $oldKey, string $newKey): bool
157157
{
158158
$baseEnv = ROOTPATH . 'env';
159-
$envFile = (new Paths())->environmentDirectory . '.env';
159+
$envFile = (new Paths())->envDirectory . '.env';
160160

161161
if (! is_file($envFile)) {
162162
if (! is_file($baseEnv)) {

system/Commands/Utilities/Environment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function run(array $params)
120120
// however we cannot redefine the ENVIRONMENT constant
121121
putenv('CI_ENVIRONMENT');
122122
unset($_ENV['CI_ENVIRONMENT'], $_SERVER['CI_ENVIRONMENT']);
123-
(new DotEnv((new Paths())->environmentDirectory))->load();
123+
(new DotEnv((new Paths())->envDirectory))->load();
124124

125125
CLI::write(sprintf('Environment is successfully changed to "%s".', $env), 'green');
126126
CLI::write('The ENVIRONMENT constant will be changed in the next script execution.');
@@ -135,7 +135,7 @@ public function run(array $params)
135135
private function writeNewEnvironmentToEnvFile(string $newEnv): bool
136136
{
137137
$baseEnv = ROOTPATH . 'env';
138-
$envFile = (new Paths())->environmentDirectory . '.env';
138+
$envFile = (new Paths())->envDirectory . '.env';
139139

140140
if (! is_file($envFile)) {
141141
if (! is_file($baseEnv)) {

0 commit comments

Comments
 (0)