- π³πΏNew Zealand quietone
The services being changed here were deprecated in #3258654: Deprecate feed.bridge.reader and move it to the Aggregator module β and removed in Drupal 10. Therefor, I am closing this as outdated.
Updated: Comment #29
Using the Zend Reader/Writer added in #1839468: [Followup] Replace aggregator rss parsing with Zend Feed β is non-obvious unless you look at the implementation in Aggregator. It's also ugly.
Reader::setExtensionManager(\Drupal::service('feed.bridge.reader'));
$channel = Reader::importString($feed->source_string);
There are other problems with this. Only a subset of methods from \Zend\Feed\Reader\Reader can actually be used. Some require dependencies that we don't have.
Create a Reader and Writer class that wraps \Zend\Feed\Reader\Reader, and \Zend\Feed\Writer\Writer and provide it as a service. This will take care of setting the extension manager, and provides a handy place to document the parts that we support.
The above code becomes:
\Drupal::service('feed.reader')->importString($feed->source_string);
This probably needs a change notice, since it's adding a new API.
None
This is an API addition. Using \Zend\Feed\Reader and Zend\Feed\Writer directly still works fine.
#1839468: [Followup] Replace aggregator rss parsing with Zend Feed β
#2003108: Switch Views RSS to use Serializer/Zend β
Closed: outdated
11.0 π₯
Last updated
Enhances developer experience.
Enhances an existing API or introduces a new subsystem. Depending on the size and impact, possibly backportable to earlier major versions.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
The services being changed here were deprecated in #3258654: Deprecate feed.bridge.reader and move it to the Aggregator module β and removed in Drupal 10. Therefor, I am closing this as outdated.