FriendsOfSymfony / FOSTwitterBundle

UNMAINTAINED. Please use HWIOAuthBundle as a replacement for FOSTwitterBundle.
http://friendsofsymfony.github.com/
145 stars 38 forks source link

Argument 2 passed error in TwitterProvider #62

Open ec-gsitu opened 11 years ago

ec-gsitu commented 11 years ago

Hi I've been stuck at this for a couple days now. I have this error when i'm trying to load my page. Any suggestions on how to solve this problem or what I can do?

PHP Catchable fatal error: Argument 2 passed to FOS\TwitterBundle\Security\Authentication\Provider\TwitterProvider::__construct() must implement interface Symfony\Component\Security\Core\User\UserProviderInterface, instance of FOS\TwitterBundle\Security\Authentication\Provider\TwitterProvider given, called in /home/gsitu/git/dev-local2/app/cache/dev/appDevDebugProjectContainer.php on line 4731 and defined in /home/gsitu/git/dev-local2/vendor/friendsofsymfony/twitter-bundle/FOS/TwitterBundle/Security/Authentication/Provider/TwitterProvider.php on line 36

ec-gsitu commented 11 years ago

Just fixed it, I had an error in my controller where I was calling the wrong TwitterProvider. Also had the argument 4 error fixed it with changing the use statement in friendsofsymfony/twitter-bundle/FOS/TwitterBundle/Security/Authentication/Provider/TwitterProvider.php

to use Symfony\Component\HttpFoundation\Session\Session