-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added question helper compatibility alongside the dialog in CreateSit… #816
Conversation
heej i rebased and fixed the structrual stuf i had done wrong, how do i get the test to run again? #magic?!?! |
Command/CreateSiteCommand.php
Outdated
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$dialog = $this->getHelperSet()->get('dialog'); | ||
if (!$this->getHelperSet()->has('question')) { |
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.
Please remove the !
and swap lines 60 and 62
Command/CreateSiteCommand.php
Outdated
$helper = $this->getHelperSet()->get('dialog'); | ||
} else { | ||
$helper = $this->getHelperSet()->get('question'); | ||
} |
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.
Please provide NEXT_MAJOR
instructions indicating what to do when dropping support for old versions of sf
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.
changed the if statements around,
is there a specific best practice for adding these instructions?
and where can i read up on that?
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.
You can find it here:
https://github.com/sonata-project/SonataPageBundle/blob/3.x/CONTRIBUTING.md
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.
cheers
Command/CreateSiteCommand.php
Outdated
} else { | ||
$question = new \Symfony\Component\Console\Question\ConfirmationQuestion('Confirm site creation (Y/N)', false, '/^(y|j)/i'); | ||
$confirmation = $helper->ask($input, $output, $question); | ||
} |
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.
Same here
Please associate your webengine.nl email address with your Github account, or change the email in your commits to an address already associated with it. |
I cancelled the second last build so that the last build would run. A build is run each time you push ;) |
Command/CreateSiteCommand.php
Outdated
|
||
if ($input->getOption('no-confirmation') || $dialog->askConfirmation($output, 'Confirm site creation ?', false)) { | ||
if ($this->getHelperSet()->has('question')) { | ||
$question = new \Symfony\Component\Console\Question\ConfirmationQuestion('Confirm site creation (Y/N)', false, '/^(y|j)/i'); |
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.
Please linebreak this
Command/CreateSiteCommand.php
Outdated
$question = new \Symfony\Component\Console\Question\ConfirmationQuestion('Confirm site creation (Y/N)', false, '/^(y|j)/i'); | ||
$confirmation = $helper->ask($input, $output, $question); | ||
} else { | ||
$confirmation = $input->getOption('no-confirmation') || $helper->askConfirmation($output, 'Confirm site creation ?', false); |
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.
Linebreak this too please.
0c82359
to
7693337
Compare
Command/CreateSiteCommand.php
Outdated
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$dialog = $this->getHelperSet()->get('dialog'); | ||
/* | ||
* NEXT_MAJOR: do remove if statment and use the question helper only (true value of if) when dropping sf < 2.5 |
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.
- do remove if statment and use the question helper only (true value of if) when dropping sf < 2.5
+ remove if statement and use the question helper only (true value of if) when dropping sf < 2.5
Command/CreateSiteCommand.php
Outdated
if ($input->getOption('no-confirmation') || $dialog->askConfirmation($output, 'Confirm site creation ?', false)) { | ||
/* | ||
* NEXT_MAJOR: do remove if statment and use the question helper only (true value of if) when dropping sf < 2.5 | ||
*/ |
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.
Same here, and after that, good to merge :)
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.
oke fixed that
Command/CreateSiteCommand.php
Outdated
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$dialog = $this->getHelperSet()->get('dialog'); | ||
/* | ||
* NEXT_MAJOR: remove if statment and use the question helper only (true value of if) when dropping sf < 2.5 |
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.
- statment
+ statement
@sonata-project/contributors please review |
Command/CreateSiteCommand.php
Outdated
} else { | ||
$confirmation = $input->getOption('no-confirmation') || $helper->askConfirmation( | ||
$output, | ||
'Confirm site creation ?', |
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.
No whitespace infront of the question mark please
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.
Ping @Dunduro
Command/CreateSiteCommand.php
Outdated
$question = new \Symfony\Component\Console\Question\ConfirmationQuestion( | ||
'Confirm site creation (Y/N)', | ||
false, | ||
'/^(y|j)/i' |
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.
Why did you allow the letter j
?
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.
Wel thats a funny story but i was looking the symfony 3 explanation and it had it as an example. But thought it made sense since symfony is in essence a multi langual platform, and in dutch for instance is 'ja'. But if ya think it shouldnt be there i dont mind taking it away
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.
If you keep it, please add o
for french, s
for spanish, i
for hungarian, h
for Klingon and so on
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.
Haha good point :p i'll get it fixed tomorrow
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.
oke fixed now
143a5aa
to
7ea64e8
Compare
Thanks @Dunduro ! |
I am targeting this branch, because this is BC.
Changelog
Subject
Symfony 3 intergration