Repository navigation
Support multiple feed-level links and emit Atom rel="self" - #69
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Support multiple feed-level links and emit Atom rel="self"
Support multiple feed-level links and emit Atom rel="self"
May 24, 2026
Grotax
force-pushed
the
copilot/support-multiple-feed-links
branch
from
June 3, 2026 08:09
4c3d4eb to
0fe3c7b
Compare
Grotax
marked this pull request as ready for review
June 3, 2026 08:15
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feed-level links were modeled as a single
setLink()value, making it impossible to represent both a homepage (rel="alternate") and a canonical feed URL (rel="self") — a requirement for valid Atom feeds.New API
FeedIo\Feed\Node\FeedLink— value object withrel,href,typeFeed::addLink(string $rel, string $href, ?string $type)— appends to an explicit link collectionFeed::getLinks(): iterable— iterates all explicit linksFeed::setHomePageUrl(string $url)/getHomePageUrl()— convenience alias oversetLink()+addLink('alternate', ..., 'text/html')Feed::setFeedUrl(string $url)/getFeedUrl()— convenience alias oversetUrl()+addLink('self', ..., 'application/atom+xml')Atom formatting
Rule\Atom\LinkNode::addElement()now emits per-link<link rel="..." href="..." type="..."/>elements when the feed has an explicit links collection. Falls back to the existing single<link href="..."/>behavior when none are present.Atom output:
Backward compatibility
setLink()behavior is unchanged. The multi-link path is only activated whenaddLink()(or the new convenience methods) are used.