diff --git a/src/Composer/StudioPlugin.php b/src/Composer/StudioPlugin.php index 1730db1..1db34ae 100644 --- a/src/Composer/StudioPlugin.php +++ b/src/Composer/StudioPlugin.php @@ -58,11 +58,23 @@ public function registerStudioPackages() foreach ($this->getManagedPaths() as $path) { $this->io->writeError("[Studio] Loading path $path"); - $repoManager->prependRepository(new PathRepository( - ['url' => $path], - $this->io, - $composerConfig - )); + // In case composer version >= 2.3.0 + if (method_exists($this->composer, 'getLoop')) { + $repoManager->prependRepository(new PathRepository( + ['url' => $path], + $this->io, + $composerConfig, + $this->composer->getLoop()->getHttpDownloader(), + $this->composer->getEventDispatcher(), + $this->composer->getLoop()->getProcessExecutor() + )); + } else { + $repoManager->prependRepository(new PathRepository( + ['url' => $path], + $this->io, + $composerConfig + )); + } } }