nette / database

💾 A database layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
https://doc.nette.org/database
Other
492 stars 105 forks source link

Compatibility issue with Row vs IRow #291

Open MartinMystikJonas opened 2 years ago

MartinMystikJonas commented 2 years ago

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 commented 2 years ago

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?