mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/11150] Updates deps + fix various issues
PHPBB3-11150
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ trait translate_composer_trait
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function write($messages, $newline = true)
|
||||
public function write($messages, $newline = true, $verbosity = self::NORMAL)
|
||||
{
|
||||
$messages = (array) $messages;
|
||||
$translated_messages = [];
|
||||
@@ -96,7 +96,7 @@ trait translate_composer_trait
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function writeError($messages, $newline = true)
|
||||
public function writeError($messages, $newline = true, $verbosity = self::NORMAL)
|
||||
{
|
||||
$messages = (array) $messages;
|
||||
$translated_messages = [];
|
||||
|
@@ -253,7 +253,7 @@ class manager implements manager_interface
|
||||
{
|
||||
$this->available_packages = $this->cache->get('_composer_' . $this->package_type . '_available');
|
||||
|
||||
if (!$this->available_packages)
|
||||
if (true || !$this->available_packages)
|
||||
{
|
||||
$this->available_packages = $this->installer->get_available_packages($this->package_type);
|
||||
$this->cache->put('_composer_' . $this->package_type . '_available', $this->available_packages, 24*60*60);
|
||||
|
Reference in New Issue
Block a user