Skip to content

PHPStan 0.11 --> 0.12: Much slower scanning when using baseline file #2790

@ericpoe

Description

@ericpoe

Bug report

Old, yet active, project that started in PHP 5.4 and is now using PHP 7.1.

PHPStan 0.11 finds 10526 errors at max level (level 7). Scan times are 1m16s without a baseline file and 7m46s with a baseline file.

PHPStan 0.12 finds 27215 errors (2.6 times more errors) at max level (level 8). Scan times are 2m24s (1.9 times longer) without a baseline file and 129m37s with a baseline file (16.7 times longer).

Code snippet that reproduces the problem

# phpstan.neon

includes:
    - phpstan-baseline.neon
parameters:
    inferPrivatePropertyTypeFromConstructor: true
    paths:
        - src
    level: max
# Scan using phpstan
phpstan analyze --memory-limit=-1

Expected output

Since there are 2.6x more errors reported under 0.12 than under 0.11, one could expect a similar increase in the time it takes to scan using the baseline.

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