Skip to content

Cannot generate the baseline when the existing baseline contains errors #14064

@theofidry

Description

@theofidry

Reproducer:

  • Have a project with a baseline and reportUnmatchedIgnoredErrors=true
  • Move around some files that are contained in the baseline: PHPStan should now fail with something along the lines of Path "/path/to/moved-file.php" is neither a directory, nor a file path, nor a fnmatch pattern. (expected)
  • Generate the baseline again with --generate-baseline

I would expect PHPStan to be able to update the baseline directly. Instead, currently it fails. So in order to generate the baseline again I need to remove those entries from the baseline first.

I have hit this case in infection, if it's not a standard behaviour let me know and I'll work on providing a better reproducer.

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