diff --git a/composer.json b/composer.json index 9f276e4..81edbd6 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "php-mock/php-mock-phpunit": "^2.10", "ext-json": "*", "ronasit/laravel-helpers": ">=3.5.7", - "winter/laravel-config-writer": "^1.2" + "winter/laravel-config-writer": ">=1.2.1" }, "require-dev": { "fakerphp/faker": "^1.23.1", diff --git a/composer.lock b/composer.lock index ac66ac0..c260a7e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ab5648220888ae8ccc4a9e7ab9640bdc", + "content-hash": "e0ac23e4dffe60bbb4f7f585924bb18a", "packages": [ { "name": "brick/math", @@ -368,16 +368,16 @@ }, { "name": "doctrine/dbal", - "version": "4.3.3", + "version": "4.3.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "231959669bb2173194c95636eae7f1b41b2a8b19" + "reference": "1a2fbd0e93b8dec7c3d1ac2b6396a7b929b130dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/231959669bb2173194c95636eae7f1b41b2a8b19", - "reference": "231959669bb2173194c95636eae7f1b41b2a8b19", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/1a2fbd0e93b8dec7c3d1ac2b6396a7b929b130dc", + "reference": "1a2fbd0e93b8dec7c3d1ac2b6396a7b929b130dc", "shasum": "" }, "require": { @@ -387,15 +387,15 @@ "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "13.0.1", + "doctrine/coding-standard": "14.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.2", - "phpstan/phpstan": "2.1.22", - "phpstan/phpstan-phpunit": "2.0.6", + "phpstan/phpstan": "2.1.30", + "phpstan/phpstan-phpunit": "2.0.7", "phpstan/phpstan-strict-rules": "^2", "phpunit/phpunit": "11.5.23", - "slevomat/coding-standard": "8.16.2", - "squizlabs/php_codesniffer": "3.13.1", + "slevomat/coding-standard": "8.24.0", + "squizlabs/php_codesniffer": "4.0.0", "symfony/cache": "^6.3.8|^7.0", "symfony/console": "^5.4|^6.3|^7.0" }, @@ -454,7 +454,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/4.3.3" + "source": "https://github.com/doctrine/dbal/tree/4.3.4" }, "funding": [ { @@ -470,7 +470,7 @@ "type": "tidelift" } ], - "time": "2025-09-04T23:52:42+00:00" + "time": "2025-10-09T09:11:36+00:00" }, { "name": "doctrine/deprecations", @@ -1700,16 +1700,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v2.0.5", + "version": "v2.0.6", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "3832547db6e0e2f8bb03d4093857b378c66eceed" + "reference": "038ce42edee619599a1debb7e81d7b3759492819" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3832547db6e0e2f8bb03d4093857b378c66eceed", - "reference": "3832547db6e0e2f8bb03d4093857b378c66eceed", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/038ce42edee619599a1debb7e81d7b3759492819", + "reference": "038ce42edee619599a1debb7e81d7b3759492819", "shasum": "" }, "require": { @@ -1757,7 +1757,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2025-09-22T17:29:40+00:00" + "time": "2025-10-09T13:42:30+00:00" }, { "name": "league/commonmark", @@ -4793,16 +4793,16 @@ }, { "name": "ronasit/laravel-helpers", - "version": "3.5.7", + "version": "3.5.8", "source": { "type": "git", "url": "https://github.com/RonasIT/laravel-helpers.git", - "reference": "4fb66ba7d43fc11d24be573c51fd7b326e28426c" + "reference": "b2ef76134afd66dedb5a956712f1bd1b483ef9c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RonasIT/laravel-helpers/zipball/4fb66ba7d43fc11d24be573c51fd7b326e28426c", - "reference": "4fb66ba7d43fc11d24be573c51fd7b326e28426c", + "url": "https://api.github.com/repos/RonasIT/laravel-helpers/zipball/b2ef76134afd66dedb5a956712f1bd1b483ef9c1", + "reference": "b2ef76134afd66dedb5a956712f1bd1b483ef9c1", "shasum": "" }, "require": { @@ -4868,9 +4868,9 @@ ], "support": { "issues": "https://github.com/RonasIT/laravel-helpers/issues", - "source": "https://github.com/RonasIT/laravel-helpers/tree/3.5.7" + "source": "https://github.com/RonasIT/laravel-helpers/tree/3.5.8" }, - "time": "2025-09-29T16:14:15+00:00" + "time": "2025-10-08T08:37:24+00:00" }, { "name": "sebastian/cli-parser", @@ -8465,16 +8465,16 @@ }, { "name": "winter/laravel-config-writer", - "version": "v1.2.0", + "version": "v1.2.1", "source": { "type": "git", "url": "https://github.com/wintercms/laravel-config-writer.git", - "reference": "96ef5c85872abd9a915654a33b679052a69d752c" + "reference": "6c9dcb10de4f63b032a3b38f66171057cef71a10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wintercms/laravel-config-writer/zipball/96ef5c85872abd9a915654a33b679052a69d752c", - "reference": "96ef5c85872abd9a915654a33b679052a69d752c", + "url": "https://api.github.com/repos/wintercms/laravel-config-writer/zipball/6c9dcb10de4f63b032a3b38f66171057cef71a10", + "reference": "6c9dcb10de4f63b032a3b38f66171057cef71a10", "shasum": "" }, "require": { @@ -8510,7 +8510,7 @@ "description": "Utility to create and update Laravel config and .env files", "support": { "issues": "https://github.com/wintercms/laravel-config-writer/issues", - "source": "https://github.com/wintercms/laravel-config-writer/tree/v1.2.0" + "source": "https://github.com/wintercms/laravel-config-writer/tree/v1.2.1" }, "funding": [ { @@ -8522,7 +8522,7 @@ "type": "open_collective" } ], - "time": "2025-07-21T06:42:49+00:00" + "time": "2025-10-15T22:16:25+00:00" } ], "packages-dev": [ @@ -9592,16 +9592,16 @@ }, { "name": "orchestra/sidekick", - "version": "v1.2.16", + "version": "v1.2.17", "source": { "type": "git", "url": "https://github.com/orchestral/sidekick.git", - "reference": "2b165b602f56bbe05a5116fbfd76e4eb4986d1c4" + "reference": "371ce2882ee3f5bf826b36e75d461e51c9cd76c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/sidekick/zipball/2b165b602f56bbe05a5116fbfd76e4eb4986d1c4", - "reference": "2b165b602f56bbe05a5116fbfd76e4eb4986d1c4", + "url": "https://api.github.com/repos/orchestral/sidekick/zipball/371ce2882ee3f5bf826b36e75d461e51c9cd76c2", + "reference": "371ce2882ee3f5bf826b36e75d461e51c9cd76c2", "shasum": "" }, "require": { @@ -9643,9 +9643,9 @@ "description": "Packages Toolkit Utilities and Helpers for Laravel", "support": { "issues": "https://github.com/orchestral/sidekick/issues", - "source": "https://github.com/orchestral/sidekick/tree/v1.2.16" + "source": "https://github.com/orchestral/sidekick/tree/v1.2.17" }, - "time": "2025-10-01T22:10:05+00:00" + "time": "2025-10-02T11:02:26+00:00" }, { "name": "orchestra/testbench", @@ -9704,21 +9704,21 @@ }, { "name": "orchestra/testbench-core", - "version": "v9.16.3", + "version": "v9.17.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "4ea3b276f706c900e3fccfa1db7742829ee9d5af" + "reference": "a5b4d56a40536fde50a72e20ce43abaa76f8de2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/4ea3b276f706c900e3fccfa1db7742829ee9d5af", - "reference": "4ea3b276f706c900e3fccfa1db7742829ee9d5af", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/a5b4d56a40536fde50a72e20ce43abaa76f8de2f", + "reference": "a5b4d56a40536fde50a72e20ce43abaa76f8de2f", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", - "orchestra/sidekick": "~1.1.14|^1.2.10", + "orchestra/sidekick": "~1.1.20|~1.2.17", "php": "^8.2", "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-php83": "^1.32" @@ -9794,7 +9794,7 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2025-09-03T02:26:35+00:00" + "time": "2025-10-14T12:02:37+00:00" }, { "name": "orchestra/workbench", diff --git a/src/Commands/InitCommand.php b/src/Commands/InitCommand.php index 675a941..599a02d 100644 --- a/src/Commands/InitCommand.php +++ b/src/Commands/InitCommand.php @@ -514,15 +514,7 @@ protected function updateEnvFile(string $fileName, array $data): void { $env = EnvFile::open($fileName); - // TODO: After updating wintercms/laravel-config-writer, remove the key comparison check and keep only $env->addEmptyLine(); - $envKeys = array_column($env->getAst(), 'match'); - $dataKeys = array_keys($data); - - $hasMissingKeys = count(array_intersect($dataKeys, $envKeys)) !== count($dataKeys); - - if ($hasMissingKeys) { - $env->addEmptyLine(); - } + $env->addEmptyLine(); $env->set($data);