diff --git a/src/Generator.php b/src/Generator.php index afb7be7..915bcb4 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -167,7 +167,7 @@ private function dumpSitemap(Sitemapindex|Urlset $sitemap, bool $deflate): void } /** @var string $content */ - $content = $deflate ? gzdeflate($sitemap->toXml()) : $sitemap->toXml(); + $content = ($deflate ? gzencode($sitemap->toXml()) : $sitemap->toXml()); $this->filesystem->dumpFile($this->buildDir.str_replace($this->generateUrl(''), '', $path), $content); } } diff --git a/tests/functional/site/fixtures/sitemap-article-0.xml.gz b/tests/functional/site/fixtures/sitemap-article-0.xml.gz index ec1bbc9..d6119a0 100644 Binary files a/tests/functional/site/fixtures/sitemap-article-0.xml.gz and b/tests/functional/site/fixtures/sitemap-article-0.xml.gz differ diff --git a/tests/functional/site/fixtures/sitemap-articles-0.xml.gz b/tests/functional/site/fixtures/sitemap-articles-0.xml.gz index adfa655..7d4b6b4 100644 Binary files a/tests/functional/site/fixtures/sitemap-articles-0.xml.gz and b/tests/functional/site/fixtures/sitemap-articles-0.xml.gz differ diff --git a/tests/functional/site/fixtures/sitemap-file-0.xml.gz b/tests/functional/site/fixtures/sitemap-file-0.xml.gz index 88d4c8f..7c85fe3 100644 Binary files a/tests/functional/site/fixtures/sitemap-file-0.xml.gz and b/tests/functional/site/fixtures/sitemap-file-0.xml.gz differ diff --git a/tests/functional/site/fixtures/sitemap-homepage-0.xml.gz b/tests/functional/site/fixtures/sitemap-homepage-0.xml.gz index e992643..235b292 100644 Binary files a/tests/functional/site/fixtures/sitemap-homepage-0.xml.gz and b/tests/functional/site/fixtures/sitemap-homepage-0.xml.gz differ diff --git a/tests/functional/site/fixtures/sitemap-index-0.xml.gz b/tests/functional/site/fixtures/sitemap-index-0.xml.gz index 6cfe80f..2655858 100644 Binary files a/tests/functional/site/fixtures/sitemap-index-0.xml.gz and b/tests/functional/site/fixtures/sitemap-index-0.xml.gz differ diff --git a/tests/functional/site/fixtures/sitemap-product-0.xml.gz b/tests/functional/site/fixtures/sitemap-product-0.xml.gz index d017319..41c57be 100644 Binary files a/tests/functional/site/fixtures/sitemap-product-0.xml.gz and b/tests/functional/site/fixtures/sitemap-product-0.xml.gz differ diff --git a/tests/functional/site/fixtures/sitemap-product_with_route_default-0.xml.gz b/tests/functional/site/fixtures/sitemap-product_with_route_default-0.xml.gz index 9935ea5..e870252 100644 Binary files a/tests/functional/site/fixtures/sitemap-product_with_route_default-0.xml.gz and b/tests/functional/site/fixtures/sitemap-product_with_route_default-0.xml.gz differ diff --git a/tests/functional/site/fixtures/sitemap.xml.gz b/tests/functional/site/fixtures/sitemap.xml.gz index 746706d..66662fa 100644 Binary files a/tests/functional/site/fixtures/sitemap.xml.gz and b/tests/functional/site/fixtures/sitemap.xml.gz differ