phpstan/phpstan-nette

Broken compatibility with Nette 2.x

fmasa opened this issue · 4 comments

fmasa commented

Since stubs for certain Nette 3.0 classes were introduced (such as 336ef25#diff-bb9396b9da8def8667dbcf5a2ab44096R6), compatibility with various Nette 2.x packages is broken.

It would be best to at least bump versions in conflict section. Should I bump these versions or try to revert those Nette 3-only changes?

Can you specifically list which changes are Nette-3-only and break compatibility?

fmasa commented

I actually found just one that affected our codebase. RouteList ArrayAccess API accepts Nette\Application\Routers\IRouter, but RouteList stub expects instance of Nette\Routing\Router, which was introduced in Nette 3.

Yeah, nothing I can do about this unfortunately, IRouter no longer exists in Nette v3 it seems.

Stubs in PHPStan don't have factory that would allow conditional loading of files. I'd recommend you to upgrade to Nette 3 as 2.x is no longer supported https://nette.org/cs/download as of November 2019.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.