title: Symfony2 won't load custom authentication provider, loads DaoAuthenticationProvider
body: <p><em>This is a continuation of <a href="https://stackoverflow.com/questions/14928514/symfony2-authentication-via-3rd-party-rest-api">my last question</a>.</em></p>
  
  <p>Hi,</p>
  
  <p>I'm implementing, in a Symfony2 application, a custom authentication provider in order to authenticate against the Wordnik REST API.</p>
  
  <p>On application load, no matter what request path, this is the exception I get:</p>
  
  <p><code>( ! ) Fatal error: Cannot access parent:: when current class scope has no parent in /[..]/WordRot/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php on line 43</code></p>
  
  <p>You can see the full stacktrace <a href="https://gist.github.com/freen/5006382" rel="nofollow noreferrer">here</a>.</p>
  
  <p>Second to last line in the trace reveals that <strong>it is loading the</strong> <code>DaoAuthenticationProvider</code>:</p>
  
  <p><code>18 0.0217  1922792 Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider-&gt;__construct( )   ../appDevDebugProjectContainer.php:3071</code></p>
  
  <p>But none of my configuration refers to that provider, or anything that extends it. My custom provider directly implements the <code>AuthenticationProviderInterface</code>.</p>
  
  <p>So I assume that my configuration is wrong, and somewhere I need to be explicitly setting the <code>WordnikProvider</code>, but I'm not sure where! Research has not provided any clues to this issue.</p>
  
  <p>Any help would be much appreciated!</p>
  
  <p><strong>Files</strong></p>
  
  <ul>
  <li><a href="https://github.com/freen/wordrot/blob/master/app/config/config.yml" rel="nofollow noreferrer">/app/config/config.yml</a></li>
  <li><a href="https://github.com/freen/wordrot/blob/master/app/config/security.yml" rel="nofollow noreferrer">/app/config/security.yml</a></li>
  <li><a href="https://github.com/freen/wordrot/blob/master/src/WordRot/PlayBundle/Security/Authentication/Provider/WordnikProvider.php" rel="nofollow noreferrer">/src/WordRot/PlayBundle/Security/Authentication/Provider/WordnikProvider.php</a></li>
  <li><a href="https://github.com/freen/wordrot/blob/master/src/WordRot/PlayBundle/Security/Authentication/Token/WordnikUserToken.php" rel="nofollow noreferrer">/src/WordRot/PlayBundle/Security/Authentication/Token/WordnikUserToken.php</a></li>
  <li><a href="https://github.com/freen/wordrot/blob/master/src/WordRot/PlayBundle/Security/Firewall/WordnikListener.php" rel="nofollow noreferrer">/src/WordRot/PlayBundle/Security/Firewall/WordnikListener.php</a></li>
  <li><a href="https://github.com/freen/wordrot/blob/master/src/WordRot/PlayBundle/DependencyInjection/Security/Factory/WordnikFactory.php" rel="nofollow noreferrer">/src/WordRot/PlayBundle/DependencyInjection/Security/Factory/WordnikFactory.php</a></li>
  </ul>