nette/http

getReferer method missing in IRequest

misaon opened this issue · 3 comments

  • bug report? yes
  • feature request? no
  • version: 2.4.7

Hi, when i write $this->getHttpRequest()->getReferer() i encountered a problem when the IDE PhpStorm did not know about the getReferer() method. The reason is that the method is missing in IRequest. I want to ask if it is deliberate or a bug. It would be good either to add or add an appropriate annotation to the IDE to understand that the getReferer method is accessible.
...

snimek obrazovky 2018-03-22 v 12 44 39

dg commented

It is possible that there are more missing methods. But bad is that adding them to the interface is a big BC break…

@dg How about adding @method Url|null getReferer() Returns referrer. annotation to head of the interface like this? I tried and works great. Additionally, it does not create an BC break.

snimek obrazovky 2018-03-23 v 9 38 28

dg commented

It seems like solution