mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/16345] Small improvements
PHPBB3-16346
This commit is contained in:
@@ -69,12 +69,12 @@ class installer
|
||||
protected $root_path;
|
||||
|
||||
/**
|
||||
* @var string Stores the original working directory in case it has been changed through move_to_root()
|
||||
* @var string|null Stores the original working directory in case it has been changed through move_to_root()
|
||||
*/
|
||||
private $original_cwd;
|
||||
|
||||
/**
|
||||
* @var array Stores the content of the ext json file before generate_ext_json_file() overrides it
|
||||
* @var array|null Stores the content of the ext json file before generate_ext_json_file() overrides it
|
||||
*/
|
||||
private $ext_json_file_backup;
|
||||
|
||||
@@ -83,11 +83,16 @@ class installer
|
||||
*/
|
||||
private $request;
|
||||
|
||||
/**
|
||||
* @var filesystem phpBB filesystem
|
||||
*/
|
||||
private $filesystem;
|
||||
|
||||
/**
|
||||
* @param string $root_path phpBB root path
|
||||
* @param filesystem $filesystem Filesystem object
|
||||
* @param request $request phpBB request object
|
||||
* @param config $config Config object
|
||||
* @param config|null $config Config object
|
||||
*/
|
||||
public function __construct($root_path, filesystem $filesystem, request $request, config $config = null)
|
||||
{
|
||||
@@ -108,6 +113,7 @@ class installer
|
||||
|
||||
$this->root_path = $root_path;
|
||||
$this->request = $request;
|
||||
$this->filesystem = $filesystem;
|
||||
|
||||
putenv('COMPOSER_HOME=' . filesystem_helper::realpath($root_path) . '/store/composer');
|
||||
}
|
||||
@@ -118,7 +124,7 @@ class installer
|
||||
* @param array $packages Packages to install.
|
||||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param array $whitelist White-listed packages (packages that can be installed/updated/removed)
|
||||
* @param IOInterface $io IO object used for the output
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*
|
||||
* @throws runtime_exception
|
||||
*/
|
||||
@@ -137,7 +143,7 @@ class installer
|
||||
* @param array $packages Packages to install.
|
||||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param array $whitelist White-listed packages (packages that can be installed/updated/removed)
|
||||
* @param IOInterface $io IO object used for the output
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*
|
||||
* @throws runtime_exception
|
||||
*/
|
||||
@@ -402,9 +408,7 @@ class installer
|
||||
*/
|
||||
public function check_requirements()
|
||||
{
|
||||
$filesystem = new \phpbb\filesystem\filesystem();
|
||||
|
||||
return $filesystem->is_writable([
|
||||
return $this->filesystem->is_writable([
|
||||
$this->root_path . $this->composer_filename,
|
||||
$this->root_path . $this->packages_vendor_dir,
|
||||
$this->root_path . substr($this->composer_filename, 0, -5) . '.lock',
|
||||
|
Reference in New Issue
Block a user