diff --git a/CHANGELOG.md b/CHANGELOG.md index 9452d0c..387d5c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `laravel-sitemap` will be documented in this file +## 7.0.0 - 2023-10-24 + +- add compatibility with spatie/crawler v8 + ## 6.4.0 - 2023-10-18 ### What's Changed diff --git a/UPGRADING.md b/UPGRADING.md index e3c76a1..478a684 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -1,5 +1,9 @@ # Upgrading +## From 6.0 to 7.0 + +- `spatie/crawler` is updated to `^8.0`. + ## From 5.0 to 6.0 No API changes were made. If you're on PHP 8, you should be able to upgrade from v5 to v6 without having to make any changes. diff --git a/composer.json b/composer.json index e747a92..41a9284 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "guzzlehttp/guzzle": "^7.2", "illuminate/support": "^8.0|^9.0|^10.0", "nesbot/carbon": "^2.63", - "spatie/crawler": "^7.0", + "spatie/crawler": "^8.0", "spatie/laravel-package-tools": "^1.5", "symfony/dom-crawler": "^5.1.14|^6.0" }, diff --git a/src/Crawler/Observer.php b/src/Crawler/Observer.php index 8c92709..bccc32b 100644 --- a/src/Crawler/Observer.php +++ b/src/Crawler/Observer.php @@ -22,7 +22,7 @@ public function __construct(callable $hasCrawled) * * @param \Psr\Http\Message\UriInterface $url */ - public function willCrawl(UriInterface $url): void + public function willCrawl(UriInterface $url, ?string $linkText): void { } @@ -43,7 +43,8 @@ public function finishedCrawling(): void public function crawled( UriInterface $url, ResponseInterface $response, - ?UriInterface $foundOnUrl = null + ?UriInterface $foundOnUrl = null, + ?string $linkText = null, ): void { ($this->hasCrawled)($url, $response); } @@ -58,7 +59,8 @@ public function crawled( public function crawlFailed( UriInterface $url, RequestException $requestException, - ?UriInterface $foundOnUrl = null + ?UriInterface $foundOnUrl = null, + ?string $linkText = null, ): void { } }