Я пытаюсь привязать googleApiKey из файла parameters.yml к моему geoLocationService, но он продолжает говорить:
Cannot autowire service "CoreBundle\Service\GeoLocationService": argument "$googleApiKey" of method "__construct()" is type-hinted "string", you should configure its value explicitly.
Я пробовал много вариантов конфигурации, которые я нашел при поиске, но ничего не работает.
GeoLocationService
public function __construct(EntityManager $entityManager, string $googleApiKey)
Service.yml
CoreBundle\Service\GeoLocationService:
arguments:
$googleApiKey: '%google_api_key%'