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).

Comments

klausi’s picture

StatusFileSize
new4.31 KB

Oh, forgot the actual patch.

amitaibu’s picture

Status: Needs review » Reviewed & tested by the community

Works.

amitaibu’s picture

Status: Reviewed & tested by the community » Needs review

hmm, I'm getting weird errors after the patch, need to check it out.

amitaibu’s picture

Status: Needs review » Reviewed & tested by the community

Yap, all good here :)

amitaibu’s picture

StatusFileSize
new5.59 KB

Patch adds another fix in SearchApiViewsHandlerArgument::query().

drunken monkey’s picture

Urgh. 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.

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks. I hope those were all …

amitaibu’s picture

> Good thing I at least didn't adapt their file naming conventions.

Why is that -- what don't you like about them?

drunken monkey’s picture

Why is that -- what don't you like about them?

Ah, 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.