1
我有一个非常简单的项目使用Symfony组件,并在控制台中显示消息。Symfony OutputFormatterStyle“闪烁”不闪烁
它声明标准ConsoleOutput
这样的:
$this->output = new ConsoleOutput();
$formatter = $this->output->getFormatter();
$formatter->setStyle('blink', new OutputFormatterStyle(null, null, array('blink')));
$formatter->setStyle('bold', new OutputFormatterStyle(null, null, array('bold')));
当我尝试显示消息“闪烁”
$this->output->writeln(sprintf('%s<blink>...</blink>', $message));
它没有“闪烁”,它显示标准格式的文本。首先,我认为这是我自己的终端问题,但它是我检查的第二台计算机,它根本不闪烁。
我测试增加了一个大胆的+眨眼格式,这样
OutputFormatterStyle(null, null, ['bold', 'blink']);
,结果是一个大胆的文字,不闪烁。
如果您要访问的完整代码,它在这里:https://github.com/akeneo/nelson/blob/master/src/Akeneo/System/AbstractConsoleLogger.php#L29
有不支持闪烁文字许多终端。检查你的终端是否支持它。 –