Skip to content

Internal error when importing PackageVersions\Versions #5157

@iluuu1994

Description

@iluuu1994

Bug report

PHPStan triggers an internal error when importing PackageVersions\Versions.

This happens since PHPStan 0.12.89.

Code snippet that reproduces the problem

The website won't let me share it because it errors but this example is enough to trigger it:

<?php

use PackageVersions\Versions;

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

Expected output

No error

Did PHPStan help you today? Did it make you happy in any way?

You already know that I love PHPStan ❤️

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