Skip to content

Internal error: "PrestaShop/PrestaShop/classes/PrestaShopAutoload.php(143) : eval()'d code" is not a file in file #7647

@Progi1984

Description

@Progi1984

Bug report

With the update of PHPStan from 1.7.4 to 1.8.1 (the bug appeared in 1.7.5), a new error is appeared

Error: Internal error: Internal error: "/home/runner/work/PrestaShop/PrestaShop/classes/PrestaShopAutoload.php(143) : eval()'d code" is not a file in file /home/runner/work/PrestaShop/PrestaShop/classes/ConfigurationTest.php

Link : https://github.com/PrestaShop/PrestaShop/runs/7357656194?check_suite_focus=true#step:8:1

The error message is the same than @tom-combet in #7445.

I think PHPStan badly interprets the autoloader of PrestaShop : https://github.com/PrestaShop/PrestaShop/blob/develop/classes/PrestaShopAutoload.php#L143

Code snippet that reproduces the problem

I think I have a reproducible bug : https://phpstan.org/r/1e2d8d54-c206-407f-9d3e-77f17fbfdd48

Expected output

PHPStan should detect the class D.

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

Thanks for your work.

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