<p dir="auto">It would be really nice if it waa possible to pass an instance of \Symfony\Component\Finder\Finder to some of the methods in \Symfony\Component\Filesystem\Filesystem, such as <code class="notranslate">remove</code> and <code class="notranslate">touch</code>.</p>
<p dir="auto">Problem:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$doctrine-&gt;resetManager();
$doctrine-&gt;getManager(); // null"><pre class="notranslate"><code class="notranslate">$doctrine-&gt;resetManager();
$doctrine-&gt;getManager(); // null
</code></pre></div>
<p dir="auto">Broken since: Symfony 2.3.</p>
<p dir="auto">The trail starts in <code class="notranslate">Symfony\Bridge\Doctrine\ManagerRegistry</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    protected function resetService($name)
    {
        $this-&gt;container-&gt;set($name, null);
    }"><pre class="notranslate"><code class="notranslate">    protected function resetService($name)
    {
        $this-&gt;container-&gt;set($name, null);
    }
</code></pre></div>
<p dir="auto">In <code class="notranslate">Symfony\Component\DependencyInjection\Container</code> (Symfony 2.3)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
    {
[..]
        // re-use shared service instance if it exists
        if (array_key_exists($id, $this-&gt;services)) {
            return $this-&gt;services[$id];
        }"><pre class="notranslate"><code class="notranslate">    public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
    {
[..]
        // re-use shared service instance if it exists
        if (array_key_exists($id, $this-&gt;services)) {
            return $this-&gt;services[$id];
        }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$example_array = array('test' =&gt; null);
var_dump(array_key_exists('test', $example_array); // true
var_dump(isset($example_array['test']); // false"><pre class="notranslate"><code class="notranslate">$example_array = array('test' =&gt; null);
var_dump(array_key_exists('test', $example_array); // true
var_dump(isset($example_array['test']); // false
</code></pre></div>
<p dir="auto">This used to work in <code class="notranslate">Symfony\Component\DependencyInjection\Container</code> (Symfony 2.2)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
    {
        $id = strtolower($id);

        if (isset($this-&gt;services[$id])) {
            return $this-&gt;services[$id];
        }"><pre class="notranslate"><code class="notranslate">    public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
    {
        $id = strtolower($id);

        if (isset($this-&gt;services[$id])) {
            return $this-&gt;services[$id];
        }
</code></pre></div>
<p dir="auto">Next to this, the <code class="notranslate">resetService</code> method should return the new entity manager, as seen in the docs of <code class="notranslate">Doctrine\Common\Persistence\ManagerRegistry</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    /**
     * Resets a named object manager.
     *  [..]
     * @return \Doctrine\Common\Persistence\ObjectManager
     */
    function resetManager($name = null);"><pre class="notranslate"><code class="notranslate">    /**
     * Resets a named object manager.
     *  [..]
     * @return \Doctrine\Common\Persistence\ObjectManager
     */
    function resetManager($name = null);
</code></pre></div>
<p dir="auto">Right now it does not.</p>