Skip to content

Commit

Permalink
Merge pull request #60 from orchestral/8/prompt-namespace-prefix
Browse files Browse the repository at this point in the history
* [8.x] Prompts to configure generated namespace

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Dec 11, 2024
2 parents 435fa95 + f8e9ba1 commit 73a8bd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/DevToolCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ protected function appendAutoloadDevToComposer(array $content, Filesystem $files

$namespacePrefix = '';

if ($this->components->confirm('Prefix with `Workbench` namespace?', default: true)) {
if (confirm('Prefix with `Workbench` namespace?', default: true)) {
$namespacePrefix = 'Workbench\\';
}

Expand Down
1 change: 1 addition & 0 deletions tests/Console/DevToolCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function it_can_be_installed_with_prompt_for_missing_arguments()
{
$this->artisan('workbench:devtool')
->expectsConfirmation('Run Workbench installation?', false)
->expectsConfirmation('Prefix with `Workbench` namespace?', true)
->assertSuccessful();

$this->assertCommandExecutedWithDevTool();
Expand Down

0 comments on commit 73a8bd7

Please sign in to comment.