Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Console] Wrapping cell text with setColumnMaxWidth could work better for console links #45521

Open
ondrejmirtes opened this issue Feb 23, 2022 · 0 comments

Comments

@ondrejmirtes
Copy link
Contributor

@ondrejmirtes ondrejmirtes commented Feb 23, 2022

Symfony version(s) affected

5.4.3, 6.x possibly too

Description

Given a cell text that roughly looks like this:

Method PHPStan\Command\ErrorsConsoleStyle::wrap() is unused.\n
✏️ <href=phpstorm://...long link...>src/Command/ErrorsConsoleStyle.php</>

The resulting output is:

 ------ -----------------------------------------------------------------------------
  Line   src/Command/ErrorsConsoleStyle.php
 ------ -----------------------------------------------------------------------------
  83     Method PHPStan\Command\ErrorsConsoleStyle::wrap() is unused.
         ✏️  src/Com
         mand/ErrorsConsoleStyle.php
 ------ -----------------------------------------------------------------------------

But I'd like it to be this:

 ------ -----------------------------------------------------------------------------
  Line   src/Command/ErrorsConsoleStyle.php
 ------ -----------------------------------------------------------------------------
  83     Method PHPStan\Command\ErrorsConsoleStyle::wrap() is unused.
         ✏️  src/Command/ErrorsConsoleStyle.php
 ------ -----------------------------------------------------------------------------

How to reproduce

In context of SymfonyStyle child class:

		$table = $this->createTable();
		$table->setHeaders($headers);
		$table->setRows($rows);
		$table->setColumnMaxWidth(1, 60);

		$table->render();

Possible Solution

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants