#669054 libphp-simplepie: Debian specific changes break wordpress

#669054#5
Date:
2012-04-16 19:56:31 UTC
From:
To:
The changes made in response to #651515 break WordPress. It's good to
clean up code but this should be upstream's responsibilities and deviating
from upstream can cause issues with external code using simplepie.

In this case, wordpress redefines a method of simplepie and that method
has been changed to "static" by Thorsten's patch (I don't know why) and
it now fails with this:
PHP Fatal error:  Cannot make static method SimplePie_Cache::create() non static in class WP_Feed_Cache in /usr/share/wordpress/wp-includes/class-feed.php on line 6

The code in question seems legitimate:
class WP_Feed_Cache extends SimplePie_Cache {
        /**
         * Create a new SimplePie_Cache object
         *
         * @static
         * @access public
         */
        function create($location, $filename, $extension) {
                return new WP_Feed_Cache_Transient($location, $filename, $extension);
        }
}

I would thus kindly ask you to revert that change at least partially
for all the methods that have been marked static and let upstream deal
properly with the fallout of the incompatible change...

Cheers,

#669054#12
Date:
2012-04-16 20:11:29 UTC
From:
To:
Raphaël Hertzog dixit:

Actually, it is a good example for a class method, hence static.

I’d rather insert a “static” here. I believe it was only not done
due to the simplepie bug, considering the @static annotation comment
above.

I think we should contact both upstreams about this, maybe they
will accept a coordinated change.

bye,
//mirabilos

#669054#17
Date:
2012-04-16 20:26:52 UTC
From:
To:
It's a possibility but I don't really like to have to maintain 2
divergences in Debian and as soon as someone grabs a clean upstream
version, they get it broken again. :-(

At least Wordpress has its own copy of libphp-simplepie. The reason why
I'm affected is because I have patched wordpress to use the Debian
libphp-simplepie... but if the Debian one diverges from upstream, we're
asking for troubles...

Cheers,

#669054#22
Date:
2012-04-16 20:45:47 UTC
From:
To:
Raphael Hertzog dixit:

But that’s not supported.

As should be. My usecase here is FusionForge, and it too uses the
Debian packaged version. It also displays all those PHP warnings in
deliberately ugly pink overlays over the page, on development systems,
so that developers get a notion of them immediately and hopefully fix
them ASAP. That’s why I like the idea of reverting the fix less than
fixing both places.

Besides, if someone grabs an upstream copy of Wordpress, then they’d
use the convenience copy, so… just a mix of those would not work as
well.

bye,
//mirabilos

#669054#27
Date:
2012-04-17 06:21:24 UTC
From:
To:
What kind of warning does the use of static fix ?

In any case, I agree those ought to be fixed too. But doing it
pre-emptively in Debian only is counter-productive. Please work
with upstream on this... they might end up fixing it in other
ways.

Cheers,

#669054#32
Date:
2012-04-17 17:32:24 UTC
From:
To:
Raphael Hertzog dixit:

The method is called only as class method, i.e.

	$foo = SimplePie_Cache::create();

and not as instance method, which would be

	$foo = new SimplePie_Cache;
	$foo->create();

I agree on this. Will have a look about contacting upstream.

bye,
//mirabilos

#669054#37
Date:
2012-04-21 19:01:05 UTC
From:
To:
Hi,

first of all, simplepie developers, sorry for directly mailing you,
but I could not find out how to work this Yahoo thing you have in
lieu of a proper mailing list. You might want to add documentation
for that ;-) (The rationale for eMail here is to keep everyone in-
volved, that is both upstream and Debian packagers for both word-
press and simplepie plus me as integrator, in the loop.)

In Evolvis/FusionForge we set the PHP error loglevel very high and
overlay the pages sent out with an ugly pink popup if there are PHP
errors or the page is invalid XHTML, to educate developers and fix
such problems immediately (on development systems only, of course).
Now we (or rather, some code from Codendi, another SourceForge de-
rivate, imported into FusionForge) use simplepie for parsing RSS
and displaying it on a project homepage. Imagine my joy when I saw
that I had to fix simplepie, too. (And others…)

Well, said, done. Unfortunately, this change is not liked by Wordpress:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669054

So I'm hereby asking you, both upstreams, to coordinatedly apply the
bugfix and make the classmethod static, since create() should never
have been an instancemethod in the first place.

This means, in the class SimplePie_Cache and all its derivates, such
as WP_Feed_Cache, the method create() must be made static:

-	function create($location, $filename, $extension)
+	static function create($location, $filename, $extension)

Ref: http://patch-tracker.debian.org/patch/series/view/simplepie/1.2.1-3/assigning_the_return_value_of_new_by_reference_is_now_deprecated.patch

The Debian package also contains other fixes you might probably want
to integrate.


Thanks in advance for your cooperation,
//mirabilos

#669054#42
Date:
2012-04-21 19:03:01 UTC
From:
To:
Dixi quod…

Easier said than done… I didn’t manage to figure out how to
deal with their Yahoo not-mailinglist thingie, even with a
GUI browser, and had to resort to duckduckgoïng for their
eMail addresses. Oh well. Hope this will reach them.

bye,
//mirabilos

#669054#51
Date:
2015-02-21 22:28:26 UTC
From:
To:
Hi All,

As Wordpress no more depends on libphp-simplepie, I will downgrade
the priority to 'normal', ok?!


Cheers,

#669054#56
Date:
2015-02-21 22:28:26 UTC
From:
To:
Hi All,

As Wordpress no more depends on libphp-simplepie, I will downgrade
the priority to 'normal', ok?!


Cheers,