Skip to content

Commit

Permalink
Ignore user-specified values in upgrader
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Sep 20, 2021
1 parent b4f78bf commit 75b5927
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Commands/GenerateDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class GenerateDocumentation extends Command

public function newLine($count = 1)
{
// TODO Remove when Laravel g is no longer supported
// TODO Remove when Laravel 6 is no longer supported
$this->getOutput()->write(str_repeat("\n", $count));
}

Expand Down Expand Up @@ -122,7 +122,10 @@ protected function mergeUserDefinedEndpoints(array $groupedEndpoints, array $use
protected function upgradeConfigFileIfNeeded(): void
{
$upgrader = Upgrader::ofConfigFile('config/scribe.php', __DIR__ . '/../../config/scribe.php')
->dontTouch('routes','example_languages', 'database_connections_to_transact', 'strategies');
->dontTouch(
'routes','example_languages', 'database_connections_to_transact', 'strategies' ,'laravel.middleware',
'postman.overrides', 'openapi.overrides'
);
$changes = $upgrader->dryRun();
if (!empty($changes)) {
$this->newLine();
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function handle(): void
{
$oldConfig = config('scribe');
$upgrader = Upgrader::ofConfigFile('config/scribe.php', __DIR__ . '/../../config/scribe.php')
->dontTouch('routes')
->dontTouch('routes', 'laravel.middleware', 'postman.overrides', 'openapi.overrides')
->move('interactive', 'try_it_out.enabled');

$changes = $upgrader->dryRun();
Expand Down

0 comments on commit 75b5927

Please sign in to comment.