I try configure my services in Symfony 5.5 with tags and a resource folder and I also used some different notations. Either I got an empty iterator as constructor param or the exception "Cannot autowire service ... argument "..." of method "__construct()" is type-hinted "iterable", you should configure its value explicitly.".
I used that easy feature in previous versions and I followed that instruction: https://symfony.com/doc/current/service_container/tags.html#reference-tagged-services.
Here that related part of my services.yaml:
services:
_defaults:
autowire: true
autoconfigure: true
App\Service\LinkTypeGuesser\:
resource: '../src/Service/LinkTypeGuesser'
tags: ['link.type.guesser']
App\Service\LinkTypeGuesser:
arguments:
- !tagged_iterator link.type.guesser
My "parent" service class constructor looks like that:
class LinkTypeGuesser
{
private $guessers;
public function __construct(iterable $linkTypeGuessers)
{
$this->guessers = $linkTypeGuessers;
}
}
Any hints what I missed in my configuration?
App\Service\LinkTypeGuesser