Skip to content

Find a way to handle relative file paths in phpstans checkstyle report in combination with full paths from other reports. #57

@calbrecht

Description

@calbrecht

Parsing a checkstyle report from phpstan together with reports that have absolute paths for files results in lot of warnings and finally in out of memory error.

Warning: strrpos(): Offset is greater than the length of haystack string 
in /home/user/path/to/PHP_CodeBrowser/src/PHPCodeBrowser/View/ViewAbstract.php on line 228
...
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 98566152 bytes) 
in /home/user/path/to/PHP_CodeBrowser/src/PHPCodeBrowser/View/ViewAbstract.php on line 230```

The reason is the common ancestor logic where phpcb tries to find a common ancestor between relative and full paths.

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