Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d537b13
podcast index live item: added new container classes
nb823 Sep 10, 2025
5011e43
podcast index live item: updated renderers
nb823 Sep 10, 2025
d1d534a
podcast index live item: load extensions from entry renderer
nb823 Sep 12, 2025
285ce06
podcast index live item: render with attributes
nb823 Sep 12, 2025
8f7f32b
podcast index live item: read with attributes
nb823 Sep 15, 2025
f18a3a1
podcast index live item: made readable with nested extensions entries…
nb823 Sep 15, 2025
9b219ce
podcast index live item: added documentation for live item namespace
nb823 Sep 16, 2025
d7f0eb4
podcast index item: added namespace content link
nb823 Sep 16, 2025
bd5b492
podcast index item: added tests for namespace content link
nb823 Sep 16, 2025
ef00b6c
podcast index item: added documentation for namespace content link
nb823 Sep 16, 2025
2551d40
podcast index item: added namespace funding
nb823 Sep 16, 2025
1bee772
podcast index item: updated namespace funding
nb823 Sep 16, 2025
576d71a
podcast index feed: updated namespace funding to allow multiple
nb823 Sep 23, 2025
a193f3d
podcast index feed: added fundings get method to writer
nb823 Sep 29, 2025
0f3092e
podcast index feed: added documentation for funding namespace
nb823 Oct 1, 2025
cd51115
podcast index feed: added namespace chat
nb823 Oct 1, 2025
e7d87a4
podcast index item and live item: added namespace chat
nb823 Oct 1, 2025
9f16bc3
podcast index item and live item: added docs for namespace chat
nb823 Oct 1, 2025
e9d131d
podcast index feed and item: cleaned up types for new methods
nb823 Oct 2, 2025
a49e1d2
podcast index: cleaned up types for new methods
nb823 Oct 7, 2025
9e5ca1d
podcast index: psalm cleanup
nb823 Oct 7, 2025
785d5c4
podcast index feed: code sniffer fixes
nb823 Oct 7, 2025
4e1cc09
podcast index: fixed links in docs
nb823 Oct 8, 2025
07fc0d9
podcast index feed: updated location namespace
nb823 Oct 10, 2025
c8a8f97
podcast index entry: updated location namespace and added tests
nb823 Oct 10, 2025
2d6b63e
podcast index: updated documentation on namespace location
nb823 Oct 10, 2025
6a42197
podcast index: updated tests on namespace location
nb823 Oct 10, 2025
8fd2208
podcast index bugfix: soundbite title must be text node
nb823 Nov 3, 2025
65367bc
podcast index: validator methods should return the validated values
nb823 Nov 28, 2025
6b53cc0
podcast index: remove unexpected keys from validated arrays
nb823 Nov 28, 2025
89662a9
podcast index validator: added tests for unexpected key removal logic
nb823 Nov 28, 2025
ad96ed6
podcast index attributes reader: attributes of psalm type objects are…
nb823 Dec 4, 2025
2422ec9
podcast index live item: made live item classes final
nb823 Dec 4, 2025
4e6f7ea
podcast index validator: removed unnecessary imports
nb823 Dec 18, 2025
7b88cb1
podcast index: marked helper classes as internal
nb823 Dec 18, 2025
13b9349
podcast index: phpcs fixes
nb823 Dec 18, 2025
873ec63
podcast index: phpdocs fixes
nb823 Dec 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 56 additions & 10 deletions docs/book/extensions/podcast-index.md

Large diffs are not rendered by default.

