| Q | A
| --- | ---
| Bug Report? | yes
| Feature Request? | no
| BC Break Report? | no
| RFC? | no
| Imagine Bundle Version | 1.9.1
Is there any way to add custom data loader to a chain in config.yml?
You would create a custom loader and then reference it when using the chain loader by using the value you specified in the custom loader service definition.
# app/config/services.yml
services:
imagine.data.loader.my_custom:
class: AppBundle\Imagine\Binary\Loader\MyCustomDataLoader
arguments:
- "@liip_imagine"
- "%liip_imagine.formats%"
tags:
- { name: "liip_imagine.binary.loader", loader: my_custom_data_loader }
# app/config/config.yml
liip_imagine:
loaders:
foo:
filesystem:
# configure filesystem loader
bar:
chain:
loaders:
- foo
- my_custom_data_loader
Thanks a lot, but I have tried it and I'm getting the following message.
The service "liip_imagine.binary.loader.NAME_OF_CHAIN_LOADER" has a dependency on a non-existent service "liip_imagine.binary.loader.NAME_OF_MY_CUSTOM_LOADER".
Symfony version is: 3.4
Any updates on this one?
Same issue here...
@olegrom Have you been able to find a workaround ?
Most helpful comment
Thanks a lot, but I have tried it and I'm getting the following message.
The service "liip_imagine.binary.loader.NAME_OF_CHAIN_LOADER" has a dependency on a non-existent service "liip_imagine.binary.loader.NAME_OF_MY_CUSTOM_LOADER".
Symfony version is: 3.4