`$this->request` vs `$this->getRequest()`

Hi everyone,

I very often see people using $this->request, even on the (relatively) recent Stackoverflow posts (e.g. here, here).

However, seeing where things have been going with the mass deprecation because of the get/set prefix addition since 3.4 and 3.6, do I feel right that one should move to $this->getRequest() instead of $this->request as well?

The reason I’m asking is because I called $this->request->getRequestTarget() on my 3.8 and it didn’t show me any deprecation warnings in the debug panel (while I thought it would).

Note that both of the deprecation notices you link to specify that the request property of components is deprecated, not the controller property, which is what the SO articles are referencing.

The question that’s interesting to me, here, is if $this->request is to be deprecated. I’m working on a new 4.0 solution, and, honestly, using both $this->request and $this->getRequest().
What is the community preference?

I was about to ask the same question.

Is $this->getRequest() preferable to $this->request ?

I think the answer is yes because in the past there were deprecations in favour of get/set prefixes… but I can’t find the reason why this is not deprecated/removed in 4.x or if it will ever be

Any new thoughts about this?