Skip to content

Commit

Permalink
Merge pull request #1 from 8fold/update-Dependencies
Browse files Browse the repository at this point in the history
Update composer.json
  • Loading branch information
joshbruce authored Dec 13, 2022
2 parents 19b1f60 + eab56c5 commit dab0d1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 3 additions & 7 deletions src/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

namespace Eightfold\Sitemap;

use Eightfold\XMLBuilder\Contracts\Buildable;
use Stringable;
// use Eightfold\XMLBuilder\Contracts\Buildable;

use DateTime;

Expand All @@ -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';

Expand Down Expand Up @@ -74,11 +75,6 @@ public function addUrl(
return $this;
}

public function build(): string
{
return (string) $this;
}

public function __toString(): string
{
return (string) Document::urlset(
Expand Down
10 changes: 3 additions & 7 deletions src/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@

namespace Eightfold\Sitemap;

use Eightfold\XMLBuilder\Contracts\Buildable;
use Stringable;
// use Eightfold\XMLBuilder\Contracts\Buildable;

use DateTime;

use Eightfold\XMLBuilder\Element;

use Eightfold\Sitemap\Changefreq;

class Url implements Buildable
class Url implements Stringable
{
private Element|string $lastmod = '';

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit dab0d1e

Please sign in to comment.