<p dir="auto">Steps to reproduce error:</p>
<ol dir="auto">
<li>Setup symfony 2.8</li>
<li>Use the configuration setting security: firewals: main: form_login: intention:</li>
<li>Observe that <strong>none</strong> of the error messages intended to help correct the deprecated setting show up, only the generic error is reported, negating the utility of the 20 lines committed to fix this setting.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (isset($options['intention'])) {
            if (isset($options['csrf_token_id'])) {
                throw new \InvalidArgumentException(sprintf('You should only define an option for one of &quot;intention&quot; or &quot;csrf_token_id&quot; for the &quot;%s&quot;. Use the &quot;csrf_token_id&quot; as it replaces &quot;intention&quot;.', __CLASS__));
            }
            @trigger_error('The &quot;intention&quot; option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the &quot;csrf_token_id&quot; option instead.', E_USER_DEPRECATED);
            $options['csrf_token_id'] = $options['intention'];
        }"><pre class="notranslate"><code class="notranslate">if (isset($options['intention'])) {
            if (isset($options['csrf_token_id'])) {
                throw new \InvalidArgumentException(sprintf('You should only define an option for one of "intention" or "csrf_token_id" for the "%s". Use the "csrf_token_id" as it replaces "intention".', __CLASS__));
            }
            @trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED);
            $options['csrf_token_id'] = $options['intention'];
        }
</code></pre></div>
<p dir="auto">Lines 51 through 60 in UsernamePasswordFormAuthenticationListener.php are intended to notify the change of config property names but the code never reaches this point of execution because the property fails during the configuration build process:<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/symfony/symfony/blob/04508658b52274dfd7a6d7502d565c764e569e5d/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php#L51">symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 51
      in
      <a data-pjax="true" class="commit-tease-sha" href="/symfony/symfony/commit/04508658b52274dfd7a6d7502d565c764e569e5d">0450865</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L51" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="51"></td>
          <td id="LC51" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (isset(<span class="pl-s1"><span class="pl-c1">$</span>options</span>[<span class="pl-s">'intention'</span>])) { </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Additionally, MainConfiguration is intended to report configuration errors related to the csrf_token_id property, but it does not:<br>
<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/743e670f4acbcb5863fd0248c97bd25050f3f44f/hovercard" href="https://github.com/symfony/symfony/commit/743e670f4acbcb5863fd0248c97bd25050f3f44f"><tt>743e670</tt></a></p>
<p dir="auto">When clearing the cache, only the generic error message is reported, probably because the configuration checks are in the wrong place in the hierarchy under the function addFirewallsSection():</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]

Unrecognized option &quot;identity&quot; under &quot;security.firewalls.main.form_login&quot;
"><pre class="notranslate"><code class="notranslate">[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]

Unrecognized option "identity" under "security.firewalls.main.form_login"

</code></pre></div>
<p dir="auto">To make matters worse, contributors believe that changes are "transparent" when they are not.  And the utility of MainConfiguration error checking is diminished by not reporting the intended correction on the command line.  This is a systemic issue because there are 20 extra committed lines of unnecessary code that do not support their own purpose, either the lines in UsernamePasswordFormAuthenticationListener should be reached because MainConfiguration does not care about the superfluous setting, or MainConfiguration should work as designed and report errors with config, including using the console interface.</p>
<p dir="auto"><strong>Description</strong><br>
You currently cannot use the profiler if you do not have the twig bundle installed. If you do not install the twig-bundle, you'll have an error <code class="notranslate">The service "web_profiler.controller.profiler" has a dependency on a non-existent service "twig".</code>, even if you don't need twig in your app (api style application).</p>
<p dir="auto">The profiler should declare its own twig service, looking into its templates, rather than forcing the dev to have <del>a <code class="notranslate">templates</code> directory and</del> an explicit dependency to <code class="notranslate">twig-bundle</code>.</p>
<p dir="auto"><strong>edit</strong>: it seems that it's okay if you don't have the <code class="notranslate">templates</code> directory. My bad.</p>