title: Doctrine generate entity aborted
body: <p>When I try to execute the command</p>
  
  <pre><code>php bin\console doctrine:generate:entity
  </code></pre>
  
  <p>I put the name of my bundle, the type of configuration that I want, in my case yml, but at the moment of insert the name of the first attribute for the entity the console starts to out the message</p>
  
  <pre><code>New field name (press &lt;return&gt; to stop adding fields): Aborted
  </code></pre>
  
  <p>Until I don't use the combination <kbd>ctrl</kbd>+<kbd>c</kbd> the console don't stop of print this message.</p>
  
  <p>There is a question with the same problem here:
  <a href="https://stackoverflow.com/q/44721325/4757412">Doctrines automatically aborted in Symfony</a>.
  In that question someone says that is problem of stty and stdin but nobody explain how solve it.</p>
  
  <p>Update:
  In Symfony there are two functions that return a RuntimeException with the message Aborted. Both are in the QuesionHelper class. The first function is getHiddenResponse and the second is readFromInput. I suppose that the second function is returning the error but I don't know why, I have not yet been able to debug it but I think that the options are:</p>
  
  <ol>
  <li>The condition of the if return false and the function fgets return false too. In this case can be that the variable $stream isn't equals to STDIN or that the function readline don't exists</li>
  <li>The function readLine doesn't works.</li>
  </ol>
  
  <p>This is the code of the readFromInput function:</p>
  
  <pre><code> private function readFromInput($stream)
  {
      if (STDIN === $stream &amp;&amp; function_exists('readline')) {
          $ret = readline();
      } else {
          $ret = fgets($stream, 4096);
      }
  
      if (false === $ret) {
          throw new RuntimeException('Aborted');
      }
  
      return trim($ret);
  }
  </code></pre>