eliashaeussler / typo3-warming

🚀 Extension for TYPO3 CMS that warms up Frontend caches based on an XML sitemap with multi-language support.
https://docs.typo3.org/p/eliashaeussler/typo3-warming/main/en-us/
GNU General Public License v2.0
15 stars 9 forks source link

[BUG] Argument 1 passed to GuzzleHttp\Psr7\Uri::__construct() must be of the type string, object given #239

Closed mkempe closed 1 year ago

mkempe commented 1 year ago

TYPO3 version

11.5.26

PHP version

7.4.33

Extension version

0.5.1

Composer mode

Operating system

Linux

Current behavior

When i run the following command typo3cms warming:cachewarmup --pages 1 an exception (Argument 1 passed to GuzzleHttp\Psr7\Uri::__construct() must be of the type string, object given) is thrown.

Expected behavior

The sitemap(s) should be parsed without exception.

Steps to reproduce

No response

Additional context

Hallo,

first of all, many thanks for this great extension.

I have already tried to fix the error, but I don't know if this would be the right approach. The error is in the cache-warmup package, in the 0.8 release, in CacheWarmupCommand.php, line 230: https://github.com/eliashaeussler/cache-warmup/blob/9a01813efbb9c62a2d6a54da75399557a22d0afd/src/Command/CacheWarmupCommand.php#L230

It is expected that the passed Url is a string, but it is a TYPO3\CMS\Core\Http\Uri object. A possible fix would be to explizit cast the Url to string. Would that be the correct procedure?

Code of Conduct

eliashaeussler commented 1 year ago

Hi @mkempe, thanks for this issue. It's now resolved as part of the 0.5.2 release.

mkempe commented 1 year ago

Hi @eliashaeussler, many thank for the fix, works like charm.

Thanks again for the great extension and your time.