diff --git a/src/store/src/Document/Loader/InMemoryLoader.php b/src/store/src/Document/Loader/InMemoryLoader.php index c08b31f5f..81525c426 100644 --- a/src/store/src/Document/Loader/InMemoryLoader.php +++ b/src/store/src/Document/Loader/InMemoryLoader.php @@ -30,7 +30,7 @@ public function __construct( ) { } - public function load(?string $source, array $options = []): iterable + public function load(?string $source = null, array $options = []): iterable { yield from $this->documents; } diff --git a/src/store/src/Document/Loader/RssFeedLoader.php b/src/store/src/Document/Loader/RssFeedLoader.php index 5bd9ba7aa..927e47287 100644 --- a/src/store/src/Document/Loader/RssFeedLoader.php +++ b/src/store/src/Document/Loader/RssFeedLoader.php @@ -41,7 +41,7 @@ public function __construct( /** * @param array{uuid_namespace?: string} $options */ - public function load(?string $source, array $options = []): iterable + public function load(?string $source = null, array $options = []): iterable { if (!class_exists(Crawler::class)) { throw new RuntimeException('For using the RSS loader, the Symfony DomCrawler component is required. Try running "composer require symfony/dom-crawler".'); diff --git a/src/store/src/Document/Loader/TextFileLoader.php b/src/store/src/Document/Loader/TextFileLoader.php index 28e0dc552..18cec8cb5 100644 --- a/src/store/src/Document/Loader/TextFileLoader.php +++ b/src/store/src/Document/Loader/TextFileLoader.php @@ -23,7 +23,7 @@ */ final class TextFileLoader implements LoaderInterface { - public function load(?string $source, array $options = []): iterable + public function load(?string $source = null, array $options = []): iterable { if (null === $source) { throw new InvalidArgumentException('TextFileLoader requires a file path as source, null given.'); diff --git a/src/store/src/Document/LoaderInterface.php b/src/store/src/Document/LoaderInterface.php index 123f4eab2..97de1f2ca 100644 --- a/src/store/src/Document/LoaderInterface.php +++ b/src/store/src/Document/LoaderInterface.php @@ -22,5 +22,5 @@ interface LoaderInterface * * @return iterable iterable of embeddable documents loaded from the source */ - public function load(?string $source, array $options = []): iterable; + public function load(?string $source = null, array $options = []): iterable; }