title: Symfony2 / Doctrine2 can't connect to IBM DB2 database using ibm_db2 client
body: <p>I'm having an issue with Doctrine2 that seems like a bug but I can't find anyone else on Google with the same problem. I'm hoping somewhere here has experienced this problem and knows how to solve it.</p>
  
  <p>Basically I'm trying to connect to a DB2 database. I prefer to use the ibm_db2 client as it's supposed to be better and faster (than PDO_IBM or PDO_ODBC). I've installed the client and tested it. Everything seems to work there. But when I use Doctrine I get the following error:</p>
  
  <pre><code>Notice: Undefined index: protocol in
  ...[my folders].../vendor/doctrine-dbal/lib/Doctrine/DBAL/Driver/
  IBMDB2/DB2Driver.php line 54
  </code></pre>
  
  <p>So in that file it's looking for <code>$params['protocol']</code> which seems to have no defaults. So in config.yml I tried this:</p>
  
  <pre><code># Doctrine Configuration
  doctrine:
      dbal:
          default_connection:   default
          driver:   %database_driver%
          host:     %database_host%
          port:     %database_port%
          dbname:   %database_name%
          user:     %database_user%
          password: %database_password%
          protocol: TCPIP
  </code></pre>
  
  <p>But when I do that it complains that <code>protocol</code> is an undefined configuration option (and looking through the DependencyInjection stuff it doesn't appear anywhere in there.)</p>
  
  <p>However: if I hard-code TCPIP into the Driver file where the error occurs ... it all works. This is undesirable since it involves changing the vendor supplied file. Has anyone found a way to properly specify the protocol in configuration?</p>