Skip to content

Commit

Permalink
Merge pull request #2 from osteel/feature/symfony6-support
Browse files Browse the repository at this point in the history
Symfony 6 support
  • Loading branch information
osteel authored Feb 8, 2022
2 parents de7a7ee + 878e156 commit aa6f672
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
php-version:
- "7.4"
- "8.0"
- "8.1"

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"require": {
"php": "^7.4|^8.0",
"symfony/console": "^5.3.0"
"symfony/console": "^5.0 | ^6.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.6",
Expand Down
9 changes: 4 additions & 5 deletions src/Services/Interpreter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ class Interpreter extends SymfonyStyle
/**
* {@inheritdoc}
*
* @param string $question
* @param string|null $default
* @param callable|null $validator
* @param string $question
* @param string|null $default
* @return string
*/
public function ask(string $question, string $default = null, callable $validator = null)
public function question(string $question, string $default = null)
{
return parent::ask(sprintf(' ✍️ %s', $question), $default, $validator);
return $this->ask(sprintf(' ✍️ %s', $question), $default);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Services/Interviewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public function collect(InputInterface $input): ConversionData

$data->setFile($input->getArgument('file'));

$author = $this->interpreter->ask('Who is the author? (leave blank to skip)');
$author = $this->interpreter->question('Who is the author? (leave blank to skip)');
$data->setAuthor($author);

$url = $this->interpreter->ask('Would you like to add a URL? (leave blank to skip)');
$url = $this->interpreter->question('Would you like to add a URL? (leave blank to skip)');
$data->setUrl($url);

return $data;
Expand Down

0 comments on commit aa6f672

Please sign in to comment.