Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Fix install:git, make:database, update:env commands #14

Merged
merged 3 commits into from
Jan 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Commands/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function getFileContent(InputInterface $input, $option)
return $filename;
}

if ($filename && ftell(STDIN) === 0) {
if ($filename && ftell(STDIN) !== false) {
return file_get_contents($filename);
}

Expand Down
2 changes: 2 additions & 0 deletions src/Commands/Databases/Make.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Make extends BaseCommand
protected $optionMap = [
'user' => 'user',
'password' => 'password',
'name' => 'name',
];

/**
Expand All @@ -27,6 +28,7 @@ public function configure()
->addArgument('server', InputArgument::REQUIRED, 'The id of the server to create the database on.')
->addOption('user', null, InputOption::VALUE_REQUIRED, 'The username of an (optional) database user to create.', null)
->addOption('password', null, InputOption::VALUE_REQUIRED, 'The password of the database user. Required with "user".', null)
->addOption('name', null, InputOption::VALUE_REQUIRED, 'The name of the database.', null)
->setDescription('Create a new database.');
}

Expand Down
7 changes: 7 additions & 0 deletions src/Commands/Env/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@

class Update extends BaseCommand
{
/**
* @var array
*/
protected $optionMap = [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required when the keys are the same as the values.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fillData() returns an empty array in this case...

'file' => 'file',
];

/**
* {@inheritdoc}
*/
Expand Down
8 changes: 8 additions & 0 deletions src/Commands/Projects/InstallGit.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

class InstallGit extends BaseCommand
{
/**
* @var array
*/
protected $optionMap = [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required when the keys are the same as the values.

'provider' => 'provider',
'repository' => 'repository',
];

/**
* {@inheritdoc}
*/
Expand Down