- Is dg/rss-php a Laravel package with a service provider or facade?
- No. dg/rss-php is a framework-agnostic PHP utility with no service provider, facade, config publishing, or package auto-discovery. Its public surface is essentially two methods, Feed::loadRss() and Feed::loadAtom(), which return a SimpleXMLElement-derived object graph. Any Laravel wiring, such as a FeedReader contract, adapter, and service provider binding, is scaffolding you own.
- How do I install and wire dg/rss-php into a Laravel app?
- Install it with composer require dg/rss-php. Because there is no auto-discovery, create a FeedReader interface, a DgRssFeedReader adapter, and bind the interface in a service provider. Add a config/feeds.php for timeouts, user agent, cache TTL, and a URL allowlist, and normalize the parsed result into a typed DTO so downstream code never depends on the library's shape.
- Does dg/rss-php support Laravel 11, Laravel 12, and PHP 8.x?
- The package is framework-agnostic, so it does not track Laravel releases or publish Laravel-specific compatibility metadata. Its Composer manifest predates PHP 7 and 8 and declares only a legacy floor, with no explicit ^8.x constraint. Installation typically succeeds on modern PHP, but that is not the same as support, so test it against your exact PHP 8.2, 8.3, or 8.4 runtime.
- How do I read an RSS or Atom feed with dg/rss-php?
- Call Feed::loadRss($url) for RSS or Feed::loadAtom($url) for Atom. Both return a SimpleXMLElement-derived object graph that you traverse directly. In a Laravel app, immediately map that graph into your own FeedItem DTO so controllers, jobs, and views never touch the library's internal shape.
- Is dg/rss-php still maintained and safe for production?
- It has been unmaintained since July 2015, with no security response channel and no PHP 8.4+ compatibility guarantees. That is the dominant risk and cannot be mitigated short of forking or vendoring the code. The BSD-3-Clause license is permissive and fork-friendly, so the practical hedge is to wrap it behind your own contract and keep a maintained fallback parser ready.
- How do I control timeouts, retries, redirects, and proxies with dg/rss-php?
- The library has no PSR-18 or PSR-7 HTTP client and no first-class timeout, retry, proxy, or redirect policy. Its internal fetching is the main integration friction point. Fetch feed bytes yourself with Laravel's Http facade or Guzzle, set explicit connect and read timeouts, retry with backoff on 5xx and 429 responses, enforce size caps, and then hand the body string to the parser.
- Does dg/rss-php parse Media RSS, iTunes podcast tags, Dublin Core, or content:encoded?
- The parser is built on libxml and SimpleXML and does not document explicit namespace extension handling. Media RSS, iTunes podcast tags, Dublin Core, and content:encoded are therefore likely to be unsupported or fragile, and upstream format drift will surface as malformed data rather than a clear error. If those namespaces are required, this library likely disqualifies itself and laminas/laminas-feed is the safer choice.
- What are the XXE and SSRF risks with dg/rss-php, and how do I mitigate them?
- The parser sits on libxml and SimpleXML, and PHP 8 defaults mitigate external entity loading, but the library exposes no explicit hardening switch. Enforce entity-loading protections at your wrapper layer with LIBXML_NONET and related flags, and cover them in tests. SSRF is a separate concern because feed URLs are user-supplied strings, so add an allowlist or denylist plus egress controls before any fetch.
- Does dg/rss-php support caching in Laravel?
- The package blurb mentions caching support, but there are no native Laravel Cache hooks or framework events. Caching is yours to implement around the fetch and parse step, for example with Cache::remember keyed by feed URL and a TTL from config/feeds.php. Cache your normalized FeedItem DTOs rather than raw SimpleXMLElement graphs so cached data stays portable.
- Can dg/rss-php generate feeds, and what alternatives should I consider?
- The reviewed API is read-only ingestion through loadRss() and loadAtom(); feed generation, OPML, pagination, and persistence are not part of the evaluated surface. If you need to produce feeds or want maintained namespace support, use laminas/laminas-feed, willdurand/feed, or SimplePie. If you keep dg/rss-php for a small Laravel reader, wrap it behind your own FeedReader contract so swapping parsers is a one-file change.