<p dir="auto">Considering this code:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;

$resolver = new OptionsResolver();
$resolver-&gt;setDefaults([
    'foo' =&gt; 1,
    'bar' =&gt; null,
]);

$options = $resolver-&gt;resolve([
    'bar' =&gt; function (Options $options) {
        return $options['foo'];
    }
]);
var_dump($options);"><pre class="notranslate"><span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">OptionsResolver</span>\<span class="pl-v">Options</span>;
<span class="pl-k">use</span> <span class="pl-v">Symfony</span>\<span class="pl-v">Component</span>\<span class="pl-v">OptionsResolver</span>\<span class="pl-v">OptionsResolver</span>;

<span class="pl-s1"><span class="pl-c1">$</span>resolver</span> = <span class="pl-k">new</span> <span class="pl-v">OptionsResolver</span>();
<span class="pl-s1"><span class="pl-c1">$</span>resolver</span>-&gt;<span class="pl-en">setDefaults</span>([
    <span class="pl-s">'foo'</span> =&gt; <span class="pl-c1">1</span>,
    <span class="pl-s">'bar'</span> =&gt; <span class="pl-c1">null</span>,
]);

<span class="pl-s1"><span class="pl-c1">$</span>options</span> = <span class="pl-s1"><span class="pl-c1">$</span>resolver</span>-&gt;<span class="pl-en">resolve</span>([
    <span class="pl-s">'bar'</span> =&gt; <span class="pl-k">function</span> (<span class="pl-smi"><span class="pl-smi">Options</span></span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>) {
        <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>[<span class="pl-s">'foo'</span>];
    }
]);
var_dump(<span class="pl-s1"><span class="pl-c1">$</span>options</span>);</pre></div>
<p dir="auto">Result <strong>before</strong> 2.6:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array (size=2)
  'foo' =&gt; int 1
  'bar' =&gt; int 1"><pre class="notranslate"><code class="notranslate">array (size=2)
  'foo' =&gt; int 1
  'bar' =&gt; int 1
</code></pre></div>
<p dir="auto">Result <strong>after</strong> 2.6:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array (size=2)
  'foo' =&gt; int 1
  'bar' =&gt; 
    object(Closure)[2242]"><pre class="notranslate"><code class="notranslate">array (size=2)
  'foo' =&gt; int 1
  'bar' =&gt; 
    object(Closure)[2242]
</code></pre></div>
<p dir="auto">I know Closure resolution is made for default options depending on others but sometimes it could be useful to reuse a default option.</p>
<p dir="auto">I'll provide a link to my Stack Overflow question if anyone is interested in more details. To sum it up I'm using postman to send POST requests to <strong>app.php/myroute/login</strong> which are converted into GET requests. If I post to just <strong>/myroute/login</strong> everything works fine. I post to the original url but move the .htaccess file and xdebug shows the method as being post. I don't think many people will access the application through app.php so I would say this is very low priority but it gave me a bit of trouble, I was accessing through app_dev.php and decided to remove _dev which lead me to this. People may come across this though in the future so I figured it would be good to submit it.</p>
<p dir="auto"><a href="http://stackoverflow.com/questions/31280841/symfony2-app-php-receiving-post-request-as-get-app-dev-php-works-fine/31281297#31281297" rel="nofollow">My Stack Overflow question</a></p>