serviceMapFactory = $serviceMapFactory; $this->serviceMap = $serviceMap; } public function provide() : ServiceMap { // avoid caching in tests if (\defined('PHPUNIT_COMPOSER_INSTALL')) { $this->serviceMap = null; } if ($this->serviceMap instanceof ServiceMap) { return $this->serviceMap; } if (SimpleParameterProvider::hasParameter(Option::SYMFONY_CONTAINER_XML_PATH_PARAMETER)) { $symfonyContainerXmlPath = SimpleParameterProvider::provideStringParameter(Option::SYMFONY_CONTAINER_XML_PATH_PARAMETER); $this->serviceMap = $this->serviceMapFactory->createFromFileContent($symfonyContainerXmlPath); } else { $this->serviceMap = $this->serviceMapFactory->createEmpty(); } return $this->serviceMap; } }