spatie / crawler

An easy to use, powerful crawler implemented in PHP. Can execute Javascript.
https://freek.dev/308-building-a-crawler-in-php
MIT License
2.51k stars 357 forks source link

Fix return type #452

Closed riesjart closed 9 months ago

riesjart commented 9 months ago

Spatie\Crawler\Crawler::startCrawling() accepts any instance of Psr\Http\Message\UriInterface. When e.g. an instance of Spatie\Url\Url has been provided, everything goes well until Spatie\Crawler\Handlers\CrawlRequestFulfilled::getBaseUrl() fails to return an instance of GuzzleHttp\Psr7\Uri instead of the PSR interface. The code doesn't depend on the concrete Guzzle Uri however.

freekmurze commented 9 months ago

Thanks!