-
-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4.x] Fix
tenants:run
argument parsing (#1287)
* Use StringInput instead of ArgvInput so that tenants:run accepts args properly * Test that tenants:run parses the arguments correctly * Fix code style (php-cs-fixer) * Fix PHPStan issue * remove unnecessary () --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Samuel Štancl <[email protected]>
- Loading branch information
1 parent
f955b38
commit 0e223e0
Showing
4 changed files
with
54 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Stancl\Tenancy\Tests\Etc\Console; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class AnotherExampleCommand extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'bar {name} {email} {password} {arg} {--option=}'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
$this->line('Name: ' . $this->argument('name')); | ||
$this->line('Email: ' . $this->argument('email')); | ||
$this->line('Password: ' . $this->argument('password')); | ||
$this->line('Argument: ' . $this->argument('arg')); | ||
$this->line('Option: ' . $this->option('option')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters