Skip to content

[Var dumper] Add link only when terminal supports it #32653

Closed
@Chi-teck

Description

@Chi-teck

Symfony version(s) affected: 4.4

Description
This probably was introduced in #30301. Links in CLI is a great thing by it should fail gracefully when not supported.

How to reproduce
Run the following script in Gnome Terminal 3.6.2.

<?php

use Symfony\Component\VarDumper\VarDumper;

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

class Foo {}
VarDumper::dump(new Foo());

The output would be like follows:
dump

Possible Solution
Render links only if user terminal supports it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions