protected function readServicesAndParams($bundleDir)
    {
        $this->servicesFile = $bundleDir.'/Resources/config/services.yml';
        if ($this->fs->exists($this->servicesFile)) {
            $this->services = Yaml::parseFile($this->servicesFile);
        }

        if (!isset($this->services['services'])) {
            $this->services['services'] = [];
        }

        if (isset($this->services['parameters'])) {
            $this->parameters['parameters'] = $this->services['parameters'];
            unset($this->services['parameters']);
        } else {
            $this->parameters['parameters'] = [];
        }
    }