geocoder-php/BazingaGeocoderBundle

integer cast on cache_lifetime return 0 instead of null if not provided

lwillems opened this issue · 2 comments

in BazingaGeocoderExtension

$container->register($providerServiceId.'.cache', CachePlugin::class) ->setPublic(false) ->setArguments([new Reference($cacheServiceId), (int) $config['cache_lifetime'], $config['cache_precision']]);

casting argument as (int) make it default to 0 in cachePlugin __construct instead of null if provided in yaml conf :
cache_lifetime: ~

Consequence : infinite caching is not possible

Regards

Hello @lwillems, would you like to submit a PR to fix this?

@lwillems this was fixed in #249