Page 1 of 1

How to disable warning for $this?

PostPosted: August 31st, 2018, 12:44 pm
by urosg
Since a few last versions I started to notice that I am getting an warning when using $this variable in "global" scope of a view in Yii2 framework.

How can I disable this?

this-view.PNG


Even if I declare this as phpdoc @var at start of document I get this warning.

It's a little annoying, nothing else.

Re: How to disable warning for $this?

PostPosted: September 11th, 2018, 12:55 pm
by urosg
No input from devsense?

Re: How to disable warning for $this?

PostPosted: September 17th, 2018, 6:47 pm
by info@dotcompanion.de
Same problem here.
The $this keyword for example in template files which are included in view files is marked as warning.
That's really annoying and should be fixed.

Re: How to disable warning for $this?

PostPosted: September 20th, 2018, 11:50 am
by Miloslav Beno
Hi guys,

Thanks for letting us know. Yes, I understand this can be really annoying. We will provide an option to turn this or any other warning off.

Thank you again!