class ComposerPluginLoader extends KernelPluginLoader
{ protected function loadPluginInfos(): void
{ if ( !
method_exists(InstalledVersions::
class, 'getInstalledPackagesByType'
) || !
method_exists(InstalledVersions::
class, 'getInstallPath'
) ) { throw new \
RuntimeException('FallbackPluginLoader does only work with Composer 2.1 or higher'
);
} $composerPlugins = InstalledVersions::
getInstalledPackagesByType(PluginFinder::COMPOSER_TYPE
);
$this->pluginInfos =
[];
foreach ($composerPlugins as $composerName) { $path = InstalledVersions::
getInstallPath($composerName);
$composerJsonPath =
$path . '/composer.json';
if (!\
file_exists($composerJsonPath)) { continue;
}