Skip to content

Import order causes incorrect type to be used #1729

@holtkamp

Description

@holtkamp
Subject Details
PHP version 7.3.7
Full Command ./vendor/bin/phpunit ./tests/Rector/Property/InjectAnnotationClassRector

Current Behaviour

Error in unit test in branch https://github.com/holtkamp/rector/tree/patch-intermixed-types

Minimal PHP Code Causing Issue

See test.

This is difficult to explain in words.

It seems that the order of the imports / use statements influences which type is used for a node.

Expected Behaviour

I would expect that the proper type is used.

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