title: How to fetch results into a custom object now that fetchAll() and FetchMode are deprecated?
body: <p>On some existing code I have the following statement (after a rather long query building exercise):</p>
  <pre class="lang-php prettyprint-override"><code>return $statement-&gt;fetchAll(
      DBAL\FetchMode::CUSTOM_OBJECT,
      PublishedLead::class
  );
  </code></pre>
  <p>This works (so far), but I see now that both <code>fetchAll()</code> and <code>FetchMode</code> are deprecated since DBAL 2.11:</p>
  <pre><code>// ResultStatement::fetchAll()
  /* 
   * @deprecated Use fetchAllNumeric(), fetchAllAssociative()
   * or fetchFirstColumn() instead.
   */
  </code></pre>
  <pre><code>// FetchMode
  /* 
   * @deprecated Use one of the fetch- or iterate-related 
   * methods on the Statement
   */
  </code></pre>
  <p>In the interest of keeping my code as forward-compatible as possible, how can write this to fetch the results hydrating into a custom objects? Do I have to write a custom hydrating logic from the results, or can DBAL do this for me?</p>