File tree 6 files changed +21
-4
lines changed
6 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to ` laravel-feed ` will be documented in this file
4
4
5
+ ## 3.1.2 - 2020-12-09
6
+
7
+ - Fix issue with Rfc3339 string
8
+
5
9
## 3.1.1 - 2020-12-07
6
10
7
11
- RFC3339 compliant updated field (#136 )
Original file line number Diff line number Diff line change 31
31
<![CDATA[{!! $category ! !} ]] >
32
32
</category >
33
33
@endforeach
34
- <updated >{{ $item -> updated -> toRssString () } } </updated >
34
+ <updated >{{ $item -> updated -> toRfc3339String () } } </updated >
35
35
</entry >
36
36
@endforeach
37
37
</feed >
Original file line number Diff line number Diff line change 17
17
<description ><![CDATA[{!! $item -> summary ! !} ]] ></description >
18
18
<author ><![CDATA[{{ $item -> author } } ]] ></author >
19
19
<guid >{{ url ($item -> id ) } } </guid >
20
- <pubDate >{{ $item -> updated -> toRssString () } } </pubDate >
20
+ <pubDate >{{ $item -> updated -> toRfc3339String () } } </pubDate >
21
21
@foreach ($item -> category as $category )
22
22
<category >{{ $category } } </category >
23
23
@endforeach
Original file line number Diff line number Diff line change @@ -94,6 +94,6 @@ protected function lastUpdated(): string
94
94
95
95
return $ this ->feedItems ->sortBy (function ($ feedItem ) {
96
96
return $ feedItem ->updated ;
97
- })->last ()->updated ->toRssString ();
97
+ })->last ()->updated ->toRfc3339String ();
98
98
}
99
99
}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function title(string $title): self
62
62
63
63
public function updated (Carbon $ updated ): self
64
64
{
65
- $ this ->updated = $ updated-> toRfc3339String () ;
65
+ $ this ->updated = $ updated ;
66
66
67
67
return $ this ;
68
68
}
Original file line number Diff line number Diff line change @@ -14,4 +14,17 @@ public function a_feed_is_invalid_if_a_field_is_missing()
14
14
15
15
FeedItem::create ()->validate ();
16
16
}
17
+
18
+ /** @test * */
19
+ public function it_can_be_created_without_errors ()
20
+ {
21
+ FeedItem::create ()
22
+ ->title ('A title ' )
23
+ ->category ('a category ' )
24
+ ->link ('https://spatie.be ' )
25
+ ->author ('an author ' )
26
+ ->updated (now ());
27
+
28
+ $ this ->expectNotToPerformAssertions ();
29
+ }
17
30
}
You can’t perform that action at this time.
0 commit comments