atoolo / rss-bundle
Symfony bundle that renders search results as an RSS feed
Package info
github.com/sitepark/atoolo-rss-bundle
Type:symfony-bundle
pkg:composer/atoolo/rss-bundle
Requires
- php: >=8.1 <8.6.0
- ext-xmlwriter: *
- atoolo/resource-bundle: ^1.6
- atoolo/rewrite-bundle: ^1
- atoolo/search-bundle: ^1
- phpro/api-problem-bundle: ^1.9
- symfony/config: ^6.3 || ^7.0
- symfony/dependency-injection: ^6.3 || ^7.0
- symfony/framework-bundle: ^6.3 || ^7.0
- symfony/http-foundation: ^6.3 || ^7.0
- symfony/http-kernel: ^6.3 || ^7.0
- symfony/routing: ^6.3 || ^7.0
- symfony/serializer: ^6.3 || ^7.0
- symfony/yaml: ^6.3 || ^7.0
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- infection/infection: ^0.27.6
- overtrue/phplint: ^9.7.1
- phpcompatibility/php-compatibility: ^9.3
- phpunit/phpunit: ^10.5.64
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.7
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-22 12:19:20 UTC
README
Renders atoolo search results as an RSS 2.0 feed.
API
GET /api/rss/search?query={query}&location={location}
| Parameter | Required | Description |
|---|---|---|
query |
yes | A JSON-serialised Atoolo\Search\Dto\Search\Query\SearchQuery. The feed language comes from it. |
location |
no | The page the feed belongs to. Supplies the channel title, description and image — it is not one of the results. |
Without a location the channel falls back to the site's own metadata: the
resource channel's name and root url, plus the configured description.
curl "https://www.example.com/api/rss/search?location=/suche.php&query={\"filter\":[{\"type\":\"objectType\",\"values\":[\"news\"]}]}"
Errors are returned as application/problem+json by
phpro/api-problem-bundle:
| Status | Cause |
|---|---|
400 |
query missing, unparseable, or asking for more than atoolo_rss.max_items |
400 |
location containing a .. segment |
404 |
location does not resolve to a resource |
500 |
the search backend failed |
Note The endpoint accepts a fully expressive
SearchQueryfrom the caller, and several of its fields reach Solr unescaped. Do not expose it to untrusted callers.
Configuration
parameters: atoolo_rss.channel.generator: 'Information Enterprise Server – Sitepark GmbH' atoolo_rss.channel.copyright: 'Copyright 2026, Landeshauptstadt Musterstadt' atoolo_rss.channel.description: 'Aktuelles aus Musterstadt' atoolo_rss.max_items: 100
The three channel.* values become the <generator>, <copyright> and
<description> elements; null omits them.
A query that omits limit keeps SearchQuery's own default of 10. Lowering
atoolo_rss.max_items invalidates feed urls already in use that ask for more.
Extension points
ItemFactory — decides what a feed item says:
Atoolo\Rss\Service\ItemFactory: alias: App\Rss\MyItemFactory
ChannelFactory — the same for the feed-level metadata: title,
description, language, image.
Atoolo\Rss\Service\ChannelFactory: alias: App\Rss\MyChannelFactory
MediaFileLocator — resolves a media url to a file on disk, used only to
fill the optional type and fileSize attributes of media:content. The
bundle ships a no-op, since where media lives depends on how the site
publishes.
Atoolo\Rss\Service\MediaFileLocator: alias: App\Rss\SiteKitMediaFileLocator
Structure
Controller\RssController |
route, parameters, error mapping |
Service\FeedFactory |
search hits → Feed |
Service\DefaultChannelFactory |
the feed's resource → Channel |
Service\DefaultItemFactory |
one resource → Item |
Service\CategoryFactory |
a resource's categories, primary parent as domain |
Service\FeedWriter |
Feed → XML; the only class that knows about RSS syntax |
All urls go through atoolo/rewrite-bundle's UrlRewriter, fully qualified, so
feed links match the ones the site renders.