nette/database

Magic method __set return type of class ActiveRow is too strict

feropeterko opened this issue · 4 comments

Version: 3.2.0

Bug Description

New return type "never" of magic __set is too strict. It forces to throw an exception and disables the possibility to inherit \Nette\Database\Table\ActiveRow.

Steps To Reproduce

Inherit class \Nette\Database\Table\ActiveRow and override __set method.

Expected Behavior

Return standard type "void" and throw same exception. Do not force the exception with "never" return type.

Exactly. I have a class that inherits ActiveRow and I'm now unable to use __set and __unset methods because of "never". Maybe "never" should be used only for "final" classes/methods that cannot be inherited from.