1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 13:44:12 +02:00

[ticket/11150] Updates deps + fix various issues

PHPBB3-11150
This commit is contained in:
Tristan Darricau
2016-09-07 20:27:50 +02:00
parent 87ce6cadaf
commit fbf11d61aa
9 changed files with 448 additions and 13 deletions

View File

@@ -27,6 +27,7 @@ use phpbb\composer\io\null_io;
use phpbb\config\config;
use phpbb\exception\runtime_exception;
use phpbb\filesystem\filesystem;
use Seld\JsonLint\ParsingException;
/**
* Class to install packages through composer while freezing core dependencies.
@@ -513,7 +514,19 @@ class installer
$this->ext_json_file_backup = null;
$json_file = new JsonFile($this->get_composer_ext_json_filename());
$ext_json_file_backup = $json_file->read();
try
{
$ext_json_file_backup = $json_file->read();
}
catch (ParsingException $e)
{
$ext_json_file_backup = '{}';
$lockFile = new JsonFile(substr($this->get_composer_ext_json_filename(), 0, -5) . '.lock');
$lockFile->write([]);
}
$json_file->write($ext_json_data);
$this->ext_json_file_backup = $ext_json_file_backup;
}