You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Be able to use any reader in Controllers, EventListeners without injecting the ReaderFactory, just use the already there service.
Many thanks!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: