Skip to content
This repository was archived by the owner on Jul 6, 2020. It is now read-only.
This repository was archived by the owner on Jul 6, 2020. It is now read-only.

Replace SimplePie with maintained library #512

@BernhardPosselt

Description

@BernhardPosselt

Why:

  • SimplePie is not maintained anymore, last active commit phase was a year ago, last commit 6 months ago
  • From the roughly 4 pull requests that we sent none were merged nor did we receive any response from the developer
  • I've notified the developer of a serious XSS issue (had to use Twitter because there's no official way to do this) in their sanitizer which has not been fixed (half a year now?)
  • It uses a registry which is an antipattern (global)
  • Documentation is bad for replacing stuff like sanitation
  • You have to call methods on the main class after you call the constructor for configuration (woot?)
  • Init fetches the feed, if it fails it returns false. It is impossible to tell why it failed, it just returns false (exceptions, hello?)

So I think it's time to throw it out and replace it with something better.

Some alternative feed parsers that Ive found til now:

Please review and post other rss/atom libs

Criteria:

  • Proxy support?
  • RSS + ATOM support?
  • Is it possible to turn off sanitation (we use htmlpurifier, speedup)?
  • Caching?
  • Free of globals and Anti-Patterns, as in: Singleton, Registry, Service Locator?
  • Actively maintained?
  • Free of severe bugs?
  • Is it used in applications?
  • How much code is there/is it easy to modified?
  • Does it have tests?
  • Forgiving parser?
  • Good documentation?
  • PHP 5.3 support?
  • Possible to set useragent?
  • Proper error reporting?
  • Additional dependencies (currently used: DOM, XML, curl)?
    @cosenal @icewind1991 @nerzhul

Choice: picoFeed

picoFeed seems to be the way to go just waiting for this issue to be resolved: https://github.com/fguillot/picoFeed/issues/46

Things to do afterwards:

  • Create a config in the application.php which also reads proxy settings, see News doesn't support proxies #637
  • Use the Client class from picoFeed to scrap website content in the XPathArticleEnhancer.php
  • Get rid of the favicon fetcher and use the Favicon class from picoFeed to get the favicon
  • Create a fetcher that uses the picoFeed
  • Get rid of SimplePie
  • Fix tests
  • Umlaut issues: https://github.com/fguillot/picoFeed/issues/49
  • Slashdot enhancer not working
  • Bring back caching

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions