Allow stringable object to be used to geocode address
ker0x opened this issue · comments
Currently, only addresses in string form can be geocoded. It would be interesting to enable objects that can be represented as strings (with a __toString()
method or by implementing the \Stringable
interface) to be geocoded too.
Is this limitation exists only in this bundle?
I think so, because I was referring to the GeocoderListener which only checks a property or a getter returning a string.
In my case, I store the address in an embeddable doctrine object which implements the Stringable
interface. I could simply add a getAddressAsString
method with the Address
attribute, but having the ability to directly mark my getAddress()
getter would be a nice improvement.
I'll be able to work on a PR when I've finished fighting the test failure!