Added $environment parameter to PackageManager::createPackageManager()