You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327
621
621
if (defined('HHVM_VERSION') && $width > 1 << 31) {
622
622
$width = 1 << 31;
@@ -676,34 +676,56 @@ public function renderException(\Exception $e, OutputInterface $output)
676
676
}
677
677
}
678
678
679
+
/**
680
+
* Returns the current terminal.
681
+
*
682
+
* @return Terminal
683
+
*/
684
+
publicfunctiongetTerminal()
685
+
{
686
+
return$this->terminal;
687
+
}
688
+
679
689
/**
680
690
* Tries to figure out the terminal width in which this application runs.
681
691
*
682
692
* @return int|null
693
+
*
694
+
* @deprecated since version 3.2, to be removed in 4.0. Use the getTerminal() method instead.
683
695
*/
684
696
protectedfunctiongetTerminalWidth()
685
697
{
698
+
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Use getTerminal() instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
699
+
686
700
return$this->terminal->getWidth();
687
701
}
688
702
689
703
/**
690
704
* Tries to figure out the terminal height in which this application runs.
691
705
*
692
706
* @return int|null
707
+
*
708
+
* @deprecated since version 3.2, to be removed in 4.0. Use the getTerminal() method instead.
693
709
*/
694
710
protectedfunctiongetTerminalHeight()
695
711
{
712
+
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Use getTerminal() instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
713
+
696
714
return$this->terminal->getHeight();
697
715
}
698
716
699
717
/**
700
718
* Tries to figure out the terminal dimensions based on the current environment.
701
719
*
702
720
* @return array Array containing width and height
721
+
*
722
+
* @deprecated since version 3.2, to be removed in 4.0. Use the getTerminal() method instead.
703
723
*/
704
724
publicfunctiongetTerminalDimensions()
705
725
{
706
-
return$this->terminal->getDimensions();
726
+
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Use getTerminal() instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Use getTerminal() instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
$this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions');
0 commit comments