60 changes: 48 additions & 12 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,7 @@
<code><![CDATA[$entry->ownerDocument]]></code>
</PossiblyNullPropertyAssignmentValue>
<PossiblyUnusedMethod>
<code>__call</code>
<code>getExtensions</code>
<code>getXpath</code>
<code>saveXml</code>
</PossiblyUnusedMethod>
<PropertyNotSetInConstructor>
Expand Down Expand Up @@ -1586,6 +1584,9 @@
</TooManyArguments>
</file>
<file src="src/Reader/Extension/PodcastIndex/Feed.php">
<DeprecatedMethod>
<code>getPodcastIndexFunding</code>
</DeprecatedMethod>
<MixedAssignment>
<code>$locked</code>
<code>$owner</code>
Expand All @@ -1606,6 +1607,14 @@
<code>query</code>
</TooManyArguments>
</file>
<file src="src/Reader/Extension/PodcastIndex/LiveItem.php">
<PossiblyUnusedMethod>
<code>registerNamespaces</code>
</PossiblyUnusedMethod>
<PropertyNotSetInConstructor>
<code>LiveItem</code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Reader/Extension/Slash/Entry.php">
<InvalidOperand>
<code>$hit</code>
Expand Down Expand Up @@ -3079,13 +3088,6 @@
</TypeDoesNotContainType>
</file>
<file src="src/Writer/Extension/PodcastIndex/Entry.php">
<DocblockTypeContradiction>
<code><![CDATA[! is_string($value['duration'])]]></code>
<code><![CDATA[! is_string($value['startTime'])]]></code>
</DocblockTypeContradiction>
<MixedArrayAssignment>
<code><![CDATA[$this->data['soundbites'][]]]></code>
</MixedArrayAssignment>
<PossiblyUnusedMethod>
<code>__construct</code>
<code>addPodcastIndexAlternateEnclosure</code>
Expand All @@ -3097,10 +3099,13 @@
<code>resetPodcastIndexValues</code>
<code>setEncoding</code>
<code>setPodcastIndexChapters</code>
<code>setPodcastIndexChat</code>
<code>setPodcastIndexContentLinks</code>
<code>setPodcastIndexDetailedImages</code>
<code>setPodcastIndexEpisode</code>
<code>setPodcastIndexFundings</code>
<code>setPodcastIndexLicense</code>
<code>setPodcastIndexLocation</code>
<code>setPodcastIndexLocations</code>
<code>setPodcastIndexPersons</code>
<code>setPodcastIndexSeason</code>
<code>setPodcastIndexSocialInteracts</code>
Expand All @@ -3118,21 +3123,28 @@
<file src="src/Writer/Extension/PodcastIndex/Feed.php">
<PossiblyUnusedMethod>
<code>__construct</code>
<code>addPodcastIndexPodrollRemoteItem</code>
<code>addPodcastIndexLiveItem</code>
<code>addPodcastIndexValue</code>
<code>getEncoding</code>
<code>createPodcastIndexLiveItem</code>
<code>getLockOwner</code>
<code>getPodcastIndexFundings</code>
<code>getPodcastIndexLiveItems</code>
<code>getPodcastIndexLocations</code>
<code>getPodcastIndexPersons</code>
<code>isLocked</code>
<code>removePodcastIndexLiveItem</code>
<code>resetPodcastIndexValues</code>
<code>setEncoding</code>
<code>setPodcastIndexBlocks</code>
<code>setPodcastIndexChat</code>
<code>setPodcastIndexDetailedImages</code>
<code>setPodcastIndexFunding</code>
<code>setPodcastIndexFundings</code>
<code>setPodcastIndexGuid</code>
<code>setPodcastIndexImages</code>
<code>setPodcastIndexLicense</code>
<code>setPodcastIndexLocation</code>
<code>setPodcastIndexLocations</code>
<code>setPodcastIndexLocked</code>
<code>setPodcastIndexMedium</code>
<code>setPodcastIndexPersons</code>
Expand All @@ -3149,9 +3161,33 @@
<code>$params</code>
</PossiblyUnusedParam>
<PossiblyUnusedProperty>
<code>$liveItemKey</code>
<code>$stringWrapper</code>
</PossiblyUnusedProperty>
</file>
<file src="src/Writer/Extension/PodcastIndex/LiveItem.php">
<PossiblyUnusedMethod>
<code>setEnd</code>
<code>setStart</code>
<code>setStatus</code>
</PossiblyUnusedMethod>
<PossiblyUnusedProperty>
<code>$encoding</code>
</PossiblyUnusedProperty>
</file>
<file src="src/Writer/Extension/PodcastIndex/Renderer/LiveItem.php">
<MixedAssignment>
<code>$ext</code>
</MixedAssignment>
<MixedMethodCall>
<code>render</code>
<code>setDataContainer</code>
<code>setDomDocument</code>
<code>setEncoding</code>
<code>setRootElement</code>
<code>setType</code>
</MixedMethodCall>
</file>
<file src="src/Writer/Extension/RendererInterface.php">
<PossiblyUnusedMethod>
<code>render</code>
Expand Down
176 changes: 117 additions & 59 deletions src/Reader/Extension/PodcastIndex/AttributesReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,142 +15,159 @@
* This class is internal to the library and should not be referenced by consumer code.
* Backwards Incompatible changes can occur in Minor and Patch Releases.
*
* @internal
*
* @psalm-internal Laminas\Feed
* @psalm-internal LaminasTest\Feed
*
* @psalm-type FundingObject = object{
* title: string,
* url: string
* }
* @psalm-type LicenseObject = object{
* identifier: string,
* url?: string
* url: string
* }
* @psalm-type LocationObject = object{
* description: string,
* geo?: string,
* osm?: string,
* rel?: string,
* country?: string,
* geo: string,
* osm: string,
* rel: string,
* country: string,
* }
* @psalm-type BlockObject = object{
* value: string,
* id?: string
* id: string
* }
* @psalm-type TxtObject = object{
* value: string,
* purpose?: string
* purpose: string
* }
* @psalm-type UpdateFrequencyObject = object{
* description: string,
* complete?: bool,
* dtstart?: DateTimeInterface,
* rrule?: string
* complete: bool,
* dtstart: DateTimeInterface,
* rrule: string
* }
* @psalm-type PersonObject = object{
* name: string,
* role?: string,
* group?: string,
* img?: string,
* href?: string
* role: string,
* group: string,
* img: string,
* href: string
* }
* @psalm-type TrailerObject = object{
* title: string,
* pubdate: string,
* url: string,
* length?: int,
* type?: string,
* season?: int
* length: int,
* type: string,
* season: int
* }
* @psalm-type RemoteItemObject = object{
* feedGuid: string,
* feedUrl?: string,
* itemGuid?: string,
* medium?: string,
* title?: string
* feedUrl: string,
* itemGuid: string,
* medium: string,
* title: string
* }
* @psalm-type ValueRecipientObject = object{
* type: string,
* address: string,
* split: int,
* name?: string,
* customKey?: string,
* customValue?: string,
* fee?: bool,
* name: string,
* customKey: string,
* customValue: string,
* fee: bool,
* }
* @psalm-type ValueTimeSplitObject = object{
* startTime: int,
* duration: int,
* remoteStartTime?: int,
* remotePercentage?: int,
* valueRecipients?: list<ValueRecipientObject>,
* remoteItem?: RemoteItemObject
* remoteStartTime: int,
* remotePercentage: int,
* valueRecipients: list<ValueRecipientObject>,
* remoteItem: RemoteItemObject
* }
* @psalm-type ValueObject = object{
* type: string,
* method: string,
* suggested?: float,
* suggested: float,
* valueRecipients: list<ValueRecipientObject>,
* valueTimeSplits?: list<ValueTimeSplitObject>,
* valueTimeSplits: list<ValueTimeSplitObject>,
* }
* @psalm-type ImagesObject = object{
* srcset: string,
* }
* @psalm-type DetailedImageObject = object{
* href: string,
* alt?: string,
* purpose?: string,
* type?: string,
* aspectRatio?: string,
* width?: int,
* height?: int,
* alt: string,
* purpose: string,
* type: string,
* aspectRatio: string,
* width: int,
* height: int,
* }
* @psalm-type SocialInteractObject = object{
* protocol: string,
* uri: string,
* priority?: int,
* accountId?: string,
* accountUrl?: string,
* priority: int,
* accountId: string,
* accountUrl: string,
* }
* @psalm-type TranscriptObject = object{
* url: string,
* type: string,
* language?: string,
* rel?: string
* language: string,
* rel: string
* }
* @psalm-type ChaptersObject = object{
* url: string,
* type: string
* }
* @psalm-type SoundbiteObject = object{
* title?: string,
* title: string,
* startTime: string,
* duration: string
* }
* @psalm-type SeasonObject = object{
* value: int,
* name?: string
* name: string
* }
* @psalm-type EpisodeObject = object{
* value: int|float,
* display?: string
* display: string
* }
* @psalm-type SourceObject = object{
* uri: string,
* contentType?: string
* contentType: string
* }
* @psalm-type IntegrityObject = object{
* type: string,
* value: string
* }
* @psalm-type AlternateEnclosureObject = object{
* type: string,
* length?: int,
* bitrate?: int|float,
* height?: int,
* lang?: string,
* title?: string,
* rel?: string,
* codecs?: string,
* default?: bool,
* sources: list<SourceObject>,
* integrity?: IntegrityObject,
* }
* @psalm-internal Laminas\Feed
* @psalm-internal LaminasTest\Feed
* length: int,
* bitrate: int|float,
* height: int,
* lang: string,
* title: string,
* rel: string,
* codecs: string,
* default: bool,
* sources: list<SourceObject>,
* integrity: IntegrityObject,
* }
* @psalm-type ContentLinkObject = object{
* href: string,
* description: string,
* }
* @psalm-type ChatObject = object{
* server: string,
* protocol: string,
* accountId: string,
* space: string,
* }
*/
final class AttributesReader
{
Expand Down Expand Up @@ -443,4 +460,45 @@ public static function readIntegrity(DOMElement $item): object
$object->value = $item->getAttribute('value');
return $object;
}

/**
* Read content link
*
* @psalm-return ContentLinkObject
*/
public static function readContentLink(DOMElement $item): object
{
$object = new stdClass();
$object->href = $item->getAttribute('href');
$object->description = $item->nodeValue;
return $object;
}

/**
* Read podcast funding
*
* @psalm-return FundingObject
*/
public static function readFunding(DOMElement $item): object
{
$object = new stdClass();
$object->url = $item->getAttribute('url');
$object->title = $item->nodeValue;
return $object;
}

/**
* Read podcast chat
*
* @psalm-return ChatObject
*/
public static function readChat(DOMElement $item): object
{
$object = new stdClass();
$object->server = $item->getAttribute('server');
$object->protocol = $item->getAttribute('protocol');
$object->accountId = $item->getAttribute('accountId');
$object->space = $item->getAttribute('space');
return $object;
}
}
Loading