Failing test case - Usage of deprecated constant via subclass is not marked as deprecation call#35
Failing test case - Usage of deprecated constant via subclass is not marked as deprecation call#35lulco wants to merge 1 commit intophpstan:masterfrom lulco:missing-deprecated-class-constant-of-subclass
Conversation
|
Hi, I don't get it, you just changed some tests but the tests are passing? Either fix the code, or provide a failing test with expected results... |
|
Hi, sorry, it is failing on my env. I have to find differencies. First is my php version 7.4.14 |
|
Hi, I can't isolate the problem in this repository for unknown reason, so I've created very simple app to reproduce my problem. If you will have some time, please check it on https://github.com/lulco/deprecated-constant It is simple Nette 2.4 "application" with RouterFactory where deprecated flag IRouter::SECURED is used. Once directly via IRouter and once via class SimpleRouter (which implements IRouter). I believe there should be two errors (on lines 15 and 16) in build: |
|
Fixed in PHPStan: phpstan/phpstan-src@6d52302 |
The same problem is with deprecated constant defined in interface and used via subclass.
See e.g. https://github.com/nette/application/blob/v2.4/src/Application/IRouter.php#L22 used with SimpleRouter:
Code
\Nette\Application\Routers\SimpleRouter::SECUREDthrows no error