From 09f2fe805c51265b047f91ff20db3cd98c84edd9 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 18 Oct 2022 22:52:19 +0200 Subject: [PATCH] [ticket/17052] Create our own static composer factory and pass known cwd PHPBB3-17052 --- phpBB/phpbb/composer/installer.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php index 28c023bb60..aead83390d 100644 --- a/phpBB/phpbb/composer/installer.php +++ b/phpBB/phpbb/composer/installer.php @@ -232,8 +232,19 @@ class installer try { + static $composer_factory; + if (!$composer_factory) + { + $composer_factory = new Factory(); + } + $io = new NullIO(); - $composer = Factory::create($io, $this->get_composer_ext_json_filename(), false); + $composer = $composer_factory->createComposer( + $io, + $this->get_composer_ext_json_filename(), + false, + filesystem_helper::realpath('') + ); $installed = [];