symfony/symfony — Issue #3098: [Console] Add setOption to InputInterface
Author: mrmark
Created: 2012-01-12 01:25:35+00:00
State: open

I was using commands in Symfony2 as inspiration for building my own commands. Some Symfony2 commands implement the interact method to ask input from the user and sets those values to $input so the execute method can read the values from $input. This is awesome!

The problem is that in the interact method, $input->setOption(...) is being called, but that method is not defined in the InputInterface, but rather in the Input class. I'm wondering if the InputInterface needs the setOption(...) method.

I know this issue doesn't actually break anything, but it does help developers know what methods are really available.

Cheers and thanks