Symfony 3, ahem, Symfony 2.8, comes with a lot of sweet new stuff. Hey, we
should totally take a tour through all the best stuff.
thanks a bunch, Victor!I can work sth out with that
I see that inside the onAuthenticationSuccess() method you have access to the Request object, so you can fetch a referer page URL from headers like $request->headers->get('referer') and then return a RedirectResponse to that page.
Hi,Thanks for that nice video explaining Guard!
I wanted to redirect my users on authentication success to the page that they tried to access (if behind a firewall). Could you maybe tell me how to do that?
I'm getting lost with a lot of posts how to do that with the traditional form_login, but if I'm not mistaken, that way of handling authentication has nothing to do with the new Guard. I.e. the options for form_login in security.yml, to change the target_path etc, are not valid here, right?
I originally planned a chapter about Assetic, but decided against it: since there's not much to cover (just that it was removed for new projects, like we're talking about). If there's any move, I think it's that Symfony is making less recommendations about assets in general. There are too many other solutions, and they all work equally well with Symfony - e.g. Gulp, etc :)
Yes that's what I have done. Out of curiosity, in this series i saw a topic before that was called "Assets" I no longer see that.
Down the line, Is Symfony moving away from Assets and moving towards other tools? like Gulp or something else?
Yea, good question - one a lot of people have been asking. The bundle *is* still ok to use - it's not abandoned or anything like that :). We just decided to not include it by default. If you want it, just require it and then add back the new Symfony\Bundle\AsseticBundle\AsseticBundle() line:
composer require symfony/assetic-bundle
I noticed on fresh install of Symfony 3.0, the AsseticBundle is no more. new Symfony\Bundle\AsseticBundle\AsseticBundle(),
Do we need to install this manually now or this bundle is not going to be used any more?