mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/11150] Makes composer output level configurable
PHPBB3-11150
This commit is contained in:
committed by
Tristan Darricau
parent
972f3a7ff4
commit
9a836b5901
@@ -106,11 +106,11 @@ class extension_manager extends manager
|
||||
}
|
||||
catch (\phpbb\exception\runtime_exception $e)
|
||||
{
|
||||
$io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
|
||||
$io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$io->writeError($e->getMessage(), true, 4);
|
||||
$io->writeError([[$e->getMessage(), [], 4]], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ class extension_manager extends manager
|
||||
*/
|
||||
protected function pre_update(array $packages, IOInterface $io = null)
|
||||
{
|
||||
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
|
||||
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
|
||||
$this->enabled_extensions = [];
|
||||
foreach ($packages as $package)
|
||||
{
|
||||
@@ -135,11 +135,11 @@ class extension_manager extends manager
|
||||
}
|
||||
catch (\phpbb\exception\runtime_exception $e)
|
||||
{
|
||||
$io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
|
||||
$io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$io->writeError($e->getMessage(), true, 4);
|
||||
$io->writeError([[$e->getMessage(), [], 4]], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ class extension_manager extends manager
|
||||
*/
|
||||
protected function post_update(array $packages, IOInterface $io = null)
|
||||
{
|
||||
$io->writeError([['ENABLING_EXTENSIONS', [], 1]], true, 1);
|
||||
$io->writeError([['ENABLING_EXTENSIONS', [], 1]], true);
|
||||
foreach ($this->enabled_extensions as $package)
|
||||
{
|
||||
try
|
||||
@@ -158,11 +158,11 @@ class extension_manager extends manager
|
||||
}
|
||||
catch (\phpbb\exception\runtime_exception $e)
|
||||
{
|
||||
$io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
|
||||
$io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$io->writeError($e->getMessage(), true, 4);
|
||||
$io->writeError([[$e->getMessage(), [], 4]], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,7 +190,7 @@ class extension_manager extends manager
|
||||
{
|
||||
if ($this->purge_on_remove)
|
||||
{
|
||||
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
|
||||
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
|
||||
}
|
||||
|
||||
foreach ($packages as $package)
|
||||
@@ -211,11 +211,11 @@ class extension_manager extends manager
|
||||
}
|
||||
catch (\phpbb\exception\runtime_exception $e)
|
||||
{
|
||||
$io->writeError([$e->getMessage(), $e->get_parameters()], true, 4);
|
||||
$io->writeError([[$e->getMessage(), $e->get_parameters(), 4]], true);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$io->writeError($e->getMessage(), true, 4);
|
||||
$io->writeError([[$e->getMessage(), [], 4]], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,7 +239,7 @@ class extension_manager extends manager
|
||||
if ($this->extension_manager->is_enabled($package))
|
||||
{
|
||||
$enabled = true;
|
||||
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1);
|
||||
$io->writeError([['DISABLING_EXTENSIONS', [], 1]], true);
|
||||
$this->extension_manager->disable($package);
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ class extension_manager extends manager
|
||||
{
|
||||
try
|
||||
{
|
||||
$io->writeError([['ENABLING_EXTENSIONS', [], 1]], true, 1);
|
||||
$io->writeError([['ENABLING_EXTENSIONS', [], 1]], true);
|
||||
$this->extension_manager->enable($package);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
|
@@ -16,6 +16,9 @@ namespace phpbb\composer\io;
|
||||
use phpbb\language\language;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Trait to translate the composer Output
|
||||
*/
|
||||
trait translate_composer_trait
|
||||
{
|
||||
/**
|
||||
@@ -54,9 +57,13 @@ trait translate_composer_trait
|
||||
$parameters = [];
|
||||
}
|
||||
|
||||
$message = trim($this->strip_format($message), "\n\r");
|
||||
$message = trim($this->strip_format($lang_key), "\n\r");
|
||||
|
||||
if (strpos($message, 'Deleting ') === 0)
|
||||
if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_DEBUG)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
else if (strpos($message, 'Deleting ') === 0)
|
||||
{
|
||||
$elements = explode(' ', $message);
|
||||
$lang_key = 'COMPOSER_DELETING';
|
||||
@@ -116,7 +123,11 @@ trait translate_composer_trait
|
||||
|
||||
$message = trim($this->strip_format($lang_key), "\n\r");
|
||||
|
||||
if (strpos($message, ' Problem ') === 0)
|
||||
if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_DEBUG)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
else if (strpos($message, ' Problem ') === 0)
|
||||
{
|
||||
if ($this->output->getVerbosity() < OutputInterface::VERBOSITY_VERBOSE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user