Skip to content

Show absolute file links when output is not decorated #8

@ruudk

Description

@ruudk

PHPStan 1.12.4 will ship with a Output::isDecorated method.

We should check if isDecorated method exists on $output. Then check if the output is decorated or not. If the method does not exist, we should assume the output is decorated.

When the output is not decorated, we should pick LINK_FORMAT_WITHOUT_EDITOR for the link:

if ($editorUrl === null) {
$format = self::LINK_FORMAT_WITHOUT_EDITOR;
}

The result will be that when --no-ansi is used, the links are not truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions