From 1db37ba363ad0a2440f782ec9c9ffe17724e1dfa Mon Sep 17 00:00:00 2001 From: Josh Bruce <15252830+joshbruce@users.noreply.github.com> Date: Mon, 12 Dec 2022 18:40:28 -0500 Subject: [PATCH 1/2] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fd6b491..48a5715 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ }, "require": { "php": "^8.1", - "8fold/php-xml-builder": "^1.3" + "8fold/php-xml-builder": "^2.0" }, "require-dev": { "phpstan/phpstan": "^1.9", From eab56c5357fad2e31602928b6f8591806740a6c2 Mon Sep 17 00:00:00 2001 From: Josh Bruce <15252830+joshbruce@users.noreply.github.com> Date: Mon, 12 Dec 2022 19:03:28 -0500 Subject: [PATCH 2/2] update: Dependencies --- src/Sitemap.php | 10 +++------- src/Url.php | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/Sitemap.php b/src/Sitemap.php index d6268d1..1c92b6e 100644 --- a/src/Sitemap.php +++ b/src/Sitemap.php @@ -3,7 +3,8 @@ namespace Eightfold\Sitemap; -use Eightfold\XMLBuilder\Contracts\Buildable; +use Stringable; +// use Eightfold\XMLBuilder\Contracts\Buildable; use DateTime; @@ -28,7 +29,7 @@ * 0.3-0.0: FAQs, outdated info, old press releases, completely static pages that * are still relevant enough to keep from deleting entirely. */ -class Sitemap implements Buildable +class Sitemap implements Stringable { private const SCHEMA_VERSION = 'http://www.sitemaps.org/schemas/sitemap/0.9'; @@ -74,11 +75,6 @@ public function addUrl( return $this; } - public function build(): string - { - return (string) $this; - } - public function __toString(): string { return (string) Document::urlset( diff --git a/src/Url.php b/src/Url.php index d013738..4833fab 100644 --- a/src/Url.php +++ b/src/Url.php @@ -3,7 +3,8 @@ namespace Eightfold\Sitemap; -use Eightfold\XMLBuilder\Contracts\Buildable; +use Stringable; +// use Eightfold\XMLBuilder\Contracts\Buildable; use DateTime; @@ -11,7 +12,7 @@ use Eightfold\Sitemap\Changefreq; -class Url implements Buildable +class Url implements Stringable { private Element|string $lastmod = ''; @@ -58,11 +59,6 @@ public function withPriority(float $priority): self return $this; } - public function build(): string - { - return (string) $this; - } - public function __toString(): string { return (string) Element::url(