H
H
hitakiri2016-02-27 21:25:45
symfony
hitakiri, 2016-02-27 21:25:45

Symfony SecurityContextInterface - myth or reality (bug, oversight or feature)?

Good time.
I'm learning Symfony, now version 3.0.2
I'm picking a din bundle now, where a certain "kulibin" uses \Twig_Extension to determine user rights in the template .
I find the following -

use Symfony\Component\Security\Core\SecurityContextInterface;

But the New in Symfony 2.6: Security component manual says that this is deprecated and there is no such space anymore.
After that, I decided to check the entire project for the SecurityContextInterface and found something strange - \vendor\symfony\symfony\src\Symfony\Bridge\Twig\Extension\SecurityExtension.php also uses -
use Symfony\Component\Security\Core\SecurityContextInterface;

I read that all backwards compatibility was removed in Symfony3, so what does SecurityContextInterface do in it ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Krasavin, 2016-02-27
@hitakiri

It's just that you are using the outdated symfony/twig-bridge
In the master branch, this file looks like this: https://github.com/symfony/twig-bridge/blob/master...
Look in composer.json or docomposer update

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question