Closed jmontoyaa closed 11 years ago
Hey @jmontoyaa
I dont remember having any problems, but that might have been in dev mode only. I will see if i get a bit of time to research this the coming days :)
A quick work around is to subclass the SecurityServiceProvider::addFakeRoute and have it be empty like:
<?php
class SecurityServiceProvider extends \Silex\Provider\SecurityServiceProvider
{
public function addFakeRoute($method, $pattern, $name)
{
// Dont do anything otherwise the closures will be dumped and that leads to fatal errors.
}
}
Also it is indeed a bit weird it adds thoose fake routes. But makes sense from a usability point of view, otherwise people would have to add empty closures to their application if they are only relying on Silex.
Thanks for your fast answer! I commented the addFakeRoute body so it was working so far. So I think I will go with your solution. I think that is not Flint fault, is the "magic" that creates the routes automatically:
https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/SecurityServiceProvider.php#L544
It have been fixed i Silex master. Closing :)
I confirm, the fix works, great!
Hey!
I found a bug when using Silex with the SecurityServiceProvider it happens because the SecurityServiceProvider creates routes on the fly with:
SecurityServiceProvider:addFakeRoute()
https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/SecurityServiceProvider.php#L548
For some reason in the ProjectUrlGenerator file the routes are not well generated and I have a fatal error.
So, the question is did you had any problems integrating SecurityServiceProvider with Flint?
I followed this tutorial http://henrik.bjrnskov.dk/silex-router
I think I will open an issue in silex because we should had a possibility to write our own routes, like Symfony2:
http://symfony.com/doc/current/book/security.html#logging-out
Finally, Flint is really great!