Skip to content

Commit

Permalink
Add support for exporter 3 (#680)
Browse files Browse the repository at this point in the history
* Add support for exporter 3

* Fix
  • Loading branch information
VincentLanglet authored Jul 28, 2022
1 parent 8c918d2 commit 59255e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"php": "^7.4 || ^8.0",
"ext-json": "*",
"sonata-project/block-bundle": "^4.0",
"sonata-project/exporter": "^2.0",
"sonata-project/exporter": "^2.0 || ^3.0",
"symfony/config": "^4.4 || ^5.4 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0",
"symfony/form": "^4.4 || ^5.4 || ^6.0",
Expand Down
3 changes: 1 addition & 2 deletions src/Sitemap/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace Sonata\SeoBundle\Sitemap;

use Sonata\Exporter\Source\ChainSourceIterator;
use Sonata\Exporter\Source\SourceIteratorInterface;

final class Source
{
Expand All @@ -35,7 +34,7 @@ public function getSources(): ChainSourceIterator
return $this->sources;
}

public function addSource(SourceIteratorInterface $source): void
public function addSource(\Iterator $source): void
{
$this->sources->addSource($source);
}
Expand Down
4 changes: 1 addition & 3 deletions src/Sitemap/SourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

namespace Sonata\SeoBundle\Sitemap;

use Sonata\Exporter\Source\SourceIteratorInterface;

/**
* Manager several chain source iterator grouped.
*
Expand All @@ -37,7 +35,7 @@ public function __construct()
*
* @param mixed[] $types
*/
public function addSource(string $group, SourceIteratorInterface $source, array $types = []): void
public function addSource(string $group, \Iterator $source, array $types = []): void
{
if (!isset($this->sources[$group])) {
$this->sources[$group] = new Source();
Expand Down

0 comments on commit 59255e8

Please sign in to comment.