ShibbolethBundle icon indicating copy to clipboard operation
ShibbolethBundle copied to clipboard

Symfony 3: updates to @famoser's fork

Open sneakyvv opened this issue 7 years ago • 2 comments

famoser's fork causes the following error

FatalThrowableError in ShibbolethListener.php line 54: Type error: Argument 6 passed to KULeuven\ShibbolethBundle\Security\ShibbolethListener::__construct() must be an instance of Symfony\Component\HttpKernel\Log\LoggerInterface, instance of Symfony\Bridge\Monolog\Logger given, called in /var/www/html/var/cache/dev/appDevDebugProjectContainer.php on line 3498

Symfony\Component\HttpKernel\Log\LoggerInterface is deprecated since Symfony 2.2 (http://api.symfony.com/2.8/Symfony/Component/HttpKernel/Log/LoggerInterface.html) and has been removed in Symfony 3.0, causing this error.

It should use Psr\Log\LoggerInterface instead.

Also, Symfony\Component\Security\Core\SecurityContextInterface is declared, but never used.

Since I was not able to create an issue in famoser's fork, I created a separate fork for this.

sneakyvv avatar May 02 '17 11:05 sneakyvv

Thanks for the contribution! Just wondering how are we gonna handle backwards compatibility? Probably there are people still using Symfony 2.x

rmoreas avatar Jun 21 '17 13:06 rmoreas

I guess you would either need two "master branches", i.e. master-sf3 and master-sf2, or if perhaps tagging/versioning the current state would also work.

PS: I suppose you reacted to a notification about my lastest commit (cc508e7). That should probably not be included in the bundle, as it is a fix for my project specifically. I'm needing the u-number instead of the whole email address as a user name. However, since my fork is a fork of your fork, I didn't manage to require it as a separate branch in my composer.json file, so I pushed it to my master branch. Perhaps we can solve this issue by introducing some kind of hook which would allow altering the username attribute before using it to fetch a user via the UserProvider?

sneakyvv avatar Jun 21 '17 13:06 sneakyvv