-
Notifications
You must be signed in to change notification settings - Fork 27
Conversation
There are bugs on these code, once I have time I will fix them. I just would like a review to know if I'm following the right path |
…ap option on YAML file
Thanks |
Any progress with this pull request? |
@@ -188,6 +192,10 @@ public function __construct($version) | |||
$c->extend('console.commands', function($c) { | |||
return new Command\DescribeCommand; | |||
}); | |||
|
|||
$c->extend('console.definitions', function($c) { | |||
return new InputOption('bootstrap=/path/to/file.php', null, InputOption::VALUE_REQUIRED, 'Run a bootstrap file before start'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The construction of the option is wrong. The first argument is the name of the option, it should be something like
new InputOption('bootstrap', null, InputOption::VALUE_REQUIRED, 'Run a bootstrap file before start')
see http://api.symfony.com/2.2/Symfony/Component/Console/Input/InputOption.html#method___construct
Actually this PR duplicates this one #64 |
parent::doRun($input, $output); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
Looking at the code. I think it is better that the |
|
Added the bootstrap option (issue #52)
After looking the issue and the tips on the pull request 64. I did quickly this peace of code and added this feature:
TODO: read the yaml file for a possible bootstrap configuration and load it.
I would like a review from you guys if the way I've done is ok or if I'm breaking any pattern that you could be using.
Thanks
Romulo