One example:
Strict warning: Declaration of SearchApiViewsHandlerFilterFulltext::options_form() should be compatible with that of views_handler_filter::options_form()
Changing method signatures is bad OOP practice when you do inheritance. Yes, additional type safety is nice, but then you need to go to Views and change the method signature in the first place.
Attached patch restores some method signatures, I don't know if that are all (at least the warnings disappear on my site).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | search_api_method_signatures-5.patch | 5.59 KB | amitaibu |
| #1 | search_api_method_signatures.patch | 4.31 KB | klausi |
Comments
Comment #1
klausiOh, forgot the actual patch.
Comment #2
amitaibuWorks.
Comment #3
amitaibuhmm, I'm getting weird errors after the patch, need to check it out.
Comment #4
amitaibuYap, all good here :)
Comment #5
amitaibuPatch adds another fix in SearchApiViewsHandlerArgument::query().
Comment #6
drunken monkeyUrgh. I hate Views for making me do this to my code … (Good thing I at least didn't adapt their file naming conventions.)
I spotted two other strict warnings, one in the option field (or filter) handler and one in the "View entitiy" data alteration. I'll fix those myself and then commit the lot – however, I'd like to wait until the other two Views-related patches that are being worked on ("More like this" and Views handlers) are committed, since this one is the easiest to re-roll.
Please remind me if I end up forgetting this.
Comment #7
drunken monkeyCommitted, thanks. I hope those were all …
Comment #8
amitaibu> Good thing I at least didn't adapt their file naming conventions.
Why is that -- what don't you like about them?
Comment #9
drunken monkeyAh, sorry, I phrased that wrong. The file naming does make sense, and I even largely kept to it.
What I meant were the class names. I generally don't like that Views is written as if to deliberately violate each and every rule of the Drupal OOP coding standards (and a few of the others as well). Which of course is what lead to this issue here.