Skip to content

Commit ea9e242

Browse files
committed
refactor: cleanup key check after laravel-config-writer update
1 parent bc7cef4 commit ea9e242

File tree

3 files changed

+43
-51
lines changed

3 files changed

+43
-51
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"php-mock/php-mock-phpunit": "^2.10",
3333
"ext-json": "*",
3434
"ronasit/laravel-helpers": ">=3.5.7",
35-
"winter/laravel-config-writer": "^1.2"
35+
"winter/laravel-config-writer": ">=1.2.1"
3636
},
3737
"require-dev": {
3838
"fakerphp/faker": "^1.23.1",

composer.lock

Lines changed: 41 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Commands/InitCommand.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -514,15 +514,7 @@ protected function updateEnvFile(string $fileName, array $data): void
514514
{
515515
$env = EnvFile::open($fileName);
516516

517-
// TODO: After updating wintercms/laravel-config-writer, remove the key comparison check and keep only $env->addEmptyLine();
518-
$envKeys = array_column($env->getAst(), 'match');
519-
$dataKeys = array_keys($data);
520-
521-
$hasMissingKeys = count(array_intersect($dataKeys, $envKeys)) !== count($dataKeys);
522-
523-
if ($hasMissingKeys) {
524-
$env->addEmptyLine();
525-
}
517+
$env->addEmptyLine();
526518

527519
$env->set($data);
528520

0 commit comments

Comments
 (0)