private function getFilesAndReflectionClassesFromPackage(PackageInterface $package)
    {
        $cache_id = $package->getName();

        if (isset($this->metadata[$cache_id])) {
            return $this->metadata[$cache_id];
        }

        $this->metadata[$cache_id] = [];
        foreach ($this->getFilesForPackage($package) as $filename) {
            $filename = (string) $filename;
            if (isset($this->metadata[$cache_id][$filename])) {
                continue;
            }

            $this->metadata[$cache_id][$filename] = new ReflectionClass($filename);
        }

        return $this->metadata[$package->getName()];
    }