You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request implements a couple of extra methods that are not defined in IRequest interface. Nette 3 deprecated autowiring of Request type, only autowiring via interface is now supported. This means that those extra methods are basically "inaccessible" for any consumer. I think those methods should be either added to the interface, or deprecated and eventually removed.
getReferer(): ?Url - the interface already mentions this method in @method annotation, the annotation should be transformed to a proper method definition.
isSameSite(): bool - this should be definitely added to the interface.
detectLanguage(array $langs): ?string - this can be easily extracted to a separate service and removed from Request.
For the next version there are plans to move to middleware and there will be probably a lot of changes. So currently I do not want make a BC break and we'll solve it the next time.
As far as I know, there is no way how to make it work in Nette 3.x. I can't use directly Request type and the IRequest interface does not declare isSameSite() method (and bunch of others).
Activity
xificurk commentedon Feb 20, 2019
@dg Any thoughts? I think this needs to be resolved before stable 3.0 version.
dg commentedon Feb 28, 2019
For the next version there are plans to move to middleware and there will be probably a lot of changes. So currently I do not want make a BC break and we'll solve it the next time.
xificurk commentedon Feb 28, 2019
I really think this needs to be solved now, because of BC break introduced in #90.
Please, tell me if I'm missing some crucial point. The following code works just fine in Nette 2.4.x:
As far as I know, there is no way how to make it work in Nette 3.x. I can't use directly
Requesttype and theIRequestinterface does not declareisSameSite()method (and bunch of others).dg commentedon Mar 9, 2019
I reverted fix for #90.