Skip to content

Cannot declare class Composer\InstalledVersions #8117

@benblub

Description

@benblub

Bug report

After Upgrading phpstan/phpstan (1.8.2 => 1.8.7)
When I execute phpstan i get the error

PHP Fatal error:  Cannot declare class Composer\InstalledVersions, because the name is already in use in /app/vendor/composer/InstalledVersions.php on line 25
Fatal error: Cannot declare class Composer\InstalledVersions, because the name is already in use in /app/vendor/composer/InstalledVersions.php on line 25

1.8.2 and older versions works fine
The prob occurs in 1.8.3 - 1.8.7

Symfony/ApiPlatform Project.

Code snippet that reproduces the problem

phpstan

Expected output

normal stan output

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