<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.1.2</p>
<p dir="auto"><strong>Description</strong><br>
Since i update from 4.1.1 to 4.1.2, default binding from controllers failed :</p>
<p dir="auto">Controller "App\Controller\Admin\KitController::edit()" requires that you provide a value for the "$customDir" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.</p>
<p dir="auto">custom_dir is defined in env, i try to rollback to 4.1.1 and it works.</p>
<p dir="auto"><strong>How to reproduce</strong><br>
service.yml</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="services:
    # default configuration for services in *this* file
    _defaults:
        bind:
            $customDir: '%custom_dir%'"><pre class="notranslate"><code class="notranslate">services:
    # default configuration for services in *this* file
    _defaults:
        bind:
            $customDir: '%custom_dir%'
</code></pre></div>
<p dir="auto">Controller :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public function edit($customDir) {
// ... 
}"><pre class="notranslate"><code class="notranslate">public function edit($customDir) {
// ... 
}
</code></pre></div>
<p dir="auto"><strong>Symfony version(s) affected</strong>: 3.4.13 (and other new patch releases for 4.0 &amp; 4.1)</p>
<p dir="auto"><strong>Description</strong><br>
I just updated my app from <code class="notranslate">3.4.12</code> to <code class="notranslate">3.4.13</code> and have an error with a service configuration.</p>
<p dir="auto"><strong>How to reproduce</strong><br>
Add a binding by variable name for an argument of a controller action.</p>
<p dir="auto">I have a controller like this:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class LegacyAdminController extends Controller
{
    /**
     * @Route(&quot;/{path}&quot;, requirements={&quot;path&quot;=&quot;.+&quot;})
     */
    public function proxyAction(
        ServerRequestInterface $request,
        LegacyUserMapper $legacyUserMapper,
        Client $legacyProxyClient
    ) {"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">LegacyAdminController</span> <span class="pl-k">extends</span> <span class="pl-v">Controller</span>
{
    <span class="pl-c">/**</span>
<span class="pl-c">     * @Route("/{path}", requirements={"path"=".+"})</span>
<span class="pl-c">     */</span>
    <span class="pl-k">public</span> <span class="pl-k">function</span> proxyAction(
        <span class="pl-smi"><span class="pl-smi">ServerRequestInterface</span></span> <span class="pl-s1"><span class="pl-c1">$</span>request</span>,
        <span class="pl-smi"><span class="pl-smi">LegacyUserMapper</span></span> <span class="pl-s1"><span class="pl-c1">$</span>legacyUserMapper</span>,
        <span class="pl-smi"><span class="pl-smi">Client</span></span> <span class="pl-s1"><span class="pl-c1">$</span>legacyProxyClient</span>
    ) {</pre></div>
<p dir="auto">And the config:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    App\Controller\LegacyAdminController:
        tags: ['controller.service_arguments']
        bind:
            $legacyProxyClient: '@ca_admin.legacy_proxy_client'"><pre class="notranslate">    <span class="pl-ent">App\Controller\LegacyAdminController</span>:
        <span class="pl-ent">tags</span>: <span class="pl-s">['controller.service_arguments']</span>
        <span class="pl-ent">bind</span>:
            <span class="pl-ent">$legacyProxyClient</span>: <span class="pl-s"><span class="pl-pds">'</span>@ca_admin.legacy_proxy_client<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">Now I get this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In ResolveBindingsPass.php line 48:
                                                                                                     
  Unused binding &quot;$legacyProxyClient&quot; in service &quot;CA\AdminBundle\Controller\LegacyAdminController&quot;."><pre class="notranslate"><code class="notranslate">In ResolveBindingsPass.php line 48:
                                                                                                     
  Unused binding "$legacyProxyClient" in service "CA\AdminBundle\Controller\LegacyAdminController".
</code></pre></div>
<p dir="auto"><strong>Possible Solution</strong><br>
As just discussed with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nicolas-grekas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nicolas-grekas">@nicolas-grekas</a>  the problem was introduced in <a href="https://github.com/symfony/symfony/pull/27834/files">https://github.com/symfony/symfony/pull/27834/files</a>.</p>