title: Making a Doctrine migration adhere to ContainerAwareInterface
body: <p>I have a Doctrine migration that looks like this:</p>
  
  <pre><code>&lt;?php
  
  namespace Application\Migrations;
  
  use Doctrine\ORM\Mapping\PushNotification;
  use Doctrine\DBAL\Migrations\AbstractMigration;
  use Symfony\Component\DependencyInjection\ContainerAwareInterface;
  use Doctrine\DBAL\Schema\Schema;
  
  /**
   * Auto-generated Migration: Please modify to your needs!
   */
  class Version20180123103147 extends AbstractMigration implements ContainerAwareInterface
  {
      private $container;
  
      public function setContainer(ContainerInterface $container = null)
      {
          $this-&gt;container = $container;
      }
  
      /**
       * @param Schema $schema
       */
      public function up(Schema $schema)
      {
          $em = $this-&gt;container-&gt;getDoctrine()-&gt;getManager();
          $tableName = $em-&gt;getClassMetadata('AppBundle:PushNotification')-&gt;getTableName();
  
          $this-&gt;abortIf($this-&gt;connection-&gt;getDatabasePlatform()-&gt;getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
  
          $this-&gt;addSql('ALTER TABLE '.$tableName.' ADD COLUMN   last_offset int(11) ');
          $this-&gt;addSql('ALTER TABLE '.$tableName.' ADD COLUMN   failure_count int(11) ');
          $this-&gt;addSql('ALTER TABLE '.$tableName.' ADD COLUMN   is_sent int(11) ');
          $this-&gt;addSql('ALTER TABLE '.$tableName.' ADD COLUMN   send_date datetime ');
  
  
      }
  
      /**
       * @param Schema $schema
       */
      public function down(Schema $schema)
      {
  
          $em = $this-&gt;container-&gt;getDoctrine()-&gt;getManager();
          $tableName = $em-&gt;getClassMetadata('AppBundle:PushNotification')-&gt;getTableName();
  
          $this-&gt;abortIf($this-&gt;connection-&gt;getDatabasePlatform()-&gt;getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
  
          $this-&gt;addSql('ALTER TABLE '.$tableName.' DROP COLUMN   last_offset ');
          $this-&gt;addSql('ALTER TABLE '.$tableName.' DROP COLUMN   failure_count ');
          $this-&gt;addSql('ALTER TABLE '.$tableName.' DROP COLUMN   is_sent ');
          $this-&gt;addSql('ALTER TABLE '.$tableName.' DROP COLUMN   send_date ');
  
      }
  }
  </code></pre>
  
  <p>... and when running migrations, I get an error stating <code>Declaration of Application\Migrations\Version20180123103147::setContainer() must be compatible with Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer(Symfony\Component\DependencyInjection\ContainerInterface $container = NULL)</code></p>
  
  <p>This error seems out of place since I copied the method signature directly from the interface in question. </p>
  
  <p><strong>Is there an obvious bit of code that I'm missing here?</strong> </p>