Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3924

Symfony upgrade give me error from 4.1 to 4.4

$
0
0

I just made the migration from symfony 4.1 to 4.4I have this error:

Argument 1 passed to App\EventListener\KernelRequestListener::__construct() must be an instance of Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage, instance of Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage given, called in C:\xampp\htdocs\chat-project-symfony\var\cache\dev\Container06Mjwya\srcApp_KernelDevDebugContainer.php on line 1130

While if you look at my KernelRequestListener :

<?phpnamespace App\EventListener;use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;//..class KernelRequestListener{    private $tokenStorage;    /**     * KernelRequestListener constructor.     * @param TokenStorage $tokenStorage     * ...     */    public function __construct(TokenStorage $tokenStorage/*...*/)    {        $this->tokenStorage = $tokenStorage;        //..    }}

Here is my config/services.yaml file:

#...services:  #..  App\EventListener\KernelRequestListener:    arguments: [ '@security.token_storage' ]    tags:      - { name: kernel.event_listener, event: kernel.request }      - { name: kernel.event_listener, event: kernel.response }

I don't know why symfony tell me that I'm using Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage while it's clearing written Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage

I already tried to clear the cache folder and also delete the cache folder and it didn't change.

How can I fix this ?

Thank you


Viewing all articles
Browse latest Browse all 3924

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>