database icon indicating copy to clipboard operation
database copied to clipboard

Compatibility issue with Row vs IRow

Open MartinMystikJonas opened this issue 3 years ago • 1 comments

Version: 3.1.5

Bug Description

Compatibility of IRow and Row is causing confusion of static analysers even when compatibility files are processed

... expects Nette\Database\Row, Nette\Database\Table\ActiveRow given

Expected Behavior

~~IRow and Row should be treaded as aliases~~

Possible Solution

~~compatibility files should define all renamed interfaces as aliases~~

MartinMystikJonas avatar Jul 20 '22 20:07 MartinMystikJonas

I am bit confused now. IRow is marked as deprecated and hints we should use Row instead. But Row is a class. And ActiveRow does not extend Row but implements deprecated IRow. So static analysis either complains about use of deprecated IRow (and suggest replacing it with Row) or Row is used and type hierarchy breaks.

What is recommended solution here?

MartinMystikJonas avatar Jul 20 '22 20:07 MartinMystikJonas