Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magic method __set return type of class ActiveRow is too strict #303

Open
feropeterko opened this issue Dec 15, 2023 · 1 comment
Open

Comments

@feropeterko
Copy link

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.

@ondrej-tuhacek
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants