Open TheAFOGroup opened 2 years ago
If you have several reader services, then Symfony dependency injector will not be able to automatically determine which one to inject, because for Symfony injector, these services are the same and only you know which one to use where.
You will have to explicitly describe dependency injection in configs or use a ReaderFactory
or create a proxy classes for each databases.
Hi, thanks for the library!
I`m having quite some trouble understanding what the heck is going on. Basically, I want a service that I can use in Controllers and EventListeners.
After checking the issues here and comments, you mentioned to declare:
However, this is not needed apparently. The moment you pass use GeoIp2\Database\Reader into the constructor, the following gets injected:
As above the City reader gets injected automatically, and I have no way of getting the ASN reader for example. I have also commented out default_database but without any effect.
So back to my question, how to use your library properly and as intended?
The requirement is quite simple:
Many thanks!