diff --git a/phpBB/phpbb/composer/extension_manager.php b/phpBB/phpbb/composer/extension_manager.php index cc9c5ba55c..a1f67c6681 100644 --- a/phpBB/phpbb/composer/extension_manager.php +++ b/phpBB/phpbb/composer/extension_manager.php @@ -97,7 +97,7 @@ class extension_manager extends manager { if ($this->enable_on_install) { - $io->writeError(['ENABLING_EXTENSIONS', [], 1], true); + $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true); foreach ($packages as $package) { try @@ -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, 1); $this->enabled_extensions = []; foreach ($packages as $package) { @@ -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, 1); foreach ($this->enabled_extensions as $package) { try @@ -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, 1); } foreach ($packages as $package) @@ -239,7 +239,7 @@ class extension_manager extends manager if ($this->extension_manager->is_enabled($package)) { $enabled = true; - $io->writeError('DISABLING_EXTENSION', true, 1); + $io->writeError([['DISABLING_EXTENSIONS', [], 1]], true, 1); $this->extension_manager->disable($package); } @@ -274,7 +274,7 @@ class extension_manager extends manager { try { - $io->writeError('ENABLING_EXTENSION', true, 1); + $io->writeError([['ENABLING_EXTENSIONS', [], 1]], true, 1); $this->extension_manager->enable($package); } catch (\Exception $e) diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php index 5431d3210d..d3066f969d 100644 --- a/phpBB/phpbb/composer/io/html_output_formatter.php +++ b/phpBB/phpbb/composer/io/html_output_formatter.php @@ -15,6 +15,36 @@ namespace phpbb\composer\io; class html_output_formatter extends \Composer\Console\HtmlOutputFormatter { + protected static $availableForegroundColors = [ + 30 => 'black', + 31 => 'red', + 32 => 'green', + 33 => 'yellow', + 34 => 'blue', + 35 => 'magenta', + 36 => 'cyan', + 37 => 'white' + ]; + + protected static $availableBackgroundColors = [ + 40 => 'black', + 41 => 'red', + 42 => 'green', + 43 => 'yellow', + 44 => 'blue', + 45 => 'magenta', + 46 => 'cyan', + 47 => 'white' + ]; + + protected static $availableOptions = [ + 1 => 'bold', + 4 => 'underscore', + //5 => 'blink', + //7 => 'reverse', + //8 => 'conceal' + ]; + /** * {@inheritdoc} */ @@ -24,4 +54,28 @@ class html_output_formatter extends \Composer\Console\HtmlOutputFormatter return preg_replace_callback("{[\033\e]\[([0-9;]+)m(.*?)[\033\e]\[[0-9;]+m}s", array($this, 'formatHtml'), $formatted); } + + protected function formatHtml($matches) + { + $out = ''.$matches[2].''; + } } diff --git a/phpBB/phpbb/composer/io/translate_composer_trait.php b/phpBB/phpbb/composer/io/translate_composer_trait.php index 0f2d6f8e64..64f69263e9 100644 --- a/phpBB/phpbb/composer/io/translate_composer_trait.php +++ b/phpBB/phpbb/composer/io/translate_composer_trait.php @@ -114,7 +114,7 @@ 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, ' Problem ') === 0) {