- Issue created by @donquixote
- Status changed to Needs review
5 months ago 1:36pm 16 July 2024 - 🇩🇪Germany donquixote
The test cases cover some "hidden" features which already work today, but the support of which may not have been by design.
- Status changed to Needs work
5 months ago 10:25am 17 July 2024 - 🇦🇺Australia dpi Perth, Australia
(It also does not check if methods are abstract, static, private/protected, but this is less of a problem because there is no reason to add the attribute here)
Yeah I dont see it as necessary. For what its worth,
static
is in fact something I want to allow 📌 Add static hook methods (and call them statically) Active .-
Mostly accept the PR, except lets just stop at isInstantiable, and just ignore abstracts.
- 🇩🇪Germany donquixote
Mostly accept the PR, except lets just stop at isInstantiable, and just ignore abstracts. (tests and fixtures need updates as a result)
We simply need to drop the second commit :)
But I want to be clear: Currently the abstract class create() does work.
So if we don't have the second commit, we lose functionality, and theoretically break BC.The example in the test is quite obscure. Perhaps somebody has a more valid use case.
Of course such cases would be easy to fix.On the other hand, I can also imagine cases where this behavior would be clearly unintentional.
I think it is good practice that a class with hook methods shall be either final or abstract, to clarify intent.
Otherwise, if a hook method is inherited from a non-abstract base class, it is not clear if the developer intended this to be registered as a hook or not.
But we can't really enforce this now. - 🇩🇪Germany donquixote
We simply need to drop the second commit :)
Or we could keep the test case from the second commit, but change the expected behavior.
- Status changed to Needs review
4 months ago 10:29pm 9 August 2024