Closed edurenye closed 6 years ago
The alias is not explicitly marked public, and therefore still private. Same problem exists in master branch still.
Hi all, could you please test the master and/or 2.0 branches and tell me if that commit removes the notice? I don't have a working 3.4 SF installation at the moment. Thanks!
I'll tag them as soon as you confirm me that :)
For you @edurenye 😉
Is it fixed yet ? Can't use the router service in symfony 4 :(
Current fix should be fine (have no test case here either) but technically the best way to do this would be to fetch the original definition and copy its isPublic
flag - someone could have overridden it, and if you do an inline replace that should be transparent.
Is it fixed yet ? Can't use the router service in symfony 4 :(
Of course you can, just not via the $this->get('router')
method which is actually 'deprecated'. If you use straight DI and just inject the UrlGeneratorInterface
it'll work fine.
I tested with dev-master it works! Ok thanks; I was using the base controller functions from FrameworkExtraBundle (redirect functions were broken)
$this->get('router') method which is actually 'deprecated'.
This is not deprecated. The router
service is public in Symfony4, you can use it. That's why the RedirectController
is using it.
I used the apostrophes on purpose. DI is recommended now over the old direct container access.
thx for that, i just tagged new releases for both branches :)
and tagged another one, the fix was not compatible with symfony 2.x, this one sould be the good one. enjoy!
I got the following deprecation after updating to Symfony 3.4:
Error:
I first filed it here: https://github.com/symfony/symfony/issues/25328 But there we realized that the problem has to be with JMSI18nRoutingBundle as disabling the bundle solved the problem.
This is also related to: https://github.com/schmittjoh/JMSI18nRoutingBundle/issues/215