Skip to content

Negative result of class_exist should be forgotten #12094

@VincentLanglet

Description

@VincentLanglet

Bug report

From #12089 (comment)

Code snippet that reproduces the problem

https://phpstan.org/r/55aa1c4a-f206-427e-91ba-111b97ac2f2c

Expected output

No error,

Since the cache->load method might have loaded some classes ; we shouldn't rely on the previous result of class_exists method.

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

This tool is awesome and detect lot of bugs. That's why it was introduced on twig/twig yesterday.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions