HasCrawled must be of type UriInterface, but Spatie\Sitemap\Tags\Url given #444
Unanswered
geoff-maddock
asked this question in
Q&A
Replies: 1 comment
-
Studying the docs, I realize that there's a difference for hasCrawled:
I changed my code to use this pattern and it looks to be working now. I'm a little confused how I had generated a sitemap with my code previously, but no matter. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Found that I started getting an error:
App\Console\Commands\GenerateSitemap::App\Console\Commands\{closure}(): Argument #1 ($url) must be of type Psr\Http\Message\UriInterface, Spatie\Sitemap\Tags\Url given, called in /var/www/events-tracker/vendor/spatie/laravel-sitemap/src/SitemapGenerator.php on line 178
The code in reference here:
This was created using the docs on the README page.
Not sure what changed exactly - I would have thought that Tags\Url would implement the UriInterface.
Any tips?
Beta Was this translation helpful? Give feedback.
All reactions