Skip to content

[Console][Table] Fix unnecessary wrapping #1

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

Closed
wants to merge 1 commit into from

Conversation

schlndh
Copy link
Owner

@schlndh schlndh commented Jul 27, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues
License MIT

This PR fixes unnecessary wrapping of Table cells which contain newlines. It's based on symfony#61242, because there would be conflicts otherwise.

Example:

<?php

require_once __DIR__ . '/vendor/autoload.php';

$output = new \Symfony\Component\Console\Output\ConsoleOutput();
$table = new \Symfony\Component\Console\Helper\Table($output);
$table->setColumnMaxWidth(0, 20);
$table->addRow(["First line: <info>1234</info>\nSecond line: 4568"]);
$table->render();
6.4 This PR
symfony_table_64 symfony_table_fixed

@schlndh schlndh closed this Jul 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy