Open PaulCombal opened 4 months ago
I didn't do too much digging, but this did't work in Symfony 7:
public function __construct( #[Autowire('api_platform.doctrine.orm.state.item_provider')] private ProviderInterface $itemProvider, )
what worked:
public function __construct( #[Autowire(service: CollectionProvider::class)] private readonly CollectionProvider $collectionProvider )
Documentation page: https://api-platform.com/docs/core/state-providers/
I had the following error with the docs code: "MyProvider::__construct(): Argument #1 ($collectionProvider) must be of type ApiPlatform\\State\\ProviderInterface, string given, called in .."
"MyProvider::__construct(): Argument #1 ($collectionProvider) must be of type ApiPlatform\\State\\ProviderInterface, string given, called in .."
I didn't do too much digging, but this did't work in Symfony 7:
what worked:
Documentation page: https://api-platform.com/docs/core/state-providers/
I had the following error with the docs code:
"MyProvider::__construct(): Argument #1 ($collectionProvider) must be of type ApiPlatform\\State\\ProviderInterface, string given, called in .."