Skip to content

Commit 568a896

Browse files
authored
Merge pull request #70 from RonasIT/config-writer-update
refactor: cleanup key check after laravel-config-writer update
2 parents 11ec720 + 7d24f67 commit 568a896

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
@@ -519,15 +519,7 @@ protected function updateEnvFile(string $fileName, array $data): void
519519
{
520520
$env = EnvFile::open($fileName);
521521

522-
// TODO: After updating wintercms/laravel-config-writer, remove the key comparison check and keep only $env->addEmptyLine();
523-
$envKeys = array_column($env->getAst(), 'match');
524-
$dataKeys = array_keys($data);
525-
526-
$hasMissingKeys = count(array_intersect($dataKeys, $envKeys)) !== count($dataKeys);
527-
528-
if ($hasMissingKeys) {
529-
$env->addEmptyLine();
530-
}
522+
$env->addEmptyLine();
531523

532524
$env->set($data);
533525

0 commit comments

Comments
 (0)