public function configure(SimpleDoctrineMappingLocator $locator)
    {
        $path = $locator->getPaths()[0];

        $resourcePathExploded = explode('/', $path);
        $resourcePathRoot = array_shift($resourcePathExploded);

        if (strpos($resourcePathRoot, '@') === 0) {
            $mappingFileBundle = ltrim($resourcePathRoot, '@');
            $bundle = $this->kernel->getBundle($mappingFileBundle);

            if ($bundle instanceof BundleInterface) {
                $resourcePathRoot = $bundle->getPath();
            }
        }

        array_unshift($resourcePathExploded, $resourcePathRoot);

        $path = implode('/', $resourcePathExploded);

        if (!file_exists($path)) {
            throw new ConfigurationInvalidException('Mapping file "' . $path . '" does not exist');
        }

        $locator->setPaths([$path]);
    }