Skip to content

Commit

Permalink
use tagged iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
limenet committed Feb 14, 2024
1 parent 4b87053 commit b92711d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/Repository/OutputRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Valantic\PimcoreFormsBundle\Repository;

use Symfony\Component\DependencyInjection\Attribute\TaggedIterator;
use Valantic\PimcoreFormsBundle\DependencyInjection\ValanticPimcoreFormsExtension;
use Valantic\PimcoreFormsBundle\Exception\DuplicateOutputException;
use Valantic\PimcoreFormsBundle\Exception\UnknownOutputException;
use Valantic\PimcoreFormsBundle\Form\Output\OutputInterface;
Expand All @@ -18,8 +20,10 @@ class OutputRepository
/**
* @param iterable<OutputInterface> $outputs
*/
public function __construct(iterable $outputs)
{
public function __construct(
#[TaggedIterator(ValanticPimcoreFormsExtension::TAG_OUTPUT)]
iterable $outputs
) {
$this->outputs = $this->iterableToArray($outputs);
}

Expand Down
4 changes: 0 additions & 4 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ services:
Valantic\PimcoreFormsBundle\Service\:
resource: '../../Service/*'

Valantic\PimcoreFormsBundle\Repository\OutputRepository:
arguments:
- !tagged_iterator valantic.pimcore_forms.output

Valantic\PimcoreFormsBundle\Repository\InputHandlerRepository:
arguments:
- !tagged_iterator valantic.pimcore_forms.input_handler
Expand Down

0 comments on commit b92711d

Please sign in to comment.