s9y / Serendipity

A PHP blog software
https://s9y.org
BSD 3-Clause "New" or "Revised" License
209 stars 88 forks source link

Switch from HTTP/Request to HTTP/Request2 #550

Open th-h opened 6 years ago

th-h commented 6 years ago

HTTP/Request has been discontinued. We should switch to HTTP/Request2 (which has been bundled with s9y, but is not used at all yet, AFAICS).

Those are the plugins that have to be fixed (without retired plugins in /alpha/, and some just use HTTP/Request as a fallback when serendipity_request_url is not present (do we still have to check that?):

garvinhicking commented 6 years ago

Actually, serendipity_request_start in s9y version 2.1 and upwards are using HTTP/Request2 in include/functions.inc.php:

function serendipity_request_url($uri, $method = 'GET', $contenttype = null, $data = null, $extra_options = null, $addData = null, $auth = null) {
    global $serendipity;

    require_once S9Y_PEAR_PATH . 'HTTP/Request2.php';

I believe I went through all plugins at that point and added forward compatibility to that layer to use that function, if available?!

th-h commented 6 years ago

AFAIR, some (perhaps: most) plugins check for serendipity_request_url and just fall back to HTTP/Request if that function isn't present, but some just use HTTP/Request.

I'll check again when I finde the time, perhaps sometimes next week, and go through the list.

garvinhicking commented 6 years ago

Ok cool. I think we can leave the fallback in place, when it's there already. If you find plugins where serendipity_request_url is missing we can hopefully add it.

th-h commented 6 years ago

I went through those plugins again - and they have mostly switched to serendipity_request_url. I checked them off in the list above.

Those plugins remain and will need an update:

th-h commented 5 years ago

serendipity_plugin_flickrbadge should be done with s9y/additional_plugins#102, while serendipity_event_flickr is a bit more complex.