Opened 10 years ago
Closed 9 years ago
#6191 closed enhancement (fixed)
Akismet integration using deprecated functions
Reported by: | r-a-y | Owned by: | r-a-y |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Activity | Keywords: | has-patch commit |
Cc: | chris@… |
Description
The following notices are popping up when using the latest version of Akismet with the BP activity component:
- akismet_get_user_roles is deprecated since version 3.0! Use Akismet::get_user_roles()
- akismet_test_mode is deprecated since version 3.0! Use Akismet::is_test_mode() instead.
- akismet_http_post is deprecated since version 3.0! Use Akismet::http_post() instead.
- akismet_microtime is deprecated since version 3.0! Use Akismet::_get_microtime() instead.
I've attached a patch to fix this. Do you think anyone is running Akismet less than v3.0?
For reference:
- Akismet 3.0 was released back on April 15th, 2014. WordPress 3.9 and BuddyPress 2.0 was released the day after.
- We support down to WordPress 3.6, which was released back on August 1st, 2013. Akismet 2.5.9 was released on the same day.
Attachments (2)
Change History (16)
#2
@
10 years ago
Deeply, deeply annoying :( But johnjamesjacoby is right - we'll have to do method_exists()
checks.
#5
@
10 years ago
We support out-of-date versions of WordPress, but I don't understand why we should support out-of-date versions of Akismet. I think we should just update BuddyPress to use the current/non-deprecated functions, and call it a day.
This "fix" would only be received by upgrading their BuddyPress, and if they're upgrading BuddyPress, then it's probably the sort of person who would keep Akismet up to date, too.
#6
follow-up:
↓ 7
@
10 years ago
We support out-of-date versions of WordPress, but I don't understand why we should support out-of-date versions of Akismet. I think we should just update BuddyPress to use the current/non-deprecated functions, and call it a day.
I'm assuming that the non-deprecated versions do not exist in older versions of Akismet, which means that anyone with the old version will get a fatal error. In principle, I agree with DJPaul that we shouldn't bend over backward to support old versions of stuff like Akismet. However, causing fatal errors on BP upgrade - especially when we have no failsafe or even documentation in place to warn against the problem - seems unacceptable. On balance, I think it's better to add a bit of baroqueness to BP.
It would be good to have more concrete rules about this going forward, though. There are very few plugins that we interact directly with in BP core, and it should be possible to come up with general rules for version support. (Akismet may actually be the only one - bbPress compatibility comes completely from bbPress.)
#7
in reply to:
↑ 6
@
10 years ago
Replying to boonebgorges:
We support out-of-date versions of WordPress, but I don't understand why we should support out-of-date versions of Akismet. I think we should just update BuddyPress to use the current/non-deprecated functions, and call it a day.
Agree.
I'm assuming that the non-deprecated versions do not exist in older versions of Akismet, which means that anyone with the old version will get a fatal error. In principle, I agree with DJPaul that we shouldn't bend over backward to support old versions of stuff like Akismet. However, causing fatal errors on BP upgrade - especially when we have no failsafe or even documentation in place to warn against the problem - seems unacceptable. On balance, I think it's better to add a bit of baroqueness to BP.
Agree.
It would be good to have more concrete rules about this going forward, though. There are very few plugins that we interact directly with in BP core, and it should be possible to come up with general rules for version support. (Akismet may actually be the only one - bbPress compatibility comes completely from bbPress.)
Correct, and agree. I created a stub codex page to help with the educational side of this, should there be any questions. Please feel free to move or modify this page at will: https://codex.buddypress.org/releases/version-1-7/akismet/
#9
@
9 years ago
There are very few plugins that we interact directly with in BP core, and it should be possible to come up with general rules for version support. (Akismet may actually be the only one - bbPress compatibility comes completely from bbPress.)
We also clear the cache for WP Super Cache (see bp_core_clear_cache()
), although it would probably make sense to remove it.
So what is the consensus for this ticket? Do we want to support older versions of Akismet < 3.0?
Or do we want to do something after we've discussed bumping the minimum version for WP (#6258)?
#10
@
9 years ago
At this point, 3.0+ has been out long enough that I'm fine with not supporting it. But we should avoid fatal errors by bailing out of our Akismet integration if a lower version is detected.
#11
@
9 years ago
- Cc chris@… added
Deprecating those functions was the wrong move on our (Akismet's) part; they were un-deprecated in 3.1.
Any function that doesn't throw a deprecation notice in 3.1 should be safe to use for a long time.
#12
@
9 years ago
I just added a patch to support only Akismet 3+ before I saw cfinke's comment :)
Do we still want to do anything?
I am sure many people are using out of date versions of both Akismet and BuddyPress. We should probably make sure we have both scenarios covered.