protected function findComposerPackagesInPath($startingDirectory)
    {
        $directories = [$startingDirectory];
        while ($directories !== []) {
            $currentDirectory = array_pop($directories);
            if ($handle = opendir($currentDirectory)) {
                while (false !== ($filename = readdir($handle))) {
                    if ($filename[0] === '.') {
                        continue;
                    }
                    $pathAndFilename = $currentDirectory . $filename;
                    if (is_dir($pathAndFilename)) {
                        $potentialPackageDirectory = $pathAndFilename . '/';
                        if (is_file($potentialPackageDirectory . 'composer.json')) {
                            $composerManifest = ComposerUtility::getComposerManifest($potentialPackageDirectory);
                            // TODO: Maybe get rid of magic string "neos-package-collection" by fetching collection package types from outside.
                            if (isset($composerManifest['type']) && $composerManifest['type'] === 'neos-package-collection') {
                                $directories[] = $potentialPackageDirectory;
                                continue;
                            }
                            yield $potentialPackageDirectory;
                        } else {
                            $directories[] = $potentialPackageDirectory;
                        }
                    }
                }
                closedir($handle);
            }
        }
    }