protected function gatherLoadedPackagesHandles($packages)
    {
        $packages = (array) $packages;
        if (!$packages) {
            $plugins = $this->container->getPlugins();
            foreach ($plugins as $plugin) {
                $path = (new ReflectionClass($plugin))->getFileName();
                preg_match('/vendor\/([^\/]+)\/([^\/]+)/', $path, $handle);
                if (count($handle) !== 3) {
                    continue;
                }

                $packages[] = $handle[1].'/'.$handle[2];
            }
        }

        return $packages;
    }