File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class RefactorConfigCommand extends Command
3434 protected const SUPPORTED_FORMATS = ['yaml ' ];
3535
3636 /** @var string */
37- protected $ signature = 'refactor:config {format : The new configuration format} ' ;
37+ protected $ signature = 'refactor:config {format : The new configuration format} {--skip-diff : Skip diffing and dump the entire config} ' ;
3838
3939 /** @var string */
4040 protected $ description = 'Migrate the configuration to a different format. ' ;
@@ -59,7 +59,11 @@ protected function migrateToYaml(): int
5959 {
6060 $ this ->ensureYamlConfigDoesNotExist ();
6161
62- $ config = $ this ->getConfigDiff ();
62+ $ config = config ('hyde ' );
63+
64+ if (! $ this ->option ('skip-diff ' )) {
65+ $ config = $ this ->getDiffedConfig ($ config );
66+ }
6367
6468 if (empty ($ config )) {
6569 $ this ->warn ("You don't seem to have any configuration to migrate. " );
@@ -84,9 +88,8 @@ protected function ensureYamlConfigDoesNotExist(): void
8488 }
8589 }
8690
87- protected function getConfigDiff ( ): array
91+ protected function getDiffedConfig ( $ config ): array
8892 {
89- $ config = config ('hyde ' );
9093 $ default = require Hyde::vendorPath ('config/hyde.php ' );
9194
9295 return $ this ->diffConfig ($ config , $ default );
You can’t perform that action at this time.
0 commit comments