Skip to content

Commit

Permalink
minor #27868 improve deprecation messages (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

improve deprecation messages

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

a3845c7 improve deprecation messages
  • Loading branch information
xabbuh committed Jul 9, 2018
2 parents 766e49d + 73b664f commit c8eb96f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ protected function doRenderException(\Exception $e, OutputInterface $output)
*/
protected function getTerminalWidth()
{
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);

return $this->terminal->getWidth();
}
Expand All @@ -821,7 +821,7 @@ protected function getTerminalWidth()
*/
protected function getTerminalHeight()
{
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);

return $this->terminal->getHeight();
}
Expand All @@ -835,7 +835,7 @@ protected function getTerminalHeight()
*/
public function getTerminalDimensions()
{
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);

return array($this->terminal->getWidth(), $this->terminal->getHeight());
}
Expand All @@ -854,7 +854,7 @@ public function getTerminalDimensions()
*/
public function setTerminalDimensions($width, $height)
{
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED);

putenv('COLUMNS='.$width);
putenv('LINES='.$height);
Expand Down

0 comments on commit c8eb96f

Please sign in to comment.