PHP 7 with Doctrine MongoDB ODM
<p>I have a Symfony 2 application that is using Doctrine MongoDB ODM and I'm trying to get this running with PHP 7.</p>

<p>I have installed PHP 7 successfully but installing dependencies through Composer is giving me grief with the following error:</p>

<pre><code>doctrine/mongodb 1.0.x-dev requires ext-mongo &gt;=1.2.12,&lt;1.7-dev -&gt; the requested PHP extension mongo is missing from your system.
</code></pre>

<p>I managed to install the PHP 7 mongo extension through apt:</p>

<pre><code>apt-get install php7.0-mongo
</code></pre>

<p>Just to be sure, I have also installed the <code>mongodb</code> extension through PECL:</p>

<pre><code>sudo apt-get install -y php-pear php7.0-dev libcurl3-openssl-dev
sudo pecl install mongodb
</code></pre>

<p>However, I'm still get the error that the mongo extension cannot be found. There seems to be a version discrepancy in that <code>ext-mongo &gt;=1.2.12</code> is required but only <code>1.1.6</code> was installed::</p>

<pre><code>$ php -i | grep mongo
/etc/php/7.0/cli/conf.d/20-mongodb.ini,
mongodb
mongodb support =&gt; enabled
mongodb version =&gt; 1.1.6
mongodb stability =&gt; stable
libmongoc version =&gt; 1.3.5
mongodb.debug =&gt; no value =&gt; no value
</code></pre>

<p>What is the correct way to install the mongo extension required by Doctrine ODM for PHP 7?</p>